Split ident_switch.php into focused classes
Extract business logic into dedicated classes under lib/: - IdentSwitchForm: form building, validation, and persistence - IdentSwitchSwitcher: account switching, SMTP config, special folders - IdentSwitchPreconfig: domain-based preconfiguration The main plugin class remains the orchestrator, registering hooks and delegating to the appropriate handler. Constants changed from private to public to allow cross-class access.
This commit is contained in:
@@ -21,16 +21,14 @@ function plugin_switchIdent_processPreconfig() {
|
||||
var disVal = disFld.val();
|
||||
if (disVal > 0) {
|
||||
$("INPUT[name='_ident_switch.form.imap.host']").prop("disabled", true);
|
||||
$("SELECT[name='_ident_switch.form.imap.tls']").prop("disabled", true);
|
||||
$("INPUT[name='_ident_switch.form.imap.tls']").prop("disabled", true);
|
||||
$("INPUT[name='_ident_switch.form.imap.port']").prop("disabled", true);
|
||||
|
||||
$("INPUT[name='_ident_switch.form.smtp.host']").prop("disabled", true);
|
||||
$("SELECT[name='_ident_switch.form.smtp.tls']").prop("disabled", true);
|
||||
$("INPUT[name='_ident_switch.form.smtp.port']").prop("disabled", true);
|
||||
}
|
||||
if (2 == disVal) {
|
||||
$("INPUT[name='_ident_switch.form.imap.username']").prop("disabled", true);
|
||||
$("INPUT[name='_ident_switch.form.smtp.username']").prop("disabled", true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user