|
Lines 1-131
Link Here
|
| 1 |
[% PROCESS 'i18n.inc' %] |
|
|
| 2 |
[% cwd = whole.cwd %] |
| 3 |
[% PROCESS "${cwd}/shared-includes/form_input_helpers.inc" %] |
| 4 |
[% IF whole.error %] |
| 5 |
[% IF whole.status == 'missing_identifier' %] |
| 6 |
<div class="alert alert-warning"> |
| 7 |
<strong>Please note:</strong> Mandatory field Identifier is missing. |
| 8 |
</div> |
| 9 |
[% ELSIF whole.status == 'missing_type' %] |
| 10 |
<div class="alert alert-warning"> |
| 11 |
<strong>Please note:</strong> Type is a mandatory field. |
| 12 |
</div> |
| 13 |
[% ELSIF whole.status == 'missing_branch' %] |
| 14 |
<div class="alert alert-warning"> |
| 15 |
<strong>Please note:</strong> Library is a mandatory field. |
| 16 |
</div> |
| 17 |
[% ELSIF whole.status == 'invalid_borrower' %] |
| 18 |
<div class="alert alert-warning"> |
| 19 |
<strong>Please note:</strong> The patron details you entered are invalid. |
| 20 |
</div> |
| 21 |
[% ELSIF whole.status == 'invalid_branch' %] |
| 22 |
<div class="alert alert-warning"> |
| 23 |
<strong>Please note:</strong> The library you chose is invalid. |
| 24 |
</div> |
| 25 |
[% ELSE %] |
| 26 |
<p>Unhandled error</p> |
| 27 |
[% END %] |
| 28 |
[% END %] |
| 29 |
[% SET opac = whole.value.other.opac %] |
| 30 |
|
| 31 |
[% IF whole.stage == "form" %] |
| 32 |
<h2>Create a manual ILL request</h2> |
| 33 |
<form id="create_form" method="POST" action=""> |
| 34 |
[% INCLUDE 'csrf-token.inc' %] |
| 35 |
<fieldset class="rows"> |
| 36 |
<legend>Patron options</legend> |
| 37 |
<ol> |
| 38 |
[% WRAPPER ill_select_field required = 1 id = 'branchcode' label = t('Destination library') %] |
| 39 |
<option value=""></option> |
| 40 |
[% FOREACH branch IN branches %] |
| 41 |
[% IF whole.value.other.branchcode && branch.branchcode == whole.value.other.branchcode %] |
| 42 |
<option value="[% branch.branchcode | html %]" selected="selected"> |
| 43 |
[% branch.branchname | html %] |
| 44 |
</option> |
| 45 |
[% ELSE %] |
| 46 |
<option value="[% branch.branchcode | html %]"> |
| 47 |
[% branch.branchname | html %] |
| 48 |
</option> |
| 49 |
[% END %] |
| 50 |
[% END %] |
| 51 |
[% END #ill_select_field %] |
| 52 |
</ol> |
| 53 |
</fieldset> |
| 54 |
<fieldset class="rows"> |
| 55 |
<legend>General details</legend> |
| 56 |
<ol id="general-standard-fields"> |
| 57 |
[% WRAPPER ill_select_field required = 1 id = 'type' label = t('Type') %] |
| 58 |
<option value=""></option> |
| 59 |
[% IF whole.value.other.type.lower == "book" %] |
| 60 |
<option value="book" selected="selected">Book</option> |
| 61 |
[% ELSE %] |
| 62 |
<option value="book">Book</option> |
| 63 |
[% END %] |
| 64 |
[% IF whole.value.other.type.lower == "chapter" %] |
| 65 |
<option value="chapter" selected="selected">Chapter</option> |
| 66 |
[% ELSE %] |
| 67 |
<option value="chapter">Chapter</option> |
| 68 |
[% END %] |
| 69 |
[% IF whole.value.other.type.lower == "journal" %] |
| 70 |
<option value="journal" selected="selected">Journal</option> |
| 71 |
[% ELSE %] |
| 72 |
<option value="journal">Journal</option> |
| 73 |
[% END %] |
| 74 |
[% IF whole.value.other.type.lower == "article" %] |
| 75 |
<option value="article" selected="selected">Journal article</option> |
| 76 |
[% ELSE %] |
| 77 |
<option value="article">Journal article</option> |
| 78 |
[% END %] |
| 79 |
[% IF whole.value.other.type.lower == "thesis" %] |
| 80 |
<option value="thesis" selected="selected">Thesis</option> |
| 81 |
[% ELSE %] |
| 82 |
<option value="thesis">Thesis</option> |
| 83 |
[% END %] |
| 84 |
[% IF whole.value.other.type.lower == "conference" %] |
| 85 |
<option value="conference" selected="selected">Conference</option> |
| 86 |
[% ELSE %] |
| 87 |
<option value="conference">Conference</option> |
| 88 |
[% END %] |
| 89 |
[% IF whole.value.other.type.lower == "dvd" %] |
| 90 |
<option value="dvd" selected="selected">DVD</option> |
| 91 |
[% ELSE %] |
| 92 |
<option value="dvd">DVD</option> |
| 93 |
[% END %] |
| 94 |
[% IF whole.value.other.type.lower == "other" %] |
| 95 |
<option value="other" selected="selected">Other</option> |
| 96 |
[% ELSE %] |
| 97 |
<option value="other">Other</option> |
| 98 |
[% END %] |
| 99 |
[% IF whole.value.other.type.lower == "resource" %] |
| 100 |
<option value="resource" selected="selected">Generic resource</option> |
| 101 |
[% ELSE %] |
| 102 |
<option value="resource">Generic resource</option> |
| 103 |
[% END %] |
| 104 |
[% END #ill_select_field %] |
| 105 |
</ol> |
| 106 |
</fieldset> |
| 107 |
[% type = whole.value.other.type %] |
| 108 |
[% IF type %] |
| 109 |
[% INCLUDE "${cwd}/shared-includes/forms/${type}.inc" %] |
| 110 |
[% END %] |
| 111 |
[% INCLUDE "${cwd}/shared-includes/custom_fields.inc" %] |
| 112 |
<fieldset class="action"> |
| 113 |
<input id="ill-submit" class="btn btn-primary" type="submit" value="Create"/> |
| 114 |
<a class="cancel" href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a> |
| 115 |
</fieldset> |
| 116 |
<input type="hidden" name="op" value="cud-create" /> |
| 117 |
<input type="hidden" name="stage" value="form" /> |
| 118 |
<input type="hidden" name="backend" value="Standard" /> |
| 119 |
</form> |
| 120 |
|
| 121 |
[% ELSE %] |
| 122 |
<p>Unknown stage. This should not have happened. |
| 123 |
|
| 124 |
[% END %] |
| 125 |
[% BLOCK backend_jsinclude %] |
| 126 |
<script> |
| 127 |
// <![CDATA[] |
| 128 |
[% INCLUDE "${cwd}/shared-includes/shared.js" %] |
| 129 |
// ]]> |
| 130 |
</script> |
| 131 |
[% END %] |