View | Details | Raw Unified | Return to bug 38340
Collapse All | Expand All

(-)a/Koha/ILL/Backend/intra-includes/cancel.inc (-16 lines)
Lines 1-16 Link Here
1
[% IF whole.error %]
2
<p>Unhandled error</p>
3
[% END %]
4
5
[% IF whole.stage == "confirm" %]
6
<h2>Cancel manual request</h2>
7
<p>Proceeding with this action will set this request to 'Cancelled'.</p>
8
<p>This means that actions have been taken to cancel this request at the source with whom the request was placed.</p>
9
<p>If you can confirm this has been done, please proceed.</p>
10
<p>
11
  [% base_url = "/cgi-bin/koha/ill/ill-requests.pl" %]
12
  [% proceed_url = base_url _ "?method=cancel&stage=confirm" _ "&illrequest_id=" _ request.illrequest_id %]
13
  <a class="btn btn-sm btn-primary" href="[% proceed_url | url %]">Revert request</a>
14
  <a class="btn btn-sm btn-default cancel" href="[% base_url | url %]">Cancel</a>
15
</p>
16
[% END %]
(-)a/Koha/ILL/Backend/intra-includes/confirm.inc (-18 lines)
Lines 1-18 Link Here
1
[% IF whole.error %]
2
<p>Unhandled error</p>
3
[% END %]
4
5
[% IF whole.stage == "confirm" %]
6
<h2>Confirm manual request</h2>
7
<p>Proceeding with this action will set this request to 'Requested'.</p>
8
<p>This means that actions have been taken to request this request from a source.</p>
9
<p>If you can confirm this has been done, please proceed.</p>
10
<p>
11
  [% base_url = "/cgi-bin/koha/ill/ill-requests.pl" %]
12
  [% proceed_url = base_url _ "?method=confirm&stage=confirm" _ "&illrequest_id=" _ request.illrequest_id %]
13
  <a class="btn btn-sm btn-primary" href="[% proceed_url | url %]">Confirm request</a>
14
  <a class="btn btn-sm btn-default cancel" href="[% base_url | url %]">Cancel</a>
15
</p>
16
[% ELSE %]
17
<p>Unknown stage.  This should not have happened.
18
[% END %]
(-)a/Koha/ILL/Backend/intra-includes/edititem.inc (-94 lines)
Lines 1-94 Link Here
1
[% cwd = whole.cwd %]
2
[% PROCESS "${cwd}/shared-includes/form_input_helpers.inc" %]
3
[% IF whole.error %]
4
[% IF whole.status == 'missing_type' %]
5
<p><em>Please note:</em> Mandatory field 'type' is missing.</p>
6
[% ELSE %]
7
<p>Unhandled error</p>
8
[% END %]
9
[% END %]
10
11
[% IF whole.stage == "form" %]
12
  <h2>Edit a manual ILL request</h2>
13
  <form id="standard_edit_form" method="POST" action="">
14
    [% INCLUDE 'csrf-token.inc' %]
15
    <fieldset class="rows">
16
      <legend>General details</legend>
17
      <ol id="general-standard-fields">
18
        <li>
19
          <label class="required" for="type">Type:</label>
20
          <select name="type" id="type">
21
            <option value=""/>
22
            [% IF whole.value.other.type.lower == "book" %]
23
            <option value="book" selected="selected">Book</option>
24
            [% ELSE %]
25
            <option value="book">Book</option>
26
            [% END %]
27
            [% IF whole.value.other.type.lower == "chapter" %]
28
            <option value="chapter" selected="selected">Chapter</option>
29
            [% ELSE %]
30
            <option value="chapter">Chapter</option>
31
            [% END %]
32
            [% IF whole.value.other.type.lower == "journal" %]
33
            <option value="journal" selected="selected">Journal</option>
34
            [% ELSE %]
35
            <option value="journal">Journal</option>
36
            [% END %]
37
            [% IF whole.value.other.type.lower == "article" %]
38
            <option value="article" selected="selected">Journal article</option>
39
            [% ELSE %]
40
            <option value="article">Journal article</option>
41
            [% END %]
42
            [% IF whole.value.other.type.lower == "thesis" %]
43
            <option value="thesis" selected="selected">Thesis</option>
44
            [% ELSE %]
45
            <option value="thesis">Thesis</option>
46
            [% END %]
47
            [% IF whole.value.other.type.lower == "conference" %]
48
            <option value="conference" selected="selected">Conference</option>
49
            [% ELSE %]
50
            <option value="conference">Conference</option>
51
            [% END %]
52
            [% IF whole.value.other.type.lower == "dvd" %]
53
            <option value="dvd" selected="selected">DVD</option>
54
            [% ELSE %]
55
            <option value="dvd">DVD</option>
56
            [% END %]
57
            [% IF whole.value.other.type.lower == "other" %]
58
            <option value="other" selected="selected">Other</option>
59
            [% ELSE %]
60
            <option value="other">Other</option>
61
            [% END %]
62
            [% IF whole.value.other.type.lower == "resource" %]
63
            <option value="resource" selected="selected">Generic resource</option>
64
            [% ELSE %]
65
            <option value="resource">Generic resource</option>
66
            [% END %]
67
          </select>
68
        </li>
69
      </ol>
70
    </fieldset>
71
    [% type = whole.value.other.type %]
72
    [% IF type %]
73
        [% INCLUDE "${cwd}/shared-includes/forms/${type}.inc" %]
74
    [% END %]
75
    [% INCLUDE "${cwd}/shared-includes/custom_fields.inc" %]
76
    <fieldset class="action">
77
      <input id="ill-submit" class="btn btn-primary" type="submit" value="Update"/>
78
      <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl">Cancel</a>
79
    </fieldset>
80
    <input type="hidden" name="illrequest_id" value="[% whole.value.other.illrequest_id | html %]" />
81
    <input type="hidden" name="op" value="cud-edititem" />
82
    <input type="hidden" name="stage" value="form" />
83
    <input type="hidden" name="backend" value="Standard" />
84
  </form>
85
  [% BLOCK backend_jsinclude %]
