X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fhelper%2Fhtml%2Fforms%2Fclass_HtmlFormHelper.php;h=768c5ed680933efdda73258fe53538e5135c3566;hb=34e0085d055bf88dcdb0caf4d29bae66fd8eafd7;hp=4e6fbc47eda7f2406279028dc0d263f85b4cb52b;hpb=af6e81a3d07cf468d3fa8cb53a9899790da2a7a1;p=core.git diff --git a/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php b/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php index 4e6fbc47..768c5ed6 100644 --- a/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php +++ b/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php @@ -1,14 +1,17 @@ setTemplateInstance($templateInstance); // Is the form id not set? - if ($formId === FALSE) { + if ($formId === false) { // Use form id from form name $formId = $formName; } // END - if @@ -90,13 +98,13 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { // Set form name $helperInstance->setFormName($formName); - // A form-less field may say 'FALSE' here... - if ($withForm === TRUE) { + // A form-less field may say 'false' here... + if ($withForm === true) { // Create the form $helperInstance->addFormTag($formName, $formId); } else { // Disable form - $helperInstance->enableForm(FALSE); + $helperInstance->enableForm(false); } // Return the prepared instance @@ -106,15 +114,15 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { /** * Add the form tag or close it an already opened form tag * - * @param $formName Name of the form (default: FALSE) - * @param $formId Id of the form (attribute 'id'; default: FALSE) + * @param $formName Name of the form (default: false) + * @param $formId Id of the form (attribute 'id'; default: false) * @return void - * @throws InvalidFormNameException If the form name is invalid ( = FALSE) + * @throws InvalidFormNameException If the form name is invalid ( = false) * @todo Add some unique PIN here to bypass problems with some browser and/or extensions */ - public function addFormTag ($formName = FALSE, $formId = FALSE) { + public function addFormTag ($formName = false, $formId = false) { // When the form is not yet opened at least form name must be valid - if (($this->formOpened === FALSE) && ($formName === FALSE)) { + if (($this->formOpened === false) && ($formName === false)) { // Thrown an exception throw new InvalidFormNameException ($this, self::EXCEPTION_FORM_NAME_INVALID); } // END - if @@ -123,26 +131,21 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { $formContent = ''; // Check whether we shall open or close the form - if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { + if (($this->formOpened === false) && ($this->formEnabled === true)) { // Add HTML code - $formContent = sprintf("