|
|
@ -39,7 +39,6 @@ var validateInline = {};
|
|
|
|
var clearInline = {};
|
|
|
|
var clearInline = {};
|
|
|
|
var validateStep = {};
|
|
|
|
var validateStep = {};
|
|
|
|
var hasPolicyProfileScript = false;
|
|
|
|
var hasPolicyProfileScript = false;
|
|
|
|
var isCorrectiveActionProfileAdded = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var enableInlineError = function (inputField, errorMsg, errorSign) {
|
|
|
|
var enableInlineError = function (inputField, errorMsg, errorSign) {
|
|
|
|
var fieldIdentifier = "#" + inputField;
|
|
|
|
var fieldIdentifier = "#" + inputField;
|
|
|
@ -224,7 +223,6 @@ stepForwardFrom["policy-profile"] = function () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// add policy correction action page
|
|
|
|
// add policy correction action page
|
|
|
|
if (!isCorrectiveActionProfileAdded) {
|
|
|
|
|
|
|
|
var policyCorrectiveActionTemplateSrc =
|
|
|
|
var policyCorrectiveActionTemplateSrc =
|
|
|
|
"/public/cdmf.unit.policy.corrective-action/templates/policy-corrective-action.hbs";
|
|
|
|
"/public/cdmf.unit.policy.corrective-action/templates/policy-corrective-action.hbs";
|
|
|
|
var policyCorrectiveActionScriptSrc =
|
|
|
|
var policyCorrectiveActionScriptSrc =
|
|
|
@ -239,16 +237,12 @@ stepForwardFrom["policy-profile"] = function () {
|
|
|
|
"correctivePolicies": $("#logged-in-user").data("corrective-policies")
|
|
|
|
"correctivePolicies": $("#logged-in-user").data("corrective-policies")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
$("#select-general-policy-type").html(content)
|
|
|
|
$("#select-general-policy-type").html(content);
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var script = document.createElement('script');
|
|
|
|
var script = document.createElement('script');
|
|
|
|
script.type = 'text/javascript';
|
|
|
|
script.type = 'text/javascript';
|
|
|
|
script.src = context + policyCorrectiveActionScriptSrc;
|
|
|
|
script.src = context + policyCorrectiveActionScriptSrc;
|
|
|
|
document.head.append(script);
|
|
|
|
document.head.append(script);
|
|
|
|
|
|
|
|
});
|
|
|
|
isCorrectiveActionProfileAdded = true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// updating next-page wizard title with selected platform
|
|
|
|
// updating next-page wizard title with selected platform
|
|
|
|
$("#policy-type-page-wizard-title").text("ADD " + policy["platform"] + " POLICY");
|
|
|
|
$("#policy-type-page-wizard-title").text("ADD " + policy["platform"] + " POLICY");
|
|
|
@ -645,8 +639,6 @@ $(document).ready(function () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
isCorrectiveActionProfileAdded = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('input[type=radio][name=policy-type-radio-btn]').change(function() {
|
|
|
|
$('input[type=radio][name=policy-type-radio-btn]').change(function() {
|
|
|
|
if ($(this).val() === "CORRECTIVE") {
|
|
|
|
if ($(this).val() === "CORRECTIVE") {
|
|
|
|
$("#select-general-policy-type").addClass("hidden");
|
|
|
|
$("#select-general-policy-type").addClass("hidden");
|
|
|
|