HPJI#38975 toevoegen contract blijft hangen en zorgt voor vele records
svn path=/Website/branches/v2016.3/; revision=32308
This commit is contained in:
@@ -105,7 +105,16 @@ else // nieuw contract
|
||||
document.activeElement.blur(); // trigger laatste onChanges
|
||||
if (!validateForm("u2"))
|
||||
return false;
|
||||
document.forms.u2.submit();
|
||||
|
||||
$.post($("form[name=u2]")[0].action, $("[name=u2]").serialize(), FcltCallbackAndThenAlways(cnt_submitCallback), "json");
|
||||
return false;
|
||||
}
|
||||
|
||||
function cnt_submitCallback(json)
|
||||
{
|
||||
iface.button.enable("btn_submit");
|
||||
if (json.success)
|
||||
FcltMgr.closeDetail(window, json);
|
||||
}
|
||||
|
||||
function cnt_cancel()
|
||||
@@ -442,7 +451,6 @@ else // nieuw contract
|
||||
IFACE.FORM_END();
|
||||
%>
|
||||
</form>
|
||||
<iframe src="../Shared/empty.html" name="hidFrameSubmit" style="display:none"></iframe>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
|
||||
File: cnt_edit_contract_save.asp
|
||||
Description: SUBMIT-form
|
||||
*/ %>
|
||||
*/
|
||||
var JSON_Result = true;
|
||||
%>
|
||||
|
||||
<!-- #include file="../Shared/common.inc" -->
|
||||
<!-- #include file="../shared/save2db.inc" -->
|
||||
@@ -13,8 +15,8 @@
|
||||
<!-- #include file="cnt.inc" -->
|
||||
|
||||
|
||||
<% FCLTHeader.Requires({ plugins:["jQuery"] }) %>
|
||||
<%
|
||||
protectRequest.validateToken();
|
||||
var cnt_key = getQParamInt("cnt_key", -1);
|
||||
var srtdisc_key = getQParamInt("srtdisc");
|
||||
var cnt_kosten = getFParamFloat("cnt_cntkstn", 0);
|
||||
@@ -95,6 +97,7 @@ var fields = [ { dbs: "cnt_contract_nummer_intern", typ: "varchar", frm: "cnt_
|
||||
|
||||
var warning = "";
|
||||
var keepForm = false;
|
||||
var success = true;
|
||||
if (!isNew)
|
||||
{
|
||||
var verlengen = getFParamInt("cntverlengen", -2); // 0=vragen nee, 1=vragen ja, -1=NULL(geen)
|
||||
@@ -112,6 +115,7 @@ if (!isNew)
|
||||
{
|
||||
warning = err.friendlyMsg;
|
||||
keepForm = true;
|
||||
success = false;
|
||||
}
|
||||
// tracking komt samen met de flexkenmerken
|
||||
|
||||
@@ -138,6 +142,7 @@ else
|
||||
{
|
||||
warning = err.friendlyMsg;
|
||||
keepForm = true;
|
||||
success = false;
|
||||
}
|
||||
else
|
||||
// Zetten van de contact status. Indien het contract approval mechanisme actief is dan moet de contract status Nieuw(2) worden en anders Actief(0).
|
||||
@@ -186,18 +191,12 @@ if (!warning)
|
||||
}
|
||||
|
||||
cnt.unlock(cnt_key);
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<% FCLTHeader.Generate() %>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
FcltMgr.closeDetail(window, { cnt_key: <%=cnt_key%>,
|
||||
warning: "<%=safe.jsstring(warning)%>",
|
||||
keepForm: <%=keepForm?"true":"false"%>
|
||||
}); } );
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
var result = { cnt_key: cnt_key,
|
||||
success: success,
|
||||
keepForm: keepForm,
|
||||
warning: warning
|
||||
};
|
||||
Response.Write(JSON.stringify(result));
|
||||
Response.End;
|
||||
%>
|
||||
Reference in New Issue
Block a user