@@ -31,15 +31,15 @@ |
||
| 31 | 31 | |
| 32 | 32 | if ($file) { |
| 33 | 33 | if (0 === strpos($file->getType(), 'image/')) { |
| 34 | - $basepath = $this->getView()->plugin('basepath'); |
|
| 35 | - $preview = '<img src="' . $basepath($file->getUri()) . '" class="img-polaroid" />'; |
|
| 34 | + $basepath = $this->getView()->plugin('basepath'); |
|
| 35 | + $preview = '<img src="'.$basepath($file->getUri()).'" class="img-polaroid" />'; |
|
| 36 | 36 | } else { |
| 37 | - $preview = '<span>' . $file->getName() . '(' . $file->getPrettySize() . ')</span>'; |
|
| 37 | + $preview = '<span>'.$file->getName().'('.$file->getPrettySize().')</span>'; |
|
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | $notice = '<div class="iu-empty-notice" style="padding: 10px; color: lightgrey;"> |
| 41 | 41 | <div style="padding: 0px 20px 5px;"><span class="yk-icon fa-file-image-o fa-5x"></span></div> |
| 42 | - <small>' . $translator->translate('Click here to add an image or use drag and drop.') . '</small> |
|
| 42 | + <small>' . $translator->translate('Click here to add an image or use drag and drop.').'</small> |
|
| 43 | 43 | |
| 44 | 44 | </div>'; |
| 45 | 45 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $formContainerHelper = $view->formContainer(); |
| 62 | 62 | $formsMarkup = ''; |
| 63 | 63 | $formTemplateWrapper = '<div class="form-collection-container-form"> |
| 64 | - '. ($this->displayRemoveButton ? '<button type="button" class="btn btn-sm btn-danger pull-right form-collection-container-remove-button">' . $translator->translate('Remove') . '</button>' : '') . ' |
|
| 64 | + '. ($this->displayRemoveButton ? '<button type="button" class="btn btn-sm btn-danger pull-right form-collection-container-remove-button">'.$translator->translate('Remove').'</button>' : '').' |
|
| 65 | 65 | %s |
| 66 | 66 | </div>'; |
| 67 | 67 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $container->getLabel(), |
| 88 | 88 | $formsMarkup, |
| 89 | 89 | $templateMarkup, |
| 90 | - '<div class="form-collection-container-add-wrapper"><button type="button" class="btn btn-success form-collection-container-add-button"><span class="yk-icon yk-icon-plus"></span> ' . sprintf($translator->translate('Add %s'), $container->getLabel()) . '</button></div>' |
|
| 90 | + '<div class="form-collection-container-add-wrapper"><button type="button" class="btn btn-success form-collection-container-add-button"><span class="yk-icon yk-icon-plus"></span> '.sprintf($translator->translate('Add %s'), $container->getLabel()).'</button></div>' |
|
| 91 | 91 | ); |
| 92 | 92 | } |
| 93 | 93 | /** |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function setDisplayRemoveButton($displayRemoveButton) |
| 99 | 99 | { |
| 100 | - $this->displayRemoveButton = (bool)$displayRemoveButton; |
|
| 100 | + $this->displayRemoveButton = (bool) $displayRemoveButton; |
|
| 101 | 101 | |
| 102 | 102 | return $this; |
| 103 | 103 | } |
@@ -65,10 +65,12 @@ |
||
| 65 | 65 | %s |
| 66 | 66 | </div>'; |
| 67 | 67 | |
| 68 | - foreach ($container as $form) /* @var $form \Laminas\Form\Form */ |
|
| 68 | + foreach ($container as $form) { |
|
| 69 | + /* @var $form \Laminas\Form\Form */ |
|
| 69 | 70 | { |
| 70 | 71 | $formsMarkup .= sprintf($formTemplateWrapper, $formContainerHelper->renderElement($form, $layout, $parameter)); |
| 71 | 72 | } |
| 73 | + } |
|
| 72 | 74 | |
| 73 | 75 | $templateForm = $container->getTemplateForm(); |
| 74 | 76 | $templateMarkup = sprintf( |
@@ -67,8 +67,8 @@ discard block |
||
| 67 | 67 | $content = $this->renderElements($form, $colMap, $buttonsSpan); |
| 68 | 68 | |
| 69 | 69 | return $this->openTag($form) |
| 70 | - . '<div class="row" style="padding: 0 15px;">' |
|
| 71 | - . $content . '</div>' . $this->closeTag(); |
|
| 70 | + . '<div class="row" style="padding: 0 15px;">' |
|
| 71 | + . $content . '</div>' . $this->closeTag(); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | public function renderButtons($buttons) |
@@ -81,8 +81,8 @@ discard block |
||
| 81 | 81 | $attrs = $helper->createAttributesString($button->getAttributes()); |
| 82 | 82 | |
| 83 | 83 | $content.= '<button ' . $attrs . '>' |
| 84 | - . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
|
| 85 | - . '</button>'; |
|
| 84 | + . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
|
| 85 | + . '</button>'; |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | return $content; |
@@ -118,15 +118,15 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | if ($element->getName() == $form->getButtonElement()) { |
| 120 | 120 | $content.='<div class="input-group col-md-' . $cols . '">' |
| 121 | - . $formElement($element) |
|
| 122 | - . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
|
| 123 | - . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 124 | - . '</div>'; |
|
| 121 | + . $formElement($element) |
|
| 122 | + . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
|
| 123 | + . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 124 | + . '</div>'; |
|
| 125 | 125 | $buttonsRendered = true; |
| 126 | 126 | } else { |
| 127 | 127 | $content .= '<div class="input-group col-md-' . $cols . '">' |
| 128 | - . $formElement($element) |
|
| 129 | - . '</div>'; |
|
| 128 | + . $formElement($element) |
|
| 129 | + . '</div>'; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | $i += 1; |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $buttonsSpan = $form->getOption('buttons_span') ?: 12; |
| 138 | 138 | } |
| 139 | 139 | $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">' |
| 140 | - . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 140 | + . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | return $content; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @param array $colMap |
| 36 | 36 | * @return Form|string |
| 37 | 37 | */ |
| 38 | - public function __invoke(FormInterface $form = null, $colMap=null) |
|
| 38 | + public function __invoke(FormInterface $form = null, $colMap = null) |
|
| 39 | 39 | { |
| 40 | 40 | if (!$form) { |
| 41 | 41 | return $this; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | return $this->render($form, $colMap); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - public function render(FormInterface $form, $colMap=null, $buttonsSpan = null) |
|
| 47 | + public function render(FormInterface $form, $colMap = null, $buttonsSpan = null) |
|
| 48 | 48 | { |
| 49 | 49 | $headscript = $this->getView()->plugin('headscript'); |
| 50 | 50 | $basepath = $this->getView()->plugin('basepath'); |
@@ -61,14 +61,14 @@ discard block |
||
| 61 | 61 | $form->prepare(); |
| 62 | 62 | |
| 63 | 63 | if ($form instanceof ViewPartialProviderInterface) { |
| 64 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
| 64 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | $content = $this->renderElements($form, $colMap, $buttonsSpan); |
| 68 | 68 | |
| 69 | 69 | return $this->openTag($form) |
| 70 | 70 | . '<div class="row" style="padding: 0 15px;">' |
| 71 | - . $content . '</div>' . $this->closeTag(); |
|
| 71 | + . $content.'</div>'.$this->closeTag(); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | public function renderButtons($buttons) |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $button->removeAttribute('name'); |
| 81 | 81 | $attrs = $helper->createAttributesString($button->getAttributes()); |
| 82 | 82 | |
| 83 | - $content.= '<button ' . $attrs . '>' |
|
| 83 | + $content .= '<button '.$attrs.'>' |
|
| 84 | 84 | . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
| 85 | 85 | . '</button>'; |
| 86 | 86 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | public function renderElements($form, $colMap = null, $buttonsSpan = null) |
| 92 | 92 | { |
| 93 | 93 | if ($form instanceof ViewPartialProviderInterface) { |
| 94 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
| 94 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | if (null === $colMap) { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $formElement = $this->getView()->plugin('formElement'); |
| 102 | 102 | $content = ''; |
| 103 | 103 | $buttonsRendered = false; |
| 104 | - $i=0; |
|
| 104 | + $i = 0; |
|
| 105 | 105 | foreach ($form as $element) { |
| 106 | 106 | if ($element instanceof Hidden) { |
| 107 | 107 | $content .= $formElement($element); |
@@ -117,14 +117,14 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | if ($element->getName() == $form->getButtonElement()) { |
| 120 | - $content.='<div class="input-group col-md-' . $cols . '">' |
|
| 120 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
| 121 | 121 | . $formElement($element) |
| 122 | 122 | . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
| 123 | - . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 123 | + . $this->renderButtons($form->getButtons()).'</div>' |
|
| 124 | 124 | . '</div>'; |
| 125 | 125 | $buttonsRendered = true; |
| 126 | 126 | } else { |
| 127 | - $content .= '<div class="input-group col-md-' . $cols . '">' |
|
| 127 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
| 128 | 128 | . $formElement($element) |
| 129 | 129 | . '</div>'; |
| 130 | 130 | } |
@@ -136,8 +136,8 @@ discard block |
||
| 136 | 136 | if (null === $buttonsSpan) { |
| 137 | 137 | $buttonsSpan = $form->getOption('buttons_span') ?: 12; |
| 138 | 138 | } |
| 139 | - $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">' |
|
| 140 | - . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 139 | + $content .= '<div class="input-group search-form-buttons col-md-'.$buttonsSpan.' text-right">' |
|
| 140 | + . '<div class="btn-group">'.$this->renderButtons($form->getButtons()).'</div></div>'; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | return $content; |
@@ -19,5 +19,5 @@ |
||
| 19 | 19 | { |
| 20 | 20 | protected $theme = 'light'; |
| 21 | 21 | |
| 22 | - protected $languagePath="modules/Core/js/tinymce-lang/"; |
|
| 22 | + protected $languagePath = "modules/Core/js/tinymce-lang/"; |
|
| 23 | 23 | } |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | ); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - return $this->openTag($element) . $labelContent . $this->closeTag(); |
|
| 31 | + return $this->openTag($element).$labelContent.$this->closeTag(); |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -113,11 +113,11 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | return str_replace( |
| 115 | 115 | array('#abort', |
| 116 | - '__file-uri__', |
|
| 117 | - '__file-name__', |
|
| 118 | - '__file-size__', |
|
| 119 | - 'fu-working', |
|
| 120 | - 'fa-file-o' |
|
| 116 | + '__file-uri__', |
|
| 117 | + '__file-name__', |
|
| 118 | + '__file-size__', |
|
| 119 | + 'fu-working', |
|
| 120 | + 'fa-file-o' |
|
| 121 | 121 | ), |
| 122 | 122 | array("$uri?do=delete", $uri, $name, $size, '', $icon), |
| 123 | 123 | $template |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | '<div class="fu-nonempty-notice"' . ('' == trim($preview) ? ' style="display:none;"' : '') . '>' |
| 141 | 141 | . $this->getNonEmptyNotice() . '</div>'; |
| 142 | 142 | $emptynotice = '<div class="fu-empty-notice"' |
| 143 | - . ('' == trim($preview) ? '' : ' style="display: none;"') . '> |
|
| 143 | + . ('' == trim($preview) ? '' : ' style="display: none;"') . '> |
|
| 144 | 144 | ' . $this->getEmptyNotice() . ' |
| 145 | 145 | </div>'; |
| 146 | 146 | |
@@ -90,12 +90,12 @@ discard block |
||
| 90 | 90 | </a> |
| 91 | 91 | <div class="fu-errors input-error"> |
| 92 | 92 | <ul class="errors"> |
| 93 | - <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain) . '</li> |
|
| 94 | - <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain) . '</li> |
|
| 93 | + <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain).'</li> |
|
| 94 | + <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain).'</li> |
|
| 95 | 95 | <li class="fu-error-count">' . sprintf( |
| 96 | 96 | $translator->translate('You may only upload %d files', $textDomain), |
| 97 | 97 | $element->getAttribute('data-maxfilecount') |
| 98 | -) . '</li><li class="fu-error-general">' . $translator->translate('An unknown error occured.') . '</li> |
|
| 98 | +).'</li><li class="fu-error-general">'.$translator->translate('An unknown error occured.').'</li> |
|
| 99 | 99 | </ul> |
| 100 | 100 | </div> |
| 101 | 101 | </li>'; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | /* @var $basepath \Laminas\View\Helper\BasePath */ |
| 104 | 104 | $renderer = $this->getView(); |
| 105 | 105 | $basepath = $renderer->plugin('basepath'); |
| 106 | - $createFileDisplay = function ($file) use ($template, $basepath) { |
|
| 106 | + $createFileDisplay = function($file) use ($template, $basepath) { |
|
| 107 | 107 | /* @var $file \Core\Entity\FileInterface */ |
| 108 | 108 | $uri = $basepath($file->getUri()); |
| 109 | 109 | $name = $file->getName(); |
@@ -137,11 +137,11 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | $nonemptynotice = |
| 140 | - '<div class="fu-nonempty-notice"' . ('' == trim($preview) ? ' style="display:none;"' : '') . '>' |
|
| 141 | - . $this->getNonEmptyNotice() . '</div>'; |
|
| 140 | + '<div class="fu-nonempty-notice"'.('' == trim($preview) ? ' style="display:none;"' : '').'>' |
|
| 141 | + . $this->getNonEmptyNotice().'</div>'; |
|
| 142 | 142 | $emptynotice = '<div class="fu-empty-notice"' |
| 143 | - . ('' == trim($preview) ? '' : ' style="display: none;"') . '> |
|
| 144 | - ' . $this->getEmptyNotice() . ' |
|
| 143 | + . ('' == trim($preview) ? '' : ' style="display: none;"').'> |
|
| 144 | + ' . $this->getEmptyNotice().' |
|
| 145 | 145 | </div>'; |
| 146 | 146 | |
| 147 | 147 | $markup = ' |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | */ |
| 289 | 289 | protected function getDefaultNotice() |
| 290 | 290 | { |
| 291 | - return '<small>' . $this->getTranslator()->translate('Click here to add files or use drag and drop.') . '</small>'; |
|
| 291 | + return '<small>'.$this->getTranslator()->translate('Click here to add files or use drag and drop.').'</small>'; |
|
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | /** |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | */ |
| 299 | 299 | public function setAllowRemove($allowRemove) |
| 300 | 300 | { |
| 301 | - $this->allowRemove = (bool)$allowRemove; |
|
| 301 | + $this->allowRemove = (bool) $allowRemove; |
|
| 302 | 302 | |
| 303 | 303 | return $this; |
| 304 | 304 | } |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | */ |
| 311 | 311 | public function setAllowClickableDropZone($allowClickableDropZone) |
| 312 | 312 | { |
| 313 | - $this->allowClickableDropZone = (bool)$allowClickableDropZone; |
|
| 313 | + $this->allowClickableDropZone = (bool) $allowClickableDropZone; |
|
| 314 | 314 | |
| 315 | 315 | return $this; |
| 316 | 316 | } |
@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | if ($element instanceof ViewPartialProviderInterface && !$ignoreViewPartial) { |
| 51 | 51 | return $this->getView()->partial( |
| 52 | 52 | $element->getViewPartial(), |
| 53 | - array( |
|
| 54 | - 'element' => $element, |
|
| 55 | - 'labelWitdh' => $labelWidth, |
|
| 56 | - 'label_attributes' => $labelAttributes |
|
| 53 | + array( |
|
| 54 | + 'element' => $element, |
|
| 55 | + 'labelWitdh' => $labelWidth, |
|
| 56 | + 'label_attributes' => $labelAttributes |
|
| 57 | 57 | ) |
| 58 | 58 | ); |
| 59 | 59 | } |
@@ -110,9 +110,9 @@ discard block |
||
| 110 | 110 | if ($desc && $this->layout != Form::LAYOUT_BARE) { |
| 111 | 111 | if (null !== ($translator = $this->getTranslator())) { |
| 112 | 112 | $desc = $translator->translate( |
| 113 | - $desc, |
|
| 114 | - $this->getTranslatorTextDomain() |
|
| 115 | - ); |
|
| 113 | + $desc, |
|
| 114 | + $this->getTranslatorTextDomain() |
|
| 115 | + ); |
|
| 116 | 116 | } |
| 117 | 117 | $elementString .= sprintf( |
| 118 | 118 | '<div id="%s-desc" class="cam-description alert alert-info">%s</div>', |
@@ -78,8 +78,8 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | // Does this element have errors ? |
| 80 | 80 | if (!empty($elementErrors) && !empty($inputErrorClass) && $this->layout != Form::LAYOUT_BARE) { |
| 81 | - $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class') . ' ' : ''); |
|
| 82 | - $classAttributes = $classAttributes . $inputErrorClass; |
|
| 81 | + $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class').' ' : ''); |
|
| 82 | + $classAttributes = $classAttributes.$inputErrorClass; |
|
| 83 | 83 | |
| 84 | 84 | $element->setAttribute('class', $classAttributes); |
| 85 | 85 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | if (!$element->hasAttribute('id')) { |
| 88 | 88 | $elementId = preg_replace( |
| 89 | 89 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
| 90 | - array('-' , '-', ''), |
|
| 90 | + array('-', '-', ''), |
|
| 91 | 91 | $element->getName() |
| 92 | 92 | ); |
| 93 | 93 | $element->setAttribute('id', $elementId); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | // moved label here so we can change it in the ElementViewHelper |
| 136 | - $label = $element->getLabel(); |
|
| 136 | + $label = $element->getLabel(); |
|
| 137 | 137 | if (isset($label) && '' !== $label && !$element instanceof \Laminas\Form\Element\Button) { |
| 138 | 138 | // Translate the label |
| 139 | 139 | if (null !== ($translator = $this->getTranslator())) { |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | if ($this->shouldWrap) { |
| 179 | 179 | $spanWidth = 12 - $labelWidth; |
| 180 | 180 | $elementString = sprintf( |
| 181 | - '<div class="col-md-%d%s" id="' . $elementId . '-span">%s</div>', |
|
| 181 | + '<div class="col-md-%d%s" id="'.$elementId.'-span">%s</div>', |
|
| 182 | 182 | $spanWidth, |
| 183 | 183 | $elementErrors ? " $inputErrorClass" : '', |
| 184 | 184 | $elementString |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $label |
| 190 | 190 | ); |
| 191 | 191 | } |
| 192 | - $markup = $label . $elementString; |
|
| 192 | + $markup = $label.$elementString; |
|
| 193 | 193 | } |
| 194 | 194 | } |
| 195 | 195 | } else { |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | && !$element instanceof \Laminas\Form\Element\Button |
| 211 | 211 | && $this->layout != Form::LAYOUT_BARE |
| 212 | 212 | ) { |
| 213 | - $markup = sprintf('<div class="controls controls-row ' . $form_row_class . '">%s</div>', $markup); |
|
| 213 | + $markup = sprintf('<div class="controls controls-row '.$form_row_class.'">%s</div>', $markup); |
|
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | return $markup; |
@@ -71,8 +71,8 @@ |
||
| 71 | 71 | $basepath = $renderer->plugin('basepath'); |
| 72 | 72 | |
| 73 | 73 | $headscript->appendFile($basepath('modules/Core/js/core.spinnerbutton.js')) |
| 74 | - //->appendFile($basepath('/assets/select2/js/select2.min.js')) |
|
| 75 | - ->appendFile($basepath('modules/Core/js/core.forms.js')); |
|
| 74 | + //->appendFile($basepath('/assets/select2/js/select2.min.js')) |
|
| 75 | + ->appendFile($basepath('modules/Core/js/core.forms.js')); |
|
| 76 | 76 | |
| 77 | 77 | /* @noinspection PhpParamsInspection */ |
| 78 | 78 | //$renderer->headLink()->appendStylesheet($basepath('/assets/select2/css/select2.css')); |
@@ -88,14 +88,14 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | $class = $form->getAttribute('class'); |
| 90 | 90 | $class = preg_replace('~\bform-[^ ]+\b~', '', $class); |
| 91 | - $class .= ' ' . $layout; |
|
| 91 | + $class .= ' '.$layout; |
|
| 92 | 92 | |
| 93 | 93 | $form->setAttribute('class', $class); |
| 94 | 94 | |
| 95 | 95 | $formId = $form->getAttribute('id') ?: $form->getName(); |
| 96 | 96 | $formId = preg_replace( |
| 97 | 97 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
| 98 | - array('-' , '-' , '' ), |
|
| 98 | + array('-', '-', ''), |
|
| 99 | 99 | $formId |
| 100 | 100 | ); |
| 101 | 101 | $form->setAttribute( |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | if (!$elementId) { |
| 122 | 122 | $elementId = preg_replace( |
| 123 | 123 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
| 124 | - array('-' , '-', ''), |
|
| 124 | + array('-', '-', ''), |
|
| 125 | 125 | $element->getName() |
| 126 | 126 | ); |
| 127 | 127 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | - return $this->openTag($form) . $formContent . $this->closeTag(); |
|
| 162 | + return $this->openTag($form).$formContent.$this->closeTag(); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | ); |
| 188 | 188 | |
| 189 | 189 | if ($desc = $form->getOption('description', '')) { |
| 190 | - $descriptionParams=$form->getOption('description_params'); |
|
| 190 | + $descriptionParams = $form->getOption('description_params'); |
|
| 191 | 191 | $translator = $this->getTranslator(); |
| 192 | 192 | $textDomain = $this->getTranslatorTextDomain(); |
| 193 | 193 | $desc = $translator->translate($desc, $textDomain); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | $desc |
| 209 | 209 | ); |
| 210 | 210 | } else { |
| 211 | - $formContent = '<div class="form-content">' . $formContent . '</div>'; |
|
| 211 | + $formContent = '<div class="form-content">'.$formContent.'</div>'; |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | $markup = '<div id="form-%s" class="form-container">' |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | . '</div>'; |
| 218 | 218 | |
| 219 | 219 | if ($label = $form->getLabel()) { |
| 220 | - $label = '<div class="form-headline"><h3>' . $renderer->translate($label) . '</h3></div>'; |
|
| 220 | + $label = '<div class="form-headline"><h3>'.$renderer->translate($label).'</h3></div>'; |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | return sprintf( |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | protected function additionalOptions() |
| 21 | 21 | { |
| 22 | - return 'toolbar: "undo redo | styleselect forecolor | bold italic | alignleft aligncenter alignright alignjustify | ' . |
|
| 22 | + return 'toolbar: "undo redo | styleselect forecolor | bold italic | alignleft aligncenter alignright alignjustify | '. |
|
| 23 | 23 | 'bullist numlist outdent indent ", '; |
| 24 | 24 | } |
| 25 | 25 | } |