<%@language = "javascript" %> <% /* $Revision$ $Id$ File: alg_edit_gebouw_multi.asp Description: Multi editten van gebouwen Parameters: key Context: alg_gebouw_search_list.asp Note: De minimale multi-edit velden */ %> <% FCLTHeader.Requires({ plugins: ["suggest", "jQuery", "kenmerk"], js: ["multi.js"] }); var bld_key_arr = getQParamIntArray("bld_keys"); var warning = ""; var result = {}; var tobeedited = 0; var ingesloten = []; // Bepaal de gebouwen in de selectie die // ook echt gewijzigd kunnen of mogen worden. var onrgoedlvl = "G"; for (var i = 0; i < bld_key_arr.length; i++) { var this_alg = alg.func_enabled(bld_key_arr[i], onrgoedlvl); if (this_alg.writeman || this_alg.writeuse) { ingesloten.push(bld_key_arr[i]); tobeedited++; var last_this_alg = this_alg; // deze gebruiken we voor rechtencontrole. Niet 100% zuiver maar goed genoeg } } user.auth_required_or_abort(ingesloten.length); // We klagen niet over enkele wel en enkele niet %>
<% FCLTHeader.Generate(); %>
<% MODAL_START(); %> " method="post"> <% MODAL_BLOCK_START("algGebouw", L("lcl_alg_gebouw_frame"), { icon: "fa-building" }); FCLTkostenplaatsselector( "prs_kstpl", "prs_kstpl", user_key, { kostenplaatsKey: -1, label: L("lcl_prs_dept_kosten"), filtercode: "G", readonly: !last_this_alg.writeman }); FCLTpersoonselector("verantw", "sgVerantw", { perslidKey: -1, label: L("lcl_alg_verantw"), readonly: !last_this_alg.writeuse, autlevel: last_this_alg.authparams("WEB_ALGMAN") && last_this_alg.authparams("WEB_ALGMAN").PRSwritelevel }); FCLTpersoonselector("verantw2", "sgVerantw2", { perslidKey: -1, label: L("lcl_alg_verantw2"), readonly: !last_this_alg.writeuse, autlevel: last_this_alg.authparams("WEB_ALGMAN") && last_this_alg.authparams("WEB_ALGMAN").PRSwritelevel }); RWFIELDTR("groep", "fld", L("lcl_estate_gebouw_groepkenmerk"), "", {maxlength: 60}); FCLTcalendar("vervaldatum", { initEmpty: true, label: L("lcl_alg_vervaldatum"), volgnr: 1, onChange: "DateChangedVerval()", readonly: !last_this_alg.writeman }); CHECKBOXTR(L("lcl_estate_gebouw_bez"), "fldalgbez", "bld_bez"); CHECKBOXTR(L("lcl_estate_gebouw_mld"), "fldalgmld", "bld_mld"); var sql = api2.splitLOV2sql(L("lcl_estate_gebouw_toontelfLOV")); FCLTselector("toon_telefoon", sql, { label: L("lcl_estate_gebouw_toon_telefoon"), initEmpty: true, emptyOption: "" }); sql = api2.splitLOV2sql(L("lcl_estate_gebouw_toonmailLOV")); FCLTselector("toon_email", sql, { label: L("lcl_estate_gebouw_toon_email"), initEmpty: true, emptyOption: "" }); sql = api2.splitLOV2sql(L("lcl_estate_gebouw_toonkentLOV")); FCLTselector("toon_kenteken", sql, { label: L("lcl_estate_gebouw_toon_kenteken"), initEmpty: true, emptyOption: "" }); sql = "SELECT mld_dienstniveau_key" + " , " + lcl.xsqla("mld_dienstniveau_omschr", "mld_dienstniveau_key") + " FROM mld_dienstniveau" + " ORDER BY UPPER(" + lcl.xsql("mld_dienstniveau_omschr", "mld_dienstniveau_key") + ")"; FCLTselector("dienstniveau", sql, { label: L("lcl_mld_dienst_niveau"), emptyOption: "", initEmpty: true, readonly: !this_alg.writeuse }); sql = "SELECT DISTINCT mld_vrije_dagen_id, mld_vrije_dagen_id" + " FROM mld_vrije_dagen"; FCLTselector("cal_id" , sql , { label: L("lcl_calendar") , emptyOption: "" , initEmpty: true , readonly: !this_alg.writeman }); var times = []; for (i=0; i<24; i++) { sql = " SELECT " + String(i+0/4) + ", '" + String(i) + ":00' FROM DUAL" + " UNION ALL SELECT " + String(i+1/4) + ", '" + String(i) + ":15' FROM DUAL" + " UNION ALL SELECT " + String(i+2/4) + ", '" + String(i) + ":30' FROM DUAL" + " UNION ALL SELECT " + String(i+3/4) + ", '" + String(i) + ":45' FROM DUAL" times.push(sql); } FCLTselector("bld_beginuur", times.join(" UNION ALL "), { label: L("lcl_estate_gebouw_beginuur"), emptyOption: "", initEmpty: true, readonly: !this_alg.writeman } ); FCLTselector("bld_einduur", times.join(" UNION ALL "), { label: L("lcl_estate_gebouw_einduur"), emptyOption: "", initEmpty: true, readonly: !this_alg.writeman } ); CHECKBOXTR(L("lcl_estate_gebouw_werkdagen"), "fldalgwerk", "bld_werkdagen"); var sql = "SELECT bez_actie_groep_key" + " , bez_actie_groep_omschrijving" + " FROM bez_actie_groep" + " WHERE bez_actie_groep_verwijder IS NULL" FCLTselector( "group", sql, { label: L("bez_actie_groep"), emptyOption: "", initEmpty: true } ); MODAL_BLOCK_END(); generateFlexKenmerkBlock({ onrgoed_niveau: "G", onrgoed_key: -1, this_alg: last_this_alg, reado: false, multi: true }); %>
<% var buttons = []; buttons.push({title: L("lcl_submit"), action:"alg_submit()", singlepress: true, id: "btn_edit_submit", importance: 1, icon: "fa-fclt-save"}); buttons.push({title: L("lcl_cancel"), action:"alg_cancel()", importance: 3, icon: "fa-fclt-cancel"}); SIMPLE_BLOCK_START(); CreateButtons(buttons); SIMPLE_BLOCK_END(); IFACE.FORM_END(); %> <% MODAL_END(); %>
<% ASPPAGE_END(); %>