Bug 34616: Add native bootstrap behaviour to default server dialog
Test plan: Create a new SMTP server Tick the 'default server' checkbox Verify it now has a backdrop, closes if u click the backdrop or press 'esc' The Yes and No buttons are now styled properly Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
352a2afd0b
commit
b9d3997063
1 changed files with 5 additions and 5 deletions
|
@ -317,8 +317,8 @@
|
||||||
<div id="default_confirm_dialog">Are you sure you want to change the default SMTP server?</div>
|
<div id="default_confirm_dialog">Are you sure you want to change the default SMTP server?</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a id="default_confirm_dialog" href="#" class="btn btn-default default_confirm_modal_yes" id="default_confirm_modal_button" role="button" data-toggle="modal">Yes</a>
|
<a id="default_confirm_dialog" href="#" class="btn btn-primary default_confirm_modal_yes" id="default_confirm_modal_button" role="button" data-toggle="modal">Yes</a>
|
||||||
<button class="btn btn-link default_confirm_modal_no" data-dismiss="modal" aria-hidden="true">No</button>
|
<button class="btn btn-default default_confirm_modal_no" data-dismiss="modal" aria-hidden="true">No</button>
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- /.modal-content -->
|
</div> <!-- /.modal-content -->
|
||||||
</div> <!-- /.modal-dialog -->
|
</div> <!-- /.modal-dialog -->
|
||||||
|
@ -456,14 +456,14 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#smtp_default').on( "click", function () {
|
$('#smtp_default').on( "click", function () {
|
||||||
$("#default_confirm_modal").show();
|
$("#default_confirm_modal").modal('show');
|
||||||
});
|
});
|
||||||
$('.default_confirm_modal_yes').on( "click", function () {
|
$('.default_confirm_modal_yes').on( "click", function () {
|
||||||
$("#default_confirm_modal").hide();
|
$("#default_confirm_modal").modal('hide');
|
||||||
});
|
});
|
||||||
$('.default_confirm_modal_no').on( "click", function () {
|
$('.default_confirm_modal_no').on( "click", function () {
|
||||||
$("#smtp_default").prop('checked', !$("#smtp_default").prop('checked') );
|
$("#smtp_default").prop('checked', !$("#smtp_default").prop('checked') );
|
||||||
$("#default_confirm_modal").hide();
|
$("#default_confirm_modal").modal('hide');
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#delete_confirm_modal_button").on( "click", function () {
|
$("#delete_confirm_modal_button").on( "click", function () {
|
||||||
|
|
Loading…
Reference in a new issue