7 Commits

Author SHA1 Message Date
SimonGschnell e41e24be04 adding the option to add css classes to the HTMLWidget 2024-03-05 15:38:51 +01:00
Paolo 9c84558f5f - Added requiredPermissions to the application/config/udfmasterschema.json and set them as mandatory
- Removed the private method _isAllowed from application/controllers/widgets/UDF.php
- Removed required permissions from views application/views/system/fas_udf.php and application/views/system/infocenter/zgvpruefungen.php
- Widget views application/views/widgets/checkbox, dropdown, textarea and textfield now they print the attribute disabled
- Added constant DISABLED to application/widgets/html/HTMLWidget.php
- Removed private property _requiredPermissions from application/widgets/udf/UDFWidget.php
- application/widgets/udf/UDFWidget.php does not check permissions anymore and does not store them anymore
- Added constants PERMISSION_TYPE_READ and PERMISSION_TYPE_WRITE to application/libraries/UDFLib.php
- Removed constant PERMISSION_TYPE from application/libraries/UDFLib.php
- Removed public method isAllowed from application/libraries/UDFLib.php
- Added private methods _readAllowed, _writeAllowed, _setRequiredPermissions and _setReadOnly to application/libraries/UDFLib.php
- UDFLib->displayUDFWidget now checks if permissions are declared in the UDF JSON and if the user is allowed to read and write such UDF
- UDFLib->saveUDFs now checks if the user has the permissions to write such UDF
- Now the UDFs are even displayed in read only mode
2021-09-07 12:13:59 +02:00
Paolo 4e6fc7c607 - Create new function getError in helper hlp_return_object_helper that should just returns retval
- Replace all show_error(getData( with show_error(getError(
- Replace all error($...->retval) with error(getError($...))
- Replace all ->outputJsonError(getData( with ->outputJsonError(getError(
- Replace all show_error($...->retval with show_error(getError($...
- Replace all outputJsonError($...->retval with outputJsonError(getError$...
- Replace all return error($...->retval) with return $...
2019-12-18 18:35:19 +01:00
Paolo d8bcc25ac2 Now the helper message is loaded only by these controllers and models:
- APIv1_Controller
- FHC_Controller
- MessageToken_model
2018-06-27 11:10:40 +02:00
Paolo 1a2fce8d1c - Moved property $htmlParameters from HTMLWidget to DropdownWidget
- Moved all the UDF related code from UDFWidget to UDFLib
- UDFWidget is now using UDFLib
2017-08-17 16:33:45 +02:00
Paolo e4160088e8 - Added headers where they were missing
- Added comments where needed
- Beautified the code where needed, more readable and more compliant to CS
- loadResource function in helper fhc_helper.php is not using anymore CI
- Moved all constants from UDFWidget to UDFLib
- Added constant SORT to UDFLib
- Renamed constant REGEX_LANGUAGE to FE_REGEX_LANGUAGE in UDFLib
- Better formatting and indentation of the code of WidgetLib (more compliant to CS)
- Added missing validation attributes to HTML widgets
- Added constant HTML_DEFAULT_VALUE to CheckboxWidget
- Unset parameter multiple in DropdownWidget constructor
- Changed value of constant REQUIRED in widget HTMLWidget
- Added protected property $htmlParameters to widget HTMLWidget
  (it works as alias to $this->_args[HTMLWidget::HTML_ARG_NAME] -> better code)
- Replaced $this->_args[HTMLWidget::HTML_ARG_NAME] with $this->htmlParameters in the widgets
- Changed the CSS class label[udf-required=true]::after to label[required-field=true]::after in widgets.css
- Better use of constants in UDFWidget: constants from HTMLWidget are used only for the HTML parameters,
  while constants from UDFLib are used only for UDF parameters
2017-08-17 11:51:40 +02:00
Paolo f126bca708 - New directory application/widgets/html/ for widgets to render HTML
elements
- All the widgets classes to render HTML elements moved from WidgetLib
to application/widgets/html/
- New directory application/widgets/udf/ for widgets to render UDF
- All the UDF widgets classes moved from WidgetLib to
application/widgets/udf/
- HTMLWidget is now the main class to render HTML widget
- UDFWidget is now the mail class to render UDF
- Removed UDFWidgetTpl
- Added function loadResource to fhc helper
- Changed method widget of WidgetLib (using loadResource)
- Moved UDFWidget method from WidgetLib to UDFLib
- Slimmed down class Widget present in WidgetLib
- Controller system/UDf now uses UDFLib
- View application/views/system/udf.php now uses UDFLib
- Updated udf and html widgets to adapt them to the new libs
2017-08-11 18:41:21 +02:00