vbenincasa
2009-09-15 2b77e8daa7f7e5c0a71f615672cdb492dcdf0dad
- Provide some additional usability for attachments form with "mainaction" class and a slightly bigger file field (CSS width doesn't works with file field so we need to use "size" property)

2 files modified
10 ■■■■ changed files
program/steps/mail/compose.inc 8 ●●●● patch | view | raw | blame | history
skins/default/templates/compose.html 2 ●●● patch | view | raw | blame | history
program/steps/mail/compose.inc
@@ -831,15 +831,15 @@
    $max_filesize = $max_postsize;
  $max_filesize = show_bytes($max_filesize);
  
  $button = new html_inputfield(array('type' => 'button', 'class' => 'button'));
  $button = new html_inputfield(array('type' => 'button'));
  
  $out = html::div($attrib,
    $OUTPUT->form_tag(array('name' => 'form', 'method' => 'post', 'enctype' => 'multipart/form-data'),
      html::div(null, rcmail_compose_attachment_field(array())) .
      html::div(null, rcmail_compose_attachment_field(array('size' => $attrib[attachmentfieldsize]))) .
      html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) .
      html::div('buttons',
        $button->show(rcube_label('close'), array('onclick' => "document.getElementById('$attrib[id]').style.visibility='hidden'")) . ' ' .
        $button->show(rcube_label('upload'), array('onclick' => JS_OBJECT_NAME . ".command('send-attachment', this.form)"))
        $button->show(rcube_label('close'), array('class' => 'button', 'onclick' => "document.getElementById('$attrib[id]').style.visibility='hidden'")) . ' ' .
        $button->show(rcube_label('upload'), array('class' => 'button mainaction', 'onclick' => JS_OBJECT_NAME . ".command('send-attachment', this.form)"))
      )
    )
  );
skins/default/templates/compose.html
@@ -99,7 +99,7 @@
</form>
<roundcube:object name="composeAttachmentForm" id="attachment-form" />
<roundcube:object name="composeAttachmentForm" id="attachment-form" attachmentFieldSize="40" />
</body>
</html>