Ready to publish
Added new Email Template and new Modal form for expired TECNs. Updated Email Template and new Modal form for TECNs. Added more margin on all modal dialogs
This commit is contained in:
75
Fab2ApprovalSystem/Views/ECN/_ECNCancel.cshtml
Normal file
75
Fab2ApprovalSystem/Views/ECN/_ECNCancel.cshtml
Normal file
@ -0,0 +1,75 @@
|
||||
<div class="modal fade" id="Cancel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel"><center>Has the process returned to the original state?</center></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="row">
|
||||
<div class="col-sm-13">
|
||||
<h4 class="modal-title">Comments (Required):</h4>
|
||||
<textarea class="form-control" rows="5" id="comments" style="resize: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmCancel">Confirm Cancel (Yes)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#CancelDocument").click(function (e) {
|
||||
|
||||
$("#comments").val("");
|
||||
|
||||
$("#Cancel").modal('show');
|
||||
});
|
||||
|
||||
$('#ConfirmCancel').on('click', function () {
|
||||
|
||||
if ($("#comments").val() == "") {
|
||||
alert("Comments are required");
|
||||
return;
|
||||
}
|
||||
|
||||
$('#ConfirmCancel').attr("disabled", true);
|
||||
|
||||
$.ajax({
|
||||
url: "/ECN/CancelDocument",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: {
|
||||
ecnNumber: $("#txtECNNumber").val(),
|
||||
currentStep: 1,
|
||||
documentType: 5,
|
||||
ecnTypeString: ecnTypeString,
|
||||
comments: $("#comments").val(),
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
$("#Cancel").modal('hide');
|
||||
|
||||
var url = '@Url.Action("ReadOnly", "ECN", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', $("#txtECNNumber").val());
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
$('#ConfirmCancel').attr("disabled", false);
|
||||
alert("Server error while canceling document");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user