86
  <script>
87
      // <![CDATA[]
88
      [% INCLUDE "${cwd}/shared-includes/shared.js" %]
89
      // ]]>
90
  </script>
91
  [% END %]
92
[% ELSE %]
93
  <p>Unknown stage.  This should not have happened.
94
[% END %]
(-)a/Koha/ILL/Backend/intra-includes/migrate.inc (-123 lines)
Lines 1-123 Link Here
1
[% IF whole.error %]
2
[% IF whole.status == 'missing_identifier' %]
3
<p><em>Please note:</em> Mandatory field Identifier is missing.</p>
4
[% ELSIF whole.status == 'missing_branch' %]
5
<p><em>Please note:</em> Library is a mandatory field.</p>
6
[% ELSIF whole.status == 'invalid_borrower' %]
7
<p><em>Please note:</em> The patrons details you entered are invalid.</p>
8
[% ELSIF whole.status == 'invalid_branch' %]
9
<p><em>Please note:</em> The library you chose is invalid.</p>
10
[% ELSE %]
11
<p>Unhandled error</p>
12
[% END %]
13
[% END %]
14
15
[% IF whole.stage == "form" %]
16
<h2>Migrating an ILL request</h2>
17
<form id="standard_migrate_form" method="POST" action="">
18
  <fieldset class="rows">
19
    <legend>General details</legend>
20
    <ol id="general-standard-fields">
21
      <li>
22
        <label class="required" for="type">Type:</label>
23
        <select class="form-select" name="type" id="type">
24
          <option value=""></option>
25
          [% IF whole.value.other.type.lower == "book" %]
26
          <option value="book" selected="selected">Book</option>
27
          [% ELSE %]
28
          <option value="book">Book</option>
29
          [% END %]
30
          [% IF whole.value.other.type.lower == "chapter" %]
31
          <option value="chapter" selected="selected">Chapter</option>
32
          [% ELSE %]
33
          <option value="chapter">Chapter</option>
34
          [% END %]
35
          [% IF whole.value.other.type.lower == "journal" %]
36
          <option value="journal" selected="selected">Journal</option>
37
          [% ELSE %]
38
          <option value="journal">Journal</option>
39
          [% END %]
40
          [% IF whole.value.other.type.lower == "article" %]
41
          <option value="article" selected="selected">Journal article</option>
42
          [% ELSE %]
43
          <option value="article">Journal article</option>
44
          [% END %]
45
          [% IF whole.value.other.type.lower == "thesis" %]
46
          <option value="thesis" selected="selected">Thesis</option>
47
          [% ELSE %]
48
          <option value="thesis">Thesis</option>
49
          [% END %]
50
          [% IF whole.value.other.type.lower == "conference" %]
51
          <option value="conference" selected="selected">Conference</option>
52
          [% ELSE %]
53
          <option value="conference">Conference</option>
54
          [% END %]
55
          [% IF whole.value.other.type.lower == "dvd" %]
56
          <option value="dvd" selected="selected">DVD/option>
57
          [% ELSE %]
58
          <option value="dvd">DVD</option>
59
          [% END %]
60
          [% IF whole.value.other.type.lower == "other" %]
61
          <option value="other" selected="selected">Other</option>
62
          [% ELSE %]
63
          <option value="other">Other</option>
64
          [% END %]
65
          [% IF whole.value.other.type.lower == "resource" %]
66
          <option value="resource" selected="selected">Generic resource</option>
67
          [% ELSE %]
68
          <option value="resource">Generic resource</option>
69
          [% END %]
70
        </select>
71
        [% IF required %]
72
            <div class="required_label required">Required</div>
73
        [% END %]
74
      </li>
75
    </ol>
76
  </fieldset>
77
  [% cwd = whole.cwd %]
78
  [% type = whole.value.other.type %]
79
  [% IF type %]
80
      [% INCLUDE "${cwd}/shared-includes/forms/${type}.inc" %]
81
  [% END %]
82
  [% INCLUDE "${cwd}/shared-includes/custom_fields.inc" %]
83
  <fieldset class="rows">
84
    <legend>Patron options</legend>
85
    <ol>
86
      <li>
87
        <label class="required" for="cardnumber">
88
          Card number or surname:
89
        </label>
90
        <input type="text" name="cardnumber" id="cardnumber" type="text" value="" />
91
            <div class="required_label required">Required</div>
92
      </li>
93
      <li>
94
        <label class="required" for="branchcode">Destination library:</label>xxx
95
        <select id="branchcode" name="branchcode">
96
          <option value=""></option>
97
          [% FOREACH branch IN branches %]
98
            <option value="[% branch.branchcode | html %]">
99
              [% branch.branchname | html %]
100
            </option>
101
          [% END %]
102
        </select>
103
            <div class="required_label required">Required</div>
104
      </li>
105
    </ol>
106
  </fieldset>
107
  <fieldset class="action">
108
    <input id="ill-submit" type="submit" value="Migrate"/>
109
    <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl">Cancel</a>
110
  </fieldset>
111
</form>
112
[% BLOCK backend_jsinclude %]
113
<script>
114
    // <![CDATA[]
115
    [% INCLUDE "${cwd}/shared-includes/shared.js" %]
116
    // ]]>
117
</script>
118
[% END %]
119
120
[% ELSE %]
121
<p>Unknown stage.  This should not have happened.
122
123
[% END %]
(-)a/Koha/ILL/Backend/opac-includes/create.inc (-131 lines)
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 %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/cancel.inc (+16 lines)
Line 0 Link Here
1
[% IF whole.error %]
2
    <p>Unhandled error</p>
3
[% END %]
4
5
[% IF whole.stage == "confirm" %]
6
    <h2>Cancel manual request</h2>
7
    <p>Proceeding with this action will set this request to 'Cancelled'.</p>
8
    <p>This means that actions have been taken to cancel this request at the source with whom the request was placed.</p>
9
    <p>If you can confirm this has been done, please proceed.</p>
10
    <p>
11
        [% base_url = "/cgi-bin/koha/ill/ill-requests.pl" %]
