From 0ff635f5eaffafe7f37257c62752752d507cf9e2 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 28 Jul 2017 17:25:27 +0200 Subject: [PATCH] - Added Zusatzfelder tab for UDF in FAS, students and employees - UDF for person and prestudent only - Added CSS for widgets - Fixed checkbox - Improved aesthetics of widgets --- application/libraries/WidgetLib.php | 30 +---- application/views/system/udf.php | 103 ++++++++++++------ application/views/widgets/checkbox.php | 11 +- application/views/widgets/dropdown.php | 8 +- application/views/widgets/textarea.php | 4 +- application/views/widgets/textfield.php | 4 +- application/widgets/UDFWidget.php | 23 +--- content/mitarbeiter/mitarbeiteroverlay.js.php | 26 +++++ .../mitarbeiter/mitarbeiteroverlay.xul.php | 8 ++ content/student/studentenoverlay.xul.php | 6 +- skin/widgets.css | 26 ++++- 11 files changed, 148 insertions(+), 101 deletions(-) diff --git a/application/libraries/WidgetLib.php b/application/libraries/WidgetLib.php index 311bd3a90..b60f28f7b 100644 --- a/application/libraries/WidgetLib.php +++ b/application/libraries/WidgetLib.php @@ -1070,23 +1070,8 @@ class CheckboxWidget extends Widget const VALUE_FIELD = 'value'; // Name of the property that will be used to store the value between the option tags const DESCRIPTION_FIELD = 'description'; - // The name of the element of the data array given to the view - // this element is used to tell what element of the dropdown is selected - const CHECKED_ELEMENT = 'checkedElement'; - - /** - * - */ - protected function setValue($value) - { - $tmpValue = $value; - if (is_array($value) && count($value) > 0) - { - $tmpValue = array_values($value)[0]; - } - - $this->_args[CheckboxWidget::VALUE_FIELD] = $tmpValue; - } + // Value of value attribute of the checkbox + const CHECKBOX_VALUE = 'true'; /** * @@ -1105,17 +1090,8 @@ class CheckboxWidgetUDF extends CheckboxWidget /** * */ - public function render($parameters) + public function render() { - if ($parameters != null) - { - $this->setValue($parameters); - } - else - { - $this->setValue(''); - } - $this->loadCheckboxView(); echo $this->content(); diff --git a/application/views/system/udf.php b/application/views/system/udf.php index ad8f2af1e..216f8523d 100644 --- a/application/views/system/udf.php +++ b/application/views/system/udf.php @@ -45,25 +45,23 @@
- - - - - - - - - - - - - - - - - - - - -
- Person - +
+
+
+ Zusatzfelder +
+
+
+
  -
- Prestudent -
-   -
+ + +
+ +
widgetlib->UDFWidget( array( @@ -73,11 +71,18 @@ ) ); ?> -
+ +
  -
+ + + +
widgetlib->UDFWidget( array( @@ -87,22 +92,52 @@ ) ); ?> -
+ + + +
+
  -
- -
+ + +
+ +
+   +
+
+   +
+ +
+ +
+
+ + + + +
diff --git a/application/views/widgets/checkbox.php b/application/views/widgets/checkbox.php index 3e3ec6ed8..3ce46d4b5 100644 --- a/application/views/widgets/checkbox.php +++ b/application/views/widgets/checkbox.php @@ -6,7 +6,7 @@ if (isset(${Widget::HTML_ARG_NAME}[UDFWidgetTpl::LABEL])) { ?> -
+
@@ -14,7 +14,7 @@ -
+
@@ -24,18 +24,15 @@ - value="" + value="" >
-
- -
diff --git a/application/views/widgets/dropdown.php b/application/views/widgets/dropdown.php index 6873cdd26..0189f1b86 100644 --- a/application/views/widgets/dropdown.php +++ b/application/views/widgets/dropdown.php @@ -5,13 +5,13 @@ -
+
@@ -19,7 +19,7 @@ -
+