|
|
@ -287,6 +287,14 @@
|
|
|
|
{% block tail %}
|
|
|
|
{% block tail %}
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function () {
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
|
|
|
// Show warning if there's unsaved changes in the settings_form
|
|
|
|
|
|
|
|
var form_changed = false;
|
|
|
|
|
|
|
|
$(window).on('beforeunload', function() {
|
|
|
|
|
|
|
|
if (form_changed) {
|
|
|
|
|
|
|
|
return "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Hide checkmark over save button
|
|
|
|
// Hide checkmark over save button
|
|
|
|
$('#save_button_checkmark').hide();
|
|
|
|
$('#save_button_checkmark').hide();
|
|
|
|
|
|
|
|
|
|
|
@ -342,6 +350,7 @@
|
|
|
|
type: 'POST',
|
|
|
|
type: 'POST',
|
|
|
|
complete: function () {
|
|
|
|
complete: function () {
|
|
|
|
$('#save_button_checkmark').show();
|
|
|
|
$('#save_button_checkmark').show();
|
|
|
|
|
|
|
|
form_changed = false;
|
|
|
|
setTimeout(
|
|
|
|
setTimeout(
|
|
|
|
function()
|
|
|
|
function()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -361,5 +370,10 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$( "#settings-auth-apikey" ).val( result );
|
|
|
|
$( "#settings-auth-apikey" ).val( result );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// monitor changes to the settings_form
|
|
|
|
|
|
|
|
$('#settings_form').on('change', function() {
|
|
|
|
|
|
|
|
form_changed = true;
|
|
|
|
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
{% endblock tail %}
|
|
|
|
{% endblock tail %}
|
|
|
|