afjQuery(document).ready(function () {
afjQuery(".af-init-onchange").each(function () {
if (afjQuery(this).val())
afjQuery(this).change();
});
afjQuery("#dnn_ctr759_Main_pnlDialogContainer .aftpl_btnSave").click(function () {
if (typeof (Page_ClientValidate) == 'function')
Page_ClientValidate('vldAForm759');
if (typeof (Page_IsValid) == "undefined" || Page_IsValid) {
// hide buttons
afjQuery(".aftpl_pnlbtn").hide();
afjQuery(".aftpl_wait").show();
}
});
afjQuery("#dnn_ctr759_Main_cFormTemplate input:text").keydown(function (evt) {
if (evt.keyCode == 13) {
evt.preventDefault();
evt.stopPropagation();
afjQuery("#dnn_ctr759_Main_pnlDialogContainer .aftpl_btnSave,#dnn_ctr759_Main_cFormTemplate .aftpl_btnSave").click();
if (typeof (Page_IsValid) == "undefined" || Page_IsValid) {
// hide buttons
afjQuery(".aftpl_pnlbtn").hide();
afjQuery(".aftpl_wait").show();
}
}
});
});