diff options
Diffstat (limited to 'program/steps/settings')
-rw-r--r-- | program/steps/settings/edit_identity.inc | 5 | ||||
-rw-r--r-- | program/steps/settings/save_identity.inc | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc index cd7ba5fa6..298822d66 100644 --- a/program/steps/settings/edit_identity.inc +++ b/program/steps/settings/edit_identity.inc @@ -109,6 +109,11 @@ function rcube_identity_form($attrib) $IDENTITY_RECORD['signature'] = htmlspecialchars($IDENTITY_RECORD['signature'], ENT_NOQUOTES, RCUBE_CHARSET); } + // hide "default" checkbox if only one identity is allowed + if (IDENTITIES_LEVEL > 1) { + unset($form['addressing']['content']['standard']); + } + // disable some field according to access level if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) { $form['addressing']['content']['email']['disabled'] = true; diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc index de0c84c91..ac7ef8708 100644 --- a/program/steps/settings/save_identity.inc +++ b/program/steps/settings/save_identity.inc @@ -49,6 +49,11 @@ foreach ($a_boolean_cols as $col) { } } +// make the identity a "default" if only one identity is allowed +if (IDENTITIES_LEVEL > 1) { + $save_data['standard'] = 1; +} + // unset email address if user has no rights to change it if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) { unset($save_data['email']); |