示例#1
0
 def render_view(self, field, value, REQUEST=None, render_prefix=None):
     """
   Render form in view only mode.
 """
     if value is None:
         value = ''
     return render_element("div",
                           css_class=field.get_value('css_class'),
                           contents=value,
                           extra=field.get_value('extra'))
示例#2
0
 def render_view(self, field, value, REQUEST=None, render_prefix=None):
   """
     Render form in view only mode.
   """
   if value is None:
     value = ''
   return render_element("div",
                         css_class=field.get_value('css_class'),
                         contents=value,
                         extra=field.get_value('extra'))
 def render(self, field, key, value, REQUEST):
     """Render text input field.
     """
     kw = {'type': "text",
           'name' : key,
           'css_class' : field.get_value('css_class'),
           'value' : value is not None and value.__identifier__ or "",
           'size' : 20,
           'id': field.generate_field_html_id(key)}
     return render_element("input", **kw)
示例#4
0
 def render(self, field, key, value, REQUEST):
     """Render text input field.
     """
     kw = {
         'type': "text",
         'name': key,
         'css_class': field.get_value('css_class'),
         'value': value is not None and value.__identifier__ or "",
         'size': 20,
         'id': field.generate_field_html_id(key)
     }
     return render_element("input", **kw)
示例#5
0
 def render_view(self, field, value, REQUEST=None, render_prefix=None):
     return render_element("a",
                           href=field.get_value('href'),
                           css_class=field.get_value('css_class'),
                           contents=field.get_value('default'),
                           extra=field.get_value('extra'))
示例#6
0
 def render_view(self, field, value, REQUEST=None, render_prefix=None):
     return render_element("a",
                           href=field.get_value('href'),
                           css_class=field.get_value('css_class'),
                           contents=field.get_value('default'),
                           extra=field.get_value('extra'))