Add Auto/Manual mode select for IMAP delimiter

This commit is contained in:
Laurent Dinclaux
2026-02-10 18:14:03 +11:00
parent 36b9b3e35f
commit 39fe417104
9 changed files with 60 additions and 8 deletions

View File

@@ -43,9 +43,14 @@ $(function() {
});
});
// Delimiter blur handler
$("INPUT[name='_ident_switch.form.imap.delimiter']").on('blur', function() {
plugin_switchIdent_clearIfDefault($(this));
// Delimiter mode handler
$("SELECT[name='_ident_switch.form.imap.delimiter_mode']").on('change', function() {
if ($(this).val() === 'manual') {
$('#ident-switch-delimiter-input').show();
} else {
$('#ident-switch-delimiter-input').hide();
$("INPUT[name='_ident_switch.form.imap.delimiter']").val('');
}
});
});
@@ -113,6 +118,9 @@ function plugin_switchIdent_processPreconfig() {
$("SELECT[name='_ident_switch.form.smtp.security']").prop("disabled", true);
$("INPUT[name='_ident_switch.form.smtp.port']").prop("disabled", true);
$("SELECT[name='_ident_switch.form.imap.delimiter_mode']").prop("disabled", true);
$("INPUT[name='_ident_switch.form.imap.delimiter']").prop("disabled", true);
$("INPUT[name='_ident_switch.form.sieve.host']").prop("disabled", true);
$("SELECT[name='_ident_switch.form.sieve.security']").prop("disabled", true);
$("INPUT[name='_ident_switch.form.sieve.port']").prop("disabled", true);