@@ -66,13 +66,13 @@ discard block |
||
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | - /** |
|
70 | - * defaultRender - Generates default output for the element. |
|
71 | - * |
|
72 | - * This method is abstract and must be overwritten by the child classes. |
|
73 | - * |
|
74 | - * @return string |
|
75 | - */ |
|
69 | + /** |
|
70 | + * defaultRender - Generates default output for the element. |
|
71 | + * |
|
72 | + * This method is abstract and must be overwritten by the child classes. |
|
73 | + * |
|
74 | + * @return string |
|
75 | + */ |
|
76 | 76 | abstract public function defaultRender(); |
77 | 77 | |
78 | 78 | /** |
@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | * @return string |
82 | 82 | */ |
83 | 83 | public function render(){ |
84 | - $xoops = \Xoops::getInstance(); |
|
85 | - return $xoops->theme()->renderer($this); |
|
86 | - } |
|
84 | + $xoops = \Xoops::getInstance(); |
|
85 | + return $xoops->theme()->renderer($this); |
|
86 | + } |
|
87 | 87 | |
88 | 88 | /** |
89 | 89 | * render attributes as a string to include in HTML output |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @return string |
82 | 82 | */ |
83 | - public function render(){ |
|
83 | + public function render() { |
|
84 | 84 | $xoops = \Xoops::getInstance(); |
85 | 85 | return $xoops->theme()->renderer($this); |
86 | 86 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | if (!$this->has('id')) { |
103 | 103 | $id = $this->get('name'); |
104 | 104 | if (substr($id, -2) === '[]') { |
105 | - $id = substr($id, 0, strlen($id)-2); |
|
105 | + $id = substr($id, 0, strlen($id) - 2); |
|
106 | 106 | } |
107 | 107 | $this->set('id', $id); |
108 | 108 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | */ |
161 | 161 | public function getName() |
162 | 162 | { |
163 | - return (string) $this->get('name'); |
|
163 | + return (string)$this->get('name'); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | /** |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | */ |
183 | 183 | public function getAccessKey() |
184 | 184 | { |
185 | - return (string) $this->get('accesskey'); |
|
185 | + return (string)$this->get('accesskey'); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | /** |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | if (!empty($access) && (false !== ($pos = strpos($str, $access)))) { |
199 | 199 | return htmlspecialchars(substr($str, 0, $pos), ENT_QUOTES) |
200 | 200 | . '<span style="text-decoration: underline;">' |
201 | - . htmlspecialchars(substr($str, $pos, 1), ENT_QUOTES) . '</span>' |
|
201 | + . htmlspecialchars(substr($str, $pos, 1), ENT_QUOTES).'</span>' |
|
202 | 202 | . htmlspecialchars(substr($str, $pos + 1), ENT_QUOTES); |
203 | 203 | } |
204 | 204 | return htmlspecialchars($str, ENT_QUOTES); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | public function setClass($class) |
215 | 215 | { |
216 | - $this->add('class', (string) $class); |
|
216 | + $this->add('class', (string)$class); |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | */ |
252 | 252 | public function getPattern() |
253 | 253 | { |
254 | - return (string) $this->get('pattern', ''); |
|
254 | + return (string)$this->get('pattern', ''); |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | /** |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | */ |
262 | 262 | public function getPatternDescription() |
263 | 263 | { |
264 | - return (string) $this->get(':pattern_description', ''); |
|
264 | + return (string)$this->get(':pattern_description', ''); |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | /** |
@@ -286,11 +286,11 @@ discard block |
||
286 | 286 | if (!$this->isDatalist()) { |
287 | 287 | return ''; |
288 | 288 | } |
289 | - $ret = "\n" . '<datalist id="list_' . $this->getName() . '">' . "\n"; |
|
289 | + $ret = "\n".'<datalist id="list_'.$this->getName().'">'."\n"; |
|
290 | 290 | foreach ($this->get('datalist') as $datalist) { |
291 | - $ret .= '<option value="' . htmlspecialchars($datalist, ENT_QUOTES) . '">' . "\n"; |
|
291 | + $ret .= '<option value="'.htmlspecialchars($datalist, ENT_QUOTES).'">'."\n"; |
|
292 | 292 | } |
293 | - $ret .= '</datalist>' . "\n"; |
|
293 | + $ret .= '</datalist>'."\n"; |
|
294 | 294 | return $ret; |
295 | 295 | } |
296 | 296 | |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | } else { |
352 | 352 | if ($this->has(':pattern_description')) { |
353 | 353 | return htmlspecialchars( |
354 | - strip_tags($this->get('caption') . ' - ' . $this->get(':pattern_description')), |
|
354 | + strip_tags($this->get('caption').' - '.$this->get(':pattern_description')), |
|
355 | 355 | ENT_QUOTES |
356 | 356 | ); |
357 | 357 | } else { |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | $class = $this->get('class'); |
537 | 537 | if ($class) { |
538 | 538 | $length = strlen($pattern); |
539 | - foreach ((array) $class as $i => $value) { |
|
539 | + foreach ((array)$class as $i => $value) { |
|
540 | 540 | if (0 === strncmp($value, $pattern, $length)) { |
541 | 541 | return $i; |
542 | 542 | } |
@@ -44,32 +44,32 @@ discard block |
||
44 | 44 | return ''; |
45 | 45 | }*/ |
46 | 46 | |
47 | - /** |
|
47 | + /** |
|
48 | 48 | * Render support for XoopsFormButton |
49 | 49 | * |
50 | 50 | * @param XoopsFormButton $element form element |
51 | 51 | * |
52 | 52 | * @return string rendered form element |
53 | 53 | */ |
54 | - protected function renderXoopsFormButton(\Xoops\Form\Button $element):string |
|
54 | + protected function renderXoopsFormButton(\Xoops\Form\Button $element):string |
|
55 | 55 | { |
56 | - if (false == $element->hasClassLike('btn')) { |
|
57 | - $element->add('class', 'btn btn-default'); |
|
58 | - } |
|
59 | - $attributes = $element->renderAttributeString(); |
|
56 | + if (false == $element->hasClassLike('btn')) { |
|
57 | + $element->add('class', 'btn btn-default'); |
|
58 | + } |
|
59 | + $attributes = $element->renderAttributeString(); |
|
60 | 60 | return '<input ' . $attributes . $element->getExtra() .' >'; |
61 | - } |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
63 | + /** |
|
64 | 64 | * Render support for XoopsFormButtonTray |
65 | 65 | * |
66 | 66 | * @param XoopsFormButtonTray $element form element |
67 | 67 | * |
68 | 68 | * @return string rendered form element |
69 | 69 | */ |
70 | - protected function renderXoopsFormButtonTray(\Xoops\Form\ButtonTray $element):string |
|
70 | + protected function renderXoopsFormButtonTray(\Xoops\Form\ButtonTray $element):string |
|
71 | 71 | { |
72 | - $ret = ''; |
|
72 | + $ret = ''; |
|
73 | 73 | $element->add('class', 'btn'); |
74 | 74 | $class = 'class="' . $element->getClass() . '"'; |
75 | 75 | |
@@ -84,16 +84,16 @@ discard block |
||
84 | 84 | . ' <input type="reset"' . $class . ' name="reset" id="reset" value="' . \XoopsLocale::A_RESET . '" />' |
85 | 85 | . ' <input ' . $attributes . $element->getExtra() . ' />'; |
86 | 86 | return $ret; |
87 | - } |
|
87 | + } |
|
88 | 88 | |
89 | - /** |
|
89 | + /** |
|
90 | 90 | * Render support for XoopsFormColorPicker |
91 | 91 | * |
92 | 92 | * @param XoopsFormColorPicker $element form element |
93 | 93 | * |
94 | 94 | * @return string rendered form element |
95 | 95 | */ |
96 | - protected function renderXoopsFormColorPicker(\Xoops\Form\ColorPicker $element):string |
|
96 | + protected function renderXoopsFormColorPicker(\Xoops\Form\ColorPicker $element):string |
|
97 | 97 | { |
98 | 98 | $xoops = \Xoops::getInstance(); |
99 | 99 | if ($xoops->theme()) { |
@@ -118,16 +118,16 @@ discard block |
||
118 | 118 | $ret .= '</span></div>'; |
119 | 119 | |
120 | 120 | return $ret; |
121 | - } |
|
121 | + } |
|
122 | 122 | |
123 | - /** |
|
123 | + /** |
|
124 | 124 | * Render support for XoopsFormDateSelect |
125 | 125 | * |
126 | 126 | * @param XoopsFormDateSelect $element form element |
127 | 127 | * |
128 | 128 | * @return string rendered form element |
129 | 129 | */ |
130 | - protected function renderXoopsFormDateSelect(\Xoops\Form\DateSelect $element):string |
|
130 | + protected function renderXoopsFormDateSelect(\Xoops\Form\DateSelect $element):string |
|
131 | 131 | { |
132 | 132 | $xoops = \Xoops::getInstance(); |
133 | 133 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $element->add('list', 'list_' . $element->getName()); |
139 | 139 | } |
140 | 140 | |
141 | - $element->add('class', 'form-control'); |
|
141 | + $element->add('class', 'form-control'); |
|
142 | 142 | $element->suppressRender(['value']); |
143 | 143 | $attributes = $element->renderAttributeString(); |
144 | 144 | |
@@ -164,16 +164,16 @@ discard block |
||
164 | 164 | $ret .= '</span></div>'; |
165 | 165 | |
166 | 166 | return $ret; |
167 | - } |
|
167 | + } |
|
168 | 168 | |
169 | - /** |
|
169 | + /** |
|
170 | 170 | * Render support for XoopsFormDhtmlTextArea |
171 | 171 | * |
172 | 172 | * @param XoopsFormDhtmlTextArea $element form element |
173 | 173 | * |
174 | 174 | * @return string rendered form element |
175 | 175 | */ |
176 | - protected function renderXoopsFormDhtmlTextArea(\Xoops\Form\DhtmlTextArea $element):string |
|
176 | + protected function renderXoopsFormDhtmlTextArea(\Xoops\Form\DhtmlTextArea $element):string |
|
177 | 177 | { |
178 | 178 | if ($element->htmlEditor && is_object($element->htmlEditor)) { |
179 | 179 | if (!isset($element->htmlEditor->isEnabled) || $element->htmlEditor->isEnabled) { |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | . '<span class="glyphicon glyphicon-check"></span></button>'; |
199 | 199 | $ret .= "\n"; |
200 | 200 | // the textarea box |
201 | - $element->add('class', 'form-control'); |
|
201 | + $element->add('class', 'form-control'); |
|
202 | 202 | $element->suppressRender(['value']); |
203 | 203 | $attributes = $element->renderAttributeString(); |
204 | 204 | |
@@ -222,30 +222,30 @@ discard block |
||
222 | 222 | $js_loaded = true; |
223 | 223 | } |
224 | 224 | return $ret; |
225 | - } |
|
225 | + } |
|
226 | 226 | |
227 | - /** |
|
227 | + /** |
|
228 | 228 | * Render support for XoopsFormPassword |
229 | 229 | * |
230 | 230 | * @param XoopsFormPassword $element form element |
231 | 231 | * |
232 | 232 | * @return string rendered form element |
233 | 233 | */ |
234 | - protected function renderXoopsFormPassword(\Xoops\Form\Password $element):string |
|
234 | + protected function renderXoopsFormPassword(\Xoops\Form\Password $element):string |
|
235 | 235 | { |
236 | 236 | $element->add('class', 'form-control'); |
237 | - $attributes = $element->renderAttributeString(); |
|
237 | + $attributes = $element->renderAttributeString(); |
|
238 | 238 | return '<input ' . $attributes . $element->getExtra() .' >'; |
239 | - } |
|
239 | + } |
|
240 | 240 | |
241 | - /** |
|
241 | + /** |
|
242 | 242 | * Render support for XoopsFormSelect |
243 | 243 | * |
244 | 244 | * @param XoopsFormSelect $element form element |
245 | 245 | * |
246 | 246 | * @return string rendered form element |
247 | 247 | */ |
248 | - protected function renderXoopsFormSelect(\Xoops\Form\Select $element):string |
|
248 | + protected function renderXoopsFormSelect(\Xoops\Form\Select $element):string |
|
249 | 249 | { |
250 | 250 | $selected = (array) $element->getValue(); |
251 | 251 | |
@@ -271,16 +271,16 @@ discard block |
||
271 | 271 | $ret .= '</select>' . "\n"; |
272 | 272 | |
273 | 273 | return $ret; |
274 | - } |
|
274 | + } |
|
275 | 275 | |
276 | - /** |
|
276 | + /** |
|
277 | 277 | * Render support for XoopsFormText |
278 | 278 | * |
279 | 279 | * @param XoopsFormText $element form element |
280 | 280 | * |
281 | 281 | * @return string rendered form element |
282 | 282 | */ |
283 | - protected function renderXoopsFormText(\Xoops\Form\Text $element):string |
|
283 | + protected function renderXoopsFormText(\Xoops\Form\Text $element):string |
|
284 | 284 | { |
285 | 285 | $element->add('class', 'form-control'); |
286 | 286 | $dataList = $element->isDatalist(); |
@@ -290,21 +290,21 @@ discard block |
||
290 | 290 | |
291 | 291 | $attributes = $element->renderAttributeString(); |
292 | 292 | return '<input ' . $attributes . ' ' . $element->getExtra() .' >'; |
293 | - } |
|
293 | + } |
|
294 | 294 | |
295 | - /** |
|
295 | + /** |
|
296 | 296 | * Render support for XoopsFormTextArea |
297 | 297 | * |
298 | 298 | * @param XoopsFormTextArea $element form element |
299 | 299 | * |
300 | 300 | * @return string rendered form element |
301 | 301 | */ |
302 | - protected function renderXoopsFormTextArea(\Xoops\Form\TextArea $element):string |
|
302 | + protected function renderXoopsFormTextArea(\Xoops\Form\TextArea $element):string |
|
303 | 303 | { |
304 | 304 | $element->suppressRender(['value']); |
305 | - $element->add('class', 'form-control'); |
|
305 | + $element->add('class', 'form-control'); |
|
306 | 306 | $attributes = $element->renderAttributeString(); |
307 | 307 | return '<textarea ' . $attributes . ' ' . $element->getExtra() .' >' |
308 | 308 | . $element->getValue() . '</textarea>'; |
309 | - } |
|
309 | + } |
|
310 | 310 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | { |
23 | 23 | public function render(\Xoops\Form\Element $element):string |
24 | 24 | { |
25 | - $methodName = 'render' . str_replace('\\' , '', get_class($element)); |
|
25 | + $methodName = 'render'.str_replace('\\', '', get_class($element)); |
|
26 | 26 | if (true === method_exists($this, $methodName)) { |
27 | 27 | return $this->$methodName($element); |
28 | 28 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $element->add('class', 'btn btn-default'); |
58 | 58 | } |
59 | 59 | $attributes = $element->renderAttributeString(); |
60 | - return '<input ' . $attributes . $element->getExtra() .' >'; |
|
60 | + return '<input '.$attributes.$element->getExtra().' >'; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -71,18 +71,18 @@ discard block |
||
71 | 71 | { |
72 | 72 | $ret = ''; |
73 | 73 | $element->add('class', 'btn'); |
74 | - $class = 'class="' . $element->getClass() . '"'; |
|
74 | + $class = 'class="'.$element->getClass().'"'; |
|
75 | 75 | |
76 | 76 | $attributes = $element->renderAttributeString(); |
77 | 77 | |
78 | - if ((bool) $element->get(':showdelete', false)) { |
|
79 | - $ret .= '<input type="submit"' . $class . ' name="delete" id="delete" value="' |
|
80 | - . \XoopsLocale::A_DELETE . '" onclick="this.form.elements.op.value=\'delete\'">'; |
|
78 | + if ((bool)$element->get(':showdelete', false)) { |
|
79 | + $ret .= '<input type="submit"'.$class.' name="delete" id="delete" value="' |
|
80 | + . \XoopsLocale::A_DELETE.'" onclick="this.form.elements.op.value=\'delete\'">'; |
|
81 | 81 | } |
82 | - $ret .= ' <input type="button" ' . $class . ' value="' . \XoopsLocale::A_CANCEL |
|
82 | + $ret .= ' <input type="button" '.$class.' value="'.\XoopsLocale::A_CANCEL |
|
83 | 83 | . '" onclick="history.go(-1);return true;" />' |
84 | - . ' <input type="reset"' . $class . ' name="reset" id="reset" value="' . \XoopsLocale::A_RESET . '" />' |
|
85 | - . ' <input ' . $attributes . $element->getExtra() . ' />'; |
|
84 | + . ' <input type="reset"'.$class.' name="reset" id="reset" value="'.\XoopsLocale::A_RESET.'" />' |
|
85 | + . ' <input '.$attributes.$element->getExtra().' />'; |
|
86 | 86 | return $ret; |
87 | 87 | } |
88 | 88 | |
@@ -99,21 +99,21 @@ discard block |
||
99 | 99 | if ($xoops->theme()) { |
100 | 100 | $xoops->theme()->addScript('include/color-picker.js'); |
101 | 101 | } else { |
102 | - echo '<script type="text/javascript" src="' . $xoops->url('/include/color-picker.js') . '"></script>'; |
|
102 | + echo '<script type="text/javascript" src="'.$xoops->url('/include/color-picker.js').'"></script>'; |
|
103 | 103 | } |
104 | 104 | $temp = $element->get('value', ''); |
105 | 105 | if (!empty($temp)) { |
106 | - $element->set('style', 'background-color:' . $temp . ';'); |
|
106 | + $element->set('style', 'background-color:'.$temp.';'); |
|
107 | 107 | } |
108 | 108 | $element->set('class', 'form-control'); |
109 | 109 | $ret = '<div class="input-group">'; |
110 | 110 | $attributes = $element->renderAttributeString(); |
111 | - $ret .= '<input ' . $attributes . ' ' . $element->getExtra() .' >'; |
|
111 | + $ret .= '<input '.$attributes.' '.$element->getExtra().' >'; |
|
112 | 112 | $ret .= '<span class="input-group-btn">'; |
113 | 113 | $ret .= '<button class="btn btn-default" type="button" '; |
114 | - $ret .= 'data-toggle="tooltip" data-placement="left" title="' . \XoopsLocale::A_SELECT . '" '; |
|
114 | + $ret .= 'data-toggle="tooltip" data-placement="left" title="'.\XoopsLocale::A_SELECT.'" '; |
|
115 | 115 | $ret .= 'onclick="return TCP.popup(\''; |
116 | - $ret .= $xoops->url('/include/') . '\',document.getElementById(\'' . $element->getName() . '\'));">'; |
|
116 | + $ret .= $xoops->url('/include/').'\',document.getElementById(\''.$element->getName().'\'));">'; |
|
117 | 117 | $ret .= '<span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span></button>'; |
118 | 118 | $ret .= '</span></div>'; |
119 | 119 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | $dataList = $element->isDatalist(); |
137 | 137 | if (!empty($dataList)) { |
138 | - $element->add('list', 'list_' . $element->getName()); |
|
138 | + $element->add('list', 'list_'.$element->getName()); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | $element->add('class', 'form-control'); |
@@ -149,17 +149,17 @@ discard block |
||
149 | 149 | $xoops->theme()->addScript( |
150 | 150 | '', |
151 | 151 | '', |
152 | - ' $(function() { $( "#' . $element->get('id') . '" ).datepicker({' . |
|
153 | - 'showOn: "focus", changeYear: true, constrainInput: false ' . |
|
152 | + ' $(function() { $( "#'.$element->get('id').'" ).datepicker({'. |
|
153 | + 'showOn: "focus", changeYear: true, constrainInput: false '. |
|
154 | 154 | ' }); }); ' |
155 | 155 | ); |
156 | 156 | |
157 | 157 | $ret = '<div class="input-group">'; |
158 | - $ret .= '<input ' . $attributes . ' value="' . $display_value . '" ' . $element->getExtra() .' >'; |
|
158 | + $ret .= '<input '.$attributes.' value="'.$display_value.'" '.$element->getExtra().' >'; |
|
159 | 159 | $ret .= '<span class="input-group-btn">'; |
160 | 160 | $ret .= '<button class="btn btn-default" type="button" '; |
161 | - $ret .= 'data-toggle="tooltip" data-placement="left" title="' . \XoopsLocale::A_SELECT . '" '; |
|
162 | - $ret .= 'onclick="$( \'#' . $element->get('id') . '\' ).datepicker( \'show\' );"> '; |
|
161 | + $ret .= 'data-toggle="tooltip" data-placement="left" title="'.\XoopsLocale::A_SELECT.'" '; |
|
162 | + $ret .= 'onclick="$( \'#'.$element->get('id').'\' ).datepicker( \'show\' );"> '; |
|
163 | 163 | $ret .= '<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span></button>'; |
164 | 164 | $ret .= '</span></div>'; |
165 | 165 | |
@@ -184,17 +184,17 @@ discard block |
||
184 | 184 | |
185 | 185 | $xoops = \Xoops::getInstance(); |
186 | 186 | |
187 | - $extra = ($element->getExtra() != '' ? " " . $element->getExtra() : ''); |
|
187 | + $extra = ($element->getExtra() != '' ? " ".$element->getExtra() : ''); |
|
188 | 188 | $ret = ""; |
189 | 189 | // actions |
190 | - $ret .= $element->codeIcon() . "<br />\n"; |
|
190 | + $ret .= $element->codeIcon()."<br />\n"; |
|
191 | 191 | // fonts |
192 | 192 | $ret .= $element->fontArray(); |
193 | 193 | // length checker |
194 | 194 | $ret .= '<button type="button" class="btn btn-xs btn-default" onclick="XoopsCheckLength(\'' |
195 | - . $element->getName() . '\', \'' . @$element->configs['maxlength'] . '\', \'' |
|
196 | - . \XoopsLocale::F_CURRENT_TEXT_LENGTH . '\', \'' . \XoopsLocale::MAXIMUM_LENGTH . '\');"' |
|
197 | - . ' title="' . \XoopsLocale::CHECK_TEXT_LENGTH . '">' |
|
195 | + . $element->getName().'\', \''.@$element->configs['maxlength'].'\', \'' |
|
196 | + . \XoopsLocale::F_CURRENT_TEXT_LENGTH.'\', \''.\XoopsLocale::MAXIMUM_LENGTH.'\');"' |
|
197 | + . ' title="'.\XoopsLocale::CHECK_TEXT_LENGTH.'">' |
|
198 | 198 | . '<span class="glyphicon glyphicon-check"></span></button>'; |
199 | 199 | $ret .= "\n"; |
200 | 200 | // the textarea box |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | $element->suppressRender(['value']); |
203 | 203 | $attributes = $element->renderAttributeString(); |
204 | 204 | |
205 | - $ret .= '<textarea ' . $attributes . $extra . '>' . $element->getValue() . "</textarea>\n"; |
|
205 | + $ret .= '<textarea '.$attributes.$extra.'>'.$element->getValue()."</textarea>\n"; |
|
206 | 206 | |
207 | 207 | if (empty($element->skipPreview)) { |
208 | 208 | if (!$xoops->theme()) { |
@@ -210,15 +210,15 @@ discard block |
||
210 | 210 | } else { |
211 | 211 | $xoops->theme()->addScript('media/xoops/image.js', array('type' => 'text/javascript')); |
212 | 212 | } |
213 | - $button = "<input id='" . $element->getName() . "_preview_button' " . "type='button' " . "class='btn btn-sm btn-default' value='" . \XoopsLocale::A_PREVIEW . "' " . "onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $element->getName() . "','" . XOOPS_URL . "/images', " . (int)($element->doHtml) . ", '" . $xoops->security()->createToken() . "')\"" . " />"; |
|
214 | - $ret .= "<br />" . "<div id='" . $element->getName() . "_hidden' style='display: block;'> " . "<fieldset>" . "<legend>" . $button . "</legend>" . "<div id='" . $element->getName() . "_hidden_data'>" . \XoopsLocale::CLICK_PREVIEW_TO_SEE_CONTENT . "</div>" . "</fieldset>" . "</div>"; |
|
213 | + $button = "<input id='".$element->getName()."_preview_button' "."type='button' "."class='btn btn-sm btn-default' value='".\XoopsLocale::A_PREVIEW."' "."onclick=\"form_instantPreview('".XOOPS_URL."', '".$element->getName()."','".XOOPS_URL."/images', ".(int)($element->doHtml).", '".$xoops->security()->createToken()."')\""." />"; |
|
214 | + $ret .= "<br />"."<div id='".$element->getName()."_hidden' style='display: block;'> "."<fieldset>"."<legend>".$button."</legend>"."<div id='".$element->getName()."_hidden_data'>".\XoopsLocale::CLICK_PREVIEW_TO_SEE_CONTENT."</div>"."</fieldset>"."</div>"; |
|
215 | 215 | } |
216 | 216 | // Load javascript |
217 | 217 | if (empty($js_loaded)) { |
218 | 218 | $javascript = (($element->js) |
219 | - ? '<script type="text/javascript">' . $element->js . '</script>' |
|
220 | - : '') . '<script type="text/javascript" src="' . \XoopsBaseConfig::get('url') . '/include/formdhtmltextarea.js"></script>'; |
|
221 | - $ret = $javascript . $ret; |
|
219 | + ? '<script type="text/javascript">'.$element->js.'</script>' |
|
220 | + : '').'<script type="text/javascript" src="'.\XoopsBaseConfig::get('url').'/include/formdhtmltextarea.js"></script>'; |
|
221 | + $ret = $javascript.$ret; |
|
222 | 222 | $js_loaded = true; |
223 | 223 | } |
224 | 224 | return $ret; |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | { |
236 | 236 | $element->add('class', 'form-control'); |
237 | 237 | $attributes = $element->renderAttributeString(); |
238 | - return '<input ' . $attributes . $element->getExtra() .' >'; |
|
238 | + return '<input '.$attributes.$element->getExtra().' >'; |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | /** |
@@ -247,19 +247,19 @@ discard block |
||
247 | 247 | */ |
248 | 248 | protected function renderXoopsFormSelect(\Xoops\Form\Select $element):string |
249 | 249 | { |
250 | - $selected = (array) $element->getValue(); |
|
250 | + $selected = (array)$element->getValue(); |
|
251 | 251 | |
252 | 252 | $ele_options = $element->getOptions(); |
253 | 253 | |
254 | - $extra = ($element->getExtra() != '' ? " " . $element->getExtra() : ''); |
|
254 | + $extra = ($element->getExtra() != '' ? " ".$element->getExtra() : ''); |
|
255 | 255 | $element->add('class', 'form-control'); |
256 | 256 | $attributes = $element->renderAttributeString(); |
257 | - $ret = '<select ' . $attributes . $extra .' >' . "\n"; |
|
257 | + $ret = '<select '.$attributes.$extra.' >'."\n"; |
|
258 | 258 | |
259 | 259 | if (empty($ele_optgroup)) { |
260 | 260 | foreach ($ele_options as $value => $display) { |
261 | 261 | if (is_array($display)) { |
262 | - $ret .= '<optgroup label="' . $value . '">' . "\n"; |
|
262 | + $ret .= '<optgroup label="'.$value.'">'."\n"; |
|
263 | 263 | foreach ($display as $optvalue => $optdisplay) { |
264 | 264 | $ret .= $element->renderOption($optvalue, $optdisplay, $selected); |
265 | 265 | } |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | } |
269 | 269 | } |
270 | 270 | } |
271 | - $ret .= '</select>' . "\n"; |
|
271 | + $ret .= '</select>'."\n"; |
|
272 | 272 | |
273 | 273 | return $ret; |
274 | 274 | } |
@@ -285,11 +285,11 @@ discard block |
||
285 | 285 | $element->add('class', 'form-control'); |
286 | 286 | $dataList = $element->isDatalist(); |
287 | 287 | if (!empty($dataList)) { |
288 | - $element->add('list', 'list_' . $element->getName()); |
|
288 | + $element->add('list', 'list_'.$element->getName()); |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | $attributes = $element->renderAttributeString(); |
292 | - return '<input ' . $attributes . ' ' . $element->getExtra() .' >'; |
|
292 | + return '<input '.$attributes.' '.$element->getExtra().' >'; |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | /** |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | $element->suppressRender(['value']); |
305 | 305 | $element->add('class', 'form-control'); |
306 | 306 | $attributes = $element->renderAttributeString(); |
307 | - return '<textarea ' . $attributes . ' ' . $element->getExtra() .' >' |
|
308 | - . $element->getValue() . '</textarea>'; |
|
307 | + return '<textarea '.$attributes.' '.$element->getExtra().' >' |
|
308 | + . $element->getValue().'</textarea>'; |
|
309 | 309 | } |
310 | 310 | } |
@@ -27,6 +27,6 @@ |
||
27 | 27 | * |
28 | 28 | * @return string rendered form element |
29 | 29 | */ |
30 | - public function render(\Xoops\Form\Element $element):string; |
|
30 | + public function render(\Xoops\Form\Element $element):string; |
|
31 | 31 | |
32 | 32 | } |
@@ -52,6 +52,6 @@ |
||
52 | 52 | public function defaultRender() |
53 | 53 | { |
54 | 54 | $attributes = $this->renderAttributeString(); |
55 | - return '<input ' . $attributes . $this->getExtra() .' >' . "\n"; |
|
55 | + return '<input '.$attributes.$this->getExtra().' >'."\n"; |
|
56 | 56 | } |
57 | 57 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } |
143 | 143 | } else { |
144 | 144 | list ($class, $path) = $this->htmlEditor; |
145 | - include_once \XoopsBaseConfig::get('root-path') . $path; |
|
145 | + include_once \XoopsBaseConfig::get('root-path').$path; |
|
146 | 146 | if (class_exists($class)) { |
147 | 147 | $this->htmlEditor = new $class($options); |
148 | 148 | } |
@@ -171,25 +171,25 @@ discard block |
||
171 | 171 | |
172 | 172 | $xoops = \Xoops::getInstance(); |
173 | 173 | |
174 | - $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); |
|
174 | + $extra = ($this->getExtra() != '' ? " ".$this->getExtra() : ''); |
|
175 | 175 | $ret = ""; |
176 | 176 | // actions |
177 | - $ret .= $this->codeIcon() . "<br />\n"; |
|
177 | + $ret .= $this->codeIcon()."<br />\n"; |
|
178 | 178 | // fonts |
179 | 179 | $ret .= $this->fontArray(); |
180 | 180 | // length checker |
181 | 181 | $ret .= '<button type="button" onclick="XoopsCheckLength(\'' |
182 | - . $this->getName() . '\', \'' . @$this->configs['maxlength'] . '\', \'' |
|
183 | - . \XoopsLocale::F_CURRENT_TEXT_LENGTH . '\', \'' . \XoopsLocale::MAXIMUM_LENGTH . '\');"' |
|
184 | - . ' title="' . \XoopsLocale::CHECK_TEXT_LENGTH . '">' |
|
185 | - . '<span>' . \XoopsLocale::CHECK_TEXT_LENGTH . '</span></button>'; |
|
182 | + . $this->getName().'\', \''.@$this->configs['maxlength'].'\', \'' |
|
183 | + . \XoopsLocale::F_CURRENT_TEXT_LENGTH.'\', \''.\XoopsLocale::MAXIMUM_LENGTH.'\');"' |
|
184 | + . ' title="'.\XoopsLocale::CHECK_TEXT_LENGTH.'">' |
|
185 | + . '<span>'.\XoopsLocale::CHECK_TEXT_LENGTH.'</span></button>'; |
|
186 | 186 | $ret .= "\n"; |
187 | 187 | // the textarea box |
188 | 188 | |
189 | 189 | $this->suppressRender(['value']); |
190 | 190 | $attributes = $this->renderAttributeString(); |
191 | 191 | |
192 | - $ret .= '<textarea ' . $attributes . $extra . '>' . $this->getValue() . "</textarea>\n"; |
|
192 | + $ret .= '<textarea '.$attributes.$extra.'>'.$this->getValue()."</textarea>\n"; |
|
193 | 193 | |
194 | 194 | if (empty($this->skipPreview)) { |
195 | 195 | if (!$xoops->theme()) { |
@@ -197,15 +197,15 @@ discard block |
||
197 | 197 | } else { |
198 | 198 | $xoops->theme()->addScript('media/xoops/image.js', array('type' => 'text/javascript')); |
199 | 199 | } |
200 | - $button = "<input id='" . $this->getName() . "_preview_button' " . "type='button' " . " value='" . \XoopsLocale::A_PREVIEW . "' " . "onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $this->getName() . "','" . XOOPS_URL . "/images', " . (int)($this->doHtml) . ", '" . $xoops->security()->createToken() . "')\"" . " />"; |
|
201 | - $ret .= "<br />" . "<div id='" . $this->getName() . "_hidden' style='display: block;'> " . "<fieldset>" . "<legend>" . $button . "</legend>" . "<div id='" . $this->getName() . "_hidden_data'>" . \XoopsLocale::CLICK_PREVIEW_TO_SEE_CONTENT . "</div>" . "</fieldset>" . "</div>"; |
|
200 | + $button = "<input id='".$this->getName()."_preview_button' "."type='button' "." value='".\XoopsLocale::A_PREVIEW."' "."onclick=\"form_instantPreview('".XOOPS_URL."', '".$this->getName()."','".XOOPS_URL."/images', ".(int)($this->doHtml).", '".$xoops->security()->createToken()."')\""." />"; |
|
201 | + $ret .= "<br />"."<div id='".$this->getName()."_hidden' style='display: block;'> "."<fieldset>"."<legend>".$button."</legend>"."<div id='".$this->getName()."_hidden_data'>".\XoopsLocale::CLICK_PREVIEW_TO_SEE_CONTENT."</div>"."</fieldset>"."</div>"; |
|
202 | 202 | } |
203 | 203 | // Load javascript |
204 | 204 | if (empty($js_loaded)) { |
205 | 205 | $javascript = (($this->js) |
206 | - ? '<script type="text/javascript">' . $this->js . '</script>' |
|
207 | - : '') . '<script type="text/javascript" src="' . \XoopsBaseConfig::get('url') . '/include/formdhtmltextarea.js"></script>'; |
|
208 | - $ret = $javascript . $ret; |
|
206 | + ? '<script type="text/javascript">'.$this->js.'</script>' |
|
207 | + : '').'<script type="text/javascript" src="'.\XoopsBaseConfig::get('url').'/include/formdhtmltextarea.js"></script>'; |
|
208 | + $ret = $javascript.$ret; |
|
209 | 209 | $js_loaded = true; |
210 | 210 | } |
211 | 211 | return $ret; |
@@ -223,22 +223,22 @@ discard block |
||
223 | 223 | $myts = \Xoops\Core\Text\Sanitizer::getInstance(); |
224 | 224 | |
225 | 225 | $code = ''; |
226 | - $code .= '<img src="' . $xoops->url('images/form/url.gif') . '" alt="' . \XoopsLocale::URL |
|
227 | - . '" title="' . \XoopsLocale::URL . '" onclick="xoopsCodeUrl(\'' . $textarea_id . '\', \'' |
|
228 | - . $myts->escapeForJavascript(\XoopsLocale::ENTER_LINK_URL) . '\', \'' |
|
226 | + $code .= '<img src="'.$xoops->url('images/form/url.gif').'" alt="'.\XoopsLocale::URL |
|
227 | + . '" title="'.\XoopsLocale::URL.'" onclick="xoopsCodeUrl(\''.$textarea_id.'\', \'' |
|
228 | + . $myts->escapeForJavascript(\XoopsLocale::ENTER_LINK_URL).'\', \'' |
|
229 | 229 | . $myts->escapeForJavascript(\XoopsLocale::ENTER_WEBSITE_TITLE) |
230 | 230 | . '\')" onmouseover="style.cursor=\'hand\'" /> '; |
231 | - $code .= '<img src="' . $xoops->url('images/form/email.gif') . '" alt="' . \XoopsLocale::EMAIL |
|
232 | - . '" title="' . \XoopsLocale::EMAIL . '" onclick="xoopsCodeEmail(\'' . $textarea_id . '\', \'' |
|
231 | + $code .= '<img src="'.$xoops->url('images/form/email.gif').'" alt="'.\XoopsLocale::EMAIL |
|
232 | + . '" title="'.\XoopsLocale::EMAIL.'" onclick="xoopsCodeEmail(\''.$textarea_id.'\', \'' |
|
233 | 233 | . $myts->escapeForJavascript(\XoopsLocale::ENTER_EMAIL) |
234 | 234 | . '\');" onmouseover="style.cursor=\'hand\'" /> '; |
235 | - $code .= '<img src="' . $xoops->url('images/form/imgsrc.gif') . '" alt="' . \XoopsLocale::IMAGES |
|
236 | - . '" title="' . \XoopsLocale::IMAGES . '" onclick="xoopsCodeImg(\'' . $textarea_id . '\', \'' |
|
237 | - . $myts->escapeForJavascript(\XoopsLocale::ENTER_IMAGE_URL) . '\', \'' |
|
238 | - . $myts->escapeForJavascript(\XoopsLocale::ENTER_IMAGE_POSITION) . '\', \'' |
|
239 | - . $myts->escapeForJavascript(\XoopsLocale::IMAGE_POSITION_DESCRIPTION) . '\', \'' |
|
240 | - . $myts->escapeForJavascript(\XoopsLocale::E_ENTER_IMAGE_POSITION) . '\', \'' |
|
241 | - . $myts->escapeForJavascript(\XoopsLocale::WIDTH) . '\');" onmouseover="style.cursor=\'hand\'" /> '; |
|
235 | + $code .= '<img src="'.$xoops->url('images/form/imgsrc.gif').'" alt="'.\XoopsLocale::IMAGES |
|
236 | + . '" title="'.\XoopsLocale::IMAGES.'" onclick="xoopsCodeImg(\''.$textarea_id.'\', \'' |
|
237 | + . $myts->escapeForJavascript(\XoopsLocale::ENTER_IMAGE_URL).'\', \'' |
|
238 | + . $myts->escapeForJavascript(\XoopsLocale::ENTER_IMAGE_POSITION).'\', \'' |
|
239 | + . $myts->escapeForJavascript(\XoopsLocale::IMAGE_POSITION_DESCRIPTION).'\', \'' |
|
240 | + . $myts->escapeForJavascript(\XoopsLocale::E_ENTER_IMAGE_POSITION).'\', \'' |
|
241 | + . $myts->escapeForJavascript(\XoopsLocale::WIDTH).'\');" onmouseover="style.cursor=\'hand\'" /> '; |
|
242 | 242 | |
243 | 243 | $extensions = array_filter($myts->listExtensions()); |
244 | 244 | foreach ($extensions as $extension) { |
@@ -250,13 +250,13 @@ discard block |
||
250 | 250 | $this->js .= $js; |
251 | 251 | } |
252 | 252 | } |
253 | - $code .= '<img src="' . $xoops->url('images/form/code.gif') .'" alt="' . \XoopsLocale::SOURCE_CODE . '" title="' |
|
254 | - . \XoopsLocale::SOURCE_CODE . '" onclick="xoopsCodeCode(\'' . $textarea_id . '\', \'' |
|
255 | - . $myts->escapeForJavascript(\XoopsLocale::ENTER_CODE) . '\');" onmouseover="style.cursor=\'hand\'" /> '; |
|
253 | + $code .= '<img src="'.$xoops->url('images/form/code.gif').'" alt="'.\XoopsLocale::SOURCE_CODE.'" title="' |
|
254 | + . \XoopsLocale::SOURCE_CODE.'" onclick="xoopsCodeCode(\''.$textarea_id.'\', \'' |
|
255 | + . $myts->escapeForJavascript(\XoopsLocale::ENTER_CODE).'\');" onmouseover="style.cursor=\'hand\'" /> '; |
|
256 | 256 | |
257 | - $code .= '<img src="' . $xoops->url('images/form/quote.gif') .'" alt="' . \XoopsLocale::QUOTE . '" title="' |
|
258 | - . \XoopsLocale::QUOTE . '" onclick="xoopsCodeQuote(\'' . $textarea_id . '\', \'' |
|
259 | - . $myts->escapeForJavascript(\XoopsLocale::ENTER_QUOTE) . '\');" onmouseover="style.cursor=\'hand\'" /> '; |
|
257 | + $code .= '<img src="'.$xoops->url('images/form/quote.gif').'" alt="'.\XoopsLocale::QUOTE.'" title="' |
|
258 | + . \XoopsLocale::QUOTE.'" onclick="xoopsCodeQuote(\''.$textarea_id.'\', \'' |
|
259 | + . $myts->escapeForJavascript(\XoopsLocale::ENTER_QUOTE).'\');" onmouseover="style.cursor=\'hand\'" /> '; |
|
260 | 260 | |
261 | 261 | $response = \Xoops::getInstance()->service('emoji')->renderEmojiSelector($this->getName()); |
262 | 262 | if ($response->isSuccess()) { |
@@ -278,24 +278,23 @@ discard block |
||
278 | 278 | $hiddentext = $this->hiddenText; |
279 | 279 | |
280 | 280 | $fontStr = "<script type=\"text/javascript\" language=\"JavaScript\">"; |
281 | - $fontStr .= "var _editor_dialog = ''" . "+ '<select class=\"span2\" id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; |
|
282 | - $fontStr .= "+ '<option value=\'SIZE\'>" . \XoopsLocale::SIZE . "</option>'"; |
|
281 | + $fontStr .= "var _editor_dialog = ''"."+ '<select class=\"span2\" id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; |
|
282 | + $fontStr .= "+ '<option value=\'SIZE\'>".\XoopsLocale::SIZE."</option>'"; |
|
283 | 283 | $localeFontSizes = \XoopsLocale::getFontSizes(); |
284 | 284 | foreach ($localeFontSizes as $_val => $_name) { |
285 | 285 | $fontStr .= " + '<option value=\'{$_val}\'>{$_name}</option>'"; |
286 | 286 | } |
287 | 287 | $fontStr .= " + '</select> '"; |
288 | 288 | $fontStr .= "+ '<select class=\"span2\" id=\'{$textarea_id}Font\' onchange=\'xoopsSetElementAttribute(\"font\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; |
289 | - $fontStr .= "+ '<option value=\'FONT\'>" . \XoopsLocale::FONT . "</option>'"; |
|
289 | + $fontStr .= "+ '<option value=\'FONT\'>".\XoopsLocale::FONT."</option>'"; |
|
290 | 290 | $localeFonts = \XoopsLocale::getFonts(); |
291 | - $fontarray = !empty($localeFonts) ? $localeFonts : |
|
292 | - array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana", "Haettenschweiler"); |
|
291 | + $fontarray = !empty($localeFonts) ? $localeFonts : array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana", "Haettenschweiler"); |
|
293 | 292 | foreach ($fontarray as $font) { |
294 | 293 | $fontStr .= " + '<option value=\'{$font}\'>{$font}</option>'"; |
295 | 294 | } |
296 | 295 | $fontStr .= " + '</select> '"; |
297 | 296 | $fontStr .= "+ '<select class=\"span2\" id=\'{$textarea_id}Color\' onchange=\'xoopsSetElementAttribute(\"color\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; |
298 | - $fontStr .= "+ '<option value=\'COLOR\'>" . \XoopsLocale::COLOR . "</option>';"; |
|
297 | + $fontStr .= "+ '<option value=\'COLOR\'>".\XoopsLocale::COLOR."</option>';"; |
|
299 | 298 | $fontStr .= "var _color_array = new Array('00', '33', '66', '99', 'CC', 'FF'); |
300 | 299 | for(var i = 0; i < _color_array.length; i ++) { |
301 | 300 | for(var j = 0; j < _color_array.length; j ++) { |
@@ -309,15 +308,15 @@ discard block |
||
309 | 308 | |
310 | 309 | $fontStr .= "document.write(_editor_dialog); </script>"; |
311 | 310 | |
312 | - $styleStr = "<img src='" . \XoopsBaseConfig::get('url') . "/images/bold.gif' alt='" . \XoopsLocale::BOLD . "' title='" . \XoopsLocale::BOLD . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
313 | - $styleStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/italic.gif' alt='" . \XoopsLocale::ITALIC . "' title='" . \XoopsLocale::ITALIC . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
314 | - $styleStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/underline.gif' alt='" . \XoopsLocale::UNDERLINE . "' title='" . \XoopsLocale::UNDERLINE . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");'/> "; |
|
315 | - $styleStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/linethrough.gif' alt='" . \XoopsLocale::LINE_THROUGH . "' title='" . \XoopsLocale::LINE_THROUGH . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
311 | + $styleStr = "<img src='".\XoopsBaseConfig::get('url')."/images/bold.gif' alt='".\XoopsLocale::BOLD."' title='".\XoopsLocale::BOLD."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
312 | + $styleStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/italic.gif' alt='".\XoopsLocale::ITALIC."' title='".\XoopsLocale::ITALIC."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
313 | + $styleStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/underline.gif' alt='".\XoopsLocale::UNDERLINE."' title='".\XoopsLocale::UNDERLINE."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");'/> "; |
|
314 | + $styleStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/linethrough.gif' alt='".\XoopsLocale::LINE_THROUGH."' title='".\XoopsLocale::LINE_THROUGH."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
316 | 315 | |
317 | - $alignStr = "<img src='" . \XoopsBaseConfig::get('url') . "/images/alignleft.gif' alt='" . \XoopsLocale::LEFT . "' title='" . \XoopsLocale::LEFT . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
318 | - $alignStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/aligncenter.gif' alt='" . \XoopsLocale::CENTER . "' title='" . \XoopsLocale::CENTER . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
319 | - $alignStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/alignright.gif' alt='" . \XoopsLocale::RIGHT . "' title='" . \XoopsLocale::RIGHT . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
320 | - $fontStr = $fontStr . "<br />\n{$styleStr} {$alignStr} \n"; |
|
316 | + $alignStr = "<img src='".\XoopsBaseConfig::get('url')."/images/alignleft.gif' alt='".\XoopsLocale::LEFT."' title='".\XoopsLocale::LEFT."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
317 | + $alignStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/aligncenter.gif' alt='".\XoopsLocale::CENTER."' title='".\XoopsLocale::CENTER."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
318 | + $alignStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/alignright.gif' alt='".\XoopsLocale::RIGHT."' title='".\XoopsLocale::RIGHT."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
319 | + $fontStr = $fontStr."<br />\n{$styleStr} {$alignStr} \n"; |
|
321 | 320 | return $fontStr; |
322 | 321 | } |
323 | 322 |