annotate data/plugin/macro/FormTextarea.py @ 628:819c4121f9a0

FormCreate/FormSubmit: change to LF-only line endings
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 25 Mar 2013 19:48:31 +0100
parents e6a6740166c8
children
rev   line source
628
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
1 # -*- coding: iso-8859-1 -*-
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
2 """
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
3 MoinMoin - FormTextarea Macro
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
4
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
5 @copyright: 2008 by Peter Bodi <petrdll@centrum.sk>
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
6 @license: GNU GPL, see COPYING for details.
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
7 """
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
8
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
9 from FormField import FormField
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
10
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
11
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
12 class FormTextarea(FormField):
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
13
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
14 def __init__(self, macro, args):
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
15 FormField.__init__(self, macro, args)
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
16
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
17 self.rows = ""
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
18 self.cols = ""
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
19 self.disabled = ""
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
20 self.readonly = ""
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
21
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
22 def build(self):
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
23 FormField.build(self)
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
24 #self.output += self._build_input("hidden", "labels[]", {'value':self.label})
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
25 self.output += "<textarea name=\"%(label)s\" %(attribs)s></textarea>" % {
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
26 'attribs': self._build_attribs(self._attribs), 'label': self.label}
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
27
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
28
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
29 def execute(macro, args):
819c4121f9a0 FormCreate/FormSubmit: change to LF-only line endings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 618
diff changeset
30 return FormTextarea(macro, args).render()