thomascube
2011-08-18 fbe54043cf598b19a753dc2b21a7ed558d23fd15
program/steps/settings/edit_identity.inc
@@ -4,8 +4,8 @@
 +-----------------------------------------------------------------------+
 | program/steps/settings/edit_identity.inc                              |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2005-2007, The Roundcube Dev Team                       |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
@@ -28,7 +28,7 @@
  if (is_array($IDENTITY_RECORD))
    $OUTPUT->set_env('iid', $IDENTITY_RECORD['identity_id']);
  else {
    $OUTPUT->show_message('opnotpermitted', 'error');
    $OUTPUT->show_message('databaserror', 'error');
    // go to identities page
    rcmail_overwrite_action('identities');
    return;
@@ -90,9 +90,13 @@
  // disable some field according to access level
  if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) {
    $form['adressing']['content']['email']['disabled'] = true;
    $form['adressing']['content']['email']['class'] = 'disabled';
    $form['addressing']['content']['email']['disabled'] = true;
    $form['addressing']['content']['email']['class'] = 'disabled';
  }
  $IDENTITY_RECORD['email']    = rcube_idn_to_utf8($IDENTITY_RECORD['email']);
  $IDENTITY_RECORD['reply-to'] = rcube_idn_to_utf8($IDENTITY_RECORD['reply-to']);
  $IDENTITY_RECORD['bcc']      = rcube_idn_to_utf8($IDENTITY_RECORD['bcc']);
  // Allow plugins to modify identity form content
  $plugin = $RCMAIL->plugins->exec_hook('identity_form', array(
@@ -122,7 +126,8 @@
      foreach ($fieldset['content'] as $col => $colprop) {
        $colprop['id'] = 'rcmfd_'.$col;
        $label = !empty($colprop['label']) ? $colprop['label'] : rcube_label($col);
        $label = !empty($colprop['label']) ? $colprop['label'] :
            rcube_label(str_replace('-', '', $col));
        $value = !empty($colprop['value']) ? $colprop['value'] :
            rcmail_get_edit_field($col, $IDENTITY_RECORD[$col], $colprop, $colprop['type']);
@@ -149,9 +154,9 @@
$OUTPUT->set_pagetitle(rcube_label(($RCMAIL->action=='add-identity' ? 'newidentity' : 'edititem')));
if ($RCMAIL->action=='add-identity' && $OUTPUT->template_exists('addidentity'))
  $OUTPUT->send('addidentity');
if ($RCMAIL->action=='add-identity' && $OUTPUT->template_exists('identityadd'))
  $OUTPUT->send('identityadd');
$OUTPUT->send('editidentity');
$OUTPUT->send('identityedit');