summaryrefslogtreecommitdiff
path: root/platform/www/lib/plugins/bureaucracy/helper/fieldtextarea.php
diff options
context:
space:
mode:
Diffstat (limited to 'platform/www/lib/plugins/bureaucracy/helper/fieldtextarea.php')
-rw-r--r--platform/www/lib/plugins/bureaucracy/helper/fieldtextarea.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/platform/www/lib/plugins/bureaucracy/helper/fieldtextarea.php b/platform/www/lib/plugins/bureaucracy/helper/fieldtextarea.php
new file mode 100644
index 0000000..0dfcce2
--- /dev/null
+++ b/platform/www/lib/plugins/bureaucracy/helper/fieldtextarea.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Class helper_plugin_bureaucracy_fieldtextarea
+ *
+ * Creates a multi-line input field
+ */
+class helper_plugin_bureaucracy_fieldtextarea extends helper_plugin_bureaucracy_field {
+ /**
+ * Arguments:
+ * - cmd
+ * - label
+ * - x123 (optional) as number of lines
+ * - ^ (optional)
+ */
+ public function initialize($args) {
+ parent::initialize($args);
+ if (!isset($this->opt['class'])) {
+ $this->opt['class'] = '';
+ }
+ $this->opt['class'] .= ' textareafield';
+ }
+
+ protected $tpl =
+'<label class="@@CLASS@@">
+ <span>@@DISPLAY@@</span>
+ <textarea name="@@NAME@@" id="@@ID@@" rows="@@ROWS|10@@" cols="10" class="edit @@OPTIONAL|required" required="required@@">@@VALUE@@</textarea>
+</label>';
+
+}