Commit 119c1c5b authored by Carsten  Rose's avatar Carsten Rose
Browse files

BuildFormBootstrap: fixed bug with unintialised variable

parent 88093a16
...@@ -34,7 +34,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -34,7 +34,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
$this->isFirstPill = true; $this->isFirstPill = true;
// Set some defaults // Set some defaults
if(!isset($this->formSpec['class'])) { if (!isset($this->formSpec['class'])) {
$this->formSpec['class'] = 'container'; $this->formSpec['class'] = 'container';
} }
} }
...@@ -96,7 +96,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -96,7 +96,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
$html = "<p><a href='$formEditUrl'>Edit</a> <small>[$sipParamString]</small></p>"; $html = "<p><a href='$formEditUrl'>Edit</a> <small>[$sipParamString]</small></p>";
$deleteUrl = $this->createDeleteUrl($this->formSpec['tableName'], $this->store->getVar(SIP_RECORD_ID, STORE_SIP)); $deleteUrl = $this->createDeleteUrl($this->formSpec['tableName'], $this->store->getVar(SIP_RECORD_ID, STORE_SIP));
$html .= "<p><a href='$deleteUrl'>Delete</a>"; $html .= "<p><a href='$deleteUrl'>Delete</a>";
$html .= '<div ' . $this->getAttribute('class', $this->formSpec['class'], TRUE) . '>'; // main <div class=...> around everything, Whole FORM; class="container" or class="container-fluid" $html .= '<div ' . $this->getAttribute('class', $this->formSpec['class'], TRUE) . '>'; // main <div class=...> around everything, Whole FORM; class="container" or class="container-fluid"
...@@ -155,7 +155,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -155,7 +155,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
if ($ii > $maxVisiblePill) { if ($ii > $maxVisiblePill) {
$htmlDropdown = Support::wrapTag('<ul class="dropdown-menu">', $pillDropdown, true); $htmlDropdown = Support::wrapTag('<ul class="dropdown-menu">', $pillDropdown, true);
$htmlDropdown = '<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button">more <span class="caret"></span></a>' . $htmlDropdown; $htmlDropdown = '<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button">more <span class="caret"></span></a>' . $htmlDropdown;
$htmlDropdown = Support::wrapTag('<li role="presentation" class="dropdown">', $htmlDropdown,false); $htmlDropdown = Support::wrapTag('<li role="presentation" class="dropdown">', $htmlDropdown, false);
} }
$htmlDropdown = Support::wrapTag('<ul id="' . $this->getTabId() . '" class="nav nav-pills" role="tablist">', $pillButton . $htmlDropdown); $htmlDropdown = Support::wrapTag('<ul id="' . $this->getTabId() . '" class="nav nav-pills" role="tablist">', $pillButton . $htmlDropdown);
...@@ -193,9 +193,8 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -193,9 +193,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
<button id="form-edit-button" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-wrench"></span></button> <button id="form-edit-button" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-wrench"></span></button>
</div> </div>
BUTTONS; BUTTONS;
if($this->store->getVar('SHOW_DEBUG_INFO', STORE_SYSTEM) === 'yes'){
$formEditButton = $tmp; $formEditButton = ($this->store->getVar('SHOW_DEBUG_INFO', STORE_SYSTEM) === 'yes') ? $tmp : '';
}
$html = <<<BUTTONS $html = <<<BUTTONS
......
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