1<?php
2/**
3 * Class helper_plugin_bureaucracy_fieldtextarea
4 *
5 * Creates a multi-line input field
6 */
7class helper_plugin_bureaucracy_fieldtextarea extends helper_plugin_bureaucracy_field {
8    /**
9     * Arguments:
10     *  - cmd
11     *  - label
12     *  - x123 (optional) as number of lines
13     *  - ^ (optional)
14     */
15    public function initialize($args) {
16        parent::initialize($args);
17        if (!isset($this->opt['class'])) {
18            $this->opt['class'] = '';
19        }
20        $this->opt['class'] .= ' textareafield';
21    }
22
23    protected $tpl =
24'<label class="@@CLASS@@">
25    <span>@@DISPLAY@@</span>
26    <textarea name="@@NAME@@" id="@@ID@@" rows="@@ROWS|10@@" cols="10" class="edit @@OPTIONAL|required" required="required@@">@@VALUE@@</textarea>
27</label>';
28
29}
30