fix(ux): locale reload feedback, submit validation, dedup blur logic
- Locale-Picker: disable select + fade before location.reload() (system mode) gives visual feedback before the page jumps - Extract _validateField() helper from wireBlurValidation to avoid duplication - Add validateAll(formContainer): validates all required fields on demand, marks inline errors, focuses first invalid field - tasks.js: call validateAll() at submit to catch untouched required fields
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
import { api } from '/api.js';
|
||||
import { renderRRuleFields, bindRRuleEvents, getRRuleValues } from '/rrule-ui.js';
|
||||
import { openModal as openSharedModal, closeModal, wireBlurValidation, btnSuccess, btnError, promptModal, confirmModal } from '/components/modal.js';
|
||||
import { openModal as openSharedModal, closeModal, wireBlurValidation, validateAll, btnSuccess, btnError, promptModal, confirmModal } from '/components/modal.js';
|
||||
import { stagger, vibrate } from '/utils/ux.js';
|
||||
import { t, formatDate } from '/i18n.js';
|
||||
import { esc } from '/utils/html.js';
|
||||
@@ -430,6 +430,9 @@ async function handleFormSubmit(e, container) {
|
||||
const submitBtn = document.getElementById('task-submit-btn');
|
||||
const taskId = document.getElementById('task-id').value;
|
||||
|
||||
// Alle required-Felder sofort validieren (auch unberührte)
|
||||
if (!validateAll(form)) return;
|
||||
|
||||
errorEl.hidden = true;
|
||||
submitBtn.disabled = true;
|
||||
submitBtn.textContent = t('common.saving');
|
||||
|
||||
Reference in New Issue
Block a user