From bab0433a274f4e22130793b5e77d3767492c4a9f Mon Sep 17 00:00:00 2001 From: thomascube Date: Tue, 20 Dec 2011 10:21:12 +0000 Subject: First steps for Larry's address book --- program/steps/addressbook/edit.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'program/steps/addressbook') diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc index 49915f5ab..eb6aa1886 100644 --- a/program/steps/addressbook/edit.inc +++ b/program/steps/addressbook/edit.inc @@ -176,9 +176,8 @@ function rcmail_upload_photo_form($attrib) { global $OUTPUT; - // add ID if not given - if (!$attrib['id']) - $attrib['id'] = 'rcmUploadbox'; + // set defaults + $attrib += array('id' => 'rcmUploadbox', 'buttons' => 'yes'); // find max filesize value $max_filesize = parse_bytes(ini_get('upload_max_filesize')); @@ -196,10 +195,10 @@ function rcmail_upload_photo_form($attrib) $hidden->show() . html::div(null, $input->show()) . html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) . - html::div('buttons', + (get_boolean($attrib['buttons']) ? html::div('buttons', $button->show(rcube_label('close'), array('class' => 'button', 'onclick' => "$('#$attrib[id]').hide()")) . ' ' . $button->show(rcube_label('upload'), array('class' => 'button mainaction', 'onclick' => JS_OBJECT_NAME . ".command('upload-photo', this.form)")) - ) + ) : '') ) ); -- cgit v1.2.3