23 Commits

Author SHA1 Message Date
ma0068 e915671a02 Adaptions for Apacheconfirmity 2024-05-16 13:17:28 +02:00
cgfhtw b1c094383f Udf Component 2024-03-28 15:38:50 +01:00
ma0048 29ae48bc48 udflib fixed fuer den infocenter udf schule uebernehmen job 2021-10-25 09:51:06 +02:00
Paolo 1ebae59292 - Adapted controllers/widgets/UDF->saveUDFs to call UDFLib->saveUDFs without the udfUniqueId parameter
- UDFLib->saveUDFs changed, the udfUniqueId parameter is retrieved from the session
- UDFLib->saveUDFs changed, the check of the permission is performed by
  the method prepare prepareUDFsWrite called by the DB_Model
- Changed UDFLib->_validateUDFs and public/js/UDFWidget.js to have a
  better error handling and better message errors
2021-10-11 10:08:58 +02:00
Paolo 45fab928ad - Renamed private method _manageUDFs to _prepareUDFsWrite in application/core/DB_Model.php
- Changed private method _toPhp in application/core/DB_Model.php to check permissions on UDFs
- Adapted code to fit the changes in application/libraries/UDFLib.php
- Renamed public method manageUDFs to prepareUDFsWrite in application/libraries/UDFLib.php
- Added new public method prepareUDFsRead to application/libraries/UDFLib.php
- Fixed bugs, comments & code style
2021-10-07 17:32:49 +02: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 87aa482234 Merge branch 'master' into feature-5491/UDFWidget_add_new_features 2020-01-28 11:03:51 +01: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 e509f7acd1 Added comments and cleaned code 2019-12-17 16:57:02 +01:00
Paolo 719f2d7314 - Changed controller system/FAS_UDF, less busy now
- Method execReadOnlyQuery of DB_Model less strict check against SQL statements
- Added new public method setup to DB_Model to setup the model after initialization
- Added new constants to UDFLib
- Added new private method _printEndUDFBlock and _printEndUDFBlock to UDFLib
- Added new public methods setUDFUniqueId, getSession, getSessionElement, setSession, setSessionElement, saveUDFs and isAllowed to UDFLib
- Removed model system/FAS_UDF_model
- View views/system/fas_udf now uses the view templates/FHC-Header
- Added new parameter udfs to view templates/FHC-Header
- Added new properties to UDFWidget
- Added new private methods _initUDFWidget, _checkParameters and _startUDFWidget to UDFWidget
2019-12-17 13:35:41 +01:00
Paolo 3b4012798f Fixed some comments typo 2019-04-30 13:13:34 +02:00
Paolo d08eb75b5a Adapted MessageLib, PhrasesLib and UDFLib to use the function getUserLanguage from language_helper 2018-07-05 12:13:02 +02:00
Paolo 25e66bf9dd - Added function isEmptyString to fhc_helper
- Added function isEmptyArray to fhc_helper
- Adapted the code in application/* to use as much as possible this two new functions
- Removed the php function empty almost everywhere
2018-06-27 15:06:04 +02:00
Paolo d04b0450da - AuthLib is loaded only in fhcauth_helper, PermissionLib and REST_Controller
- Removed all the NOT usefull loads of helpers and libraries
- Fixed undefined index in controllers/system/UDF and model system/UDF_model
- APIv1_Controller now loads helper fhcauth
- FHC_Controller now loads ithe fhc and session helpers too
- Added/Fixed comments
- PermissionLib does NOT use anymore the getAuthUID function from the fhcauth helper, now relies on AuthLib directly
- REST_Controller loads directly the AuthLib when is needed
2018-06-27 13:12:46 +02:00
Paolo ee3998f62e - Changed system/dbupdate_3.3.php to create table system.tbl_filters and what its needed
- Added model system/Filters_model to manage system.tbl_filters
- Removed method execQuery from model system/UDF_model
- Added property executedQueryMetaData to DB_Model
- Added property executedQueryListFields to DB_Model
- Added method getExecutedQueryListFields to DB_Model
- Added method getExecutedQueryMetaData to DB_Model
- Added method execReadOnlyQuery to DB_Model to execute read only queries from outside a model
- Changed DB_Model method _toPhp to store infos about an executed query into properties executedQueryMetaData and executedQueryListFields
- Updated library UDFLib to use execReadOnlyQuery
- Added widget FilterWidget to render and manage a filter into VileSci
- Added views widgets/filter/selectFields, widgets/filter/selectFilters and widgets/filter/tableDataset used by FilterWidget
2017-11-22 12:08:54 +01:00
Paolo 35e35b4110 - Now UDFLib->_popUDFParameters returns the result without storing it in UDFs property
- UDFs property has been removed
2017-09-20 17:58:46 +02:00
Paolo a456c0838d - Added property UDFs to UDFLib
- UDFLib constructor initialize UDFs property as an empty array
2017-09-20 10:55:20 +02:00
Paolo 72b3e9adc1 - Replaced DEFAULT_LEHREINHEIT_SPRACHE with DEFAULT_LANGUAGE in UDFLib
- Method _setAttributesWithPhrases now sets by default all the attributes to null
- Method _setValidationAttributes now sets also MIN_LENGTH and MAX_LENGTH attributes
2017-08-28 12:42:19 +02:00
Paolo d8cd786079 - application/core/* -> CS compliant
- application/libraries/* -> CS compliant
- FHC_Model isEntitled method now return error() or success()
- Updated all code that uses isEntitled method from FHC_Model
- Removed Squiz.PHP.DisallowSizeFunctionsInLoops from CS ruleset
- Removed depracated method replace from DB_Model
- Removed unused method pgArrayPhp from DB_Model
- Renamed method arrayMergeIndex to _arrayCombine in DB_Model and set as private
- Added method _manageUDFs to DB_Model (a wrapper for UDFLib->manageUDFs)
2017-08-22 16:24:51 +02:00
Paolo b50aab2d33 - Moved all code related to UDF from DB_Model to UDFLib
- Changed method getUDFs in DB_Model
- Removed method getUDF
- Moved method _getUDFsDefinitions to UDF_model and renamed to getUDFsDefinitions
- Updated model UDF_model
- Updated controller system/UDF
- Updated DB_Model to be more CS compliant
2017-08-18 15:50:59 +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