parent
b94e5eb7f3
commit
dad6332923
|
@ -51,6 +51,10 @@
|
|||
{% endif %}
|
||||
<input type="submit" value="Post Only" name="post_only" />
|
||||
{% endif %}
|
||||
<div id="cancel-dialog" style="display: none;" title="Cancel {% if form.edit %}editing liaison{% else %}adding new liaison{% endif %}">
|
||||
Are you sure you want to return to liaison statement list?<br/><br/>All data entered into this form will be lost.
|
||||
</div>
|
||||
<input id="id_cancel" type="button" value="Cancel" name="cancel" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -137,6 +137,8 @@
|
|||
var deadline = form.find('#id_deadline_date');
|
||||
var other_organization = form.find('#id_other_organization');
|
||||
var approval = form.find('#id_approved');
|
||||
var cancel = form.find('#id_cancel');
|
||||
var cancel_dialog = form.find('#cancel-dialog');
|
||||
var config = {};
|
||||
|
||||
var readConfig = function() {
|
||||
|
@ -226,12 +228,17 @@
|
|||
}
|
||||
};
|
||||
|
||||
var cancelForm = function() {
|
||||
cancel_dialog.dialog("open");
|
||||
};
|
||||
|
||||
var initTriggers = function() {
|
||||
organization.change(updateInfo);
|
||||
organization.change(checkOtherSDO);
|
||||
from.change(updateInfo);
|
||||
reply.keyup(updateFrom);
|
||||
purpose.change(updatePurpose);
|
||||
cancel.click(cancelForm);
|
||||
};
|
||||
|
||||
var updateOnInit = function() {
|
||||
|
@ -252,12 +259,31 @@
|
|||
form.find('.addAttachmentWidget').AttachmentWidget();
|
||||
};
|
||||
|
||||
var initDialogs = function() {
|
||||
cancel_dialog.dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
Ok: function() {
|
||||
window.location='..';
|
||||
$( this ).dialog( "close" );
|
||||
},
|
||||
Cancel: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var initForm = function() {
|
||||
readConfig();
|
||||
initTriggers();
|
||||
updateOnInit();
|
||||
initDatePicker();
|
||||
initAttachments();
|
||||
initDialogs();
|
||||
};
|
||||
|
||||
initForm();
|
||||
|
|
Loading…
Reference in a new issue