Added confirmation dialog adding new jobs
This commit is contained in:
parent
cb786a4dea
commit
3877b7a933
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -5,14 +5,29 @@ $(function() {
|
|||
$(".addJob").button('disable');
|
||||
addJob();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$( "#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');
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue