diff --git a/APPL/MGT/mld_stdmelding.js b/APPL/MGT/mld_stdmelding.js index 593364af0e..f4621c1741 100644 --- a/APPL/MGT/mld_stdmelding.js +++ b/APPL/MGT/mld_stdmelding.js @@ -19,23 +19,27 @@ function init_stdmelding() onChangeHighprioritytime(); onChangeLowprioritytime() - var init_srtdisc_key = (srtdisc_key && srtdisc_key > -1 ? srtdisc_key : 0); + if (typeof srtdisc_key == "undefined") var srtdisc_key = -1; + if (typeof disc_key == "undefined") var disc_key = -1; + + var init_srtdisc_key = (srtdisc_key > -1 ? srtdisc_key : 0); var init_disc_key = (disc_key ? disc_key : -1); + fill_disciplineselector(init_srtdisc_key, init_disc_key); fill_issuetypeselector(0, 0); } function onChangeAccepttime() { - $("#accepttime_eenheid").prop("disabled", (isNaN(parseFloat($("#accepttime").val()))); + $("#accepttime_eenheid").prop("disabled", isNaN(parseFloat($("#accepttime").val()))); } function onChangeCriticaltime() { - $("#criticaltime_eenheid").prop("disabled", (isNaN(parseFloat($("#criticaltime").val()))); + $("#criticaltime_eenheid").prop("disabled", isNaN(parseFloat($("#criticaltime").val()))); } function onChangeHighprioritytime() { - $("#highprioritytime_eenheid").prop("disabled", (isNaN(parseFloat($("#highprioritytime").val()))); + $("#highprioritytime_eenheid").prop("disabled", isNaN(parseFloat($("#highprioritytime").val()))); } function onChangeLowprioritytime() {