if (($this->formOpened === false) && ($formName === false)) {
// Thrown an exception
throw new InvalidFormNameException ($this, self::EXCEPTION_FORM_NAME_INVALID);
- }
+ } // END - if
// Close the form is default
$formContent = "</form>";
if ($this->groupOpened === true) {
// Then automatically close it here
$this->addFormGroup("", "");
- }
+ } // END - if
/* @TODO Add some unique PIN here to bypass problems with some browser and/or extensions */
// Simply close it
if ($this->formOpened === false) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- }
+ } // END - if
// Generate the content
$inputContent = sprintf("<input type=\"text\" class=\"textfield\" id=\"%s\" name=\"%s\" value=\"%s\" />",
if ($this->formOpened === false) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- }
+ } // END - if
// Generate the content
$inputContent = sprintf("<input type=\"password\" class=\"password\" id=\"%s\" name=\"%s\" value=\"%s\" />",
if ($this->formOpened === false) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- }
+ } // END - if
// Generate the content
$inputContent = sprintf("<input type=\"hidden\" name=\"%s\" value=\"%s\" />",
if ($this->formOpened === false) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- }
+ } // END - if
// Set wether the check box is checked...
$checked = " checked=\"checked\"";
if ($this->formOpened === false) {
// Throw an exception
throw new FormClosedException (array($this, "reset"), self::EXCEPTION_CLOSED_FORM);
- }
+ } // END - if
// Generate the content
$inputContent = sprintf("<input type=\"reset\" class=\"reset_button\" id=\"%s_reset\" value=\"%s\" />",
if ($this->formOpened === false) {
// Throw an exception
throw new FormClosedException (array($this, "submit"), self::EXCEPTION_CLOSED_FORM);
- }
+ } // END - if
// Generate the content
$inputContent = sprintf("<input type=\"submit\" class=\"submit_button\" id=\"%s_submit\" name=\"%s_button\" value=\"%s\" />",
if ($this->formOpened === false) {
// Throw exception here
throw new FormClosedException(array($this, $groupName), self::EXCEPTION_CLOSED_FORM);
- }
+ } // END - if
// At least the group name should be set
if ((empty($groupName)) && ($this->groupOpened === false)) {
// Throw exception here
throw new EmptyVariableException(array($this, 'groupName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
- }
+ } // END - if
// Initialize content with closing div by default
$content = " </div>\n</div><!-- Group - CLOSE //-->";
if ($this->subGroupOpened === true) {
// Close it here
$this->addFormSubGroup("", "");
- }
+ } // END - if
// Add the content
$this->addContent($content);
// All call it again if the group name is not empty
if (!empty($groupName)) {
$this->addFormGroup($groupName, $groupText);
- }
+ } // END - if
}
}
if ($this->groupOpened === false) {
// Throw exception here
throw new FormGroupClosedException(array($this, $subGroupName), self::EXCEPTION_UNEXPECTED_CLOSED_GROUP);
- }
+ } // END - if
// At least the sub group name should be set
if ((empty($subGroupName)) && ($this->subGroupOpened === false)) {
// Throw exception here
throw new EmptyVariableException(array($this, 'groupName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
- }
+ } // END - if
// Initialize content with closing div by default
$content = " </div>\n</div><!-- Sub group- CLOSE //-->";
// All call it again if sub group name is not empty
if (!empty($subGroupName)) {
$this->addFormSubGroup($subGroupName, $subGroupText);
- }
+ } // END - if
}
}
if ($this->formOpened === false) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- }
+ } // END - if
// Set the block type
$block = "div";
if ($this->formOpened === false) {
// Throw an exception
throw new FormClosedException (array($this, "form_notes"), self::EXCEPTION_CLOSED_FORM);
- }
+ } // END - if
// Is a group open?
if ($this->groupOpened === true) {
// Then automatically close it here
$this->addFormGroup("", "");
- }
+ } // END - if
// Generate the content
$inputContent = sprintf(" <div id=\"form_note\">
if ($this->formOpened === true) {
// Throw an exception
throw new FormOpenedException ($this, self::EXCEPTION_OPENED_FORM);
- }
+ } // END - if
// Send content to template engine
$this->getTemplateInstance()->assignVariable($this->formName, $this->getContent());