Added confirmation dialog adding new jobs

This commit is contained in:
Karl Cordes 2011-04-20 15:57:38 +10:00
parent cb786a4dea
commit 3877b7a933
2 changed files with 22 additions and 2 deletions

View file

@ -208,6 +208,11 @@ $class = ' class="altrow"';?>
</ul>
</div>
<div id="jobAddedDialog" title="New Job Created">
Job has been created.<br>
Redirecting you now to fill in the details.
</div>
<div class="related">

View file

@ -7,12 +7,27 @@ $(function() {
});
$( "#jobAddedDialog" ).dialog({
autoOpen: false,
modal: true,
buttons: {
Ok: function() {
$( this ).dialog( "close" );
}
},
close: function(event,ui) {
window.location.href = '/jobs';
}
});
function addJob() {
var enquiryID = $(".addJob").attr("id");
$.post('/jobs/ajax_add/'+enquiryID, function(data) {
window.location.href = '/jobs';
$( "#jobAddedDialog" ).dialog('open');
});
}