Commit f6f4290c authored by Carsten  Rose's avatar Carsten Rose
Browse files

B6283: Form: hide title frame if empty

parent 37ce49a6
...@@ -111,7 +111,7 @@ enterAsSubmit = 1 ...@@ -111,7 +111,7 @@ enterAsSubmit = 1
editFormPage = form editFormPage = form
# cat=form-config/config; type=string; label=Form data pattern error message:Default is 'pattern error'. Customizable error message used in validator.js. 'pattern' violation. # cat=form-config/config; type=string; label=Form data pattern error message:QFQ default is pattern dependent - leave this empty to use pattern specific messages. Customizable error message used in validator.js. 'pattern' violation.
formDataPatternError = formDataPatternError =
# cat=form-config/config; type=string; label=Form data required error message:Default is 'required error'. Customizable error message used in validator.js. 'required' violation. # cat=form-config/config; type=string; label=Form data required error message:Default is 'required error'. Customizable error message used in validator.js. 'required' violation.
......
...@@ -117,12 +117,16 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -117,12 +117,16 @@ class BuildFormBootstrap extends AbstractBuildForm {
*/ */
public function head($mode = FORM_LOAD) { public function head($mode = FORM_LOAD) {
$html = ''; $html = '';
$title = '';
$html .= '<div ' . Support::doAttribute('class', $this->formSpec[F_CLASS], true) . '>'; // main <div class=...> around everything, Whole FORM; class="container" or class="container-fluid" $html .= '<div ' . Support::doAttribute('class', $this->formSpec[F_CLASS], true) . '>'; // main <div class=...> around everything, Whole FORM; class="container" or class="container-fluid"
$button = Support::wrapTag('<div class="row"><div class="col-md-12">', $this->buildButtons()); $button = Support::wrapTag('<div class="row"><div class="col-md-12">', $this->buildButtons());
$title = Support::wrapTag('<div class="row"><div class="col-md-12">', Support::wrapTag('<div class="qfq-form-title">', $this->formSpec[F_TITLE])); // Show title / frame only if there is a title given.
if ($this->formSpec[F_TITLE] != '') {
$title = Support::wrapTag('<div class="row"><div class="col-md-12">', Support::wrapTag('<div class="qfq-form-title">', $this->formSpec[F_TITLE]));
}
$html .= $button . $title; $html .= $button . $title;
...@@ -446,8 +450,8 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -446,8 +450,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
case FE_MODE_SHOW: case FE_MODE_SHOW:
case FE_MODE_REQUIRED: case FE_MODE_REQUIRED:
$attributeLi = ''; $attributeLi = '';
$json[$htmlFormElementName][API_ELEMENT_UPDATE][$htmlIdLi][API_ELEMENT_ATTRIBUTE][HTML_ATTR_CLASS] = ''; $json[$htmlFormElementName][API_ELEMENT_UPDATE][$htmlIdLi][API_ELEMENT_ATTRIBUTE][HTML_ATTR_CLASS] = '';
$json[$htmlFormElementName][API_ELEMENT_UPDATE][$htmlIdLiA][API_ELEMENT_ATTRIBUTE][HTML_ATTR_CLASS] = ''; $json[$htmlFormElementName][API_ELEMENT_UPDATE][$htmlIdLiA][API_ELEMENT_ATTRIBUTE][HTML_ATTR_CLASS] = '';
break; break;
case FE_MODE_READONLY: case FE_MODE_READONLY:
...@@ -530,7 +534,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -530,7 +534,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
$attribute['class'] = 'form-horizontal'; $attribute['class'] = 'form-horizontal';
$attribute['data-toggle'] = 'validator'; $attribute['data-toggle'] = 'validator';
if (isset($this->formSpec[F_SAVE_BUTTON_ACTIVE]) && $this->formSpec[F_SAVE_BUTTON_ACTIVE]!='0') { if (isset($this->formSpec[F_SAVE_BUTTON_ACTIVE]) && $this->formSpec[F_SAVE_BUTTON_ACTIVE] != '0') {
$attribute[DATA_ENABLE_SAVE_BUTTON] = 'true'; $attribute[DATA_ENABLE_SAVE_BUTTON] = 'true';
} }
...@@ -831,8 +835,8 @@ EOF; ...@@ -831,8 +835,8 @@ EOF;
switch ($mode) { switch ($mode) {
case FORM_SAVE: case FORM_SAVE:
case FORM_UPDATE: case FORM_UPDATE:
$pillArray = OnArray::filter($this->feSpecNative, FE_TYPE, FE_TYPE_PILL); $pillArray = OnArray::filter($this->feSpecNative, FE_TYPE, FE_TYPE_PILL);
$this->buildPillNavigation($mode, $pillArray, $json); $this->buildPillNavigation($mode, $pillArray, $json);
$data = array_merge($data, $json); $data = array_merge($data, $json);
break; break;
default: default:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment