227 lines
8.6 KiB
Plaintext
227 lines
8.6 KiB
Plaintext
<%@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
|
|
|
|
*/ %>
|
|
<!-- #include file="../Shared/common.inc" -->
|
|
<!-- #include file="../Shared/iface.inc" -->
|
|
<!-- #include file="../Shared/calendar.inc" -->
|
|
<!-- #include file="../Shared/selector.inc" -->
|
|
<!-- #include file="../Shared/save2db.inc" -->
|
|
<!-- #include file="../Shared/persoonselector.inc" -->
|
|
<!-- #include file="../Shared/kostenplaatsselector.inc" -->
|
|
<!-- #include file="../Shared/kenmerk_common.inc" -->
|
|
<!-- #include file="../API2/api2.inc" -->
|
|
<!-- #include file="./alg_flexkenmerk.inc" -->
|
|
<!-- #include file="alg.inc" -->
|
|
|
|
<%
|
|
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
|
|
%>
|
|
|
|
<html>
|
|
<head>
|
|
<% FCLTHeader.Generate(); %>
|
|
<script type="text/javascript">
|
|
$(function () { $("select option[value=-1]").val(""); }); // prevents removal of values from listboxes
|
|
function alg_submit()
|
|
{
|
|
$.post($("form[name=u2]")[0].action,
|
|
$("[name=u2]").serialize(),
|
|
FcltCallbackAndThenAlways(alg_submit_callback),
|
|
"json");
|
|
return true; // disable button
|
|
}
|
|
|
|
function alg_submit_callback(json)
|
|
{
|
|
iface.button.enable("btn_alg_submit");
|
|
if (json.success)
|
|
FcltMgr.closeDetail(window, json);
|
|
}
|
|
|
|
function alg_cancel()
|
|
{
|
|
FcltMgr.closeDetail(window, { cancel: true } );
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body class="fclt-modal" id="mod_algmultiedit">
|
|
<% MODAL_START(); %>
|
|
<form name="u2" action="alg_edit_gebouw_multi_save.asp?bld_keys=<%=ingesloten.join(",")%>" 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
|
|
});
|
|
|
|
%>
|
|
<script type="text/javascript">
|
|
$(function()
|
|
{
|
|
init_multi();
|
|
});
|
|
</script>
|
|
<%
|
|
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();
|
|
%>
|
|
</form>
|
|
<% MODAL_END(); %>
|
|
</body>
|
|
</html>
|
|
<% ASPPAGE_END(); %>
|