Some new features
[openemr.git] / templates / documents / general_upload.html
blob51dac08d6a88a917f26bf11039cdc767839f20eb
1 {**
2 * general document view
4 * @package OpenEMR
5 * @link http://www.open-emr.org
6 * @author Brady Miller <brady.g.miller@gmail.com>
7 * @author Jerry Padgett <sjpadgett@gmail.com>
8 * @copyright Copyright (c) 2017-2018 Brady Miller <brady.g.miller@gmail.com>
9 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
12 <form method=post enctype="multipart/form-data" action="{$FORM_ACTION}" onsubmit="return top.restoreSession()">
13 <input type="hidden" name="MAX_FILE_SIZE" value="64000000" />
15 {if (!($patient_id > 0)) }
16 <div class="text" style="color:red;">
17 {xlt t="IMPORTANT: This upload tool is only for uploading documents on patients that are not yet entered into the system. To upload files for patients whom already have been entered into the system, please use the upload tool linked within the Patient Summary screen."}
18 <br/>
19 <br/>
20 </div>
21 {/if}
23 <div class="text">
24 {xlt t="NOTE: Uploading files with duplicate names will cause the files to be automatically renamed (for example, file.jpg will become file.1.jpg). Filenames are considered unique per patient, not per category."}
25 <br/>
26 <br/>
27 </div>
28 <div class="text bold">
29 {xlt t="Upload Document"} {if $category_name} {xlt t="to category"} '{$category_name|text}'{/if}
30 </div>
31 <div class="text">
32 <p><span>{xlt t="Source File Path"}:</span> <input type="file" name="file[]" id="source-name" multiple="true"/>&nbsp;(<font size="1">{xlt t="Multiple files can be uploaded at one time by selecting them using CTRL+Click or SHIFT+Click."}</font>)</p>
33 <p><span title="{xla t='Leave Blank To Keep Original Filename'}">{xlt t="Optional Destination Name"}:</span> <input type="text" name="destination" title="{xla t='Leave Blank To Keep Original Filename'}" id="destination-name" /></p>
34 {if !$hide_encryption}
35 </br>
36 <p><span title="{xla t='Check the box if this is an encrypted file'}">{xlt t="Is The File Encrypted?"}:</span> <input type="checkbox" name="encrypted" title="{xla t='Check the box if this is an encrypted file'}" id="encrypted" /></p>
37 <p><span title="{xla t='Pass phrase to decrypt document'}">{xlt t="Pass Phrase"}:</span> <input type="text" name="passphrase" title="{xla t='Pass phrase to decrypt document'}" id="passphrase" /></p>
38 <p><i>{xlt t='Supports AES-256-CBC encryption/decryption only.'}</i></p>
39 {/if}
40 <p><input type="submit" value="{xl t='Upload'|attr}" /></p>
41 </div>
43 <input type="hidden" name="patient_id" value="{$patient_id|attr}" />
44 <input type="hidden" name="category_id" value="{$category_id|attr}" />
45 <input type="hidden" name="process" value="{$PROCESS|attr}" />
46 </form>
48 <br><br>
50 <!-- Drag and drop uploader -->
51 <div id="autouploader">
52 <form method="post" enctype="multipart/form-data" action="{$GLOBALS.webroot}/library/ajax/upload.php?patient_id={$patient_id|attr_url}&parent_id={$category_id|attr_url}&csrf_token_form={$CSRF_TOKEN_FORM|attr_url}" class="dropzone">
53 <input type="hidden" name="MAX_FILE_SIZE" value="64000000" >
54 </form>
55 </div>
57 <!-- Section for document template download -->
58 <form method='post' action='interface/patient_file/download_template.php' onsubmit='return top.restoreSession()'>
59 <input type="hidden" name="csrf_token_form" value="{$CSRF_TOKEN_FORM|attr}">
60 <input type='hidden' name='patient_id' value='{$patient_id|attr}' />
61 <div class='col-sm-6'>
62 <p class='text bold'>
63 {xlt t="Download document template for this patient and visit"}
64 </p>
65 <div class="input-group">
66 <span class="input-group-btn">
67 <button type="submit" class="btn btn-download">{xlt t="Fetch"}</button>
68 </span>
69 <select class="form-control" name='form_filename'>{$TEMPLATES_LIST}</select>
70 </div>
71 </div>
72 </form>
73 <!-- End document template download section -->
75 <!-- Section for portal document templates -->
76 <div class='col-sm-6'>
77 <p class='text bold'>
78 {xlt t="Patient Document Template Forms"}
79 </p>
80 <div class="input-group">
81 <span class="input-group-btn">
82 <button class="btn btn-download" onclick="callTemplateModule()">{xlt t="Open"}</button>
83 </span>
84 <select class="form-control" id='template_filename'>{$TEMPLATES_LIST_PATIENT}</select>
85 </div>
86 </div>
88 {if !empty($file)}
89 <div class="text bold">
90 <br/>
91 {xlt t='Upload Report'}
92 </div>
93 {foreach from=$file item=file}
94 <div class="text">
95 {if $error}<i>{$error|text}</i><br/>{/if}
96 {xlt t='ID'}: {$file->get_id()|text}<br>
97 {xlt t='Patient'}: {$file->get_foreign_id()|text}<br>
98 {xlt t='URL'}: {$file->get_url()|text}<br>
99 {xlt t='Size'}: {$file->get_size()|text}<br>
100 {xlt t='Date'}: {$file->get_date()|text}<br>
101 {xlt t='Hash'}: {$file->get_hash()|text}<br>
102 {xlt t='MimeType'}: {$file->get_mimetype()|text}<br>
103 {xlt t='Revision'}: {$file->revision|text}<br><br>
104 </div>
105 {/foreach}
106 {/if}
107 <h3>{$error}</h3>