| | |
| | | break; |
| | | |
| | | case 'upload-photo': |
| | | this.upload_contact_photo(props); |
| | | this.upload_contact_photo(props || this.gui_objects.uploadform); |
| | | break; |
| | | |
| | | case 'delete-photo': |
| | |
| | | global $OUTPUT; |
| | | |
| | | // set defaults |
| | | $attrib += array('id' => 'rcmUploadbox', 'buttons' => 'yes'); |
| | | $attrib += array('id' => 'rcmUploadform', 'buttons' => 'yes'); |
| | | |
| | | // find max filesize value |
| | | $max_filesize = parse_bytes(ini_get('upload_max_filesize')); |
| | |
| | | $button = new html_inputfield(array('type' => 'button')); |
| | | |
| | | $out = html::div($attrib, |
| | | $OUTPUT->form_tag(array('name' => 'uploadform', 'method' => 'post', 'enctype' => 'multipart/form-data'), |
| | | $OUTPUT->form_tag(array('id' => $attrib['id'].'Frm', 'name' => 'uploadform', 'method' => 'post', 'enctype' => 'multipart/form-data'), |
| | | $hidden->show() . |
| | | html::div(null, $input->show()) . |
| | | html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) . |
| | |
| | | ); |
| | | |
| | | $OUTPUT->add_label('addphoto','replacephoto'); |
| | | $OUTPUT->add_gui_object('uploadbox', $attrib['id']); |
| | | $OUTPUT->add_gui_object('uploadform', $attrib['id'].'Frm'); |
| | | return $out; |
| | | } |
| | | |
| | |
| | | $button = new html_inputfield(array('type' => 'button')); |
| | | |
| | | $out = html::div($attrib, |
| | | $OUTPUT->form_tag(array('name' => 'uploadform', 'method' => 'post', 'enctype' => 'multipart/form-data'), |
| | | $OUTPUT->form_tag(array('id' => $attrib['id'].'Frm', 'name' => 'uploadform', 'method' => 'post', 'enctype' => 'multipart/form-data'), |
| | | html::div(null, rcmail_compose_attachment_field(array('size' => $attrib['attachmentfieldsize']))) . |
| | | html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) . |
| | | (get_boolean($attrib['buttons']) ? html::div('buttons', |
| | |
| | | ) |
| | | ); |
| | | |
| | | $OUTPUT->add_gui_object('uploadform', $attrib['id']); |
| | | $OUTPUT->add_gui_object('uploadform', $attrib['id'].'Frm'); |
| | | return $out; |
| | | } |
| | | |