You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.7 KiB
47 lines
1.7 KiB
<div class="modal fade" id="send-invitation-modal" tabindex="-1" role="dialog" aria-labelledby="send-invitation-modal-title" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'Close' | get_lang }}">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
<h4 class="modal-title" id="send-invitation-modal-title">{{ 'SendInvitation' | get_lang }}</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div id="send-invitation-alert"></div>
|
|
{{ invitation_form|raw }}
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" id="btn-send-invitation" class="btn btn-primary">
|
|
<em class="fa fa-send"></em> {{ 'Send' | get_lang }}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
var $sendInvitationModal = $('#send-invitation-modal');
|
|
var sendToUser = 0;
|
|
|
|
$('.btn-to-send-invitation').on('click', function(e) {
|
|
e.preventDefault();
|
|
sendToUser = $(this).data('send-to');
|
|
$sendInvitationModal.modal('show');
|
|
});
|
|
|
|
$('#btn-send-invitation').on('click', function(e) {
|
|
e.preventDefault();
|
|
|
|
var $frmSendInvitation = $sendInvitationModal.find('.modal-body form'),
|
|
url = '{{ _p.web_ajax }}message.ajax.php?a=send_invitation&user_id=' + sendToUser;
|
|
|
|
$.get(url, $frmSendInvitation.serialize(), function() {
|
|
$frmSendInvitation[0].reset();
|
|
|
|
window.location.reload();
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|