FSN#35498 UDR: kolom-expressies mogelijk maken
svn path=/Website/trunk/; revision=30038
This commit is contained in:
@@ -159,7 +159,6 @@ function model_reportcolumns(usrrap_key, params)
|
||||
if (user.has("WEB_FACTAB") && (obj.expression || !obj.id))
|
||||
{
|
||||
this.fields.expression.readonly = false;
|
||||
this.fields.expression.required = true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -167,7 +166,6 @@ function model_reportcolumns(usrrap_key, params)
|
||||
{
|
||||
if (obj.id == -1)
|
||||
this.fields.expression.readonly = false;
|
||||
this.fields.expression.required = true;
|
||||
}
|
||||
|
||||
// Maakt de default fac_usrrap_cols records aan aan de hand van de view of werk ze bij
|
||||
@@ -380,6 +378,10 @@ function model_reportcolumns(usrrap_key, params)
|
||||
};
|
||||
this.REST_PUT = function (params, jsondata, the_key) /* update columns */
|
||||
{
|
||||
var valid_char = /^[_0-9a-zA-Z]+$/; // Alleen deze tekens zijn geldig!
|
||||
if (!valid_char.test(jsondata.name))
|
||||
abort_with_warning(L("lcl_rap_column_invalid"));
|
||||
|
||||
var dbfields = api2.update_fields(params, this, jsondata); // Build updater
|
||||
|
||||
var sql = buildUpdate("fac_usrrap_cols", dbfields, { noValidateToken: true }) + " fac_usrrap_cols_key = " + the_key;
|
||||
@@ -394,6 +396,10 @@ function model_reportcolumns(usrrap_key, params)
|
||||
// Only internally used by report_clone and _view2columns
|
||||
this._REST_POST = function (params, jsondata, parent_key) /* insert columns */
|
||||
{
|
||||
var valid_char = /^[_0-9a-zA-Z]+$/;
|
||||
if (!valid_char.test(jsondata.name))
|
||||
abort_with_warning(L("lcl_rap_column_invalid"));
|
||||
|
||||
var dbfields = api2.update_fields(params, this, jsondata); // Build updater
|
||||
|
||||
dbfields["id"] = this.fields["id"];
|
||||
|
||||
Reference in New Issue
Block a user