05/22 Enhance codes and fix bugs

This commit is contained in:
2026-05-22 11:53:41 -04:00
parent d6d9b5e9dc
commit 3511ac2b56
13 changed files with 891 additions and 47 deletions
+12 -9
View File
@@ -368,7 +368,8 @@
{% if survey_enabled %}
<button type="submit" name="survey_enabled" value="0"
class="btn btn-sm btn-outline-danger"
onclick="return confirm('Disable satisfaction surveys? No survey emails will be sent when tickets are resolved.')">
data-confirm="Disable satisfaction surveys? No survey emails will be sent when tickets are resolved."
data-confirm-title="Disable Satisfaction Surveys" data-confirm-ok="Disable">
<i class="bi bi-toggle-on me-1"></i>Disable
</button>
{% else %}
@@ -416,7 +417,8 @@
{% if registration_enabled %}
<button type="submit" name="registration_enabled" value="0"
class="btn btn-sm btn-outline-danger"
onclick="return confirm('Disable self-registration? New users will not be able to sign up independently.')">
data-confirm="Disable self-registration? New users will not be able to sign up independently."
data-confirm-title="Disable Self-Registration" data-confirm-ok="Disable">
<i class="bi bi-toggle-on me-1"></i>Disable
</button>
{% else %}
@@ -461,13 +463,14 @@ function syncColorPicker(val) {
}
function removeLogo() {
if (!confirm('Remove the current logo?')) return;
document.getElementById('remove-logo-input').value = '1';
const initials = document.getElementById('logo-initials').value.substring(0, 2).toUpperCase();
document.getElementById('logo-preview-wrap').innerHTML =
`<span id="logo-preview-initials" style="font-family:'Space Mono',monospace;font-weight:700;font-size:18px;color:#fff;">${initials}</span>`;
const row = document.getElementById('remove-logo-row');
if (row) row.style.display = 'none';
confirmModal('Remove Logo', 'Remove the current logo? The initials fallback will be displayed instead.', 'Remove', 'btn-danger', () => {
document.getElementById('remove-logo-input').value = '1';
const initials = document.getElementById('logo-initials').value.substring(0, 2).toUpperCase();
document.getElementById('logo-preview-wrap').innerHTML =
`<span id="logo-preview-initials" style="font-family:'Space Mono',monospace;font-weight:700;font-size:18px;color:#fff;">${initials}</span>`;
const row = document.getElementById('remove-logo-row');
if (row) row.style.display = 'none';
});
}
</script>
{% endblock %}