@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | use Xmf\Request; |
| 23 | 23 | |
| 24 | -include __DIR__ . '/header.php'; |
|
| 24 | +include __DIR__.'/header.php'; |
|
| 25 | 25 | |
| 26 | 26 | $adminObject = \Xmf\Module\Admin::getInstance(); |
| 27 | 27 | |
@@ -60,12 +60,12 @@ discard block |
||
| 60 | 60 | $fb_content = Request::getText('fb_content', ''); |
| 61 | 61 | $fb_content = str_replace(["\r\n", "\n", "\r"], '<br>', $fb_content); //clean line break from dhtmltextarea |
| 62 | 62 | |
| 63 | - $title = constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_FOR') . $GLOBALS['xoopsModule']->getVar('dirname'); |
|
| 64 | - $body = constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME') . ': ' . $your_name . '<br>'; |
|
| 65 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL') . ': ' . $your_mail . '<br>'; |
|
| 66 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE') . ': ' . $your_site . '<br>'; |
|
| 67 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE') . ': ' . $fb_type . '<br><br>'; |
|
| 68 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT') . ':<br>'; |
|
| 63 | + $title = constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_FOR').$GLOBALS['xoopsModule']->getVar('dirname'); |
|
| 64 | + $body = constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME').': '.$your_name.'<br>'; |
|
| 65 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL').': '.$your_mail.'<br>'; |
|
| 66 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE').': '.$your_site.'<br>'; |
|
| 67 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE').': '.$fb_type.'<br><br>'; |
|
| 68 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_CONTENT').':<br>'; |
|
| 69 | 69 | $body .= $fb_content; |
| 70 | 70 | $xoopsMailer = xoops_getMailer(); |
| 71 | 71 | $xoopsMailer->useMail(); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $xoopsMailer->setBody($body); |
| 78 | 78 | $ret = $xoopsMailer->send(); |
| 79 | 79 | if ($ret) { |
| 80 | - redirect_header('index.php', 3, constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_SUCCESS')); |
|
| 80 | + redirect_header('index.php', 3, constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_SUCCESS')); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | // show form with content again |
@@ -87,11 +87,11 @@ discard block |
||
| 87 | 87 | $feedback->type = $fb_type; |
| 88 | 88 | $feedback->content = $fb_content; |
| 89 | 89 | echo '<div align="center" style="width: 80%; padding: 10px; border: 2px solid #ff0000; color: #ff0000; margin-right:auto;margin-left:auto;"> |
| 90 | - <h3>' . constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_ERROR') . '</h3> |
|
| 90 | + <h3>' . constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_ERROR').'</h3> |
|
| 91 | 91 | </div>'; |
| 92 | 92 | $form = $feedback->getFormFeedback(); |
| 93 | 93 | $form->display(); |
| 94 | 94 | |
| 95 | 95 | break; |
| 96 | 96 | } |
| 97 | -require __DIR__ . '/footer.php'; |
|
| 97 | +require __DIR__.'/footer.php'; |
|
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | //--></script> |
| 55 | 55 | <!-- End Form Validation JavaScript //-->', |
| 56 | 56 | ]; |
| 57 | - $paypalform = [ |
|
| 57 | + $paypalform = [ |
|
| 58 | 58 | 0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">', |
| 59 | 59 | 1 => '<input name="cmd" value="_s-xclick" type="hidden">', |
| 60 | 60 | 2 => '<input name="hosted_button_id" value="%s" type="hidden">', |
@@ -67,11 +67,11 @@ discard block |
||
| 67 | 67 | case 2: |
| 68 | 68 | $donationform[$key] = sprintf( |
| 69 | 69 | $donationform[$key], |
| 70 | - $GLOBALS['xoopsConfig']['sitename'] . ' - ' . ('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name') . ' [' . $GLOBALS['xoopsUser']->getVar('uname') . ']' : $GLOBALS['xoopsUser']->getVar('uname')), |
|
| 70 | + $GLOBALS['xoopsConfig']['sitename'].' - '.('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name').' ['.$GLOBALS['xoopsUser']->getVar('uname').']' : $GLOBALS['xoopsUser']->getVar('uname')), |
|
| 71 | 71 | $GLOBALS['xoopsUser']->getVar('email'), |
| 72 | 72 | XOOPS_LICENSE_KEY, |
| 73 | 73 | mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')), |
| 74 | - mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')) . ' ' . $GLOBALS['xoopsModule']->getVar('name') |
|
| 74 | + mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')).' '.$GLOBALS['xoopsModule']->getVar('name') |
|
| 75 | 75 | ); |
| 76 | 76 | break; |
| 77 | 77 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | global $xoopsDB; |
| 59 | 59 | $result = $xoopsDB->query( |
| 60 | - 'SELECT t1.tpl_id FROM ' . $xoopsDB->prefix('tplfile') . ' t1, ' . $xoopsDB->prefix('tplfile') . ' t2 WHERE t1.tpl_refid = t2.tpl_refid AND t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_type = t2.tpl_type AND t1.tpl_id > t2.tpl_id' |
|
| 60 | + 'SELECT t1.tpl_id FROM '.$xoopsDB->prefix('tplfile').' t1, '.$xoopsDB->prefix('tplfile').' t2 WHERE t1.tpl_refid = t2.tpl_refid AND t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_type = t2.tpl_type AND t1.tpl_id > t2.tpl_id' |
|
| 61 | 61 | ); |
| 62 | 62 | $tplids = []; |
| 63 | 63 | while (list($tplid) = $xoopsDB->fetchRow($result)) { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | if (count($tplids) > 0) { |
| 67 | 67 | $tplfileHandler = xoops_getHandler('tplfile'); |
| 68 | 68 | $duplicate_files = $tplfileHandler->getObjects( |
| 69 | - new \Criteria('tpl_id', '(' . implode(',', $tplids) . ')', 'IN') |
|
| 69 | + new \Criteria('tpl_id', '('.implode(',', $tplids).')', 'IN') |
|
| 70 | 70 | ); |
| 71 | 71 | |
| 72 | 72 | if (count($duplicate_files) > 0) { |
@@ -75,9 +75,9 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | - $sql = 'SHOW INDEX FROM ' . $xoopsDB->prefix('tplfile') . " WHERE KEY_NAME = 'tpl_refid_module_set_file_type'"; |
|
| 78 | + $sql = 'SHOW INDEX FROM '.$xoopsDB->prefix('tplfile')." WHERE KEY_NAME = 'tpl_refid_module_set_file_type'"; |
|
| 79 | 79 | if (!$result = $xoopsDB->queryF($sql)) { |
| 80 | - xoops_error($this->db->error() . '<br />' . $sql); |
|
| 80 | + xoops_error($this->db->error().'<br />'.$sql); |
|
| 81 | 81 | |
| 82 | 82 | return false; |
| 83 | 83 | } |
@@ -92,9 +92,9 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | return true; |
| 94 | 94 | } |
| 95 | - $sql = 'ALTER TABLE ' . $xoopsDB->prefix('tplfile') . ' ADD UNIQUE tpl_refid_module_set_file_type ( tpl_refid, tpl_module, tpl_tplset, tpl_file, tpl_type )'; |
|
| 95 | + $sql = 'ALTER TABLE '.$xoopsDB->prefix('tplfile').' ADD UNIQUE tpl_refid_module_set_file_type ( tpl_refid, tpl_module, tpl_tplset, tpl_file, tpl_type )'; |
|
| 96 | 96 | if (!$result = $xoopsDB->queryF($sql)) { |
| 97 | - xoops_error($xoopsDB->error() . '<br />' . $sql); |
|
| 97 | + xoops_error($xoopsDB->error().'<br />'.$sql); |
|
| 98 | 98 | $module->setErrors( |
| 99 | 99 | "'tpl_refid_module_set_file_type' unique index is not added to 'tplfile' table. Warning: do not use XOOPS until you add this unique index." |
| 100 | 100 | ); |
@@ -6,17 +6,17 @@ |
||
| 6 | 6 | $moduleDirName = basename(dirname(__DIR__)); |
| 7 | 7 | |
| 8 | 8 | return (object)[ |
| 9 | - 'name' => mb_strtoupper($moduleDirName) . ' IconConfigurator', |
|
| 9 | + 'name' => mb_strtoupper($moduleDirName).' IconConfigurator', |
|
| 10 | 10 | 'icons' => [ |
| 11 | - 'edit' => "<img src='" . $pathIcon16 . "/edit.png' alt=" . _EDIT . "' align='middle'>", |
|
| 12 | - 'delete' => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>", |
|
| 13 | - 'clone' => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>", |
|
| 14 | - 'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>", |
|
| 15 | - 'print' => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>", |
|
| 16 | - 'pdf' => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>", |
|
| 17 | - 'add' => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>", |
|
| 18 | - '0' => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>", |
|
| 19 | - '1' => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>", |
|
| 11 | + 'edit' => "<img src='".$pathIcon16."/edit.png' alt="._EDIT."' align='middle'>", |
|
| 12 | + 'delete' => "<img src='".$pathIcon16."/delete.png' alt='"._DELETE."' align='middle'>", |
|
| 13 | + 'clone' => "<img src='".$pathIcon16."/editcopy.png' alt='"._CLONE."' align='middle'>", |
|
| 14 | + 'preview' => "<img src='".$pathIcon16."/view.png' alt='"._PREVIEW."' align='middle'>", |
|
| 15 | + 'print' => "<img src='".$pathIcon16."/printer.png' alt='"._CLONE."' align='middle'>", |
|
| 16 | + 'pdf' => "<img src='".$pathIcon16."/pdf.png' alt='"._CLONE."' align='middle'>", |
|
| 17 | + 'add' => "<img src='".$pathIcon16."/add.png' alt='"._ADD."' align='middle'>", |
|
| 18 | + '0' => "<img src='".$pathIcon16."/0.png' alt='".0."' align='middle'>", |
|
| 19 | + '1' => "<img src='".$pathIcon16."/1.png' alt='".1."' align='middle'>", |
|
| 20 | 20 | ], |
| 21 | 21 | ]; |
| 22 | 22 | } |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $isNew = $this->isNew(); |
| 148 | 148 | $title = $isNew ? sprintf(_AM_TDMCREATE_SETTING_NEW) : sprintf(_AM_TDMCREATE_SETTING_EDIT); |
| 149 | 149 | |
| 150 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 150 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 151 | 151 | |
| 152 | 152 | $form = new \XoopsThemeForm($title, 'settingform', $action, 'post', true); |
| 153 | 153 | $form->setExtra('enctype="multipart/form-data"'); |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $checkbox = new \XoopsFormCheckbox(' ', 'setting_option', $settingOption, '<br>'); |
| 177 | 177 | $checkbox->setDescription(_AM_TDMCREATE_OPTIONS_DESC); |
| 178 | 178 | foreach ($this->options as $option) { |
| 179 | - $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_SETTING_' . mb_strtoupper($option))); |
|
| 179 | + $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_SETTING_'.mb_strtoupper($option))); |
|
| 180 | 180 | } |
| 181 | 181 | $optionsTray->addElement($checkbox); |
| 182 | 182 | |
@@ -185,17 +185,17 @@ discard block |
||
| 185 | 185 | $modImage = $this->getVar('set_image'); |
| 186 | 186 | $modImage = $modImage ?: $set['image']; |
| 187 | 187 | |
| 188 | - $uploadDirectory = 'uploads/' . $GLOBALS['xoopsModule']->dirname() . '/images/modules'; |
|
| 188 | + $uploadDirectory = 'uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/modules'; |
|
| 189 | 189 | $imgtray = new \XoopsFormElementTray(_AM_TDMCREATE_SETTING_IMAGE, '<br>'); |
| 190 | - $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './' . mb_strtolower($uploadDirectory) . '/'); |
|
| 190 | + $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './'.mb_strtolower($uploadDirectory).'/'); |
|
| 191 | 191 | $imageSelect = new \XoopsFormSelect($imgpath, 'set_image', $modImage); |
| 192 | 192 | $modImage_array = \XoopsLists::getImgListAsArray(TDMC_UPLOAD_IMGMOD_PATH); |
| 193 | 193 | foreach ($modImage_array as $image) { |
| 194 | 194 | $imageSelect->addOption($image, $image); |
| 195 | 195 | } |
| 196 | - $imageSelect->setExtra("onchange='showImgSelected(\"image3\", \"set_image\", \"" . $uploadDirectory . '", "", "' . XOOPS_URL . "\")'"); |
|
| 196 | + $imageSelect->setExtra("onchange='showImgSelected(\"image3\", \"set_image\", \"".$uploadDirectory.'", "", "'.XOOPS_URL."\")'"); |
|
| 197 | 197 | $imgtray->addElement($imageSelect); |
| 198 | - $imgtray->addElement(new \XoopsFormLabel('', "<br><img src='" . TDMC_UPLOAD_IMGMOD_URL . '/' . $modImage . "' name='image3' id='image3' alt='' /><br>")); |
|
| 198 | + $imgtray->addElement(new \XoopsFormLabel('', "<br><img src='".TDMC_UPLOAD_IMGMOD_URL.'/'.$modImage."' name='image3' id='image3' alt='' /><br>")); |
|
| 199 | 199 | |
| 200 | 200 | $fileseltray = new \XoopsFormElementTray('', '<br>'); |
| 201 | 201 | $fileseltray->addElement(new \XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $helper->getConfig('maxsize'))); |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $form->addElement(new \XoopsFormText(_AM_TDMCREATE_SETTING_PAYPAL_BUTTON, 'set_donations', 50, 255, $this->getVar('set_donations'))); |
| 224 | 224 | $form->addElement(new \XoopsFormText(_AM_TDMCREATE_SETTING_SUBVERSION, 'set_subversion', 50, 255, $this->getVar('set_subversion'))); |
| 225 | 225 | |
| 226 | - $buttonTray = new \XoopsFormElementTray(_REQUIRED . ' <sup class="red bold">*</sup>', ''); |
|
| 226 | + $buttonTray = new \XoopsFormElementTray(_REQUIRED.' <sup class="red bold">*</sup>', ''); |
|
| 227 | 227 | $buttonTray->addElement(new \XoopsFormHidden('op', 'save')); |
| 228 | 228 | $buttonTray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
| 229 | 229 | $form->addElement($buttonTray); |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | { |
| 264 | 264 | $retSet = []; |
| 265 | 265 | foreach ($this->options as $option) { |
| 266 | - if (1 == $this->getVar('set_' . $option)) { |
|
| 266 | + if (1 == $this->getVar('set_'.$option)) { |
|
| 267 | 267 | $retSet[] = $option; |
| 268 | 268 | } |
| 269 | 269 | } |
@@ -139,17 +139,17 @@ |
||
| 139 | 139 | */ |
| 140 | 140 | public function loadClass($className) |
| 141 | 141 | { |
| 142 | - if (null === $this->_namespace || $this->_namespace . $this->_namespaceSeparator === mb_substr($className, 0, mb_strlen($this->_namespace . $this->_namespaceSeparator))) { |
|
| 142 | + if (null === $this->_namespace || $this->_namespace.$this->_namespaceSeparator === mb_substr($className, 0, mb_strlen($this->_namespace.$this->_namespaceSeparator))) { |
|
| 143 | 143 | $fileName = ''; |
| 144 | 144 | $namespace = ''; |
| 145 | 145 | if (false !== ($lastNsPos = mb_strrpos($className, $this->_namespaceSeparator))) { |
| 146 | 146 | $namespace = mb_substr($className, 0, $lastNsPos); |
| 147 | 147 | $className = mb_substr($className, $lastNsPos + 1); |
| 148 | - $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; |
|
| 148 | + $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR; |
|
| 149 | 149 | } |
| 150 | - $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->_fileExtension; |
|
| 150 | + $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className).$this->_fileExtension; |
|
| 151 | 151 | |
| 152 | - require (null !== $this->_includePath ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName; |
|
| 152 | + require (null !== $this->_includePath ? $this->_includePath.DIRECTORY_SEPARATOR : '').$fileName; |
|
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | } |
@@ -115,17 +115,17 @@ discard block |
||
| 115 | 115 | // New Object HtmlTable |
| 116 | 116 | $form->addElement(new Tdmcreate\Html\FormLabel('<table cellspacing="1" class="outer width100">')); |
| 117 | 117 | $form->addElement(new Tdmcreate\Html\FormLabel('<thead class="center">')); |
| 118 | - $form->addElement(new Tdmcreate\Html\FormLabel('<tr class="head"><th colspan="9">' . $title . '</th></tr>')); |
|
| 118 | + $form->addElement(new Tdmcreate\Html\FormLabel('<tr class="head"><th colspan="9">'.$title.'</th></tr>')); |
|
| 119 | 119 | $form->addElement(new Tdmcreate\Html\FormLabel('<tr class="head width5">')); |
| 120 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td>' . _AM_TDMCREATE_FIELD_ID . '</td>')); |
|
| 121 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td>' . _AM_TDMCREATE_FIELD_NAME . '</td>')); |
|
| 122 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td>' . _AM_TDMCREATE_FIELD_TYPE . '</td>')); |
|
| 123 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td>' . _AM_TDMCREATE_FIELD_VALUE . '</th>')); |
|
| 124 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td>' . _AM_TDMCREATE_FIELD_ATTRIBUTE . '</th>')); |
|
| 125 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td>' . _AM_TDMCREATE_FIELD_NULL . '</th>')); |
|
| 126 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td>' . _AM_TDMCREATE_FIELD_DEFAULT . '</th>')); |
|
| 127 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td>' . _AM_TDMCREATE_FIELD_KEY . '</th>')); |
|
| 128 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td>' . _AM_TDMCREATE_FIELD_PARAMETERS . '</th>')); |
|
| 120 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td>'._AM_TDMCREATE_FIELD_ID.'</td>')); |
|
| 121 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td>'._AM_TDMCREATE_FIELD_NAME.'</td>')); |
|
| 122 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td>'._AM_TDMCREATE_FIELD_TYPE.'</td>')); |
|
| 123 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td>'._AM_TDMCREATE_FIELD_VALUE.'</th>')); |
|
| 124 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td>'._AM_TDMCREATE_FIELD_ATTRIBUTE.'</th>')); |
|
| 125 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td>'._AM_TDMCREATE_FIELD_NULL.'</th>')); |
|
| 126 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td>'._AM_TDMCREATE_FIELD_DEFAULT.'</th>')); |
|
| 127 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td>'._AM_TDMCREATE_FIELD_KEY.'</th>')); |
|
| 128 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td>'._AM_TDMCREATE_FIELD_PARAMETERS.'</th>')); |
|
| 129 | 129 | $form->addElement(new Tdmcreate\Html\FormLabel('</tr></thead>')); |
| 130 | 130 | $form->addElement(new Tdmcreate\Html\FormLabel('<tbody>')); |
| 131 | 131 | |
@@ -177,44 +177,44 @@ discard block |
||
| 177 | 177 | private function getFormNewLine($form, $class, $i, $fieldMid, $fieldTid, $fName, $tableAutoincrement) |
| 178 | 178 | { |
| 179 | 179 | $helper = Tdmcreate\Helper::getInstance(); |
| 180 | - $form->addElement(new \XoopsFormHidden('field_id[' . $i . ']', 0)); |
|
| 180 | + $form->addElement(new \XoopsFormHidden('field_id['.$i.']', 0)); |
|
| 181 | 181 | $form->addElement(new \XoopsFormHidden('field_mid', $fieldMid)); |
| 182 | 182 | $form->addElement(new \XoopsFormHidden('field_tid', $fieldTid)); |
| 183 | 183 | |
| 184 | - $form->addElement(new Tdmcreate\Html\FormLabel('<tr class="' . $class . '">')); |
|
| 184 | + $form->addElement(new Tdmcreate\Html\FormLabel('<tr class="'.$class.'">')); |
|
| 185 | 185 | // Index ID |
| 186 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $i . '</td>')); |
|
| 186 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$i.'</td>')); |
|
| 187 | 187 | // Field Name |
| 188 | - $thisFieldName = (!empty($fName) ? ((1 == $i) ? $fName . '_id' : $fName . '_') : ''); |
|
| 189 | - $fieldName = new \XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name[' . $i . ']', 15, 255, $thisFieldName); |
|
| 190 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldName->render() . '</td>')); |
|
| 188 | + $thisFieldName = (!empty($fName) ? ((1 == $i) ? $fName.'_id' : $fName.'_') : ''); |
|
| 189 | + $fieldName = new \XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name['.$i.']', 15, 255, $thisFieldName); |
|
| 190 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldName->render().'</td>')); |
|
| 191 | 191 | // Field Type |
| 192 | 192 | $value = (1 == $i) && (1 == $tableAutoincrement) ? '2' : ''; |
| 193 | - $fieldTypeSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type[' . $i . ']', $value); |
|
| 193 | + $fieldTypeSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type['.$i.']', $value); |
|
| 194 | 194 | $fieldTypeSelect->addOptionArray($helper->getHandler('Fieldtype')->getList()); |
| 195 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldTypeSelect->render() . '</td>')); |
|
| 195 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldTypeSelect->render().'</td>')); |
|
| 196 | 196 | // Field Value |
| 197 | 197 | $value = (1 == $i) && (1 == $tableAutoincrement) ? '8' : ''; |
| 198 | - $fieldValue = new \XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value[' . $i . ']', 10, 200, $value); |
|
| 199 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldValue->render() . '</td>')); |
|
| 198 | + $fieldValue = new \XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value['.$i.']', 10, 200, $value); |
|
| 199 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldValue->render().'</td>')); |
|
| 200 | 200 | // Field Attributes |
| 201 | 201 | $value = (1 == $i) && (1 == $tableAutoincrement) ? '3' : ''; |
| 202 | - $fieldAttributesSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute[' . $i . ']', $value); |
|
| 202 | + $fieldAttributesSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute['.$i.']', $value); |
|
| 203 | 203 | $fieldAttributesSelect->addOptionArray($helper->getHandler('Fieldattributes')->getList()); |
| 204 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldAttributesSelect->render() . '</td>')); |
|
| 204 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldAttributesSelect->render().'</td>')); |
|
| 205 | 205 | // Field Null |
| 206 | 206 | $value = (1 == $i) && (1 == $tableAutoincrement) ? '2' : '2'; |
| 207 | - $fieldNullSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null[' . $i . ']', $value); |
|
| 207 | + $fieldNullSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null['.$i.']', $value); |
|
| 208 | 208 | $fieldNullSelect->addOptionArray($helper->getHandler('Fieldnull')->getList()); |
| 209 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldNullSelect->render() . '</td>')); |
|
| 209 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldNullSelect->render().'</td>')); |
|
| 210 | 210 | // Field Default |
| 211 | - $fieldDefault = new \XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default[' . $i . ']', 15, 25); |
|
| 212 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldDefault->render() . '</td>')); |
|
| 211 | + $fieldDefault = new \XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default['.$i.']', 15, 25); |
|
| 212 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldDefault->render().'</td>')); |
|
| 213 | 213 | // Field Key |
| 214 | 214 | $value = (1 == $i) && (1 == $tableAutoincrement) ? '2' : ''; |
| 215 | - $fieldKeySelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key[' . $i . ']', $value); |
|
| 215 | + $fieldKeySelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key['.$i.']', $value); |
|
| 216 | 216 | $fieldKeySelect->addOptionArray($helper->getHandler('Fieldkey')->getList()); |
| 217 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldKeySelect->render() . '</td>')); |
|
| 217 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldKeySelect->render().'</td>')); |
|
| 218 | 218 | // Field Void |
| 219 | 219 | if ((1 == $i) && (1 == $tableAutoincrement)) { |
| 220 | 220 | $form->addElement(new Tdmcreate\Html\FormLabel('<td> </td></tr>')); |
@@ -226,64 +226,64 @@ discard block |
||
| 226 | 226 | $crElement->add(new \Criteria('fieldelement_tid', 0)); |
| 227 | 227 | $crTable = new \CriteriaCompo(); |
| 228 | 228 | $crTable->add(new \Criteria('fieldelement_mid', $fieldMid)); |
| 229 | - $fieldElementsSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element[' . $i . ']'); |
|
| 229 | + $fieldElementsSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$i.']'); |
|
| 230 | 230 | $fieldElementsSelect->addOptionArray($helper->getHandler('Fieldelements')->getList($crElement)); |
| 231 | 231 | $fieldElementsSelect->addOptionArray($helper->getHandler('Fieldelements')->getList($crTable)); |
| 232 | 232 | unset($crElement, $crTable); |
| 233 | 233 | $parametersTray->addElement($fieldElementsSelect); |
| 234 | 234 | |
| 235 | 235 | $field_parent = 0; |
| 236 | - $checkFieldParent = new \XoopsFormCheckBox(' ', 'field_parent[' . $i . ']', $field_parent); |
|
| 236 | + $checkFieldParent = new \XoopsFormCheckBox(' ', 'field_parent['.$i.']', $field_parent); |
|
| 237 | 237 | $checkFieldParent->addOption(1, _AM_TDMCREATE_FIELD_PARENT); |
| 238 | 238 | $parametersTray->addElement($checkFieldParent); |
| 239 | 239 | |
| 240 | 240 | $field_admin = 0; |
| 241 | - $checkFieldAdmin = new \XoopsFormCheckBox(' ', 'field_admin[' . $i . ']', $field_admin); |
|
| 241 | + $checkFieldAdmin = new \XoopsFormCheckBox(' ', 'field_admin['.$i.']', $field_admin); |
|
| 242 | 242 | $checkFieldAdmin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN); |
| 243 | 243 | $parametersTray->addElement($checkFieldAdmin); |
| 244 | 244 | |
| 245 | 245 | $field_inlist = 0; |
| 246 | - $checkFieldInList = new \XoopsFormCheckBox(' ', 'field_inlist[' . $i . ']', $field_inlist); |
|
| 246 | + $checkFieldInList = new \XoopsFormCheckBox(' ', 'field_inlist['.$i.']', $field_inlist); |
|
| 247 | 247 | $checkFieldInList->addOption(1, _AM_TDMCREATE_FIELD_INLIST); |
| 248 | 248 | $parametersTray->addElement($checkFieldInList); |
| 249 | 249 | |
| 250 | 250 | $field_inform = 0; |
| 251 | - $checkFieldInForm = new \XoopsFormCheckBox(' ', 'field_inform[' . $i . ']', $field_inform); |
|
| 251 | + $checkFieldInForm = new \XoopsFormCheckBox(' ', 'field_inform['.$i.']', $field_inform); |
|
| 252 | 252 | $checkFieldInForm->addOption(1, _AM_TDMCREATE_FIELD_INFORM); |
| 253 | 253 | $parametersTray->addElement($checkFieldInForm); |
| 254 | 254 | |
| 255 | 255 | $field_user = 0; |
| 256 | - $checkFieldUser = new \XoopsFormCheckBox(' ', 'field_user[' . $i . ']', $field_user); |
|
| 256 | + $checkFieldUser = new \XoopsFormCheckBox(' ', 'field_user['.$i.']', $field_user); |
|
| 257 | 257 | $checkFieldUser->addOption(1, _AM_TDMCREATE_FIELD_USER); |
| 258 | 258 | $parametersTray->addElement($checkFieldUser); |
| 259 | 259 | |
| 260 | 260 | $field_thead = 0; |
| 261 | - $checkFieldThead = new \XoopsFormCheckBox(' ', 'field_thead[' . $i . ']', $field_thead); |
|
| 261 | + $checkFieldThead = new \XoopsFormCheckBox(' ', 'field_thead['.$i.']', $field_thead); |
|
| 262 | 262 | $checkFieldThead->addOption(1, _AM_TDMCREATE_FIELD_THEAD); |
| 263 | 263 | $parametersTray->addElement($checkFieldThead); |
| 264 | 264 | |
| 265 | 265 | $field_tbody = 0; |
| 266 | - $checkFieldTbody = new \XoopsFormCheckBox(' ', 'field_tbody[' . $i . ']', $field_tbody); |
|
| 266 | + $checkFieldTbody = new \XoopsFormCheckBox(' ', 'field_tbody['.$i.']', $field_tbody); |
|
| 267 | 267 | $checkFieldTbody->addOption(1, _AM_TDMCREATE_FIELD_TBODY); |
| 268 | 268 | $parametersTray->addElement($checkFieldTbody); |
| 269 | 269 | |
| 270 | 270 | $field_tfoot = 0; |
| 271 | - $checkFieldTfoot = new \XoopsFormCheckBox(' ', 'field_tfoot[' . $i . ']', $field_tfoot); |
|
| 271 | + $checkFieldTfoot = new \XoopsFormCheckBox(' ', 'field_tfoot['.$i.']', $field_tfoot); |
|
| 272 | 272 | $checkFieldTfoot->addOption(1, _AM_TDMCREATE_FIELD_TFOOT); |
| 273 | 273 | $parametersTray->addElement($checkFieldTfoot); |
| 274 | 274 | |
| 275 | 275 | $field_block = 0; |
| 276 | - $checkFieldBlock = new \XoopsFormCheckBox('', 'field_block[' . $i . ']', $field_block); |
|
| 276 | + $checkFieldBlock = new \XoopsFormCheckBox('', 'field_block['.$i.']', $field_block); |
|
| 277 | 277 | $checkFieldBlock->addOption(1, _AM_TDMCREATE_FIELD_BLOCK); |
| 278 | 278 | $parametersTray->addElement($checkFieldBlock); |
| 279 | 279 | |
| 280 | 280 | $field_search = 0; |
| 281 | - $check_field_search = new \XoopsFormCheckBox(' ', 'field_search[' . $i . ']', $field_search); |
|
| 281 | + $check_field_search = new \XoopsFormCheckBox(' ', 'field_search['.$i.']', $field_search); |
|
| 282 | 282 | $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH); |
| 283 | 283 | $parametersTray->addElement($check_field_search); |
| 284 | 284 | |
| 285 | 285 | $field_required = 0; |
| 286 | - $checkFieldRequired = new \XoopsFormCheckBox(' ', 'field_required[' . $i . ']', $field_required); |
|
| 286 | + $checkFieldRequired = new \XoopsFormCheckBox(' ', 'field_required['.$i.']', $field_required); |
|
| 287 | 287 | $checkFieldRequired->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED); |
| 288 | 288 | $parametersTray->addElement($checkFieldRequired); |
| 289 | 289 | |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | $checkFieldMain->addOption($i, _AM_TDMCREATE_FIELD_MAIN); |
| 293 | 293 | $parametersTray->addElement($checkFieldMain); |
| 294 | 294 | |
| 295 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td><div class="portlet"><div class="portlet-header">' . _AM_TDMCREATE_FIELD_PARAMETERS_LIST . '</div><div class="portlet-content">' . $parametersTray->render() . '</div></div></td></tr>')); |
|
| 295 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parametersTray->render().'</div></div></td></tr>')); |
|
| 296 | 296 | } |
| 297 | 297 | } |
| 298 | 298 | |
@@ -335,36 +335,36 @@ discard block |
||
| 335 | 335 | $helper->getHandler('Fields')->delete($fieldsObj, true); |
| 336 | 336 | } else { |
| 337 | 337 | // show field with settings |
| 338 | - $form->addElement(new \XoopsFormHidden('field_id[' . $id . ']', $fieldId)); |
|
| 338 | + $form->addElement(new \XoopsFormHidden('field_id['.$id.']', $fieldId)); |
|
| 339 | 339 | |
| 340 | - $form->addElement(new Tdmcreate\Html\FormLabel('<tr class="' . $class . '">')); |
|
| 340 | + $form->addElement(new Tdmcreate\Html\FormLabel('<tr class="'.$class.'">')); |
|
| 341 | 341 | // Index ID |
| 342 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $id . '</td>')); |
|
| 342 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$id.'</td>')); |
|
| 343 | 343 | // Field Name |
| 344 | - $fieldName = new \XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name[' . $id . ']', 15, 255, $field->getVar('field_name')); |
|
| 345 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldName->render() . '</td>')); |
|
| 344 | + $fieldName = new \XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name['.$id.']', 15, 255, $field->getVar('field_name')); |
|
| 345 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldName->render().'</td>')); |
|
| 346 | 346 | // Field Type |
| 347 | - $fieldTypeSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type[' . $id . ']', $field->getVar('field_type')); |
|
| 347 | + $fieldTypeSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type['.$id.']', $field->getVar('field_type')); |
|
| 348 | 348 | $fieldTypeSelect->addOptionArray($helper->getHandler('Fieldtype')->getList()); |
| 349 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldTypeSelect->render() . '</td>')); |
|
| 349 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldTypeSelect->render().'</td>')); |
|
| 350 | 350 | // Field Value |
| 351 | - $fieldValue = new \XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value[' . $id . ']', 10, 200, $field->getVar('field_value')); |
|
| 352 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldValue->render() . '</td>')); |
|
| 351 | + $fieldValue = new \XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value['.$id.']', 10, 200, $field->getVar('field_value')); |
|
| 352 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldValue->render().'</td>')); |
|
| 353 | 353 | // Field Attributes |
| 354 | - $fieldAttributesSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute[' . $id . ']', $field->getVar('field_attribute')); |
|
| 354 | + $fieldAttributesSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute['.$id.']', $field->getVar('field_attribute')); |
|
| 355 | 355 | $fieldAttributesSelect->addOptionArray($helper->getHandler('Fieldattributes')->getList()); |
| 356 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldAttributesSelect->render() . '</td>')); |
|
| 356 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldAttributesSelect->render().'</td>')); |
|
| 357 | 357 | // Field Null |
| 358 | - $fieldNullSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null[' . $id . ']', $field->getVar('field_null')); |
|
| 358 | + $fieldNullSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null['.$id.']', $field->getVar('field_null')); |
|
| 359 | 359 | $fieldNullSelect->addOptionArray($helper->getHandler('Fieldnull')->getList()); |
| 360 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldNullSelect->render() . '</td>')); |
|
| 360 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldNullSelect->render().'</td>')); |
|
| 361 | 361 | // Field Default |
| 362 | - $fieldDefault = new \XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default[' . $id . ']', 15, 25, $field->getVar('field_default')); |
|
| 363 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldDefault->render() . '</td>')); |
|
| 362 | + $fieldDefault = new \XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default['.$id.']', 15, 25, $field->getVar('field_default')); |
|
| 363 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldDefault->render().'</td>')); |
|
| 364 | 364 | // Field Key |
| 365 | - $fieldKeySelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key[' . $id . ']', $field->getVar('field_key')); |
|
| 365 | + $fieldKeySelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key['.$id.']', $field->getVar('field_key')); |
|
| 366 | 366 | $fieldKeySelect->addOptionArray($helper->getHandler('Fieldkey')->getList()); |
| 367 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">' . $fieldKeySelect->render() . '</td>')); |
|
| 367 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td class="center">'.$fieldKeySelect->render().'</td>')); |
|
| 368 | 368 | // Field Void |
| 369 | 369 | if ((1 == $id) && (1 == $tableAutoincrement)) { |
| 370 | 370 | $form->addElement(new Tdmcreate\Html\FormLabel('<td> </td></tr>')); |
@@ -376,53 +376,53 @@ discard block |
||
| 376 | 376 | $crElement->add(new \Criteria('fieldelement_tid', 0)); |
| 377 | 377 | $crTable = new \CriteriaCompo(); |
| 378 | 378 | $crTable->add(new \Criteria('fieldelement_mid', $fieldMid)); |
| 379 | - $fieldElementsSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element[' . $id . ']', $field->getVar('field_element')); |
|
| 379 | + $fieldElementsSelect = new \XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$id.']', $field->getVar('field_element')); |
|
| 380 | 380 | $fieldElementsSelect->addOptionArray($helper->getHandler('Fieldelements')->getList($crElement)); |
| 381 | 381 | $fieldElementsSelect->addOptionArray($helper->getHandler('Fieldelements')->getList($crTable)); |
| 382 | 382 | unset($crElement, $crTable); |
| 383 | 383 | $parametersTray->addElement($fieldElementsSelect); |
| 384 | 384 | |
| 385 | - $checkFieldParent = new \XoopsFormCheckBox(' ', 'field_parent[' . $id . ']', $field->getVar('field_parent')); |
|
| 385 | + $checkFieldParent = new \XoopsFormCheckBox(' ', 'field_parent['.$id.']', $field->getVar('field_parent')); |
|
| 386 | 386 | $checkFieldParent->addOption(1, _AM_TDMCREATE_FIELD_PARENT); |
| 387 | 387 | $parametersTray->addElement($checkFieldParent); |
| 388 | 388 | |
| 389 | - $checkFieldAdmin = new \XoopsFormCheckBox(' ', 'field_admin[' . $id . ']', $field->getVar('field_admin')); |
|
| 389 | + $checkFieldAdmin = new \XoopsFormCheckBox(' ', 'field_admin['.$id.']', $field->getVar('field_admin')); |
|
| 390 | 390 | $checkFieldAdmin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN); |
| 391 | 391 | $parametersTray->addElement($checkFieldAdmin); |
| 392 | 392 | |
| 393 | - $checkFieldInList = new \XoopsFormCheckBox(' ', 'field_inlist[' . $id . ']', $field->getVar('field_inlist')); |
|
| 393 | + $checkFieldInList = new \XoopsFormCheckBox(' ', 'field_inlist['.$id.']', $field->getVar('field_inlist')); |
|
| 394 | 394 | $checkFieldInList->addOption(1, _AM_TDMCREATE_FIELD_INLIST); |
| 395 | 395 | $parametersTray->addElement($checkFieldInList); |
| 396 | 396 | |
| 397 | - $checkFieldInForm = new \XoopsFormCheckBox(' ', 'field_inform[' . $id . ']', $field->getVar('field_inform')); |
|
| 397 | + $checkFieldInForm = new \XoopsFormCheckBox(' ', 'field_inform['.$id.']', $field->getVar('field_inform')); |
|
| 398 | 398 | $checkFieldInForm->addOption(1, _AM_TDMCREATE_FIELD_INFORM); |
| 399 | 399 | $parametersTray->addElement($checkFieldInForm); |
| 400 | 400 | |
| 401 | - $checkFieldUser = new \XoopsFormCheckBox(' ', 'field_user[' . $id . ']', $field->getVar('field_user')); |
|
| 401 | + $checkFieldUser = new \XoopsFormCheckBox(' ', 'field_user['.$id.']', $field->getVar('field_user')); |
|
| 402 | 402 | $checkFieldUser->addOption(1, _AM_TDMCREATE_FIELD_USER); |
| 403 | 403 | $parametersTray->addElement($checkFieldUser); |
| 404 | 404 | |
| 405 | - $checkFieldThead = new \XoopsFormCheckBox(' ', 'field_thead[' . $id . ']', $field->getVar('field_thead')); |
|
| 405 | + $checkFieldThead = new \XoopsFormCheckBox(' ', 'field_thead['.$id.']', $field->getVar('field_thead')); |
|
| 406 | 406 | $checkFieldThead->addOption(1, _AM_TDMCREATE_FIELD_THEAD); |
| 407 | 407 | $parametersTray->addElement($checkFieldThead); |
| 408 | 408 | |
| 409 | - $checkFieldTbody = new \XoopsFormCheckBox(' ', 'field_tbody[' . $id . ']', $field->getVar('field_tbody')); |
|
| 409 | + $checkFieldTbody = new \XoopsFormCheckBox(' ', 'field_tbody['.$id.']', $field->getVar('field_tbody')); |
|
| 410 | 410 | $checkFieldTbody->addOption(1, _AM_TDMCREATE_FIELD_TBODY); |
| 411 | 411 | $parametersTray->addElement($checkFieldTbody); |
| 412 | 412 | |
| 413 | - $checkFieldTfoot = new \XoopsFormCheckBox(' ', 'field_tfoot[' . $id . ']', $field->getVar('field_tfoot')); |
|
| 413 | + $checkFieldTfoot = new \XoopsFormCheckBox(' ', 'field_tfoot['.$id.']', $field->getVar('field_tfoot')); |
|
| 414 | 414 | $checkFieldTfoot->addOption(1, _AM_TDMCREATE_FIELD_TFOOT); |
| 415 | 415 | $parametersTray->addElement($checkFieldTfoot); |
| 416 | 416 | |
| 417 | - $checkFieldBlock = new \XoopsFormCheckBox('', 'field_block[' . $id . ']', $field->getVar('field_block')); |
|
| 417 | + $checkFieldBlock = new \XoopsFormCheckBox('', 'field_block['.$id.']', $field->getVar('field_block')); |
|
| 418 | 418 | $checkFieldBlock->addOption(1, _AM_TDMCREATE_FIELD_BLOCK); |
| 419 | 419 | $parametersTray->addElement($checkFieldBlock); |
| 420 | 420 | |
| 421 | - $check_field_search = new \XoopsFormCheckBox(' ', 'field_search[' . $id . ']', $field->getVar('field_search')); |
|
| 421 | + $check_field_search = new \XoopsFormCheckBox(' ', 'field_search['.$id.']', $field->getVar('field_search')); |
|
| 422 | 422 | $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH); |
| 423 | 423 | $parametersTray->addElement($check_field_search); |
| 424 | 424 | |
| 425 | - $checkFieldRequired = new \XoopsFormCheckBox(' ', 'field_required[' . $id . ']', $field->getVar('field_required')); |
|
| 425 | + $checkFieldRequired = new \XoopsFormCheckBox(' ', 'field_required['.$id.']', $field->getVar('field_required')); |
|
| 426 | 426 | $checkFieldRequired->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED); |
| 427 | 427 | $parametersTray->addElement($checkFieldRequired); |
| 428 | 428 | |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | $checkFieldMain->addOption($id, _AM_TDMCREATE_FIELD_MAIN); |
| 432 | 432 | $parametersTray->addElement($checkFieldMain); |
| 433 | 433 | |
| 434 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td><div class="portlet"><div class="portlet-header">' . _AM_TDMCREATE_FIELD_PARAMETERS_LIST . '</div><div class="portlet-content">' . $parametersTray->render() . '</div></div></td></tr>')); |
|
| 434 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parametersTray->render().'</div></div></td></tr>')); |
|
| 435 | 435 | } |
| 436 | 436 | } |
| 437 | 437 | ++$id; |
@@ -463,8 +463,8 @@ discard block |
||
| 463 | 463 | $form->addElement(new Tdmcreate\Html\FormLabel('<tfoot><tr>')); |
| 464 | 464 | $formHidden = new \XoopsFormHidden('op', 'save'); |
| 465 | 465 | $formButton = new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'); |
| 466 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td colspan="8">' . $formHidden->render() . '</td>')); |
|
| 467 | - $form->addElement(new Tdmcreate\Html\FormLabel('<td>' . $formButton->render() . '</td>')); |
|
| 466 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td colspan="8">'.$formHidden->render().'</td>')); |
|
| 467 | + $form->addElement(new Tdmcreate\Html\FormLabel('<td>'.$formButton->render().'</td>')); |
|
| 468 | 468 | $form->addElement(new Tdmcreate\Html\FormLabel('</tr></tfoot></table>')); |
| 469 | 469 | |
| 470 | 470 | return $form; |
@@ -183,18 +183,18 @@ discard block |
||
| 183 | 183 | $tableImage = $getTableImage ?: 'blank.gif'; |
| 184 | 184 | $icons32Directory = '/Frameworks/moduleclasses/icons/32'; |
| 185 | 185 | $uploadsDirectory = '/uploads/tdmcreate/images/tables'; |
| 186 | - $iconsDirectory = is_dir(XOOPS_ROOT_PATH . $icons32Directory) ? $icons32Directory : $uploadsDirectory; |
|
| 186 | + $iconsDirectory = is_dir(XOOPS_ROOT_PATH.$icons32Directory) ? $icons32Directory : $uploadsDirectory; |
|
| 187 | 187 | |
| 188 | 188 | $imgtray1 = new \XoopsFormElementTray(_AM_TDMCREATE_TABLE_IMAGE, '<br>'); |
| 189 | 189 | $imgpath1 = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".{$iconsDirectory}/"); |
| 190 | 190 | $imageSelect1 = new \XoopsFormSelect($imgpath1, 'table_image', $tableImage, 10); |
| 191 | - $imageArray1 = \XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $iconsDirectory); |
|
| 191 | + $imageArray1 = \XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH.$iconsDirectory); |
|
| 192 | 192 | foreach ($imageArray1 as $image1) { |
| 193 | 193 | $imageSelect1->addOption($image1, $image1); |
| 194 | 194 | } |
| 195 | - $imageSelect1->setExtra("onchange='showImgSelected(\"image1\", \"table_image\", \"" . $iconsDirectory . '", "", "' . XOOPS_URL . "\")'"); |
|
| 195 | + $imageSelect1->setExtra("onchange='showImgSelected(\"image1\", \"table_image\", \"".$iconsDirectory.'", "", "'.XOOPS_URL."\")'"); |
|
| 196 | 196 | $imgtray1->addElement($imageSelect1, false); |
| 197 | - $imgtray1->addElement(new \XoopsFormLabel('', "<br><img src='" . XOOPS_URL . '/' . $iconsDirectory . '/' . $tableImage . "' name='image1' id='image1' alt='' />")); |
|
| 197 | + $imgtray1->addElement(new \XoopsFormLabel('', "<br><img src='".XOOPS_URL.'/'.$iconsDirectory.'/'.$tableImage."' name='image1' id='image1' alt='' />")); |
|
| 198 | 198 | $fileseltray1 = new \XoopsFormElementTray('', '<br>'); |
| 199 | 199 | $fileseltray1->addElement(new \XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $helper->getConfig('maxsize'))); |
| 200 | 200 | $fileseltray1->addElement(new \XoopsFormLabel('')); |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | $checkbox = new \XoopsFormCheckbox(' ', 'table_option', $this->getOptionsTables(), '<br>'); |
| 219 | 219 | $checkbox->setDescription(_AM_TDMCREATE_OPTIONS_DESC); |
| 220 | 220 | foreach ($this->options as $option) { |
| 221 | - $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_TABLE_' . mb_strtoupper($option))); |
|
| 221 | + $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_TABLE_'.mb_strtoupper($option))); |
|
| 222 | 222 | } |
| 223 | 223 | $optionsTray->addElement($checkbox); |
| 224 | 224 | |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | |
| 227 | 227 | $form->addElement($optionsTray); |
| 228 | 228 | |
| 229 | - $buttonTray = new \XoopsFormElementTray(_REQUIRED . ' <sup class="red bold">*</sup>', ''); |
|
| 229 | + $buttonTray = new \XoopsFormElementTray(_REQUIRED.' <sup class="red bold">*</sup>', ''); |
|
| 230 | 230 | $buttonTray->addElement(new \XoopsFormHidden('op', 'save')); |
| 231 | 231 | $buttonTray->addElement(new \XoopsFormHidden('table_id', ($isNew ? 0 : $this->getVar('table_id')))); |
| 232 | 232 | $buttonTray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | { |
| 276 | 276 | $retTable = []; |
| 277 | 277 | foreach ($this->options as $option) { |
| 278 | - if (1 == $this->getVar('table_' . $option)) { |
|
| 278 | + if (1 == $this->getVar('table_'.$option)) { |
|
| 279 | 279 | $retTable[] = $option; |
| 280 | 280 | } |
| 281 | 281 | } |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | $form->addElement($fileInfolder, true); |
| 132 | 132 | |
| 133 | 133 | $form->addElement(new \XoopsFormHidden('op', 'save')); |
| 134 | - $form->addElement(new \XoopsFormButton(_REQUIRED . ' <sup class="red bold">*</sup>', 'submit', _SUBMIT, 'submit')); |
|
| 134 | + $form->addElement(new \XoopsFormButton(_REQUIRED.' <sup class="red bold">*</sup>', 'submit', _SUBMIT, 'submit')); |
|
| 135 | 135 | |
| 136 | 136 | return $form; |
| 137 | 137 | } |