X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fhelper%2Fweb%2Fforms%2Fclass_WebFormHelper.php;h=acb419a222aaf9488bf022ecd164fd0a5c98baea;hp=a188251b5cd84215b1e2c94e55a4ef4beb77a3c1;hb=bbf48d46cb9063a4d2b78c106747147712f5474e;hpb=2395ee5b9b0a54681e7b04297cb2aa21fe646a23
diff --git a/inc/classes/main/helper/web/forms/class_WebFormHelper.php b/inc/classes/main/helper/web/forms/class_WebFormHelper.php
index a188251..acb419a 100644
--- a/inc/classes/main/helper/web/forms/class_WebFormHelper.php
+++ b/inc/classes/main/helper/web/forms/class_WebFormHelper.php
@@ -378,7 +378,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
} // END - if
// At least the group name should be set
- if ((empty($groupId)) && (!$this->ifGroupOpenedPreviously())) {
+ if ((empty($groupId)) && ($this->ifGroupOpenedPreviously() === false)) {
// Throw exception here
throw new EmptyVariableException(array($this, 'groupId'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
} elseif (empty($groupId)) {
@@ -387,7 +387,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
}
// Same group to open?
- if ((!$this->ifGroupOpenedPreviously()) && ($groupId == $this->getPreviousGroupId())) {
+ if (($this->ifGroupOpenedPreviously() === false) && ($groupId === $this->getPreviousGroupId())) {
// Abort here silently
return false;
} // END - if
@@ -396,7 +396,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
$content = " \n";
// Is this group opened?
- if (!$this->ifGroupOpenedPreviously()) {
+ if ($this->ifGroupOpenedPreviously() === false) {
// Begin the div/span blocks
$content = sprintf("
@@ -412,7 +412,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
);
// Switch the state
- $this->openGroupByIdContent($groupId, $content);
+ $this->openGroupByIdContent($groupId, $content, "div");
} else {
// Is a sub group opened?
if ($this->ifSubGroupOpenedPreviously()) {
@@ -447,13 +447,13 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
*/
public function addFormSubGroup ($subGroupId = "", $subGroupText = "") {
// Is a group opened?
- if (!$this->ifGroupOpenedPreviously()) {
+ if ($this->ifGroupOpenedPreviously() === false) {
// Throw exception here
throw new FormFormClosedException(array($this, $subGroupId), self::EXCEPTION_UNEXPECTED_CLOSED_GROUP);
} // END - if
// At least the sub group name should be set
- if ((empty($subGroupId)) && (!$this->ifSubGroupOpenedPreviously())) {
+ if ((empty($subGroupId)) && ($this->ifSubGroupOpenedPreviously() === false)) {
// Throw exception here
throw new EmptyVariableException(array($this, 'subGroupId'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
} elseif (empty($subGroupId)) {
@@ -462,7 +462,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
}
// Same sub group to open?
- if ((!$this->ifSubGroupOpenedPreviously()) && ($subGroupId == $this->getPreviousSubGroupId())) {
+ if (($this->ifSubGroupOpenedPreviously() === false) && ($subGroupId == $this->getPreviousSubGroupId())) {
// Abort here silently
return false;
} // END - if
@@ -471,7 +471,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
$content = "
\n";
// Is this group opened?
- if (!$this->ifSubGroupOpenedPreviously()) {
+ if ($this->ifSubGroupOpenedPreviously() === false) {
// Begin the span block
$content = sprintf("
@@ -487,7 +487,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
);
// Switch the state and remeber the name
- $this->openSubGroupByIdContent($subGroupId, $content);
+ $this->openSubGroupByIdContent($subGroupId, $content, "div");
} else {
// Get previous sub group id
$prevSubGroupId = $this->getPreviousSubGroupId();
@@ -587,7 +587,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
} // END - if
// Shall we close or open the sub group?
- if ((!$this->ifSubGroupOpenedPreviously()) && ($this->getPreviousSubGroupId() !== $selectId)) {
+ if (($this->ifSubGroupOpenedPreviously() === false) && ($this->getPreviousSubGroupId() !== $selectId)) {
// Initialize first entry (which might be non-selectable if content is provided
if (!empty($firstEntry)) {
// Add selection around it
@@ -605,10 +605,10 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
);
// Open the sub group
- $this->openSubGroupByIdContent($selectId, $content);
+ $this->openSubGroupByIdContent($selectId, $content, "select");
} elseif ($this->getPreviousSubGroupId() != $selectId) {
// Something went wrong!
- $this->debugInstance();
+ $this->debugInstance(__METHOD__."(): Previous sub group id {$this->getPreviousSubGroupId()} does not match current id {$selectId}.");
} else {
// Close the sub group
$this->closePreviousSubGroupByContent("");
@@ -628,7 +628,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
*/
public function addSelectSubOption ($subName, $subValue) {
// Is there a sub group (shall be a selection box!)
- if (!$this->ifSubGroupOpenedPreviously()) {
+ if ($this->ifSubGroupOpenedPreviously() === false) {
// Then throw an exception here
throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED);
} // END - if
@@ -656,7 +656,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
*/
public function addSelectOption ($optionName, $optionValue) {
// Is there a sub group (shall be a selection box!)
- if (!$this->ifSubGroupOpenedPreviously()) {
+ if ($this->ifSubGroupOpenedPreviously() === false) {
// Then throw an exception here
throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED);
} // END - if