summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-01-13 11:01:17 +0100
committerAleksander Machniak <alec@alec.pl>2015-01-13 11:02:02 +0100
commit56caf850794587a8f3f644c6823daef2d659360f (patch)
tree4662b5d9f9133cd42acff04c778b2ddd4c4a2fbe
parentdb780e10e4981f15da653d8fc53e0fb80c8cce9a (diff)
Fix so "set as default" option is hidden if identities_level > 1 (#1490226)
-rw-r--r--CHANGELOG1
-rw-r--r--program/steps/settings/edit_identity.inc5
-rw-r--r--program/steps/settings/save_identity.inc5
3 files changed, 11 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 073c948d2..069affb8c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,7 @@ CHANGELOG Roundcube Webmail
- Fix checks based on window.ActiveXObject in IE > 10
- Fix XSS issue in style attribute handling (#1490227)
- Fix bug where Drafts list wasn't updated on draft-save action in new window (#1490225)
+- Fix so "set as default" option is hidden if identities_level > 1 (#1490226)
RELEASE 1.0.4
-------------
diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc
index f208c8a05..97922c3da 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 1584c5f00..1582dfba6 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']);