12
        [% proceed_url = base_url _ "?method=cancel&stage=confirm" _ "&illrequest_id=" _ request.illrequest_id %]
13
        <a class="btn btn-sm btn-primary" href="[% proceed_url | url %]">Revert request</a>
14
        <a class="btn btn-sm btn-default cancel" href="[% base_url | url %]">Cancel</a>
15
    </p>
16
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/confirm.inc (+18 lines)
Line 0 Link Here
1
[% IF whole.error %]
2
    <p>Unhandled error</p>
3
[% END %]
4
5
[% IF whole.stage == "confirm" %]
6
    <h2>Confirm manual request</h2>
7
    <p>Proceeding with this action will set this request to 'Requested'.</p>
8
    <p>This means that actions have been taken to request this request from a source.</p>
9
    <p>If you can confirm this has been done, please proceed.</p>
10
    <p>
11
        [% base_url = "/cgi-bin/koha/ill/ill-requests.pl" %]
12
        [% proceed_url = base_url _ "?method=confirm&stage=confirm" _ "&illrequest_id=" _ request.illrequest_id %]
13
        <a class="btn btn-sm btn-primary" href="[% proceed_url | url %]">Confirm request</a>
14
        <a class="btn btn-sm btn-default cancel" href="[% base_url | url %]">Cancel</a>
15
    </p>
16
[% ELSE %]
17
    <p>Unknown stage. This should not have happened. </p>
18
[% END %]
(-)a/Koha/ILL/Backend/intra-includes/create.inc (-5 / +4 lines)
Lines 1-6 Link Here
1
[% SET koha_version = Koha.Version %]
1
[% SET koha_version = Koha.Version %]
2
[% cwd = whole.cwd %]
2
[% PROCESS "ill/backends/Standard/inc/form_input_helpers.inc" %]
3
[% PROCESS "${cwd}/shared-includes/form_input_helpers.inc" %]
4
[% IF whole.error %]
3
[% IF whole.error %]
5
[% IF whole.status == 'missing_identifier' %]
4
[% IF whole.status == 'missing_identifier' %]
6
<p><em>Please note:</em> Mandatory field Identifier is missing.</p>
5
<p><em>Please note:</em> Mandatory field Identifier is missing.</p>
Lines 77-85 Link Here
77
  </fieldset>
76
  </fieldset>
78
  [% type = whole.value.other.type %]
77
  [% type = whole.value.other.type %]
79
  [% IF type %]
78
  [% IF type %]
80
      [% INCLUDE "${cwd}/shared-includes/forms/${type}.inc" %]
79
      [% INCLUDE "ill/backends/Standard/inc/forms/${type}.inc" %]
81
  [% END %]
80
  [% END %]
82
  [% INCLUDE "${cwd}/shared-includes/custom_fields.inc" %]
81
  [% INCLUDE "ill/backends/Standard/inc/custom_fields.inc" %]
83
  <fieldset class="rows">
82
  <fieldset class="rows">
84
    <legend>Patron options</legend>
83
    <legend>Patron options</legend>
85
    <ol>
84
    <ol>
Lines 119-125 Link Here
119
[% BLOCK backend_jsinclude %]
118
[% BLOCK backend_jsinclude %]
120
<script>
119
<script>
121
    // <![CDATA[]
120
    // <![CDATA[]
122
    [% INCLUDE "${cwd}/shared-includes/shared.js" %]
121
    [% INCLUDE "ill/backends/Standard/inc/shared.js" %]
123
    // Require a username and branch selection
122
    // Require a username and branch selection
