示例#1
0
 def textarea(self, name, content="", id=NotGiven, **attrs):
     """
     Return a textarea tag.
     """
     name = self._get_name(name)
     return tags.textarea(name, self.value(name, content),
                          self._get_id(id, name), **attrs)
示例#2
0
 def textarea(self, name, content="", id=None, **attrs):
     """
     Outputs <textarea> element.
     """
     id = id or name
     attrs.update(self.validation_attrs(name))
     return tags.textarea(name, self.value(name, content), id, **attrs)
示例#3
0
 def textarea(self, name, content="", id=NotGiven, **attrs):
     """
     Return a textarea tag.
     """
     name = self._get_name(name)
     return tags.textarea(name,
                          self.value(name, content),
                          self._get_id(id, name),
                          **attrs)
    def textarea(self, name, content="", id=None, **attrs):
        """
        Outputs <textarea> element.
        """

        return tags.textarea(
            name, 
            self.value(name, content), 
            self._get_id(id, name), 
            **attrs
        )
def text_area(name, content='', **options):
    """
    Creates a text input area.

    Options:

    * ``size`` - A string specifying the dimensions of the textarea.

    Example::

        >>> print(text_area("Body", '', size="25x10"))
        <textarea cols="25" id="Body" name="Body" rows="10"></textarea>
    """
    _update_fa(options, name)
    if 'size' in options:
        options["cols"], options["rows"] = options["size"].split("x")
        del options['size']
    return textarea(name, content=content, **options)
示例#6
0
def text_area(name, content='', **options):
    """
    Creates a text input area.

    Options:

    * ``size`` - A string specifying the dimensions of the textarea.

    Example::

        >>> print(text_area("Body", '', size="25x10"))
        <textarea cols="25" id="Body" name="Body" rows="10"></textarea>
    """
    _update_fa(options, name)
    if 'size' in options:
        options["cols"], options["rows"] = options["size"].split("x")
        del options['size']
    return textarea(name, content=content, **options)
示例#7
0
 def render(self, **kwargs):
     value = self.value and self.value or ''
     vars = dict(name=self.name, value=value)
     richtextfield.need()
     return textarea(name=self.name, content=value, id=self.name, class_='tinymceEditor', cols="80", rows="40")
示例#8
0
 def render_html(self):
     displayval = self.displayval if self.displayval or self.displayval == 0 else ''
     return tags.textarea(self.nameattr or self.id, displayval, **self.attributes)