@@ -54,7 +54,9 @@ discard block |
||
| 54 | 54 | $size = (int) $fieldInfos->size; |
| 55 | 55 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 56 | 56 | $moreAttrib = trim((string) $moreAttrib); |
| 57 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 57 | + if (empty($moreAttrib)) { |
|
| 58 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 59 | + } |
|
| 58 | 60 | $value = (int) $value; |
| 59 | 61 | $htmlName = $keyPrefix . $key . $keySuffix; |
| 60 | 62 | |
@@ -84,7 +86,9 @@ discard block |
||
| 84 | 86 | $size = (int) $fieldInfos->size; |
| 85 | 87 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 86 | 88 | $moreAttrib = trim((string) $moreAttrib); |
| 87 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 89 | + if (empty($moreAttrib)) { |
|
| 90 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 91 | + } |
|
| 88 | 92 | $autoFocus = $fieldInfos->inputAutofocus ? ' autofocus' : ''; |
| 89 | 93 | $value = (int) $value; |
| 90 | 94 | $htmlName = $keyPrefix . $key . $keySuffix; |
@@ -72,7 +72,9 @@ |
||
| 72 | 72 | { |
| 73 | 73 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 74 | 74 | $moreAttrib = trim((string) $moreAttrib); |
| 75 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 75 | + if (empty($moreAttrib)) { |
|
| 76 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 77 | + } |
|
| 76 | 78 | $htmlName = $keyPrefix . $key . $keySuffix; |
| 77 | 79 | |
| 78 | 80 | return self::$form->inputText($htmlName, (string) $value, $moreCss, $moreAttrib, $fieldInfos->options); |
@@ -53,7 +53,9 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 55 | 55 | $moreAttrib = trim((string) $moreAttrib); |
| 56 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 56 | + if (empty($moreAttrib)) { |
|
| 57 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 58 | + } |
|
| 57 | 59 | $htmlName = $keyPrefix . $key . $keySuffix; |
| 58 | 60 | $value = $this->isEmptyValue($fieldInfos, $value) ? array() : (is_string($value) ? explode(',', $value) : (is_array($value) ? $value: array($value))); |
| 59 | 61 | |
@@ -82,7 +84,9 @@ discard block |
||
| 82 | 84 | { |
| 83 | 85 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 84 | 86 | $moreAttrib = trim((string) $moreAttrib); |
| 85 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 87 | + if (empty($moreAttrib)) { |
|
| 88 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 89 | + } |
|
| 86 | 90 | $htmlName = $keyPrefix . $key . $keySuffix; |
| 87 | 91 | |
| 88 | 92 | $selectedValue = $this->isEmptyValue($fieldInfos, $value) ? '' : (string) $value; |
@@ -53,7 +53,9 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 55 | 55 | $moreAttrib = trim((string) $moreAttrib); |
| 56 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 56 | + if (empty($moreAttrib)) { |
|
| 57 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 58 | + } |
|
| 57 | 59 | $htmlName = $keyPrefix . $key . $keySuffix; |
| 58 | 60 | |
| 59 | 61 | $optionsList = array(); |
@@ -83,9 +85,13 @@ discard block |
||
| 83 | 85 | |
| 84 | 86 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 85 | 87 | $moreAttrib = trim((string) $moreAttrib); |
| 86 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 88 | + if (empty($moreAttrib)) { |
|
| 89 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 90 | + } |
|
| 87 | 91 | $placeHolder = $fieldInfos->inputPlaceholder; |
| 88 | - if (!empty($placeHolder)) $placeHolder = ' placeholder="' . dolPrintHTMLForAttribute($placeHolder) . '"'; |
|
| 92 | + if (!empty($placeHolder)) { |
|
| 93 | + $placeHolder = ' placeholder="' . dolPrintHTMLForAttribute($placeHolder) . '"'; |
|
| 94 | + } |
|
| 89 | 95 | $autoFocus = $fieldInfos->inputAutofocus ? ' autofocus' : ''; |
| 90 | 96 | $htmlName = $keyPrefix . $key . $keySuffix; |
| 91 | 97 | $selectedValue = is_null($value) || $this->isEmptyValue($fieldInfos, $value) ? '' : (string) $value; |
@@ -70,7 +70,9 @@ discard block |
||
| 70 | 70 | { |
| 71 | 71 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 72 | 72 | $moreAttrib = trim((string) $moreAttrib); |
| 73 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 73 | + if (empty($moreAttrib)) { |
|
| 74 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 75 | + } |
|
| 74 | 76 | $checked = empty($value) ? '' : ' checked="checked"'; |
| 75 | 77 | $htmlName = $keyPrefix . $key . $keySuffix; |
| 76 | 78 | |
@@ -97,7 +99,9 @@ discard block |
||
| 97 | 99 | if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER') < 2) { |
| 98 | 100 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 99 | 101 | $moreAttrib = trim((string) $moreAttrib); |
| 100 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 102 | + if (empty($moreAttrib)) { |
|
| 103 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 104 | + } |
|
| 101 | 105 | $checked = empty($value) ? '' : ' checked="checked"'; |
| 102 | 106 | $value = self::$form->inputType('checkbox', '', '1', '', $moreCss, $checked . $moreAttrib . ' readonly disabled'); |
| 103 | 107 | } else { |
@@ -118,7 +122,9 @@ discard block |
||
| 118 | 122 | */ |
| 119 | 123 | public function getInputCss($fieldInfos, $moreCss = '', $defaultCss = '') |
| 120 | 124 | { |
| 121 | - if (empty($moreCss)) $moreCss = $defaultCss; |
|
| 125 | + if (empty($moreCss)) { |
|
| 126 | + $moreCss = $defaultCss; |
|
| 127 | + } |
|
| 122 | 128 | $moreCss = trim((string) $moreCss); |
| 123 | 129 | |
| 124 | 130 | return empty($moreCss) ? '' : ' ' . $moreCss; |
@@ -53,7 +53,9 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 55 | 55 | $moreAttrib = trim((string) $moreAttrib); |
| 56 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 56 | + if (empty($moreAttrib)) { |
|
| 57 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 58 | + } |
|
| 57 | 59 | $htmlName = $keyPrefix . $key . $keySuffix; |
| 58 | 60 | $value = $this->isEmptyValue($fieldInfos, $value) ? array() : (is_string($value) ? explode(',', $value) : (is_array($value) ? $value: array($value))); |
| 59 | 61 | |
@@ -82,9 +84,13 @@ discard block |
||
| 82 | 84 | { |
| 83 | 85 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 84 | 86 | $moreAttrib = trim((string) $moreAttrib); |
| 85 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 87 | + if (empty($moreAttrib)) { |
|
| 88 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 89 | + } |
|
| 86 | 90 | $placeHolder = $fieldInfos->inputPlaceholder; |
| 87 | - if (!empty($placeHolder)) $placeHolder = ' placeholder="' . dolPrintHTMLForAttribute($placeHolder) . '"'; |
|
| 91 | + if (!empty($placeHolder)) { |
|
| 92 | + $placeHolder = ' placeholder="' . dolPrintHTMLForAttribute($placeHolder) . '"'; |
|
| 93 | + } |
|
| 88 | 94 | $autoFocus = $fieldInfos->inputAutofocus ? ' autofocus' : ''; |
| 89 | 95 | $htmlName = $keyPrefix . $key . $keySuffix; |
| 90 | 96 | |
@@ -128,7 +128,9 @@ |
||
| 128 | 128 | $labelAlias[] = $tmp['alias']; |
| 129 | 129 | } |
| 130 | 130 | $keyField = (string) ($InfoFieldList[2] ?? ''); |
| 131 | - if (empty($keyField)) $keyField = 'rowid'; |
|
| 131 | + if (empty($keyField)) { |
|
| 132 | + $keyField = 'rowid'; |
|
| 133 | + } |
|
| 132 | 134 | $keyFieldParent = (string) ($InfoFieldList[3] ?? ''); |
| 133 | 135 | $tmp = array_map('trim', explode('|', $keyFieldParent)); |
| 134 | 136 | $parentName = (string) ($tmp[0] ?? ''); |
@@ -73,7 +73,9 @@ |
||
| 73 | 73 | { |
| 74 | 74 | $moreCss = $this->getInputCss($fieldInfos, $moreCss); |
| 75 | 75 | $moreAttrib = trim((string) $moreAttrib); |
| 76 | - if (empty($moreAttrib)) $moreAttrib = ' ' . $moreAttrib; |
|
| 76 | + if (empty($moreAttrib)) { |
|
| 77 | + $moreAttrib = ' ' . $moreAttrib; |
|
| 78 | + } |
|
| 77 | 79 | $htmlName = $keyPrefix . $key . $keySuffix; |
| 78 | 80 | |
| 79 | 81 | return self::$form->inputHtml($htmlName, $value, $moreCss, $moreAttrib); |
@@ -242,7 +242,9 @@ |
||
| 242 | 242 | { |
| 243 | 243 | $filterValue = $value['value'] ?? ''; |
| 244 | 244 | $filterCurrency = $value['currency'] ?? ''; |
| 245 | - if ($filterCurrency == '-1') $filterCurrency = ''; |
|
| 245 | + if ($filterCurrency == '-1') { |
|
| 246 | + $filterCurrency = ''; |
|
| 247 | + } |
|
| 246 | 248 | |
| 247 | 249 | $tmp = $this->getPriceAndCurrencyAliasAndField($fieldInfos, $key); |
| 248 | 250 | $aliasPrice = $tmp['aliasPrice']; |