aboutsummaryrefslogtreecommitdiff
path: root/h-source/Library/Form
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Library/Form')
-rwxr-xr-xh-source/Library/Form/Entry.php1
-rwxr-xr-xh-source/Library/Form/Form.php2
-rwxr-xr-xh-source/Library/Form/Select.php2
3 files changed, 4 insertions, 1 deletions
diff --git a/h-source/Library/Form/Entry.php b/h-source/Library/Form/Entry.php
index a17ac5e..8136dda 100755
--- a/h-source/Library/Form/Entry.php
+++ b/h-source/Library/Form/Entry.php
@@ -32,6 +32,7 @@ abstract class Form_Entry {
public $labelString = null; //label of the form
public $labelClass = null; //the class of the tag of the label
public $options = array(); //options (if the entry is a <select> entry or a radio button). Associative array or comma-divided list.
+ public $reverse = null; //reverse label with value in select entries
public $defaultValue = '';
public $wrap = array();
public $deleteButton = null;
diff --git a/h-source/Library/Form/Form.php b/h-source/Library/Form/Form.php
index f358651..a1a9fda 100755
--- a/h-source/Library/Form/Form.php
+++ b/h-source/Library/Form/Form.php
@@ -81,6 +81,7 @@ class Form_Form {
$defaultValue = array_key_exists('defaultValue',$entry) ? $entry['defaultValue'] : null;
$wrap = array_key_exists('wrap',$entry) ? $entry['wrap'] : array();
$deleteButton = array_key_exists('deleteButton',$entry) ? $entry['deleteButton'] : null;
+ $reverse = array_key_exists('reverse',$entry) ? $entry['reverse'] : null;
$this->entry[$name]->entryClass = $entryClass;
$this->entry[$name]->labelString = $labelString;
@@ -90,6 +91,7 @@ class Form_Form {
$this->entry[$name]->defaultValue = $defaultValue;
$this->entry[$name]->wrap = $wrap;
$this->entry[$name]->deleteButton = $deleteButton;
+ $this->entry[$name]->reverse = $reverse;
}
}
diff --git a/h-source/Library/Form/Select.php b/h-source/Library/Form/Select.php
index 521e3b5..53d7632 100755
--- a/h-source/Library/Form/Select.php
+++ b/h-source/Library/Form/Select.php
@@ -39,7 +39,7 @@ class Form_Select extends Form_Entry
$returnString .= $wrap[1];
$returnString .= $this->getLabelTag();
$returnString .= $wrap[2];
- $returnString .= Html_Form::select($this->entryName,$value,$this->options,$this->className, $this->idName);
+ $returnString .= Html_Form::select($this->entryName,$value,$this->options,$this->className, $this->idName, $this->reverse);
$returnString .= $wrap[3];
$returnString .="</div>\n";
$returnString .= $wrap[4];