File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
lib/internal/Magento/Framework/Data/Form/Element Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -345,15 +345,18 @@ protected function _getUiId($suffix = null)
345
345
public function getElementHtml ()
346
346
{
347
347
$ html = '' ;
348
- if ($ this ->getBeforeElementHtml () && $ this ->getBeforeElementHtml () != '' ) {
348
+ $ htmlId = $ this ->getHtmlId ();
349
+
350
+ if (($ beforeElementHtml = $ this ->getBeforeElementHtml ())) {
349
351
$ html .= '<label class="addbefore" for=" ' .
350
- $ this -> getHtmlId () .
352
+ $ htmlId .
351
353
'"> ' .
352
- $ this -> getBeforeElementHtml () .
354
+ $ beforeElementHtml .
353
355
'</label> ' ;
354
356
}
357
+
355
358
$ html .= '<input id=" ' .
356
- $ this -> getHtmlId () .
359
+ $ htmlId .
357
360
'" name=" ' .
358
361
$ this ->getName () .
359
362
'" ' .
@@ -364,16 +367,19 @@ public function getElementHtml()
364
367
$ this ->serialize (
365
368
$ this ->getHtmlAttributes ()
366
369
) . '/> ' ;
367
- if ($ this ->getAfterElementJs () && $ this ->getAfterElementJs () != '' ) {
368
- $ html .= $ this ->getAfterElementJs ();
370
+
371
+ if (($ afterElementJs = $ this ->getAfterElementJs ())) {
372
+ $ html .= $ afterElementJs ;
369
373
}
370
- if ($ this ->getAfterElementHtml () && $ this ->getAfterElementHtml () != '' ) {
374
+
375
+ if (($ afterElementHtml = $ this ->getAfterElementHtml ())) {
371
376
$ html .= '<label class="addafter" for=" ' .
372
- $ this -> getHtmlId () .
377
+ $ htmlId .
373
378
'"> ' .
374
- $ this -> getAfterElementHtml () .
379
+ $ afterElementHtml .
375
380
'</label> ' ;
376
381
}
382
+
377
383
return $ html ;
378
384
}
379
385
You can’t perform that action at this time.
0 commit comments