124
    document.addEventListener('DOMContentLoaded', function(){
123
    document.addEventListener('DOMContentLoaded', function(){
125
      let cardnumber_input = '#create_form #cardnumber';
124
      let cardnumber_input = '#create_form #cardnumber';
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/edititem.inc (+93 lines)
Line 0 Link Here
1
[% PROCESS "ill/backends/Standard/inc/form_input_helpers.inc" %]
2
[% IF whole.error %]
3
    [% IF whole.status == 'missing_type' %]
4
        <p><em>Please note:</em> Mandatory field 'type' is missing.</p>
5
    [% ELSE %]
6
        <p>Unhandled error</p>
7
    [% END %]
8
[% END %]
9
10
[% IF whole.stage == "form" %]
11
    <h2>Edit a manual ILL request</h2>
12
    <form id="standard_edit_form" method="POST" action="">
13
        [% INCLUDE 'csrf-token.inc' %]
14
        <fieldset class="rows">
15
            <legend>General details</legend>
16
            <ol id="general-standard-fields">
17
                <li>
18
                    <label class="required" for="type">Type:</label>
19
                    <select name="type" id="type">
20
                        <option value="" />
21
                        [% IF whole.value.other.type.lower == "book" %]
22
                            <option value="book" selected="selected">Book</option>
23
                        [% ELSE %]
24
                            <option value="book">Book</option>
25
                        [% END %]
26
                        [% IF whole.value.other.type.lower == "chapter" %]
27
                            <option value="chapter" selected="selected">Chapter</option>
28
                        [% ELSE %]
29
                            <option value="chapter">Chapter</option>
30
                        [% END %]
31
                        [% IF whole.value.other.type.lower == "journal" %]
32
                            <option value="journal" selected="selected">Journal</option>
33
                        [% ELSE %]
34
                            <option value="journal">Journal</option>
35
                        [% END %]
36
                        [% IF whole.value.other.type.lower == "article" %]
37
                            <option value="article" selected="selected">Journal article</option>
38
                        [% ELSE %]
39
                            <option value="article">Journal article</option>
40
                        [% END %]
41
                        [% IF whole.value.other.type.lower == "thesis" %]
42
                            <option value="thesis" selected="selected">Thesis</option>
43
                        [% ELSE %]
44
                            <option value="thesis">Thesis</option>
45
                        [% END %]
46
                        [% IF whole.value.other.type.lower == "conference" %]
47
                            <option value="conference" selected="selected">Conference</option>
48
                        [% ELSE %]
49
                            <option value="conference">Conference</option>
50
                        [% END %]
51
                        [% IF whole.value.other.type.lower == "dvd" %]
52
                            <option value="dvd" selected="selected">DVD</option>
53
                        [% ELSE %]
54
                            <option value="dvd">DVD</option>
55
                        [% END %]
56
                        [% IF whole.value.other.type.lower == "other" %]
57
                            <option value="other" selected="selected">Other</option>
58
                        [% ELSE %]
59
                            <option value="other">Other</option>
60
                        [% END %]
61
                        [% IF whole.value.other.type.lower == "resource" %]
62
                            <option value="resource" selected="selected">Generic resource</option>
63
                        [% ELSE %]
64
                            <option value="resource">Generic resource</option>
65
                        [% END %]
66
                    </select>
67
                </li>
68
            </ol>
69
        </fieldset>
70
        [% type = whole.value.other.type %]
71
        [% IF type %]
72
            [% INCLUDE "ill/backends/Standard/inc/forms/${type}.inc" %]
73
        [% END %]
74
        [% INCLUDE "ill/backends/Standard/inc/custom_fields.inc" %]
75
        <fieldset class="action">
76
            <input id="ill-submit" class="btn btn-primary" type="submit" value="Update" />
77
            <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl">Cancel</a>
78
        </fieldset>
79
        <input type="hidden" name="illrequest_id" value="[% whole.value.other.illrequest_id | html %]" />
80
        <input type="hidden" name="op" value="cud-edititem" />
81
        <input type="hidden" name="stage" value="form" />
82
        <input type="hidden" name="backend" value="Standard" />
83
    </form>
84
    [% BLOCK backend_jsinclude %]
85
        <script>
86
            // <![CDATA[]
87
            [% INCLUDE "ill/backends/Standard/inc/shared.js" %]
88
            // ]]>
89
        </script>
90
    [% END %]
91
[% ELSE %]
92
    <p>Unknown stage. This should not have happened. </p>
93
[% END %]
(-)a/Koha/ILL/Backend/shared-includes/custom_fields.inc (-13 / +11 lines)
Lines 7-36 Link Here
7
        [% FOREACH key IN keys %]
7
        [% FOREACH key IN keys %]
8
            <li class="form-horizontal">
8
            <li class="form-horizontal">
9
                [% IF opac %]
9
                [% IF opac %]
10
                    <input type="text" placeholder="key" class="form-control input-fluid custom-field-input custom-name" name="custom_key" value="[% key | html %]">
10
                    <input type="text" placeholder="key" class="form-control input-fluid custom-field-input custom-name" name="custom_key" value="[% key | html %]" />
11
                    <input type="text" placeholder="value" class="form-control input-fluid custom-field-input" name="custom_value" id="custom-value" value="[% values.$i | html %]">
11
                    <input type="text" placeholder="value" class="form-control input-fluid custom-field-input" name="custom_value" id="custom-value" value="[% values.$i | html %]" />
12
                [% ELSE %]
12
                [% ELSE %]
13
                    <input type="text" placeholder="key" class="custom-name" name="custom_key" value="[% key | html %]">
13
                    <input type="text" placeholder="key" class="custom-name" name="custom_key" value="[% key | html %]" />
14
                    <input type="text" placeholder="value" name="custom_value" id="custom-value" value="[% values.$i | html %]">
14
                    <input type="text" placeholder="value" name="custom_value" id="custom-value" value="[% values.$i | html %]" />
15
                [% END %]
15
                [% END %]
16
                <button value="[% i | html %]" name="custom_delete" type="submit" class="btn btn-danger btn-sm delete-new-field">
16
                <button value="[% i | html %]" name="custom_delete" type="submit" class="btn btn-danger btn-sm delete-new-field"> <span class="fa fa-trash"></span> Delete </button>
17
                    <span class="fa fa-trash"></span> Delete
18
                </button>
19
            </li>
17
            </li>
20
            [% i = i + 1 %]
18
            [% i = i + 1 %]
21
        [% END %]
19
        [% END %]
22
    </ol>
20
    </ol>
23
    <div id="custom-warning" style="display:none;margin:1em;" class="error required"></div>
21
    <div id="custom-warning" style="display:none;margin:1em;" class="error required"></div>
24
        <button type="button" id="add-new-fields" class="btn btn-default">
22
    <button type="button" id="add-new-fields" class="btn btn-default">
25
        <span class="fa fa-plus"></span>
23
        <span class="fa fa-plus"></span>
26
        Add new field
24
        Add new field
27
    </button>
25
    </button>
28
</fieldset>
26
</fieldset>
29
27
30
<style>
28
<style>
31
.custom-field-input {
29
    .custom-field-input {
32
    width: 25%;
30
        width: 25%;
33
    display: inline-block;
31
        display: inline-block;
34
    margin-left: 0.5em;
32
        margin-left: 0.5em;
35
}
33
    }
36
</style>
34
</style>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/migrate.inc (+116 lines)
Line 0 Link Here
1
[% IF whole.error %]
2
    [% IF whole.status == 'missing_identifier' %]
3
        <p><em>Please note:</em> Mandatory field Identifier is missing.</p>
4
    [% ELSIF whole.status == 'missing_branch' %]
5
        <p><em>Please note:</em> Library is a mandatory field.</p>
6
    [% ELSIF whole.status == 'invalid_borrower' %]
7
        <p><em>Please note:</em> The patrons details you entered are invalid.</p>
8
    [% ELSIF whole.status == 'invalid_branch' %]
9
        <p><em>Please note:</em> The library you chose is invalid.</p>
10
    [% ELSE %]
11
        <p>Unhandled error</p>
12
    [% END %]
13
[% END %]
14
15
[% IF whole.stage == "form" %]
16
    <h2>Migrating an ILL request</h2>
17
    <form id="standard_migrate_form" method="POST" action="">
18
        <fieldset class="rows">
19
            <legend>General details</legend>
20
            <ol id="general-standard-fields">
21
                <li>
22
                    <label class="required" for="type">Type:</label>
23
                    <select class="form-select" name="type" id="type">
24
                        <option value=""></option>
25
                        [% IF whole.value.other.type.lower == "book" %]
26
                            <option value="book" selected="selected">Book</option>
27
                        [% ELSE %]
28
                            <option value="book">Book</option>
29
                        [% END %]
30
                        [% IF whole.value.other.type.lower == "chapter" %]
31
                            <option value="chapter" selected="selected">Chapter</option>
32
                        [% ELSE %]
33
                            <option value="chapter">Chapter</option>
34
                        [% END %]
35
                        [% IF whole.value.other.type.lower == "journal" %]
36
                            <option value="journal" selected="selected">Journal</option>
37
                        [% ELSE %]
38
                            <option value="journal">Journal</option>
39
                        [% END %]
40
                        [% IF whole.value.other.type.lower == "article" %]
41
                            <option value="article" selected="selected">Journal article</option>
42
                        [% ELSE %]
43
                            <option value="article">Journal article</option>
44
                        [% END %]
45
                        [% IF whole.value.other.type.lower == "thesis" %]
46
                            <option value="thesis" selected="selected">Thesis</option>
47
                        [% ELSE %]
48
                            <option value="thesis">Thesis</option>
49
                        [% END %]
50
                        [% IF whole.value.other.type.lower == "conference" %]
51
                            <option value="conference" selected="selected">Conference</option>
52
                        [% ELSE %]
53
                            <option value="conference">Conference</option>
54
                        [% END %]
55
                        [% IF whole.value.other.type.lower == "dvd" %]
56
                            <option value="dvd" selected="selected">DVD/option> </option>
57
                        [% ELSE %]
58
                            <option value="dvd">DVD</option>
59
                        [% END %]
60
                        [% IF whole.value.other.type.lower == "other" %]
61
                            <option value="other" selected="selected">Other</option>
62
                        [% ELSE %]
63
                            <option value="other">Other</option>
64
                        [% END %]
65
                        [% IF whole.value.other.type.lower == "resource" %]
66
                            <option value="resource" selected="selected">Generic resource</option>
67
                        [% ELSE %]
68
                            <option value="resource">Generic resource</option>
69
                        [% END %]
70
                    </select>
71
                    [% IF required %]
72
                        <div class="required_label required">Required</div>
73
                    [% END %]
74
                </li>
75
            </ol>
76
        </fieldset>
77
        [% type = whole.value.other.type %]
78
        [% IF type %]
79
            [% INCLUDE "ill/backends/Standard/inc/forms/${type}.inc" %]
80
        [% END %]
81
        [% INCLUDE "ill/backends/Standard/inc/custom_fields.inc" %]
82
        <fieldset class="rows">
83
            <legend>Patron options</legend>
84
            <ol>
85
                <li>
86
                    <label class="required" for="cardnumber"> Card number or surname: </label>
87
                    <input type="text" name="cardnumber" id="cardnumber" type="text" value="" />
88
                    <div class="required_label required">Required</div>
89
                </li>
90
                <li>
91
                    <label class="required" for="branchcode">Destination library:</label>xxx
92
                    <select id="branchcode" name="branchcode">
93
                        <option value=""></option>
94
                        [% FOREACH branch IN branches %]
95
                            <option value="[% branch.branchcode | html %]"> [% branch.branchname | html %] </option>
96
                        [% END %]
97
                    </select>
98
                    <div class="required_label required">Required</div>
99
                </li>
100
            </ol>
101
        </fieldset>
102
        <fieldset class="action">
103
            <input id="ill-submit" type="submit" value="Migrate" />
104
            <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl">Cancel</a>
105
        </fieldset>
106
    </form>
107
    [% BLOCK backend_jsinclude %]
108
        <script>
109
            // <![CDATA[]
110
            [% INCLUDE "ill/backends/Standard/inc/shared.js" %]
111
            // ]]>
112
        </script>
113
    [% END %]
114
[% ELSE %]
115
    <p>Unknown stage. This should not have happened. </p>
116
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc (+114 lines)
Line 0 Link Here
1
[% PROCESS 'i18n.inc' %]
2
[% PROCESS "ill/backends/Standard/inc/form_input_helpers.inc" %]
3
[% IF whole.error %]
4
    [% IF whole.status == 'missing_identifier' %]
5
        <div class="alert alert-warning"> <strong>Please note:</strong> Mandatory field Identifier is missing. </div>
6
    [% ELSIF whole.status == 'missing_type' %]
7
        <div class="alert alert-warning"> <strong>Please note:</strong> Type is a mandatory field. </div>
8
    [% ELSIF whole.status == 'missing_branch' %]
9
        <div class="alert alert-warning"> <strong>Please note:</strong> Library is a mandatory field. </div>
10
    [% ELSIF whole.status == 'invalid_borrower' %]
11
        <div class="alert alert-warning"> <strong>Please note:</strong> The patron details you entered are invalid. </div>
12
    [% ELSIF whole.status == 'invalid_branch' %]
13
        <div class="alert alert-warning"> <strong>Please note:</strong> The library you chose is invalid. </div>
14
    [% ELSE %]
15
        <p>Unhandled error</p>
16
    [% END %]
17
[% END %]
18
[% SET opac = whole.value.other.opac %]
19
20
[% IF whole.stage == "form" %]
21
    <h2>Create a manual ILL request</h2>
22
    <form id="create_form" method="POST" action="">
23
        [% INCLUDE 'csrf-token.inc' %]
24
        <fieldset class="rows">
25
            <legend>Patron options</legend>
26
            <ol>
27
                [% WRAPPER ill_select_field required = 1 id = 'branchcode' label = t('Destination library') %]
28
                    <option value=""></option>
29
                    [% FOREACH branch IN branches %]
30
                        [% IF whole.value.other.branchcode && branch.branchcode == whole.value.other.branchcode %]
31
                            <option value="[% branch.branchcode | html %]" selected="selected"> [% branch.branchname | html %] </option>
32
                        [% ELSE %]
33
                            <option value="[% branch.branchcode | html %]"> [% branch.branchname | html %] </option>
34
                        [% END %]
35
                    [% END %]
36
                [% END #ill_select_field %]
37
            </ol>
38
        </fieldset>
39
        <fieldset class="rows">
40
            <legend>General details</legend>
41
            <ol id="general-standard-fields">
42
                [% WRAPPER ill_select_field required = 1 id = 'type' label = t('Type') %]
43
                    <option value=""></option>
44
                    [% IF whole.value.other.type.lower == "book" %]
45
                        <option value="book" selected="selected">Book</option>
46
                    [% ELSE %]
47
                        <option value="book">Book</option>
48
                    [% END %]
49
                    [% IF whole.value.other.type.lower == "chapter" %]
50
                        <option value="chapter" selected="selected">Chapter</option>
51
                    [% ELSE %]
52
                        <option value="chapter">Chapter</option>
53
                    [% END %]
54
                    [% IF whole.value.other.type.lower == "journal" %]
55
                        <option value="journal" selected="selected">Journal</option>
56
                    [% ELSE %]
57
                        <option value="journal">Journal</option>
58
                    [% END %]
59
                    [% IF whole.value.other.type.lower == "article" %]
60
                        <option value="article" selected="selected">Journal article</option>
61
                    [% ELSE %]
62
                        <option value="article">Journal article</option>
63
                    [% END %]
64
                    [% IF whole.value.other.type.lower == "thesis" %]
65
                        <option value="thesis" selected="selected">Thesis</option>
66
                    [% ELSE %]
67
                        <option value="thesis">Thesis</option>
68
                    [% END %]
69
                    [% IF whole.value.other.type.lower == "conference" %]
70
                        <option value="conference" selected="selected">Conference</option>
71
                    [% ELSE %]
72
                        <option value="conference">Conference</option>
73
                    [% END %]
74
                    [% IF whole.value.other.type.lower == "dvd" %]
75
                        <option value="dvd" selected="selected">DVD</option>
76
                    [% ELSE %]
77
                        <option value="dvd">DVD</option>
78
                    [% END %]
79
                    [% IF whole.value.other.type.lower == "other" %]
80
                        <option value="other" selected="selected">Other</option>
81
                    [% ELSE %]
82
                        <option value="other">Other</option>
83
                    [% END %]
84
                    [% IF whole.value.other.type.lower == "resource" %]
85
                        <option value="resource" selected="selected">Generic resource</option>
86
                    [% ELSE %]
87
                        <option value="resource">Generic resource</option>
88
                    [% END %]
89
                [% END #ill_select_field %]
90
            </ol>
91
        </fieldset>
92
        [% type = whole.value.other.type %]
93
        [% IF type %]
94
            [% INCLUDE "ill/backends/Standard/inc/forms/${type}.inc" %]
95
        [% END %]
96
        [% INCLUDE "ill/backends/Standard/inc/custom_fields.inc" %]
97
        <fieldset class="action">
98
            <input id="ill-submit" class="btn btn-primary" type="submit" value="Create" />
99
            <a class="cancel" href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a>
100
        </fieldset>
101
        <input type="hidden" name="op" value="cud-create" />
102
        <input type="hidden" name="stage" value="form" />
103
        <input type="hidden" name="backend" value="Standard" />
104
    </form>
105
[% ELSE %]
106
    <p>Unknown stage. This should not have happened. </p>
107
[% END %]
108
[% BLOCK backend_jsinclude %]
109
    <script>
110
        // <![CDATA[]
111
        [% INCLUDE "ill/backends/Standard/inc/shared.js" %]
112
        // ]]>
113
    </script>
114
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/custom_fields.inc (+34 lines)
Line 0 Link Here
1
<fieldset class="rows">
2
    <legend>Custom fields</legend>
3
    <ol id="standard-fields">
4
        [% keys = whole.value.other.custom_key.split('\0') %]
5
        [% values = whole.value.other.custom_value.split('\0') %]
6
        [% i = 0 %]
7
        [% FOREACH key IN keys %]
8
            <li class="form-horizontal">
9
                [% IF opac %]
10
                    <input type="text" placeholder="key" class="form-control input-fluid custom-field-input custom-name" name="custom_key" value="[% key | html %]" />
11
                    <input type="text" placeholder="value" class="form-control input-fluid custom-field-input" name="custom_value" id="custom-value" value="[% values.$i | html %]" />
12
                [% ELSE %]
13
                    <input type="text" placeholder="key" class="custom-name" name="custom_key" value="[% key | html %]" />
14
                    <input type="text" placeholder="value" name="custom_value" id="custom-value" value="[% values.$i | html %]" />
15
                [% END %]
16
                <button value="[% i | html %]" name="custom_delete" type="submit" class="btn btn-danger btn-sm delete-new-field"> <span class="fa fa-trash"></span> Delete </button>
17
            </li>
18
            [% i = i + 1 %]
19
        [% END %]
20
    </ol>
21
    <div id="custom-warning" style="display:none;margin:1em;" class="error required"></div>
22
    <button type="button" id="add-new-fields" class="btn btn-default">
23
        <span class="fa fa-plus"></span>
24
        Add new field
25
    </button>
26
</fieldset>
27
28
<style>
29
    .custom-field-input {
30
        width: 25%;
31
        display: inline-block;
32
        margin-left: 0.5em;
33
    }
34
</style>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/form_input_helpers.inc (+52 lines)
Line 0 Link Here
1
[% BLOCK ill_text_input_field %]
2
    <li>
3
        <label for="[% id | html %]">[% label | html %]:</label>
4
        [% IF opac %]
5
            <input class="form-control input-fluid" type="text" name="[% id | html %]" id="[% id | html%]" value="[% value | html %]" />
6
        [% ELSE %]
7
            <input type="text" name="[% id | html %]" id="[% id | html%]" value="[% value | html %]" />
8
        [% END %]
9
        [% IF required %]
10
            <div class="required_label required">Required</div>
11
        [% END %]
12
        [% SET required = 0 %]
13
    </li>
14
[% END %]
15
16
[% BLOCK ill_select_field %]
17
    <li>
18
        <label for="[% id | html %]">[% label | html %]:</label>
19
        [% IF opac %]
20
            <select class="form-select input-fluid" name="[% id | html %]" id="[% id | html %]">
21
        [% ELSE %]
22
            <select name="[% id | html %]" id="[% id | html %]">
23
        [% END %]
24
            [% content | $raw %]
25
        </select>
26
        [% IF required %]
27
            <div class="required_label required">Required</div>
28
        [% END %]
29
        [% SET required = 0 %]
30
    </li>
31
[% END %]
32
33
[% BLOCK book_text_input_fields %]
34
  [% PROCESS ill_text_input_field id = 'title' label = t('Title') value = whole.value.other.title %]
35
  [% PROCESS ill_text_input_field id = 'author' label = t('Author') value = whole.value.other.author %]
36
  [% PROCESS ill_text_input_field id = 'editor' label = t('Editor') value = whole.value.other.editor %]
37
  [% PROCESS ill_text_input_field id = 'publisher' label = t('Publisher') value = whole.value.other.publisher %]
38
  [% PROCESS ill_text_input_field id = 'published_place' label = t('Place of publication') value = whole.value.other.published_place %]
39
  [% PROCESS ill_text_input_field id = 'year' label = t('Year') value = whole.value.other.year %]
40
  [% PROCESS ill_text_input_field id = 'part_edition' label = t('Part / Edition') value = whole.value.other.part_edition %]
41
  [% PROCESS ill_text_input_field id = 'volume' label = t('Volume') value = whole.value.other.volume %]
42
  [% PROCESS ill_text_input_field id = 'isbn' label = t('ISBN') value = whole.value.other.isbn %]
43
  [% PROCESS ill_text_input_field id = 'doi' label = t('DOI') value = whole.value.other.doi %]
44
[% END %]
45
46
[% BLOCK journal_text_input_fields %]
47
  [% PROCESS ill_text_input_field id = 'title' label = t('Title') value = whole.value.other.title %]
48
  [% PROCESS ill_text_input_field id = 'volume' label = t('Volume') value = whole.value.other.volume %]
49
  [% PROCESS ill_text_input_field id = 'issue' label = t('Issue number') value = whole.value.other.issue %]
50
  [% PROCESS ill_text_input_field id = 'year' label = t('Year') value = whole.value.other.year %]
51
  [% PROCESS ill_text_input_field id = 'issn' label = t('ISSN') value = whole.value.other.issn %]
52
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/article.inc (+16 lines)
Line 0 Link Here
1
<fieldset id="journal-standard-fieldset" class="rows">
2
    <legend>Journal details</legend>
3
    <ol id="journal-standard-fields">
4
        [% PROCESS journal_text_input_fields %]
5
    </ol>
6
</fieldset>
7
<fieldset id="article-standard-fieldset" class="rows">
8
    <legend>Article details</legend>
9
    <ol id="article-standard-fields">
10
        [% PROCESS ill_text_input_field id = 'article_title' label = t('Article title') value = whole.value.other.article_title %]
11
        [% PROCESS ill_text_input_field id = 'article_author' label = t('Article author') value = whole.value.other.article_author %]
12
        [% PROCESS ill_text_input_field id = 'published_date' label = t('Publication date') value = whole.value.other.published_date %]
13
        [% PROCESS ill_text_input_field id = 'pages' label = t('Pages') value = whole.value.other.pages %]
14
        [% PROCESS ill_text_input_field id = 'doi' label = t('DOI') value = whole.value.other.doi %]
15
    </ol>
16
</fieldset>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/book.inc (+6 lines)
Line 0 Link Here
1
<fieldset id="book-standard-fieldset" class="rows">
2
    <legend>Book details</legend>
3
    <ol id="publication-standard-fields">
4
        [% PROCESS book_text_input_fields %]
5
    </ol>
6
</fieldset>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/chapter.inc (+14 lines)
Line 0 Link Here
1
<fieldset id="book-standard-fieldset" class="rows">
2
    <legend>Book details</legend>
3
    <ol id="publication-standard-fields">
4
        [% PROCESS book_text_input_fields %]
5
    </ol>
6
</fieldset>
7
<fieldset id="chapter-standard-fieldset" class="rows">
8
    <legend>Chapter details</legend>
9
    <ol id="chapter-standard-fields">
10
        [% PROCESS ill_text_input_field id = 'chapter_author' label = t('Author') value = whole.value.other.chapter_author %]
11
        [% PROCESS ill_text_input_field id = 'chapter' label = t('Chapter') value = whole.value.other.chapter %]
12
        [% PROCESS ill_text_input_field id = 'pages' label = t('Pages') value = whole.value.other.pages %]
13
    </ol>
14
</fieldset>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/conference.inc (+16 lines)
Line 0 Link Here
1
<fieldset id="conference-standard-fieldset" class="rows">
2
    <legend>Conference details</legend>
3
    <ol id="conference-standard-fields">
4
        [% PROCESS ill_text_input_field id = 'title' label = t('Conference title') value = whole.value.other.title %]
5
        [% PROCESS ill_text_input_field id = 'publication' label = t('Publication') value = whole.value.other.publication %]
6
        [% PROCESS ill_text_input_field id = 'conference_date' label = t('Conference date') value = whole.value.other.conference_date %]
7
        [% PROCESS ill_text_input_field id = 'venue' label = t('Venue') value = whole.value.other.venue %]
8
        [% PROCESS ill_text_input_field id = 'sponsor' label = t('Sponsor') value = whole.value.other.sponsor %]
9
        [% PROCESS ill_text_input_field id = 'volume' label = t('Volume') value = whole.value.other.volume %]
10
        [% PROCESS ill_text_input_field id = 'isbn' label = t('ISBN') value = whole.value.other.isbn %]
11
        [% PROCESS ill_text_input_field id = 'issn' label = t('ISSN') value = whole.value.other.issn %]
12
        [% PROCESS ill_text_input_field id = 'part_edition' label = t('Part') value = whole.value.other.part_edition %]
13
        [% PROCESS ill_text_input_field id = 'paper_title' label = t('Paper title') value = whole.value.other.paper_title %]
14
        [% PROCESS ill_text_input_field id = 'paper_author' label = t('Paper author') value = whole.value.other.paper_author %]
15
    </ol>
16
</fieldset>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/dvd.inc (+12 lines)
Line 0 Link Here
1
<fieldset id="dvd-standard-fieldset" class="rows">
2
    <legend>DVD details</legend>
3
    <ol id="dvd-standard-fields">
4
        [% PROCESS ill_text_input_field id = 'title' label = t('Title') value = whole.value.other.title %]
5
        [% PROCESS ill_text_input_field id = 'author' label = t('Author') value = whole.value.other.author %]
6
        [% PROCESS ill_text_input_field id = 'studio' label = t('Studio') value = whole.value.other.studio %]
7
        [% PROCESS ill_text_input_field id = 'genre' label = t('Genre') value = whole.value.other.genre %]
8
        [% PROCESS ill_text_input_field id = 'year' label = t('Year') value = whole.value.other.year %]
9
        [% PROCESS ill_text_input_field id = 'format' label = t('Format') value = whole.value.other.format %]
10
        [% PROCESS ill_text_input_field id = 'language' label = t('Language') value = whole.value.other.language %]
11
    </ol>
12
</fieldset>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/journal.inc (+7 lines)
Line 0 Link Here
1
<fieldset id="journal-standard-fieldset" class="rows">
2
    <legend>Journal details</legend>
3
    <ol id="journal-standard-fields">
4
        [% PROCESS journal_text_input_fields %]
5
        [% PROCESS ill_text_input_field id = 'doi' label = t('DOI') value = whole.value.other.doi %]
6
    </ol>
7
</fieldset>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/resource.inc (+17 lines)
Line 0 Link Here
1
<fieldset id="resource-standard-fieldset" class="rows">
2
    <legend>Generic resource details</legend>
3
    <ol id="resource-standard-fields">
4
        [% PROCESS ill_text_input_field id = 'title' label = t('Title') value = whole.value.other.title %]
5
        [% PROCESS ill_text_input_field id = 'author' label = t('Author') value = whole.value.other.author %]
6
        [% PROCESS ill_text_input_field id = 'editor' label = t('Editor') value = whole.value.other.editor %]
7
        [% PROCESS ill_text_input_field id = 'publisher' label = t('Publisher') value = whole.value.other.publisher %]
8
        [% PROCESS ill_text_input_field id = 'published_place' label = t('Place of publication') value = whole.value.other.published_place %]
9
        [% PROCESS ill_text_input_field id = 'year' label = t('Year') value = whole.value.other.year %]
10
        [% PROCESS ill_text_input_field id = 'part_edition' label = t('Part / Edition') value = whole.value.other.part_edition %]
11
        [% PROCESS ill_text_input_field id = 'volume' label = t('Volume') value = whole.value.other.volume %]
12
        [% PROCESS ill_text_input_field id = 'pages' label = t('Pages') value = whole.value.other.pages %]
13
        [% PROCESS ill_text_input_field id = 'isbn' label = t('ISBN') value = whole.value.other.isbn %]
14
        [% PROCESS ill_text_input_field id = 'issn' label = t('ISSN') value = whole.value.other.issn %]
15
        [% PROCESS ill_text_input_field id = 'doi' label = t('DOI') value = whole.value.other.doi %]
16
    </ol>
17
</fieldset>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/thesis.inc (+10 lines)
Line 0 Link Here
1
<fieldset id="thesis-standard-fieldset" class="rows">
2
    <legend>Thesis details</legend>
3
    <ol id="thesis-standard-fields">
4
        [% PROCESS ill_text_input_field id = 'title' label = t('Title') value = whole.value.other.title %]
5
        [% PROCESS ill_text_input_field id = 'author' label = t('Author') value = whole.value.other.author %]
6
        [% PROCESS ill_text_input_field id = 'institution' label = t('Institution') value = whole.value.other.institution %]
7
        [% PROCESS ill_text_input_field id = 'published_date' label = t('Publication date') value = whole.value.other.published_date %]
8
        [% PROCESS ill_text_input_field id = 'doi' label = t('DOI') value = whole.value.other.doi %]
9
    </ol>
10
</fieldset>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/shared.js (-1 / +44 lines)
Line 0 Link Here
0
- 
1
var core = [ [% whole.core %] ];
2
var opac = [% opac || 0 %];
3
document.addEventListener('DOMContentLoaded', function() {
4
    $('#add-new-fields').click(function(e) {
5
        e.preventDefault();
6
        var row = '<li class="form-horizontal">' +
7
            '<input type="text" class="custom-name ' +
8
            ( opac ? 'form-control input-fluid custom-field-input' : '') +
9
            '" name="custom_key" placeholder="'+__('key')+'">' +
10
            ' ' +
11
            '<input type="text" id="custom-value" name="custom_value" class="' +
12
            ( opac ? 'form-control input-fluid custom-field-input' : '') +'" placeholder="'+__('value')+'"> ' +
13
            '<button type="button" class="btn btn-danger btn-sm ' +
14
            'delete-new-field">' +
15
            '<span class="fa fa-trash-can"></span> ' +
16
            __('Delete') +
17
            '</button></li>';
18
        $('#standard-fields').append(row);
19
    });
20
    $('#standard-fields').on('click', '.delete-new-field',
21
        function(event) {
22
            event.preventDefault();
23
            $(event.target).parent().remove();
24
        }
25
    );
26
    $('#type').change(function() {
27
        $('#create_form').prepend(
28
            '<input type="hidden" name="change_type" value="1" />'
29
        );
30
        $('#create_form').submit();
31
    });
32
    $('#standard-fields').on('keyup', '.custom-name', function() {
33
        var val = $(this).val();
34
        if (core.indexOf(val.toLowerCase()) > -1) {
35
            $('#custom-warning').text(__("The name '%s' is not permitted").format(val)).show();
36
            $('#ill-submit').attr('disabled', true);
37
            $('#add-new-fields').attr('disabled', true);
38
        } else {
39
            $('#custom-warning').hide();
40
            $('#ill-submit').attr('disabled', false);
41
            $('#add-new-fields').attr('disabled', false);
42
        }
43
    });
44
});

Return to bug 38340