Added confirmation dialog adding new jobs
This commit is contained in:
parent
cb786a4dea
commit
3877b7a933
|
|
@ -208,6 +208,11 @@ $class = ' class="altrow"';?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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">
|
<div class="related">
|
||||||
|
|
|
||||||
|
|
@ -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() {
|
function addJob() {
|
||||||
|
|
||||||
var enquiryID = $(".addJob").attr("id");
|
var enquiryID = $(".addJob").attr("id");
|
||||||
|
|
||||||
$.post('/jobs/ajax_add/'+enquiryID, function(data) {
|
$.post('/jobs/ajax_add/'+enquiryID, function(data) {
|
||||||
window.location.href = '/jobs';
|
$( "#jobAddedDialog" ).dialog('open');
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue