- 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
This commit is contained in:
Paolo
2021-10-11 10:08:58 +02:00
parent c325046e8e
commit 1ebae59292
3 changed files with 22 additions and 35 deletions
+1 -2
View File
@@ -36,7 +36,6 @@ class UDF extends FHC_Controller
*/
public function saveUDFs()
{
$udfUniqueId = $this->input->post(self::UDF_UNIQUE_ID);
$udfs = $this->input->post(UDFLib::UDFS_ARG_NAME);
if (!isEmptyString($udfs))
@@ -44,7 +43,7 @@ class UDF extends FHC_Controller
$jsonDecodedUDF = json_decode($udfs);
if ($jsonDecodedUDF != null)
{
$this->outputJson($this->udflib->saveUDFs($udfUniqueId, $jsonDecodedUDF));
$this->outputJson($this->udflib->saveUDFs($jsonDecodedUDF));
}
else
{