From 39aa984e73f0e8d379683a4ab43f2b27531072af Mon Sep 17 00:00:00 2001 From: Jos Groot Lipman Date: Mon, 15 May 2017 10:08:01 +0000 Subject: [PATCH] =?UTF-8?q?FSN#40470=20USR=20rapporten=20ook=20goed=20kunn?= =?UTF-8?q?en=20kopi=C3=ABren.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/Website/trunk/; revision=33843 --- APPL/API2/model_reportsx.inc | 10 ++++++++-- APPL/SCF/scaffolding_edit.inc | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/APPL/API2/model_reportsx.inc b/APPL/API2/model_reportsx.inc index 4be174f104..8205669b0a 100644 --- a/APPL/API2/model_reportsx.inc +++ b/APPL/API2/model_reportsx.inc @@ -71,7 +71,13 @@ function model_reportsx(usrrap_key, rapparams) "styling" : { dbs: "fac_usrrap_functie", typ: "key", label: L("lcl_usrrap_styling"), - LOV: L("lcl_usrrap_stylingLOV") // 0;on-gestylede;1;gestylede;2;procedure;3;procedure gestyled;8;Via tabelizer;16;mobile;32;UDR Template + LOV: L("lcl_usrrap_stylingLOV"), // 0;on-gestylede;1;gestylede;2;procedure;3;procedure gestyled;8;Via tabelizer;16;mobile;32;UDR Template + clone: function (xxx_data) + { + if (xxx_data.styling) + xxx_data.styling.id = xxx_data.styling.id & ~32; + return (xxx_data.styling); + } }, "urllink" : { dbs: "fac_usrrap_urllink", typ: "varchar", @@ -246,7 +252,7 @@ function model_reportsx(usrrap_key, rapparams) if ("viewname" in rap_data && !this.is_safe_view(rap_data.viewname)) this.fields["viewname"].readonly = true; - if (rap_data.styling && rap_data.styling.id & 32) // UDR Template + if (!params.cloning && rap_data.styling && rap_data.styling.id & 32) // UDR Template { this.REST_PUT = false; // Niets te updaten, alleen clonen } diff --git a/APPL/SCF/scaffolding_edit.inc b/APPL/SCF/scaffolding_edit.inc index 008a699fdb..e31a1edd6f 100644 --- a/APPL/SCF/scaffolding_edit.inc +++ b/APPL/SCF/scaffolding_edit.inc @@ -44,7 +44,7 @@ function scaffolding_edit(model, scf_params) else if (key > 0) { user.auth_required_or_abort(model.REST_PUT || model.REST_DELETE); - var xxx_params = { filter: { id: key } }; + var xxx_params = { filter: { id: key }, cloning: cloning }; xxx_params.for_edit = true; // dan wordt niet vertaald var xxx_array = model.REST_GET(xxx_params);