Make expert mode toggle less prominent
All checks were successful
Tests / test (push) Successful in 28s

This commit is contained in:
Tobias Kunze 2025-11-07 11:41:08 +01:00
parent 6182b36daf
commit 985e4b47c0
2 changed files with 9 additions and 9 deletions

View file

@ -7,12 +7,11 @@
{% csrf_token %}
{% include "frontend/forms/errors.html" %}
{% if form %}
<div class="mb-3">
<button type="button"
class="btn btn-sm btn-outline-secondary ml-auto d-block"
id="expert-mode-toggle">
<i class="bi bi-code-square"></i> {% translate "Show Expert Mode" %}
</button>
<div class="mb-3 text-end">
<a href="#"
class="text-muted small"
id="expert-mode-toggle"
style="text-decoration: none">{% translate "Show Expert Mode" %}</a>
</div>
{% endif %}
<div id="custom-form-container"

View file

@ -15,7 +15,8 @@
return;
}
toggleButton.addEventListener('click', function() {
toggleButton.addEventListener('click', function(e) {
e.preventDefault();
isExpertMode = !isExpertMode;
const activeFormInput = document.getElementById('active-form-input');
@ -23,12 +24,12 @@
if (isExpertMode) {
customFormContainer.style.display = 'none';
expertFormContainer.style.display = 'block';
toggleButton.innerHTML = '<i class="bi bi-code-square-fill"></i> Show Simplified Form';
toggleButton.textContent = 'Show Simplified Form';
if (activeFormInput) activeFormInput.value = 'expert';
} else {
customFormContainer.style.display = 'block';
expertFormContainer.style.display = 'none';
toggleButton.innerHTML = '<i class="bi bi-code-square"></i> Show Expert Mode';
toggleButton.textContent = 'Show Expert Mode';
if (activeFormInput) activeFormInput.value = 'custom';
}
});