Bug 8130 [FOLLOW-UP] attach PDF files to a patron record
Markup corrections: - Hide table of files if no files are attached - Move error messages out of table (invalid) - Add <tr> tags to table (invalid) - Apply standard form structure to upload form - Add proper labels and ids to upload form - Correct unescaped ampersands Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
0294f5e167
commit
05d952a4a6
1 changed files with 30 additions and 22 deletions
|
@ -17,49 +17,58 @@
|
||||||
|
|
||||||
<h1>Files</h1>
|
<h1>Files</h1>
|
||||||
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Type</th>
|
|
||||||
<th>Description</th>
|
|
||||||
<th>Uploaded</th>
|
|
||||||
[% IF CAN_user_borrowers %]<th> </th>[% END %]
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
[% IF errors %]
|
[% IF errors %]
|
||||||
<div class="error warn">
|
<div class="dialog alert">
|
||||||
[% IF errors.empty_upload %]The file you are attempting to upload has no contents.[% END %]
|
[% IF errors.empty_upload %]The file you are attempting to upload has no contents.[% END %]
|
||||||
[% IF errors.no_file %]You did not select a file to upload.[% END %]
|
[% IF errors.no_file %]You did not select a file to upload.[% END %]
|
||||||
</div>
|
</div>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
[% IF ( files ) %]
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>Uploaded</th>
|
||||||
|
[% IF CAN_user_borrowers %]<th> </th>[% END %]
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
[% FOREACH f IN files %]
|
[% FOREACH f IN files %]
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="?borrowernumber=[% borrowernumber %]&op=download&file_id=[% f.file_id %]">[% f.file_name %]</a></td>
|
<td><a href="?borrowernumber=[% borrowernumber %]&op=download&file_id=[% f.file_id %]">[% f.file_name %]</a></td>
|
||||||
<td>[% f.file_type %]</td>
|
<td>[% f.file_type %]</td>
|
||||||
<td>[% f.file_description %]</td>
|
<td>[% f.file_description %]</td>
|
||||||
<td>[% f.date_uploaded | $KohaDates %]</td>
|
<td>[% f.date_uploaded | $KohaDates %]</td>
|
||||||
[% IF CAN_user_borrowers %]<td><a href="?borrowernumber=[% borrowernumber %]&op=delete&file_id=[% f.file_id %]">Delete</a></td>[% END %]
|
[% IF CAN_user_borrowers %]<td><a href="?borrowernumber=[% borrowernumber %]&op=delete&file_id=[% f.file_id %]">Delete</a></td>[% END %]
|
||||||
</tr>
|
</tr>
|
||||||
[% END %]
|
[% END %]
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
[% ELSE %]
|
||||||
|
<div class="dialog message">
|
||||||
|
<p>This patron has no files attached.</p>
|
||||||
|
</div>
|
||||||
|
[% END %]
|
||||||
|
|
||||||
<form method="post" enctype="multipart/form-data">
|
<form method="post" action="/cgi-bin/koha/members/files.pl" enctype="multipart/form-data">
|
||||||
<fieldset>
|
<fieldset class="rows">
|
||||||
<legend>Upload New File</legend>
|
<legend>Upload New File</legend>
|
||||||
|
<ol>
|
||||||
<input type="hidden" name="op" value="upload" />
|
<li><input type="hidden" name="op" value="upload" />
|
||||||
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
|
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
|
||||||
<input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
|
<input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
|
||||||
|
|
||||||
<label for="description">Description:</label>
|
<label for="description">Description:</label>
|
||||||
<input name="description" type="text" />
|
<input name="description" id="description" type="text" /></li>
|
||||||
|
|
||||||
<input name="uploadfile" type="file" id="uploadfile" />
|
<li><label for="uploadfile">File:</label><input name="uploadfile" type="file" id="uploadfile" /></li>
|
||||||
|
|
||||||
<input name="upload" type="submit" id="upload" value="Upload File" />
|
</ol>
|
||||||
|
<fieldset class="action"><input name="upload" type="submit" id="upload" value="Upload File" /></fieldset>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@ -70,5 +79,4 @@
|
||||||
[% INCLUDE 'circ-menu.inc' %]
|
[% INCLUDE 'circ-menu.inc' %]
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
[% INCLUDE 'intranet-bottom.inc' %]
|
[% INCLUDE 'intranet-bottom.inc' %]
|
||||||
|
|
Loading…
Reference in a new issue