diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-09-13 17:47:48 +0400 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-09-13 17:47:48 +0400 |
commit | eaf4e08408b1f6ad572fcdaf04673ac7160c8b77 (patch) | |
tree | 32a6dcd22c77beb61457218b9d72284a586871a9 /templates/documents.php | |
parent | 06ea1d914e2aa213a8869ed6bbfbd182c10bcc29 (diff) |
Initial upload. Ref #32
Diffstat (limited to 'templates/documents.php')
-rwxr-xr-x | templates/documents.php | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/templates/documents.php b/templates/documents.php index fdbc0d7d..eb0263bf 100755 --- a/templates/documents.php +++ b/templates/documents.php @@ -14,9 +14,29 @@ <a class="add svg" target="_blank" href=""> <label><?php p('Add') ?></label> </a> - <a class="upload svg" target="_blank" href=""> - <label><?php p('Upload') ?></label> - </a> + <div id="upload" title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>"> + <form data-upload-id="1" + id="data-upload-form" + class="file_upload_form" + action="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" + method="post" + enctype="multipart/form-data" + target="file_upload_target_1"> + <?php if($_['uploadMaxFilesize'] >= 0):?> + <input type="hidden" name="MAX_FILE_SIZE" id="max_upload" + value="<?php p($_['uploadMaxFilesize']) ?>"> + <?php endif;?> + <!-- Send the requesttoken, this is needed for older IE versions + because they don't send the CSRF token via HTTP header in this case --> + <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken"> + <input type="hidden" class="max_human_file_size" + value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)"> + <input type="hidden" name="dir" value="/" id="dir"> + <input type="file" id="file_upload_start" name='files[]'/> + <a href="#" class="upload svg"> + <label><?php p('Upload') ?></label></a> + </form> + </div> </li> <li class="document template" data-id="" style="display:none;"> <a target="_blank" href=""><label></label></a> |