summaryrefslogtreecommitdiff
path: root/protected/components/Html.php
diff options
context:
space:
mode:
authorTristan Zur <tzur@ccwn.org>2012-05-15 21:34:54 +0200
committerTristan Zur <tzur@ccwn.org>2012-05-15 21:34:54 +0200
commit1c57e4d02c914cb83d13ef919179f9cb73b5fbbe (patch)
tree2d987f9905432d5fecd918591c581365276c0f85 /protected/components/Html.php
parent94bb97f7b574ad8557d568a2ef1288dae3b4e9c8 (diff)
- Initiale Verein-Veranstaltungsverwaltung
- components/Html ergänzt für Anzeige der Einheiten-Dropdown Box - Logo-Upload für Admins - AngebotVerein mit Autocomplete und "Einheiten-Tausch"
Diffstat (limited to 'protected/components/Html.php')
-rw-r--r--protected/components/Html.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/protected/components/Html.php b/protected/components/Html.php
index 6c7df3c..38128d5 100644
--- a/protected/components/Html.php
+++ b/protected/components/Html.php
@@ -34,5 +34,17 @@ class Html extends CHtml {
public static function enumDropDownList($model, $attribute, $htmlOptions = array()) {
return CHtml::activeDropDownList($model, $attribute, Html::enumItem($model, $attribute), $htmlOptions);
}
+
+ public static function einheitenDropDownList($model, $attribute, $values, $htmlOptions = array()) {
+ $tmpEinheiten = preg_split('/,/', $values);
+ $einheiten = array();
+ foreach ($tmpEinheiten as $einheit) {
+ $einheit = trim($einheit);
+ $einheiten[$einheit] = $einheit;
+ }
+ self::resolveNameID($model, $attribute, $htmlOptions);
+ $selectedValue = self::resolveValue($model, $attribute);
+ return CHtml::dropDownList($htmlOptions['name'], $selectedValue, $einheiten);
+ }
}
?> \ No newline at end of file