| @@ 136-149 (lines=14) @@ | ||
| 133 | } |
|
| 134 | break; |
|
| 135 | ||
| 136 | case 'select': |
|
| 137 | $ele = new Xoops\Form\Select( |
|
| 138 | $title, |
|
| 139 | $obj[$i]->getVar('conf_name'), |
|
| 140 | $obj[$i]->getConfValueForOutput() |
|
| 141 | ); |
|
| 142 | $options = $config_handler->getConfigOptions(new Criteria('conf_id', $obj[$i]->getVar('conf_id'))); |
|
| 143 | $opcount = count($options); |
|
| 144 | for ($j = 0; $j < $opcount; ++$j) { |
|
| 145 | $optval = \Xoops\Locale::translate($options[$j]->getVar('confop_value'), $mod->getVar('dirname')); |
|
| 146 | $optkey = \Xoops\Locale::translate($options[$j]->getVar('confop_name'), $mod->getVar('dirname')); |
|
| 147 | $ele->addOption($optval, $optkey); |
|
| 148 | } |
|
| 149 | break; |
|
| 150 | ||
| 151 | case 'select_editor': |
|
| 152 | $ele = new Xoops\Form\Select( |
|
| @@ 160-169 (lines=10) @@ | ||
| 157 | \Xoops\Core\Lists\Editor::setOptionsArray($ele); |
|
| 158 | break; |
|
| 159 | ||
| 160 | case 'select_multi': |
|
| 161 | $ele = new Xoops\Form\Select($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput(), 5, true); |
|
| 162 | $options = $config_handler->getConfigOptions(new Criteria('conf_id', $obj[$i]->getVar('conf_id'))); |
|
| 163 | $opcount = count($options); |
|
| 164 | for ($j = 0; $j < $opcount; ++$j) { |
|
| 165 | $optval = \Xoops\Locale::translate($options[$j]->getVar('confop_value'), $mod->getVar('dirname')); |
|
| 166 | $optkey = \Xoops\Locale::translate($options[$j]->getVar('confop_name'), $mod->getVar('dirname')); |
|
| 167 | $ele->addOption($optval, $optkey); |
|
| 168 | } |
|
| 169 | break; |
|
| 170 | ||
| 171 | case 'yesno': |
|
| 172 | $ele = new Xoops\Form\RadioYesNo($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); |
|
| @@ 103-112 (lines=10) @@ | ||
| 100 | } |
|
| 101 | break; |
|
| 102 | ||
| 103 | case 'select': |
|
| 104 | $ele = new Xoops\Form\Select($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); |
|
| 105 | $options = $config_handler->getConfigOptions(new Criteria('conf_id', $obj[$i]->getVar('conf_id'))); |
|
| 106 | $opcount = count($options); |
|
| 107 | for ($j = 0; $j < $opcount; ++$j) { |
|
| 108 | $optval = \Xoops\Locale::translate($options[$j]->getVar('confop_value'), $mod->getVar('dirname')); |
|
| 109 | $optkey = \Xoops\Locale::translate($options[$j]->getVar('confop_name'), $mod->getVar('dirname')); |
|
| 110 | $ele->addOption($optval, $optkey); |
|
| 111 | } |
|
| 112 | break; |
|
| 113 | ||
| 114 | case 'select_multi': |
|
| 115 | $ele = new Xoops\Form\Select($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput(), 5, true); |
|
| @@ 114-123 (lines=10) @@ | ||
| 111 | } |
|
| 112 | break; |
|
| 113 | ||
| 114 | case 'select_multi': |
|
| 115 | $ele = new Xoops\Form\Select($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput(), 5, true); |
|
| 116 | $options = $config_handler->getConfigOptions(new Criteria('conf_id', $obj[$i]->getVar('conf_id'))); |
|
| 117 | $opcount = count($options); |
|
| 118 | for ($j = 0; $j < $opcount; ++$j) { |
|
| 119 | $optval = \Xoops\Locale::translate($options[$j]->getVar('confop_value'), $mod->getVar('dirname')); |
|
| 120 | $optkey = \Xoops\Locale::translate($options[$j]->getVar('confop_name'), $mod->getVar('dirname')); |
|
| 121 | $ele->addOption($optval, $optkey); |
|
| 122 | } |
|
| 123 | break; |
|
| 124 | ||
| 125 | case 'yesno': |
|
| 126 | $ele = new Xoops\Form\RadioYesNo($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); |
|