@@ -16,27 +16,27 @@ |
||
16 | 16 | */ |
17 | 17 | class SmartFormFileUploadElement extends SmartFormUploadElement |
18 | 18 | { |
19 | - /** |
|
20 | - * SmartFormFileUploadElement constructor. |
|
21 | - * @param string $object |
|
22 | - * @param string $key |
|
23 | - */ |
|
24 | - public function __construct($object, $key) |
|
25 | - { |
|
26 | - $this->SmartFormFileElement($object, $key); |
|
27 | - // Override name for upload purposes |
|
28 | - $this->setName('upload_' . $key); |
|
29 | - } |
|
19 | + /** |
|
20 | + * SmartFormFileUploadElement constructor. |
|
21 | + * @param string $object |
|
22 | + * @param string $key |
|
23 | + */ |
|
24 | + public function __construct($object, $key) |
|
25 | + { |
|
26 | + $this->SmartFormFileElement($object, $key); |
|
27 | + // Override name for upload purposes |
|
28 | + $this->setName('upload_' . $key); |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * prepare HTML for output |
|
33 | - * |
|
34 | - * @return string HTML |
|
35 | - */ |
|
36 | - public function render() |
|
37 | - { |
|
38 | - return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' /> |
|
31 | + /** |
|
32 | + * prepare HTML for output |
|
33 | + * |
|
34 | + * @return string HTML |
|
35 | + */ |
|
36 | + public function render() |
|
37 | + { |
|
38 | + return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' /> |
|
39 | 39 | <input type='file' name='upload_" . $this->getName() . "' id='upload_" . $this->getName() . "'" . $this->getExtra() . " /> |
40 | 40 | <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName() . "' />"; |
41 | - } |
|
41 | + } |
|
42 | 42 | } |
@@ -11,20 +11,20 @@ |
||
11 | 11 | */ |
12 | 12 | class SmartFormLanguageElement extends XoopsFormSelectLang |
13 | 13 | { |
14 | - /** |
|
15 | - * SmartFormLanguageElement constructor. |
|
16 | - * @param string $object |
|
17 | - * @param string $key |
|
18 | - */ |
|
19 | - public function __construct($object, $key) |
|
20 | - { |
|
21 | - $var = $object->vars[$key]; |
|
22 | - $control = $object->controls[$key]; |
|
23 | - $all = isset($control['all']) ? true : false; |
|
14 | + /** |
|
15 | + * SmartFormLanguageElement constructor. |
|
16 | + * @param string $object |
|
17 | + * @param string $key |
|
18 | + */ |
|
19 | + public function __construct($object, $key) |
|
20 | + { |
|
21 | + $var = $object->vars[$key]; |
|
22 | + $control = $object->controls[$key]; |
|
23 | + $all = isset($control['all']) ? true : false; |
|
24 | 24 | |
25 | - parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e')); |
|
26 | - if ($all) { |
|
27 | - $this->addOption('all', _ALL); |
|
28 | - } |
|
29 | - } |
|
25 | + parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e')); |
|
26 | + if ($all) { |
|
27 | + $this->addOption('all', _ALL); |
|
28 | + } |
|
29 | + } |
|
30 | 30 | } |
@@ -11,39 +11,39 @@ |
||
11 | 11 | */ |
12 | 12 | class SmartFormRichFileElement extends XoopsFormElementTray |
13 | 13 | { |
14 | - /** |
|
15 | - * SmartFormRichFileElement constructor. |
|
16 | - * @param string $form_caption |
|
17 | - * @param string $key |
|
18 | - * @param string $object |
|
19 | - */ |
|
20 | - public function __construct($form_caption, $key, $object) |
|
21 | - { |
|
22 | - parent::__construct($form_caption, ' '); |
|
23 | - if ($object->getVar('url') != '') { |
|
24 | - $caption = $object->getVar('caption') != '' ? $object->getVar('caption') : $object->getVar('url'); |
|
25 | - $this->addElement(new XoopsFormLabel('', _CO_SOBJECT_CURRENT_FILE . "<a href='" . str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar('url')) . "' target='_blank' >" . $caption . '</a><br/><br/>')); |
|
26 | - //$this->addElement( new XoopsFormLabel( '', "<br/><a href = '".SMARTOBJECT_URL."admin/file.php?op=del&fileid=".$object->id()."'>"._CO_SOBJECT_DELETE_FILE."</a>")); |
|
27 | - } |
|
14 | + /** |
|
15 | + * SmartFormRichFileElement constructor. |
|
16 | + * @param string $form_caption |
|
17 | + * @param string $key |
|
18 | + * @param string $object |
|
19 | + */ |
|
20 | + public function __construct($form_caption, $key, $object) |
|
21 | + { |
|
22 | + parent::__construct($form_caption, ' '); |
|
23 | + if ($object->getVar('url') != '') { |
|
24 | + $caption = $object->getVar('caption') != '' ? $object->getVar('caption') : $object->getVar('url'); |
|
25 | + $this->addElement(new XoopsFormLabel('', _CO_SOBJECT_CURRENT_FILE . "<a href='" . str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar('url')) . "' target='_blank' >" . $caption . '</a><br/><br/>')); |
|
26 | + //$this->addElement( new XoopsFormLabel( '', "<br/><a href = '".SMARTOBJECT_URL."admin/file.php?op=del&fileid=".$object->id()."'>"._CO_SOBJECT_DELETE_FILE."</a>")); |
|
27 | + } |
|
28 | 28 | |
29 | - include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformfileuploadelement.php'; |
|
30 | - if ($object->isNew()) { |
|
31 | - $this->addElement(new SmartFormFileUploadElement($object, $key)); |
|
32 | - $this->addElement(new XoopsFormLabel('', '<br/><br/><small>' . _CO_SOBJECT_URL_FILE_DSC . '</small>')); |
|
33 | - $this->addElement(new XoopsFormLabel('', '<br/>' . _CO_SOBJECT_URL_FILE)); |
|
34 | - $this->addElement(new SmartFormTextElement($object, 'url_' . $key)); |
|
35 | - } |
|
36 | - $this->addElement(new XoopsFormLabel('', '<br/>' . _CO_SOBJECT_CAPTION)); |
|
37 | - $this->addElement(new SmartFormTextElement($object, 'caption_' . $key)); |
|
38 | - $this->addElement(new XoopsFormLabel('', '<br/>' . _CO_SOBJECT_DESC . '<br/>')); |
|
39 | - $this->addElement(new XoopsFormTextArea('', 'desc_' . $key, $object->getVar('description'))); |
|
29 | + include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformfileuploadelement.php'; |
|
30 | + if ($object->isNew()) { |
|
31 | + $this->addElement(new SmartFormFileUploadElement($object, $key)); |
|
32 | + $this->addElement(new XoopsFormLabel('', '<br/><br/><small>' . _CO_SOBJECT_URL_FILE_DSC . '</small>')); |
|
33 | + $this->addElement(new XoopsFormLabel('', '<br/>' . _CO_SOBJECT_URL_FILE)); |
|
34 | + $this->addElement(new SmartFormTextElement($object, 'url_' . $key)); |
|
35 | + } |
|
36 | + $this->addElement(new XoopsFormLabel('', '<br/>' . _CO_SOBJECT_CAPTION)); |
|
37 | + $this->addElement(new SmartFormTextElement($object, 'caption_' . $key)); |
|
38 | + $this->addElement(new XoopsFormLabel('', '<br/>' . _CO_SOBJECT_DESC . '<br/>')); |
|
39 | + $this->addElement(new XoopsFormTextArea('', 'desc_' . $key, $object->getVar('description'))); |
|
40 | 40 | |
41 | - if (!$object->isNew()) { |
|
42 | - $this->addElement(new XoopsFormLabel('', '<br/>' . _CO_SOBJECT_CHANGE_FILE)); |
|
43 | - $this->addElement(new SmartFormFileUploadElement($object, $key)); |
|
44 | - $this->addElement(new XoopsFormLabel('', '<br/><br/><small>' . _CO_SOBJECT_URL_FILE_DSC . '</small>')); |
|
45 | - $this->addElement(new XoopsFormLabel('', '<br/>' . _CO_SOBJECT_URL_FILE)); |
|
46 | - $this->addElement(new SmartFormTextElement($object, 'url_' . $key)); |
|
47 | - } |
|
48 | - } |
|
41 | + if (!$object->isNew()) { |
|
42 | + $this->addElement(new XoopsFormLabel('', '<br/>' . _CO_SOBJECT_CHANGE_FILE)); |
|
43 | + $this->addElement(new SmartFormFileUploadElement($object, $key)); |
|
44 | + $this->addElement(new XoopsFormLabel('', '<br/><br/><small>' . _CO_SOBJECT_URL_FILE_DSC . '</small>')); |
|
45 | + $this->addElement(new XoopsFormLabel('', '<br/>' . _CO_SOBJECT_URL_FILE)); |
|
46 | + $this->addElement(new SmartFormTextElement($object, 'url_' . $key)); |
|
47 | + } |
|
48 | + } |
|
49 | 49 | } |
@@ -11,23 +11,23 @@ |
||
11 | 11 | */ |
12 | 12 | class SmartFormTimeElement extends XoopsFormSelect |
13 | 13 | { |
14 | - /** |
|
15 | - * SmartFormTimeElement constructor. |
|
16 | - * @param string $object |
|
17 | - * @param string $key |
|
18 | - */ |
|
19 | - public function __construct($object, $key) |
|
20 | - { |
|
21 | - $var = $object->vars[$key]; |
|
22 | - $timearray = array(); |
|
23 | - for ($i = 0; $i < 24; ++$i) { |
|
24 | - for ($j = 0; $j < 60; $j = $j + 10) { |
|
25 | - $key_t = ($i * 3600) + ($j * 60); |
|
26 | - $timearray[$key_t] = ($j != 0) ? $i . ':' . $j : $i . ':0' . $j; |
|
27 | - } |
|
28 | - } |
|
29 | - ksort($timearray); |
|
30 | - parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e')); |
|
31 | - $this->addOptionArray($timearray); |
|
32 | - } |
|
14 | + /** |
|
15 | + * SmartFormTimeElement constructor. |
|
16 | + * @param string $object |
|
17 | + * @param string $key |
|
18 | + */ |
|
19 | + public function __construct($object, $key) |
|
20 | + { |
|
21 | + $var = $object->vars[$key]; |
|
22 | + $timearray = array(); |
|
23 | + for ($i = 0; $i < 24; ++$i) { |
|
24 | + for ($j = 0; $j < 60; $j = $j + 10) { |
|
25 | + $key_t = ($i * 3600) + ($j * 60); |
|
26 | + $timearray[$key_t] = ($j != 0) ? $i . ':' . $j : $i . ':0' . $j; |
|
27 | + } |
|
28 | + } |
|
29 | + ksort($timearray); |
|
30 | + parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e')); |
|
31 | + $this->addOptionArray($timearray); |
|
32 | + } |
|
33 | 33 | } |
@@ -1,34 +1,34 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Contains the set password tray class |
|
4 | - * |
|
5 | - * @license GNU |
|
6 | - * @author marcan <[email protected]> |
|
7 | - * @link http://smartfactory.ca The SmartFactory |
|
8 | - * @package SmartObject |
|
9 | - * @subpackage SmartObjectForm |
|
10 | - */ |
|
3 | + * Contains the set password tray class |
|
4 | + * |
|
5 | + * @license GNU |
|
6 | + * @author marcan <[email protected]> |
|
7 | + * @link http://smartfactory.ca The SmartFactory |
|
8 | + * @package SmartObject |
|
9 | + * @subpackage SmartObjectForm |
|
10 | + */ |
|
11 | 11 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
12 | 12 | |
13 | 13 | class SmartFormUser_sigElement extends XoopsFormElementTray |
14 | 14 | { |
15 | - /** |
|
16 | - * SmartFormUser_sigElement constructor. |
|
17 | - * @param string $object |
|
18 | - * @param string $key |
|
19 | - */ |
|
20 | - public function __construct($object, $key) |
|
21 | - { |
|
22 | - $var = $object->vars[$key]; |
|
23 | - $control = $object->controls[$key]; |
|
15 | + /** |
|
16 | + * SmartFormUser_sigElement constructor. |
|
17 | + * @param string $object |
|
18 | + * @param string $key |
|
19 | + */ |
|
20 | + public function __construct($object, $key) |
|
21 | + { |
|
22 | + $var = $object->vars[$key]; |
|
23 | + $control = $object->controls[$key]; |
|
24 | 24 | |
25 | - parent::__construct($var['form_caption'], '<br /><br />', $key . '_signature_tray'); |
|
25 | + parent::__construct($var['form_caption'], '<br /><br />', $key . '_signature_tray'); |
|
26 | 26 | |
27 | - $signature_textarea = new XoopsFormDhtmlTextArea('', $key, $object->getVar($key, 'e')); |
|
28 | - $this->addElement($signature_textarea); |
|
27 | + $signature_textarea = new XoopsFormDhtmlTextArea('', $key, $object->getVar($key, 'e')); |
|
28 | + $this->addElement($signature_textarea); |
|
29 | 29 | |
30 | - $attach_checkbox = new XoopsFormCheckBox('', 'attachsig', $object->getVar('attachsig', 'e')); |
|
31 | - $attach_checkbox->addOption(1, _US_SHOWSIG); |
|
32 | - $this->addElement($attach_checkbox); |
|
33 | - } |
|
30 | + $attach_checkbox = new XoopsFormCheckBox('', 'attachsig', $object->getVar('attachsig', 'e')); |
|
31 | + $attach_checkbox->addOption(1, _US_SHOWSIG); |
|
32 | + $this->addElement($attach_checkbox); |
|
33 | + } |
|
34 | 34 | } |
@@ -11,59 +11,59 @@ |
||
11 | 11 | */ |
12 | 12 | class SmartFormSelectElement extends XoopsFormSelect |
13 | 13 | { |
14 | - public $multiple = false; |
|
14 | + public $multiple = false; |
|
15 | 15 | |
16 | - /** |
|
17 | - * SmartFormSelectElement constructor. |
|
18 | - * @param string $object |
|
19 | - * @param string $key |
|
20 | - */ |
|
21 | - public function __construct($object, $key) |
|
22 | - { |
|
23 | - $var = $object->vars[$key]; |
|
24 | - $size = isset($var['size']) ? $var['size'] : ($this->multiple ? 5 : 1); |
|
16 | + /** |
|
17 | + * SmartFormSelectElement constructor. |
|
18 | + * @param string $object |
|
19 | + * @param string $key |
|
20 | + */ |
|
21 | + public function __construct($object, $key) |
|
22 | + { |
|
23 | + $var = $object->vars[$key]; |
|
24 | + $size = isset($var['size']) ? $var['size'] : ($this->multiple ? 5 : 1); |
|
25 | 25 | |
26 | - // Adding the options inside this SelectBox |
|
27 | - // If the custom method is not from a module, than it's from the core |
|
28 | - $control = $object->getControl($key); |
|
26 | + // Adding the options inside this SelectBox |
|
27 | + // If the custom method is not from a module, than it's from the core |
|
28 | + $control = $object->getControl($key); |
|
29 | 29 | |
30 | - $value = isset($control['value']) ? $control['value'] : $object->getVar($key, 'e'); |
|
30 | + $value = isset($control['value']) ? $control['value'] : $object->getVar($key, 'e'); |
|
31 | 31 | |
32 | - parent::__construct($var['form_caption'], $key, $value, $size, $this->multiple); |
|
32 | + parent::__construct($var['form_caption'], $key, $value, $size, $this->multiple); |
|
33 | 33 | |
34 | - if (isset($control['options'])) { |
|
35 | - $this->addOptionArray($control['options']); |
|
36 | - } else { |
|
37 | - // let's find if the method we need to call comes from an already defined object |
|
38 | - if (isset($control['object'])) { |
|
39 | - if (method_exists($control['object'], $control['method'])) { |
|
40 | - if ($option_array = $control['object']->{$control['method']}()) { |
|
41 | - // Adding the options array to the XoopsFormSelect |
|
42 | - $this->addOptionArray($option_array); |
|
43 | - } |
|
44 | - } |
|
45 | - } else { |
|
46 | - // finding the itemHandler; if none, let's take the itemHandler of the $object |
|
47 | - if (isset($control['itemHandler'])) { |
|
48 | - if (!$control['module']) { |
|
49 | - // Creating the specified core object handler |
|
50 | - $controlHandler = xoops_getHandler($control['itemHandler']); |
|
51 | - } else { |
|
52 | - $controlHandler = xoops_getModuleHandler($control['itemHandler'], $control['module']); |
|
53 | - } |
|
54 | - } else { |
|
55 | - $controlHandler =& $object->handler; |
|
56 | - } |
|
34 | + if (isset($control['options'])) { |
|
35 | + $this->addOptionArray($control['options']); |
|
36 | + } else { |
|
37 | + // let's find if the method we need to call comes from an already defined object |
|
38 | + if (isset($control['object'])) { |
|
39 | + if (method_exists($control['object'], $control['method'])) { |
|
40 | + if ($option_array = $control['object']->{$control['method']}()) { |
|
41 | + // Adding the options array to the XoopsFormSelect |
|
42 | + $this->addOptionArray($option_array); |
|
43 | + } |
|
44 | + } |
|
45 | + } else { |
|
46 | + // finding the itemHandler; if none, let's take the itemHandler of the $object |
|
47 | + if (isset($control['itemHandler'])) { |
|
48 | + if (!$control['module']) { |
|
49 | + // Creating the specified core object handler |
|
50 | + $controlHandler = xoops_getHandler($control['itemHandler']); |
|
51 | + } else { |
|
52 | + $controlHandler = xoops_getModuleHandler($control['itemHandler'], $control['module']); |
|
53 | + } |
|
54 | + } else { |
|
55 | + $controlHandler =& $object->handler; |
|
56 | + } |
|
57 | 57 | |
58 | - // Checking if the specified method exists |
|
59 | - if (method_exists($controlHandler, $control['method'])) { |
|
60 | - // TODO: How could I pass the parameters in the following call ... |
|
61 | - if ($option_array = $controlHandler->{$control['method']}()) { |
|
62 | - // Adding the options array to the XoopsFormSelect |
|
63 | - $this->addOptionArray($option_array); |
|
64 | - } |
|
65 | - } |
|
66 | - } |
|
67 | - } |
|
68 | - } |
|
58 | + // Checking if the specified method exists |
|
59 | + if (method_exists($controlHandler, $control['method'])) { |
|
60 | + // TODO: How could I pass the parameters in the following call ... |
|
61 | + if ($option_array = $controlHandler->{$control['method']}()) { |
|
62 | + // Adding the options array to the XoopsFormSelect |
|
63 | + $this->addOptionArray($option_array); |
|
64 | + } |
|
65 | + } |
|
66 | + } |
|
67 | + } |
|
68 | + } |
|
69 | 69 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $controlHandler = xoops_getModuleHandler($control['itemHandler'], $control['module']); |
48 | 48 | } |
49 | 49 | } else { |
50 | - $controlHandler =& $object->handler; |
|
50 | + $controlHandler = & $object->handler; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | // Checking if the specified method exists |
@@ -11,36 +11,36 @@ |
||
11 | 11 | */ |
12 | 12 | class SmartFormUserElement extends XoopsFormSelect |
13 | 13 | { |
14 | - public $multiple = false; |
|
14 | + public $multiple = false; |
|
15 | 15 | |
16 | - /** |
|
17 | - * SmartFormUserElement constructor. |
|
18 | - * @param string $object |
|
19 | - * @param string $key |
|
20 | - */ |
|
21 | - public function __construct($object, $key) |
|
22 | - { |
|
23 | - $var = $object->vars[$key]; |
|
24 | - $size = isset($var['size']) ? $var['size'] : ($this->multiple ? 5 : 1); |
|
16 | + /** |
|
17 | + * SmartFormUserElement constructor. |
|
18 | + * @param string $object |
|
19 | + * @param string $key |
|
20 | + */ |
|
21 | + public function __construct($object, $key) |
|
22 | + { |
|
23 | + $var = $object->vars[$key]; |
|
24 | + $size = isset($var['size']) ? $var['size'] : ($this->multiple ? 5 : 1); |
|
25 | 25 | |
26 | - parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e'), $size, $this->multiple); |
|
26 | + parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e'), $size, $this->multiple); |
|
27 | 27 | |
28 | - // Adding the options inside this SelectBox |
|
29 | - // If the custom method is not from a module, than it's from the core |
|
30 | - $control = $object->getControl($key); |
|
28 | + // Adding the options inside this SelectBox |
|
29 | + // If the custom method is not from a module, than it's from the core |
|
30 | + $control = $object->getControl($key); |
|
31 | 31 | |
32 | - global $xoopsDB; |
|
33 | - $ret = array(); |
|
34 | - $limit = $start = 0; |
|
35 | - $sql = 'SELECT uid, uname FROM ' . $xoopsDB->prefix('users'); |
|
36 | - $sql .= ' ORDER BY uname ASC'; |
|
32 | + global $xoopsDB; |
|
33 | + $ret = array(); |
|
34 | + $limit = $start = 0; |
|
35 | + $sql = 'SELECT uid, uname FROM ' . $xoopsDB->prefix('users'); |
|
36 | + $sql .= ' ORDER BY uname ASC'; |
|
37 | 37 | |
38 | - $result = $xoopsDB->query($sql); |
|
39 | - if ($result) { |
|
40 | - while ($myrow = $xoopsDB->fetchArray($result)) { |
|
41 | - $uArray[$myrow['uid']] = $myrow['uname']; |
|
42 | - } |
|
43 | - } |
|
44 | - $this->addOptionArray($uArray); |
|
45 | - } |
|
38 | + $result = $xoopsDB->query($sql); |
|
39 | + if ($result) { |
|
40 | + while ($myrow = $xoopsDB->fetchArray($result)) { |
|
41 | + $uArray[$myrow['uid']] = $myrow['uname']; |
|
42 | + } |
|
43 | + } |
|
44 | + $this->addOptionArray($uArray); |
|
45 | + } |
|
46 | 46 | } |
@@ -16,27 +16,27 @@ |
||
16 | 16 | */ |
17 | 17 | class SmartFormImageUploadElement extends SmartFormUploadElement |
18 | 18 | { |
19 | - /** |
|
20 | - * SmartFormImageUploadElement constructor. |
|
21 | - * @param string $object |
|
22 | - * @param string $key |
|
23 | - */ |
|
24 | - public function __construct($object, $key) |
|
25 | - { |
|
26 | - $this->SmartFormFileElement($object, $key); |
|
27 | - // Override name for upload purposes |
|
28 | - $this->setName('upload_' . $key); |
|
29 | - } |
|
19 | + /** |
|
20 | + * SmartFormImageUploadElement constructor. |
|
21 | + * @param string $object |
|
22 | + * @param string $key |
|
23 | + */ |
|
24 | + public function __construct($object, $key) |
|
25 | + { |
|
26 | + $this->SmartFormFileElement($object, $key); |
|
27 | + // Override name for upload purposes |
|
28 | + $this->setName('upload_' . $key); |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * prepare HTML for output |
|
33 | - * |
|
34 | - * @return string HTML |
|
35 | - */ |
|
36 | - public function render() |
|
37 | - { |
|
38 | - return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' /> |
|
31 | + /** |
|
32 | + * prepare HTML for output |
|
33 | + * |
|
34 | + * @return string HTML |
|
35 | + */ |
|
36 | + public function render() |
|
37 | + { |
|
38 | + return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' /> |
|
39 | 39 | <input type='file' name='" . $this->getName() . "' id='" . $this->getName() . "'" . $this->getExtra() . " /> |
40 | 40 | <input type='hidden' name='smart_upload_image[]' id='smart_upload_image[]' value='" . $this->getName() . "' />"; |
41 | - } |
|
41 | + } |
|
42 | 42 | } |
@@ -6,41 +6,41 @@ |
||
6 | 6 | */ |
7 | 7 | class SmartFormSection extends XoopsFormElement |
8 | 8 | { |
9 | - /** |
|
10 | - * Text |
|
11 | - * @var string |
|
12 | - * @access private |
|
13 | - */ |
|
14 | - public $_value; |
|
9 | + /** |
|
10 | + * Text |
|
11 | + * @var string |
|
12 | + * @access private |
|
13 | + */ |
|
14 | + public $_value; |
|
15 | 15 | |
16 | - /** |
|
17 | - * SmartFormSection constructor. |
|
18 | - * @param $sectionname |
|
19 | - * @param bool $value |
|
20 | - */ |
|
21 | - public function __construct($sectionname, $value = false) |
|
22 | - { |
|
23 | - $this->setName($sectionname); |
|
24 | - $this->_value = $value; |
|
25 | - } |
|
16 | + /** |
|
17 | + * SmartFormSection constructor. |
|
18 | + * @param $sectionname |
|
19 | + * @param bool $value |
|
20 | + */ |
|
21 | + public function __construct($sectionname, $value = false) |
|
22 | + { |
|
23 | + $this->setName($sectionname); |
|
24 | + $this->_value = $value; |
|
25 | + } |
|
26 | 26 | |
27 | - /** |
|
28 | - * Get the text |
|
29 | - * |
|
30 | - * @return string |
|
31 | - */ |
|
32 | - public function getValue() |
|
33 | - { |
|
34 | - return $this->_value; |
|
35 | - } |
|
27 | + /** |
|
28 | + * Get the text |
|
29 | + * |
|
30 | + * @return string |
|
31 | + */ |
|
32 | + public function getValue() |
|
33 | + { |
|
34 | + return $this->_value; |
|
35 | + } |
|
36 | 36 | |
37 | - /** |
|
38 | - * Prepare HTML for output |
|
39 | - * |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function render() |
|
43 | - { |
|
44 | - return $this->getValue(); |
|
45 | - } |
|
37 | + /** |
|
38 | + * Prepare HTML for output |
|
39 | + * |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function render() |
|
43 | + { |
|
44 | + return $this->getValue(); |
|
45 | + } |
|
46 | 46 | } |