| | |
| | | <?php |
| | | |
| | | /* |
| | | /** |
| | | +-----------------------------------------------------------------------+ |
| | | | program/steps/settings/edit_identity.inc | |
| | | | | |
| | |
| | | $OUTPUT->include_script('list.js'); |
| | | $OUTPUT->add_handler('identityform', 'rcube_identity_form'); |
| | | $OUTPUT->set_env('identities_level', IDENTITIES_LEVEL); |
| | | $OUTPUT->add_label('deleteidentityconfirm'); |
| | | $OUTPUT->add_label('deleteidentityconfirm', 'uploading'); |
| | | |
| | | $OUTPUT->set_pagetitle($RCMAIL->gettext(($RCMAIL->action == 'add-identity' ? 'addidentity' : 'editidentity'))); |
| | | |
| | |
| | | // add some labels to client |
| | | $OUTPUT->add_label('noemailwarning', 'converting', 'editorwarning'); |
| | | |
| | | $i_size = !empty($attrib['size']) ? $attrib['size'] : 40; |
| | | $t_rows = !empty($attrib['textarearows']) ? $attrib['textarearows'] : 6; |
| | | $t_cols = !empty($attrib['textareacols']) ? $attrib['textareacols'] : 40; |
| | | $i_size = $attrib['size'] ?: 40; |
| | | $t_rows = $attrib['textarearows'] ?: 6; |
| | | $t_cols = $attrib['textareacols'] ?: 40; |
| | | |
| | | // list of available cols |
| | | $form = array( |
| | |
| | | |
| | | // Correctly handle HTML entities in HTML editor (#1488483) |
| | | $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 |
| | |
| | | foreach ($fieldset['content'] as $col => $colprop) { |
| | | $colprop['id'] = 'rcmfd_'.$col; |
| | | |
| | | $label = !empty($colprop['label']) ? $colprop['label'] : |
| | | $RCMAIL->gettext(str_replace('-', '', $col)); |
| | | |
| | | $value = !empty($colprop['value']) ? $colprop['value'] : |
| | | rcube_output::get_edit_field($col, $IDENTITY_RECORD[$col], $colprop, $colprop['type']); |
| | | $label = $colprop['label'] ?: $RCMAIL->gettext(str_replace('-', '', $col)); |
| | | $value = $colprop['value'] ?: rcube_output::get_edit_field($col, $IDENTITY_RECORD[$col], $colprop, $colprop['type']); |
| | | |
| | | $table->add('title', html::label($colprop['id'], rcube::Q($label))); |
| | | $table->add(null, $value); |
| | |
| | | |
| | | $out .= $form_end; |
| | | |
| | | // add image upload form |
| | | $max_filesize = $RCMAIL->upload_init($RCMAIL->config->get('identity_image_size', 64) * 1024); |
| | | $upload_form_id = 'identityImageUpload'; |
| | | |
| | | $out .= '<form id="' . $upload_form_id . '" style="display: none">' |
| | | . html::div('hint', $RCMAIL->gettext(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) |
| | | . '</form>'; |
| | | |
| | | $RCMAIL->output->add_gui_object('uploadform', $upload_form_id); |
| | | |
| | | return $out; |
| | | } |