isFirstPill = true; } /** * */ public function fillWrap() { // $this->wrap[WRAP_SETUP_OUTER][WRAP_SETUP_START] = '
'; // $this->wrap[WRAP_SETUP_OUTER][WRAP_SETUP_END] = '
'; $this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_START] = "

"; $this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_END] = "

"; // Element: Label + Input + Note $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_CLASS] = "form-group clearfix"; $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START] = "
"; $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END] = "
"; $this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_START] = "
"; $this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_END] = "
"; $this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_START] = ""; $this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_END] = ""; $this->wrap[WRAP_SETUP_IN_TEMPLATE_GROUP][WRAP_SETUP_START] = ""; $this->wrap[WRAP_SETUP_IN_TEMPLATE_GROUP][WRAP_SETUP_END] = ""; // $this->feDivClass['radio'] = 'radio'; // $this->feDivClass['checkbox'] = 'checkbox'; } /** * @param string $addClass * * @return string * @throws \CodeException */ public function getRowOpenTag($addClass = '') { $class = Support::doAttribute('class', [$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_CLASS], $addClass]); return "
"; } /** * Fill the BS wrapper for Label/Input/Note. * For legacy reasons, $label/$input/$note might be a number (0-12) or the bs column classes ('col-md-12 col-lg9') * * @param $label * @param $input * @param $note */ public function fillWrapLabelInputNote($label, $input, $note) { $label = is_numeric($label) ? ('col-md-' . $label) : $label; $this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_START] = "
"; $this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_END] = "
"; $input = is_numeric($input) ? ('col-md-' . $input) : $input; $this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_START] = "
"; $this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_END] = "
"; $note = is_numeric($note) ? ('col-md-' . $note) : $note; $this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_START] = "
"; $this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_END] = "
"; } /** * @return string */ public function getProcessFilter() { return FORM_ELEMENTS_NATIVE_SUBRECORD; } /** * @return string */ public function doSubrecords() { return ''; } /** * @param string $mode * @return string * @throws \CodeException * @throws \DbException * @throws \UserFormException * @throws \UserReportException */ public function head($mode = FORM_LOAD) { $html = ''; $title = ''; $html .= '
formSpec[F_CLASS], true) . '>'; // main
around everything, Whole FORM; class="container" or class="container-fluid" $button = Support::wrapTag('
', $this->buildButtons()); // Show title / frame only if there is a title given. if (trim($this->formSpec[F_TITLE]) != '') { $classTitle = isset($this->formSpec[F_CLASS_TITLE]) ? $this->formSpec[F_CLASS_TITLE] : "qfq-form-title"; $title = Support::wrapTag('
', Support::wrapTag('
', $this->formSpec[F_TITLE])); } $html .= $button . $title; $dummy = array(); $pill = $this->buildPillNavigation($mode, OnArray::filter($this->feSpecNative, FE_TYPE, FE_TYPE_PILL), $dummy); $html .= Support::wrapTag('
', $pill); $html .= $this->getFormTag(); $class = ['tab-content', $this->formSpec[F_CLASS_BODY]]; if ($pill == '') { $class[] = 'col-md-12'; $class[] = 'qfq-form-body'; // Make an outline on form body if ($title == '') { $class[] = 'qfq-form-no-title'; } } $html .= "
"; return $html; } /** * Creates a Checkbox, which toggles 'hide'/'unhide' via JS, on all elements with class= CLASS_FORM_ELEMENT_EDIT. * * @return string - the rendered Checkbox */ private function buildShowEditFormElementCheckbox() { // EditFormElement Icons $js = '$(".' . CLASS_FORM_ELEMENT_EDIT . '").toggleClass("hidden")'; $element = "" . Support::wrapTag("", ''); $element = Support::wrapTag('