Merge pull request #7679 from bradymiller/fix-ci_10
[openemr.git] / templates / documents / general_upload.html
blob893ce20340001b8bc86642a2a19d671bc228c9dc
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 * @copyright Copyright (c) 2019-2024 Jerry Padgett <sjpadgett@gmail.com>
10 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 <div class="col-sm-12">
14 <form class="form" method="post" enctype="multipart/form-data" action="{$FORM_ACTION}" onsubmit="return top.restoreSession()">
15 <input type="hidden" name="MAX_FILE_SIZE" value="64000000" />
16 <h3>{if !empty($error)}{$error|text|nl2br}{/if}</h3>
17 {if (!($patient_id > 0))}
18 <div class="text text-danger">
19 {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."}
20 <br />
21 </div>
22 {/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 </div>
27 <div class="font-weight-bold">
28 {xlt t="Upload Document"} {if $category_name} {xlt t="to category"} '{$category_name|text}'{/if}
29 </div>
30 <div class="form-group">
31 <div class="form-group">
32 <p>(<small>{xlt t="Multiple files can be uploaded at one time by selecting them using CTRL+Click or SHIFT+Click."}</small>)</p>
33 <span>{xlt t="Source File Path"}:</span>
34 <input type="file" class="form-control-file" name="file[]" id="source-name" multiple="true" />
35 </div>
36 <div class="form-group">
37 <span>(<small>{xlt t="Click below to Zip a Directory of image slices."}</small>)</span>
38 <input type="file" class="form-control-file" name="dicom_folder[]" id="dicom_folder" multiple directory="" webkitdirectory="" moxdirectory="" />
39 <input type="text" class="form-control" name="destination" placeholder='{xla t="Optional Destination or Dicom Study Name"}' title="{xla t='Leave Blank To Keep Original Filename'}" id="destination-name" />
40 </div>
41 {if !$hide_encryption}
42 <div class="form-group">
43 <label role="button" title="{xla t='Check the box if this is an encrypted file'}">{xlt t="Is The File Encrypted?"}:
44 <input type="checkbox" class="form-check-inline" name="encrypted" title="{xla t='Check the box if this is an encrypted file'}" id="encrypted" />
45 </label>
46 <input type="text" class="form-control" name="passphrase" placeholder="{xla t='Pass Phrase'}" title="{xla t='Pass phrase to decrypt document'}" id="passphrase" />
47 <p><i>{xlt t='Supports AES-256-CBC encryption/decryption only.'}</i></p>
48 </div>
49 {/if}
50 <div>
51 <input type="submit" class="btn btn-primary" value="{xl t='Upload'|attr}" />
52 </div>
53 </div>
54 <input type="hidden" name="patient_id" value="{$patient_id|attr}" />
55 <input type="hidden" name="category_id" value="{$category_id|attr}" />
56 <input type="hidden" name="process" value="{$PROCESS|attr}" />
57 {if !empty($file)}
58 <div class="form-group">
59 <label class="font-weight-bold">
60 {xlt t='Uploaded'}
61 </label>
62 {foreach from=$file item=onefile}
63 <p>
64 {if $error}<i>{$error|text|nl2br}</i><br />{/if}
65 {xlt t='Name'}: {$onefile->get_name()|text}<br /><br />
66 </p>
67 {/foreach}
68 </div>
69 {/if}
70 </form>
71 <!-- Drag and drop uploader -->
72 <div class="row">
73 <div class="col-sm mt-1" id="autouploader">
74 <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">
75 <div class="dz-message" data-dz-message><span>{xlt t='Drop files here to upload'}</span></div>
76 <input type="hidden" name="MAX_FILE_SIZE" value="64000000" />
77 </form>
78 </div>
79 </div>
80 <!-- Section for document template download -->
81 <form class="form-inline" method='post' action='interface/patient_file/download_template.php' onsubmit='return top.restoreSession()'>
82 <input type="hidden" name="csrf_token_form" value="{$CSRF_TOKEN_FORM|attr}" />
83 <input type='hidden' name='patient_id' value='{$patient_id|attr}' />
84 <div class='form-group col-sm-4'>
85 <p class='my-1'>{xlt t="Download document template for this patient and visit"}</p>
86 <div class="input-group">
87 <span class="input-group-prepend">
88 <button type="submit" class="btn btn-primary btn-download">{xlt t="Fetch"}</button>
89 </span>
90 <select class="form-control" name='form_filename'>{$TEMPLATES_LIST}</select>
91 </div>
92 </div>
93 <!-- Section for portal document templates -->
94 <div class='for-group-group col'>
95 <p class='my-1'>{xlt t="Patient Document Template Forms"}</p>
96 <div class='input-group'>
97 <div class="dropdown">
98 <a class="dropdown-toggle nav-link btn btn-outline-primary" href="#" role="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
99 {xlt t="Open Patient Template"}
100 </a>
101 <div class="dropdown-menu" aria-labelledby="dropdownMenu">
102 {$TEMPLATES_LIST_PATIENT}
103 </div>
104 </div>
105 <span class="input-group-append">
106 <button type="button" class="btn btn-primary" onclick="callTemplateModule({$patient_id|attr_url}, '-patient-', '', 0, 0)">{xlt t="or Open Module"}</button>
107 </span>
108 </div>
109 </div>
110 </form>
111 </div>