Changeset 47124c22 in github for program/steps/mail/compose.inc


Ignore:
Timestamp:
Apr 12, 2008 9:54:45 AM (5 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
3d35312
Parents:
b00bd0f2
Message:

Changed codebase to PHP5 with autoloader + added some new classes from the devel-vnext branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/steps/mail/compose.inc

    r0c6f4b8 r47124c22  
    2020*/ 
    2121 
    22 require_once('Mail/mimeDecode.php'); 
    23 require_once('lib/html2text.inc'); 
    24  
    2522// define constants for message compose mode 
    2623define('RCUBE_COMPOSE_REPLY', 0x0106); 
     
    160157         
    161158      $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'tabindex'); 
    162       $field_type = 'textarea';             
     159      $field_type = 'html_textarea'; 
    163160      break; 
    164161 
     
    167164      $fname = '_replyto'; 
    168165      $allow_attrib = array('id', 'class', 'style', 'size', 'tabindex'); 
    169       $field_type = 'textfield'; 
     166      $field_type = 'html_inputfield'; 
    170167      break;     
    171168  } 
     
    232229    // create teaxtarea object 
    233230    $input = new $field_type($field_attrib); 
    234     $out = $input->show($fvalue);     
     231    $out = $input->show($fvalue); 
    235232  } 
    236233   
     
    286283 
    287284    $field_attrib['onchange'] = JS_OBJECT_NAME.".change_identity(this)"; 
    288     $select_from = new select($field_attrib); 
     285    $select_from = new html_select($field_attrib); 
    289286 
    290287    while ($sql_arr = $DB->fetch_assoc($sql_result)) 
     
    328325  else 
    329326  { 
    330     $input_from = new textfield($field_attrib); 
     327    $input_from = new html_inputfield($field_attrib); 
    331328    $out = $input_from->show($_POST['_from']); 
    332329  } 
     
    420417  $out = $form_start ? "$form_start\n" : ''; 
    421418 
    422   $saveid = new hiddenfield(array('name' => '_draft_saveid', 'value' => $compose_mode==RCUBE_COMPOSE_DRAFT ? str_replace(array('<','>'), "", $MESSAGE['headers']->messageID) : '')); 
     419  $saveid = new html_hiddenfield(array('name' => '_draft_saveid', 'value' => $compose_mode==RCUBE_COMPOSE_DRAFT ? str_replace(array('<','>'), "", $MESSAGE['headers']->messageID) : '')); 
    423420  $out .= $saveid->show(); 
    424421 
    425   $drafttoggle = new hiddenfield(array('name' => '_draft', 'value' => 'yes')); 
     422  $drafttoggle = new html_hiddenfield(array('name' => '_draft', 'value' => 'yes')); 
    426423  $out .= $drafttoggle->show(); 
    427424 
    428   $msgtype = new hiddenfield(array('name' => '_is_html', 'value' => ($isHtml?"1":"0"))); 
     425  $msgtype = new html_hiddenfield(array('name' => '_is_html', 'value' => ($isHtml?"1":"0"))); 
    429426  $out .= $msgtype->show(); 
    430427 
     
    432429  if ($isHtml) 
    433430    $attrib['mce_editable'] = "true"; 
    434   $textarea = new textarea($attrib); 
     431  $textarea = new html_textarea($attrib); 
    435432  $out .= $textarea->show($body); 
    436433  $out .= $form_end ? "\n$form_end" : ''; 
     
    623620   
    624621  $attrib['name'] = '_subject'; 
    625   $textfield = new textfield($attrib); 
     622  $textfield = new html_inputfield($attrib); 
    626623 
    627624  $subject = ''; 
     
    751748   
    752749  $attrib['name'] = '_priority'; 
    753   $selector = new select($attrib); 
     750  $selector = new html_select($attrib); 
    754751 
    755752  $selector->add(array(rcube_label('lowest'), 
     
    782779  $attrib['name'] = '_receipt'; 
    783780  $attrib['value'] = '1'; 
    784   $checkbox = new checkbox($attrib); 
     781  $checkbox = new html_checkbox($attrib); 
    785782 
    786783  $out = $form_start ? "$form_start\n" : ''; 
     
    829826 
    830827    $attrib['id'] = '_' . $value; 
    831     $rb = new radiobutton($attrib); 
     828    $rb = new html_radiobutton($attrib); 
    832829    $selector .= sprintf("%s<label for=\"%s\">%s</label>", 
    833830                         $rb->show($value), 
     
    847844  if (!strlen($MESSAGE_FORM)) 
    848845  { 
    849     $hiddenfields = new hiddenfield(array('name' => '_task', 'value' => $GLOBALS['_task'])); 
     846    $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $GLOBALS['_task'])); 
    850847    $hiddenfields->add(array('name' => '_action', 'value' => 'send')); 
    851848 
     
    863860  $MESSAGE_FORM = $form_name; 
    864861 
    865   return array($form_start, $form_end);   
     862  return array($form_start, $form_end); 
    866863} 
    867864 
     
    881878 
    882879/****** get contacts for this user and add them to client scripts ********/ 
    883  
    884 require_once('include/rcube_contacts.inc'); 
    885 require_once('include/rcube_ldap.inc');  
    886880 
    887881$CONTACTS = new rcube_contacts($DB, $USER->ID); 
     
    929923        $OUTPUT->set_env('contacts', $a_contacts);  
    930924  }  
    931 parse_template('compose'); 
     925$OUTPUT->send('compose'); 
    932926?> 
Note: See TracChangeset for help on using the changeset viewer.