Changeset 606 in subversion
- Timestamp:
- Jun 6, 2007 3:51:21 PM (6 years ago)
- Location:
- branches/devel-vnext/program
- Files:
-
- 3 edited
-
include/rcube/rcmail_compose.php (modified) (2 diffs)
-
steps/settings/edit_identity.inc (modified) (3 diffs)
-
steps/settings/identities.inc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/devel-vnext/program/include/rcube/rcmail_compose.php
r602 r606 297 297 } 298 298 $out = $form_start ? "$form_start\n" : ''; 299 300 //tfk_debug($MESSAGE['headers']); 301 299 302 $saveid = new hiddenfield( 300 303 array( … … 302 305 'value' => $compose_mode==RCUBE_COMPOSE_DRAFT ? str_replace(array('<','>'), 303 306 "", 304 $MESSAGE[' structure']->headers['messageID']) : ''307 $MESSAGE['headers']->messageID) : '' 305 308 ) 306 309 ); -
branches/devel-vnext/program/steps/settings/edit_identity.inc
r589 r606 1 1 <?php 2 3 2 /* 4 3 +-----------------------------------------------------------------------+ … … 20 19 */ 21 20 22 if (($_GET['_iid'] || $_POST['_iid']) && $_action=='edit-identity') 23 { 24 $DB->query("SELECT * FROM ".get_table_name('identities')." 25 WHERE identity_id=? 26 AND user_id=? 27 AND del<>1", 28 get_input_value('_iid', RCUBE_INPUT_GPC), 29 $_SESSION['user_id']); 21 if (($_GET['_iid'] || $_POST['_iid']) && $_action=='edit-identity') { 22 $_query = "SELECT * FROM " . get_table_name('identities'); 23 $_query.= " WHERE identity_id=?"; 24 $_query.= " AND user_id=?"; 25 $_query.= " AND del<>1"; 26 $DB->query( 27 $_query, 28 get_input_value('_iid', RCUBE_INPUT_GPC), 29 $_SESSION['user_id'] 30 ); 30 31 31 $IDENTITY_RECORD = $DB->fetch_assoc();32 $IDENTITY_RECORD = $DB->fetch_assoc(); 32 33 33 if (is_array($IDENTITY_RECORD))34 $OUTPUT->set_env('iid', $IDENTITY_RECORD['identity_id']);35 36 $OUTPUT->set_pagetitle(rcube_label('edititem'));37 }38 else 34 if (is_array($IDENTITY_RECORD)) { 35 $OUTPUT->set_env('iid', $IDENTITY_RECORD['identity_id']); 36 } 37 $OUTPUT->set_pagetitle(rcube_label('edititem')); 38 } 39 else { 39 40 $OUTPUT->set_pagetitle(rcube_label('newitem')); 40 41 41 } 42 42 $OUTPUT->include_script('list.js'); 43 43 44 45 44 function rcube_identity_form($attrib) 46 {47 global $IDENTITY_RECORD, $OUTPUT;45 { 46 global $IDENTITY_RECORD, $OUTPUT; 48 47 49 48 /* … … 61 60 "theme_advanced_buttons3 : '' });"); 62 61 */ 63 if (!$IDENTITY_RECORD && $GLOBALS['_action']!='add-identity')64 return rcube_label('notfound');65 66 // add some labels to client67 rcube_add_label('noemailwarning', 'nonamewarning');62 if (!$IDENTITY_RECORD && $GLOBALS['_action']!='add-identity') { 63 return rcube_label('notfound'); 64 } 65 // add some labels to client 66 rcube_add_label('noemailwarning', 'nonamewarning'); 68 67 69 68 70 list($form_start, $form_end) = get_form_tags($attrib, 'save-identity', array('name' => '_iid', 'value' => $IDENTITY_RECORD['identity_id']));71 unset($attrib['form']);69 list($form_start, $form_end) = get_form_tags($attrib, 'save-identity', array('name' => '_iid', 'value' => $IDENTITY_RECORD['identity_id'])); 70 unset($attrib['form']); 72 71 73 72 74 // list of available cols 75 $a_show_cols = array('name' => array('type' => 'text'), 76 'email' => array('type' => 'text'), 77 'organization' => array('type' => 'text'), 78 'reply-to' => array('type' => 'text', 'label' => 'replyto'), 79 'bcc' => array('type' => 'text'), 80 'signature' => array('type' => 'textarea', 'size' => "40", 'rows' => "4"), 81 // 'html_signature'=>array('type' => 'checkbox', 'label' => 'htmlsignature', 'onclick' => 'return rcmail.toggle_editor(this, \'_signature\');'), 82 'standard' => array('type' => 'checkbox', 'label' => 'setdefault')); 73 // list of available cols 74 $a_show_cols = array( 75 'name' => array('type' => 'text'), 76 'email' => array('type' => 'text'), 77 'organization' => array('type' => 'text'), 78 'reply-to' => array('type' => 'text', 'label' => 'replyto'), 79 'bcc' => array('type' => 'text'), 80 'signature' => array('type' => 'textarea', 'size' => "40", 'rows' => "4"), 81 // 'html_signature'=>array('type' => 'checkbox', 'label' => 'htmlsignature', 'onclick' => 'return rcmail.toggle_editor(this, \'_signature\');'), 82 'standard' => array('type' => 'checkbox', 'label' => 'setdefault')); 83 83 84 84 85 // a specific part is requested 86 if ($attrib['part']) 87 { 88 $colprop = $a_show_cols[$attrib['part']]; 89 if (is_array($colprop)) 90 { 91 $out = $form_start; 92 $out .= rcmail_get_edit_field($attrib['part'], $IDENTITY_RECORD[$attrib['part']], $attrib, $colprop['type']); 93 return $out; 94 } 95 else 96 return ''; 85 // a specific part is requested 86 if ($attrib['part']) { 87 $colprop = $a_show_cols[$attrib['part']]; 88 if (is_array($colprop)) { 89 $out = $form_start; 90 $out.= rcmail_get_edit_field($attrib['part'], $IDENTITY_RECORD[$attrib['part']], $attrib, $colprop['type']); 91 return $out; 92 } 93 else { 94 return ''; 95 } 97 96 } 98 97 99 98 100 // return the complete edit form as table101 $out = "$form_start<table>\n\n";99 // return the complete edit form as table 100 $out = "$form_start<table>\n\n"; 102 101 103 foreach ($a_show_cols as $col => $colprop) 104 { 105 $attrib['id'] = 'rcmfd_'.$col; 102 foreach ($a_show_cols as $col => $colprop) { 103 $attrib['id'] = 'rcmfd_'.$col; 106 104 107 if (strlen($colprop['onclick'])) 108 $attrib['onclick'] = $colprop['onclick']; 109 else 110 unset($attrib['onclick']); 105 if (strlen($colprop['onclick'])) { 106 $attrib['onclick'] = $colprop['onclick']; 107 } 108 else { 109 unset($attrib['onclick']); 110 } 111 111 112 if ($col == 'signature') 113 { 114 $attrib['size'] = $colprop['size']; 115 $attrib['rows'] = $colprop['rows']; 116 $attrib['mce_editable'] = $IDENTITY_RECORD['html_signature'] ? "true" : "false"; 117 } 118 else 119 { 120 unset($attrib['size']); 121 unset($attrib['rows']); 122 unset($attrib['mce_editable']); 123 } 112 if ($col == 'signature') { 113 $attrib['size'] = $colprop['size']; 114 $attrib['rows'] = $colprop['rows']; 115 $attrib['mce_editable'] = $IDENTITY_RECORD['html_signature'] ? "true" : "false"; 116 } 117 else { 118 unset($attrib['size']); 119 unset($attrib['rows']); 120 unset($attrib['mce_editable']); 121 } 124 122 125 $label = strlen($colprop['label']) ? $colprop['label'] : $col;126 $value = rcmail_get_edit_field($col, $IDENTITY_RECORD[$col], $attrib, $colprop['type']);123 $label = strlen($colprop['label']) ? $colprop['label'] : $col; 124 $value = rcmail_get_edit_field($col, $IDENTITY_RECORD[$col], $attrib, $colprop['type']); 127 125 128 $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 126 $out .= sprintf( 127 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 129 128 $attrib['id'], 130 129 Q(rcube_label($label)), 131 130 $value); 132 131 } 132 $out .= "\n</table>$form_end"; 133 133 134 $out .= "\n</table>$form_end"; 135 136 return $out; 137 } 134 return $out; 135 } 138 136 139 137 $OUTPUT->add_handler('identityform', 'rcube_identity_form'); 140 138 141 if ($_action=='add-identity' && template_exists('addidentity')) 142 parse_template('addidentity');143 139 if ($_action=='add-identity' && template_exists('addidentity')) { 140 parse_template('addidentity'); 141 } 144 142 parse_template('editidentity'); 145 143 ?> -
branches/devel-vnext/program/steps/settings/identities.inc
r589 r606 20 20 */ 21 21 22 if ($USER_DATA = $DB->fetch_assoc($sql_result)) 23 $OUTPUT->set_pagetitle(sprintf('%s (%s@%s)', rcube_label('identities'), $USER_DATA['username'], $USER_DATA['mail_host']));24 22 if ($USER_DATA = $DB->fetch_assoc($sql_result)) { 23 $OUTPUT->set_pagetitle(sprintf('%s (%s@%s)', rcube_label('identities'), $USER_DATA['username'], $USER_DATA['mail_host'])); 24 } 25 25 $OUTPUT->include_script('list.js'); 26 26 … … 28 28 // similar function as /steps/addressbook/func.inc::rcmail_contact_frame() 29 29 function rcmail_identity_frame($attrib) 30 {31 global $OUTPUT;30 { 31 global $OUTPUT; 32 32 33 if (!$attrib['id']) 34 $attrib['id'] = 'rcmIdentityFrame'; 33 if (!$attrib['id']) { 34 $attrib['id'] = 'rcmIdentityFrame'; 35 } 36 $attrib['name'] = $attrib['id']; 35 37 36 $attrib['name'] = $attrib['id'];38 $OUTPUT->set_env('contentframe', $attrib['name']); 37 39 38 $OUTPUT->set_env('contentframe', $attrib['name']); 40 $attrib_str = create_attrib_string($attrib, array('name', 'id', 'class', 'style', 'src', 'width', 'height', 'frameborder')); 41 $out = '<iframe'. $attrib_str . '></iframe>'; 39 42 40 $attrib_str = create_attrib_string($attrib, array('name', 'id', 'class', 'style', 'src', 'width', 'height', 'frameborder')); 41 $out = '<iframe'. $attrib_str . '></iframe>'; 42 43 return $out; 44 } 43 return $out; 44 } 45 45 46 46 $OUTPUT->add_handler('identityframe', 'rcmail_identity_frame');
Note: See TracChangeset
for help on using the changeset viewer.
