| | |
| | | <?php |
| | | |
| | | /* |
| | | /** |
| | | +-----------------------------------------------------------------------+ |
| | | | program/steps/addressbook/edit.inc | |
| | | | | |
| | |
| | | 'filedroparea' => 'rcmail_photo_drop_area', |
| | | )); |
| | | |
| | | $OUTPUT->set_pagetitle($RCMAIL->gettext(($RCMAIL->action == 'add' ? 'addcontact' : 'editcontact'))); |
| | | |
| | | if ($RCMAIL->action == 'add' && $OUTPUT->template_exists('contactadd')) { |
| | | $OUTPUT->send('contactadd'); |
| | | } |
| | |
| | | |
| | | // check if we have a valid result |
| | | $record = rcmail_get_edit_record(); |
| | | $i_size = !empty($attrib['size']) ? $attrib['size'] : 20; |
| | | $i_size = $attrib['size'] ?: 20; |
| | | |
| | | $form = array( |
| | | 'head' => array( |
| | |
| | | if (preg_match_all('/\{([a-z0-9]+)\}([^{]*)/i', $RCMAIL->config->get('address_template', ''), $templ, PREG_SET_ORDER)) |
| | | $RCMAIL->output->set_env('address_template', $templ); |
| | | |
| | | $i_size = !empty($attrib['size']) ? $attrib['size'] : 40; |
| | | $t_rows = !empty($attrib['textarearows']) ? $attrib['textarearows'] : 10; |
| | | $t_cols = !empty($attrib['textareacols']) ? $attrib['textareacols'] : 40; |
| | | $i_size = $attrib['size'] ?: 40; |
| | | $t_rows = $attrib['textarearows'] ?: 10; |
| | | $t_cols = $attrib['textareacols'] ?: 40; |
| | | |
| | | $form = array( |
| | | 'contact' => array( |
| | |
| | | if ($RCMAIL->action == 'edit') |
| | | $hiddenfields->add(array('name' => '_source', 'value' => $SOURCE_ID)); |
| | | $hiddenfields->add(array('name' => '_gid', 'value' => $CONTACTS->group_id)); |
| | | $hiddenfields->add(array('name' => '_search', 'value' => rcube_utils::get_input_value('_search', rcube_utils::INPUT_GPC))); |
| | | |
| | | if (($result = $CONTACTS->get_result()) && ($record = $result->first())) |
| | | $hiddenfields->add(array('name' => '_cid', 'value' => $record['ID'])); |
| | |
| | | 'noclose' => true) + $attrib, $hiddenfields->show()); |
| | | $form_end = !strlen($attrib['form']) ? '</form>' : ''; |
| | | |
| | | $EDIT_FORM = !empty($attrib['form']) ? $attrib['form'] : 'form'; |
| | | $EDIT_FORM = $attrib['form'] ?: 'form'; |
| | | $RCMAIL->output->add_gui_object('editform', $EDIT_FORM); |
| | | } |
| | | |