diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php
index 064cd1b9e..27a6224b9 100644
--- a/application/core/DB_Model.php
+++ b/application/core/DB_Model.php
@@ -27,10 +27,10 @@ class DB_Model extends FHC_Model
// UDF validation attributes
const UDF_REGEX = 'regex';
- const UDF_REGEX_LANG = 'php';
const UDF_REQUIRED = 'required';
const UDF_MAX_VALUE = 'max-value';
const UDF_MIN_VALUE = 'min-value';
+ const UDF_REGEX_LANG = 'php';
const UDF_MAX_LENGTH = 'max-length';
const UDF_MIN_LENGTH = 'min-length';
@@ -991,8 +991,8 @@ class DB_Model extends FHC_Model
// If validation rules are present for this UDF description and the required attribute is === true
// then add this UDF into $requiredUDFsArray
if(isset($decodedUDFDefinition->validation)
- && isset($decodedUDFDefinition->validation->required)
- && $decodedUDFDefinition->validation->required === true)
+ && isset($decodedUDFDefinition->validation->{DB_Model::UDF_REQUIRED})
+ && $decodedUDFDefinition->validation->{DB_Model::UDF_REQUIRED} === true)
{
$requiredUDFsArray[$decodedUDFDefinition->{DB_Model::UDF_ATTRIBUTE_NAME}] = error(
$decodedUDFDefinition->{DB_Model::UDF_ATTRIBUTE_NAME},
@@ -1021,8 +1021,8 @@ class DB_Model extends FHC_Model
// then removes this UDF from the array $requiredUDFsArray
// because this UDF is present in the property UDFs (the list of UDFs that should be stored)
// therefore it was supplied
- if (isset($decodedUDFDefinition->validation->required)
- && $decodedUDFDefinition->validation->required === true
+ if (isset($decodedUDFDefinition->validation->{DB_Model::UDF_REQUIRED})
+ && $decodedUDFDefinition->validation->{DB_Model::UDF_REQUIRED} === true
&& isset($requiredUDFsArray[$decodedUDFDefinition->{DB_Model::UDF_ATTRIBUTE_NAME}]))
{
unset($requiredUDFsArray[$decodedUDFDefinition->{DB_Model::UDF_ATTRIBUTE_NAME}]);
diff --git a/application/views/system/udf.php b/application/views/system/udf.php
index 12405b558..ad8f2af1e 100644
--- a/application/views/system/udf.php
+++ b/application/views/system/udf.php
@@ -1,7 +1,7 @@
-load->view("templates/header", array("title" => "UDF")); ?>
+load->view("templates/header", array("title" => "UDF", "widgetsCSS" => true)); ?>
-
+
- |
+ |
Person
|
|
-
+ |
Prestudent
|
@@ -63,7 +63,7 @@
- |
+ |
widgetlib->UDFWidget(
array(
@@ -77,7 +77,7 @@
|
|
-
+ |
widgetlib->UDFWidget(
array(
diff --git a/application/views/templates/header.php b/application/views/templates/header.php
index 97d280585..a32817227 100644
--- a/application/views/templates/header.php
+++ b/application/views/templates/header.php
@@ -13,6 +13,7 @@ isset($title) ? $title = 'VileSci - '.$title : $title = 'VileSci';
!isset($jsoneditor) ? $jsoneditor = false : $jsoneditor = $jsoneditor;
!isset($jsonforms) ? $jsonforms = false : $jsonforms = $jsonforms;
!isset($textile) ? $textile = false : $textile = $textile;
+!isset($widgetsCSS) ? $widgetsCSS = false : $widgetsCSS = $widgetsCSS;
if ($tablesort || $jquery_checkboxes || $jquery_custom)
$jquery = true;
@@ -67,4 +68,7 @@ if ($tablesort || $jquery_checkboxes || $jquery_custom)
+
+
+
\ No newline at end of file
diff --git a/application/views/widgets/checkbox.php b/application/views/widgets/checkbox.php
index d6a233115..3e3ec6ed8 100644
--- a/application/views/widgets/checkbox.php
+++ b/application/views/widgets/checkbox.php
@@ -1,30 +1,42 @@
-
-
-
-
-
-
-
-
-
-
- value=""
->
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ value=""
+ >
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/views/widgets/dropdown.php b/application/views/widgets/dropdown.php
index 3cbdbff23..6873cdd26 100644
--- a/application/views/widgets/dropdown.php
+++ b/application/views/widgets/dropdown.php
@@ -1,56 +1,71 @@
-
-
-
- |