Commit 3d51eb6e authored by Alexandre Morin's avatar Alexandre Morin
Browse files

Popup confirm restitution

parent d56a0d88
......@@ -668,8 +668,8 @@ class message
if ($message->status == "sent") {
$messageObject->exportButton = "/restitution/".$messageId."/Export";
} elseif ($message->status == "received") {
$messageObject->rejectButton = "/restitution/".$messageId."/Reject";
$messageObject->acceptButton = "/restitution/".$messageId."/Acknowledge";
//$messageObject->rejectButton = "/restitution/".$messageId."/Reject";
$messageObject->acknowledgeButton = "/restitution/".$messageId."/Acknowledge";
}
break;
......
......@@ -18,28 +18,28 @@
</div>
<div data-translate-catalog="medona/messages">
<div class="modal fade" id="deleteConfirmationModal">
<div class="modal fade" id="restitutionConfirmationModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Delete an archive</h4>
<h4 class="modal-title">Restitution</h4>
</div>
<div class="modal-body">
<p>
<span>Are you sur to delete this archive ?</span>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" title="Close">No</button>
<button type="button" class="btn btn-primary" id="confirmDelete" data-action="" data-dismiss="modal" title="Yes">Yes</button>
<button type="button" class="btn btn-success" data-dismiss="modal" title="Close">No</button>
<button type="button" class="btn btn-danger" id="confirmDelete" data-action="" data-dismiss="modal" title="Yes">Yes</button>
</div>
</div>
</div>
</div>
<div style="display:none">
<span id="acknowledge_text">acknowledge warning</span>
<span id="destroy_text">destroy warning</span>
</div>
</div>
<script>
var str = document.URL;
var res = str.split("/");
......
......@@ -30,12 +30,13 @@
<?merge .modifyButton.bool() ?>
<button type="button" class="btn btn-warning messageAction" data-action="[?merge .modifyButton ?]" title="Modify"><i class="fa fa-times">&nbsp;</i>Modify</button>
<?merge .validationButton.bool() ?>
<button type="button" class="btn btn-success messageActionValidation" data-action="[?merge .validationButton ?]" title="End" ><i class="fa fa-check">&nbsp;</i>End</button>
<button type="button" class="btn btn-danger messageActionValidation" data-action="[?merge .validationButton ?]" title="Destroy" ><i class="fa fa-trash">&nbsp;</i>Destroy</button>
<?merge .sendRequestAuth.bool() ?>
<button type="button" class="btn btn-warning messageAction" data-action="[?merge .sendRequestAuth ?]" title="Authorization"><i class="fa fa-level-up">&nbsp;</i>Authorization</button>
<?merge .archived ?>
<button type="button" class="btn btn-success viewArchive" data-archive-id="[?merge .messageId ?]" title="Info"><span class="fa fa-info-circle"></span></button>
<?merge .acknowledgeButton.bool() ?>
<button type="button" class="btn btn-danger messageActionValidation" data-action="[?merge .acknowledgeButton ?]" title="Acknowledge"><i class="fa fa-gavel">&nbsp;</i>Acknowledge</button>
</div>
</h4>
</h3>
......@@ -84,7 +85,15 @@
messageAction: $(this).data('action')
};
$('#deleteConfirmationModal').modal();
var res = parameters.messageAction.split("/");
if (res.pop() == "Acknowledge") {
$('#restitutionConfirmationModal').find('.modal-body').html($('#acknowledge_text').html());
} else {
$('#restitutionConfirmationModal').find('.modal-body').html($('#destroy_text').html());
}
$('#restitutionConfirmationModal').modal();
$('#confirmDelete').one('click', function(){
$.ajax({
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment