Add new identity level: one identity with edit only signature

pull/49/head
jeremie kornobis 12 years ago
parent 7fac4dc87b
commit f125852979

@ -357,6 +357,7 @@ $rcmail_config['send_format_flowed'] = true;
// 1 - many identities with possibility to edit all params but not email address // 1 - many identities with possibility to edit all params but not email address
// 2 - one identity with possibility to edit all params // 2 - one identity with possibility to edit all params
// 3 - one identity with possibility to edit all params but not email address // 3 - one identity with possibility to edit all params but not email address
// 4 - one identity with possibility to edit only signature
$rcmail_config['identities_level'] = 0; $rcmail_config['identities_level'] = 0;
// Mimetypes supported by the browser. // Mimetypes supported by the browser.

@ -97,6 +97,13 @@ function rcube_identity_form($attrib)
$form['addressing']['content']['email']['class'] = 'disabled'; $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']); $IDENTITY_RECORD['email'] = rcube_idn_to_utf8($IDENTITY_RECORD['email']);
// Allow plugins to modify identity form content // Allow plugins to modify identity form content

@ -26,7 +26,7 @@ $a_boolean_cols = array('standard', 'html_signature');
$updated = $default_id = false; $updated = $default_id = false;
// check input // 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'); $OUTPUT->show_message('formincomplete', 'warning');
rcmail_overwrite_action('edit-identity'); rcmail_overwrite_action('edit-identity');

Loading…
Cancel
Save