summaryrefslogtreecommitdiff
path: root/program/steps/settings
diff options
context:
space:
mode:
authorjeremie kornobis <jkornobis@linagora.com>2012-11-26 14:12:48 +0100
committerjeremie kornobis <jkornobis@linagora.com>2012-11-26 14:17:20 +0100
commitf12585297974a994bd9b081cd1d70e8ab8d2365e (patch)
tree4978171bd5b071a1a74bc32a7f9ec8f356bc4409 /program/steps/settings
parent7fac4dc87b2507227666db9b74d83090f38d62e7 (diff)
Add new identity level: one identity with edit only signature
Diffstat (limited to 'program/steps/settings')
-rw-r--r--program/steps/settings/edit_identity.inc7
-rw-r--r--program/steps/settings/save_identity.inc2
2 files changed, 8 insertions, 1 deletions
diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc
index aa1aeea5d..7e7be1f83 100644
--- a/program/steps/settings/edit_identity.inc
+++ b/program/steps/settings/edit_identity.inc
@@ -97,6 +97,13 @@ function rcube_identity_form($attrib)
$form['addressing']['content']['email']['class'] = 'disabled';
}
+ if (IDENTITIES_LEVEL == 4) {
+ foreach($form['addressing']['content'] as $formfield => $value){
+ $form['addressing']['content'][$formfield]['disabled'] = true;
+ $form['addressing']['content'][$formfield]['class'] = 'disabled';
+ }
+ }
+
$IDENTITY_RECORD['email'] = rcube_idn_to_utf8($IDENTITY_RECORD['email']);
// Allow plugins to modify identity form content
diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc
index 8515c44f1..7ca54a179 100644
--- a/program/steps/settings/save_identity.inc
+++ b/program/steps/settings/save_identity.inc
@@ -26,7 +26,7 @@ $a_boolean_cols = array('standard', 'html_signature');
$updated = $default_id = false;
// check input
-if (empty($_POST['_name']) || (empty($_POST['_email']) && IDENTITIES_LEVEL != 1 && IDENTITIES_LEVEL != 3))
+if (IDENTITIES_LEVEL != 4 && (empty($_POST['_name']) || (empty($_POST['_email']) && IDENTITIES_LEVEL != 1 && IDENTITIES_LEVEL != 3)))
{
$OUTPUT->show_message('formincomplete', 'warning');
rcmail_overwrite_action('edit-identity');