135 lines
4.4 KiB
Plaintext
135 lines
4.4 KiB
Plaintext
<%@language = "javascript" %>
|
|
<% /*
|
|
$Revision$
|
|
$Id$
|
|
|
|
File: alg_edit_locatie_multi.asp
|
|
Description: Multi editten van locaties
|
|
Parameters: key
|
|
|
|
Context: alg_locatie_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/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 loc_key_arr = getQParamIntArray("loc_keys");
|
|
var warning = "";
|
|
var result = {};
|
|
var tobeedited = 0;
|
|
var ingesloten = [];
|
|
// Bepaal de locaties in de selectie die
|
|
// ook echt gewijzigd kunnen of mogen worden.
|
|
var onrgoedlvl = "L";
|
|
for (var i = 0; i < loc_key_arr.length; i++)
|
|
{
|
|
var this_alg = alg.func_enabled(loc_key_arr[i], onrgoedlvl);
|
|
if (this_alg.writeman || this_alg.writeuse)
|
|
{
|
|
ingesloten.push(loc_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 alg_submit()
|
|
{ // Invoer van velden wordt realtime gevalideerd.
|
|
$.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_locatie_multi_save.asp?loc_keys=<%=ingesloten.join(",")%>" method="post">
|
|
<%
|
|
MODAL_BLOCK_START("algLoc1", L("lcl_location"), { icon: "fa-location-arrow" });
|
|
|
|
FCLTcalendar("vervaldatum",
|
|
{ initEmpty: true,
|
|
label: L("lcl_alg_vervaldatum"),
|
|
volgnr: 1,
|
|
onChange: "DateChangedVerval()",
|
|
readonly: !last_this_alg.writeman
|
|
});
|
|
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,required: true
|
|
});
|
|
RWFIELDTR("loc_vw", "fld", L("lcl_estate_locatie_man_verantw"), "", {maxlength: 30});
|
|
RWFIELDTR("loc_vwtel", "fld", L("lcl_estate_locatie_man_verantw_tel"), "", {maxlength: 20});
|
|
|
|
MODAL_BLOCK_END();
|
|
|
|
generateFlexKenmerkBlock({
|
|
onrgoed_niveau: "L",
|
|
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(); %>
|