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

(-)a/Koha/ILL/Backend/intra-includes/create.inc (-6 / +7 lines)
Lines 5-15 Link Here
5
[% IF whole.status == 'missing_identifier' %]
5
[% IF whole.status == 'missing_identifier' %]
6
<p><em>Please Note:</em> Mandatory field Identifier is missing.</p>
6
<p><em>Please Note:</em> Mandatory field Identifier is missing.</p>
7
[% ELSIF whole.status == 'missing_branch' %]
7
[% ELSIF whole.status == 'missing_branch' %]
8
<p><em>Please Note:</em> Branch is a mandatory field.</p>
8
<p><em>Please Note:</em> Library is a mandatory field.</p>
9
[% ELSIF whole.status == 'invalid_borrower' %]
9
[% ELSIF whole.status == 'invalid_borrower' %]
10
<p><em>Please Note:</em> The borrower details you entered are invalid.</p>
10
<p><em>Please Note:</em> The patron details you entered are invalid.</p>
11
[% ELSIF whole.status == 'invalid_branch' %]
11
[% ELSIF whole.status == 'invalid_branch' %]
12
<p><em>Please Note:</em> The branch you chose is invalid.</p>
12
<p><em>Please Note:</em> The library you chose is invalid.</p>
13
[% ELSE %]
13
[% ELSE %]
14
<p>Unhandled error</p>
14
<p>Unhandled error</p>
15
[% END %]
15
[% END %]
Lines 87-94 Link Here
87
        <label class="required" for="cardnumber">
87
        <label class="required" for="cardnumber">
88
          Card number, username or surname:
88
          Card number, username or surname:
89
        </label>
89
        </label>
90
        <input type="text" name="cardnumber" id="cardnumber" autocomplete="off"
90
        <input type="text" name="cardnumber" id="cardnumber" autocomplete="off" type="text" value="[% whole.value.other.cardnumber | html %]" />
91
               type="text" value="[% whole.value.other.cardnumber | html %]" />
91
        <span class="required">Required</span>
92
      </li>
92
      </li>
93
      <li>
93
      <li>
94
        <label class="required" for="branchcode">Destination library:</label>
94
        <label class="required" for="branchcode">Destination library:</label>
Lines 104-114 Link Here
104
            </option>
104
            </option>
105
          [% END %]
105
          [% END %]
106
        </select>
106
        </select>
107
        <span class="required">Required</span>
107
      </li>
108
      </li>
108
    </ol>
109
    </ol>
109
  </fieldset>
110
  </fieldset>
110
  <fieldset class="action">
111
  <fieldset class="action">
111
    <input id="ill-submit" type="submit" value="Create" disabled />
112
    <input id="ill-submit" class="btn btn-primary" type="submit" value="Create" disabled />
112
    <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl">Cancel</a>
113
    <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl">Cancel</a>
113
  </fieldset>
114
  </fieldset>
114
  <input type="hidden" name="method" value="create" />
115
  <input type="hidden" name="method" value="create" />
(-)a/Koha/ILL/Backend/intra-includes/migrate.inc (-9 / +13 lines)
Lines 2-12 Link Here
2
[% IF whole.status == 'missing_identifier' %]
2
[% IF whole.status == 'missing_identifier' %]
3
<p><em>Please Note:</em> Mandatory field Identifier is missing.</p>
3
<p><em>Please Note:</em> Mandatory field Identifier is missing.</p>
4
[% ELSIF whole.status == 'missing_branch' %]
4
[% ELSIF whole.status == 'missing_branch' %]
5
<p><em>Please Note:</em> Branch is a mandatory field.</p>
5
<p><em>Please Note:</em> Library is a mandatory field.</p>
6
[% ELSIF whole.status == 'invalid_borrower' %]
6
[% ELSIF whole.status == 'invalid_borrower' %]
7
<p><em>Please Note:</em> The borrower details you entered are invalid.</p>
7
<p><em>Please Note:</em> The patrons details you entered are invalid.</p>
8
[% ELSIF whole.status == 'invalid_branch' %]
8
[% ELSIF whole.status == 'invalid_branch' %]
9
<p><em>Please Note:</em> The branch you chose is invalid.</p>
9
<p><em>Please Note:</em> The library you chose is invalid.</p>
10
[% ELSE %]
10
[% ELSE %]
11
<p>Unhandled error</p>
11
<p>Unhandled error</p>
12
[% END %]
12
[% END %]
Lines 20-27 Link Here
20
    <ol id="general-standard-fields">
20
    <ol id="general-standard-fields">
21
      <li>
21
      <li>
22
        <label class="required" for="type">Type:</label>
22
        <label class="required" for="type">Type:</label>
23
        <select name="type" id="type">
23
        <select class="form-select" name="type" id="type">
24
          <option value=""/>
24
          <option value=""></option>
25
          [% IF whole.value.other.type.lower == "book" %]
25
          [% IF whole.value.other.type.lower == "book" %]
26
          <option value="book" selected="selected">Book</option>
26
          <option value="book" selected="selected">Book</option>
27
          [% ELSE %]
27
          [% ELSE %]
Lines 68-73 Link Here
68
          <option value="resource">Generic resource</option>
68
          <option value="resource">Generic resource</option>
69
          [% END %]
69
          [% END %]
70
        </select>
70
        </select>
71
        [% IF required %]
72
            <div class="required_label required">Required</div>
73
        [% END %]
71
      </li>
74
      </li>
72
    </ol>
75
    </ol>
73
  </fieldset>
76
  </fieldset>
Lines 84-102 Link Here
84
        <label class="required" for="cardnumber">
87
        <label class="required" for="cardnumber">
85
          Card number or surname:
88
          Card number or surname:
86
        </label>
89
        </label>
87
        <input type="text" name="cardnumber" id="cardnumber"
90
        <input type="text" name="cardnumber" id="cardnumber" type="text" value="" />
88
               type="text" value="" />
91
            <div class="required_label required">Required</div>
89
      </li>
92
      </li>
90
      <li>
93
      <li>
91
        <label class="required" for="branchcode">Destination library:</label>
94
        <label class="required" for="branchcode">Destination library:</label>xxx
92
        <select id="branchcode" name="branchcode">
95
        <select id="branchcode" name="branchcode">
93
          <option value="" />
96
          <option value=""></option>
94
          [% FOREACH branch IN branches %]
97
          [% FOREACH branch IN branches %]
95
            <option value="[% branch.branchcode | html %]">
98
            <option value="[% branch.branchcode | html %]">
96
              [% branch.branchname | html %]
99
              [% branch.branchname | html %]
97
            </option>
100
            </option>
98
          [% END %]
101
          [% END %]
99
        </select>
102
        </select>
103
            <div class="required_label required">Required</div>
100
      </li>
104
      </li>
101
    </ol>
105
    </ol>
102
  </fieldset>
106
  </fieldset>
(-)a/Koha/ILL/Backend/opac-includes/create.inc (-15 / +21 lines)
Lines 3-17 Link Here
3
[% PROCESS "${cwd}/shared-includes/form_input_helpers.inc" %]
3
[% PROCESS "${cwd}/shared-includes/form_input_helpers.inc" %]
4
[% IF whole.error %]
4
[% IF whole.error %]
5
[% IF whole.status == 'missing_identifier' %]
5
[% IF whole.status == 'missing_identifier' %]
6
<p><em>Please Note:</em> Mandatory field Identifier is missing.</p>
6
    <div class="alert alert-warning">
7
        <strong>Please note:</strong> Mandatory field Identifier is missing.
8
    </div>
7
[% ELSIF whole.status == 'missing_type' %]
9
[% ELSIF whole.status == 'missing_type' %]
8
<p><em>Please Note:</em> Type is a mandatory field.</p>
10
    <div class="alert alert-warning">
11
        <strong>Please note:</strong> Type is a mandatory field.
12
    </div>
9
[% ELSIF whole.status == 'missing_branch' %]
13
[% ELSIF whole.status == 'missing_branch' %]
10
<p><em>Please Note:</em> Branch is a mandatory field.</p>
14
    <div class="alert alert-warning">
15
        <strong>Please note:</strong> Library is a mandatory field.
16
    </div>
11
[% ELSIF whole.status == 'invalid_borrower' %]
17
[% ELSIF whole.status == 'invalid_borrower' %]
12
<p><em>Please Note:</em> The borrower details you entered are invalid.</p>
18
    <div class="alert alert-warning">
19
        <strong>Please note:</strong> The patron details you entered are invalid.
20
    </div>
13
[% ELSIF whole.status == 'invalid_branch' %]
21
[% ELSIF whole.status == 'invalid_branch' %]
14
<p><em>Please Note:</em> The branch you chose is invalid.</p>
22
    <div class="alert alert-warning">
23
        <strong>Please note:</strong> The library you chose is invalid.
24
    </div>
15
[% ELSE %]
25
[% ELSE %]
16
<p>Unhandled error</p>
26
<p>Unhandled error</p>
17
[% END %]
27
[% END %]
Lines 25-36 Link Here
25
    <fieldset class="rows">
35
    <fieldset class="rows">
26
    <legend>Patron options</legend>
36
    <legend>Patron options</legend>
27
    <ol>
37
    <ol>
28
      <li>
29
        [% WRAPPER ill_select_field required = 1 id = 'branchcode' label = t('Destination library') %]
38
        [% WRAPPER ill_select_field required = 1 id = 'branchcode' label = t('Destination library') %]
30
          <option value="" />
39
          <option value=""></option>
31
          [% FOREACH branch IN branches %]
40
          [% FOREACH branch IN branches %]
32
            [% IF whole.value.other.branchcode && branch.branchcode == whole.value.other.branchcode %]
41
            [% IF whole.value.other.branchcode && branch.branchcode == whole.value.other.branchcode %]
33
            <option value="[% branch.branchcode | html %]" selected>
42
            <option value="[% branch.branchcode | html %]" selected="selected">
34
              [% branch.branchname | html %]
43
              [% branch.branchname | html %]
35
            </option>
44
            </option>
36
            [% ELSE %]
45
            [% ELSE %]
Lines 40-54 Link Here
40
            [% END %]
49
            [% END %]
41
          [% END %]
50
          [% END %]
42
        [% END #ill_select_field %]
51
        [% END #ill_select_field %]
43
      </li>
44
    </ol>
52
    </ol>
45
  </fieldset>
53
  </fieldset>
46
  <fieldset class="rows">
54
  <fieldset class="rows">
47
    <legend>General details</legend>
55
    <legend>General details</legend>
48
    <ol id="general-standard-fields">
56
    <ol id="general-standard-fields">
49
    [% WRAPPER ill_select_field required = 1 id = 'type' label = t('Type') %]
57
        [% WRAPPER ill_select_field required = 1 id = 'type' label = t('Type') %]
50
      <li>
58
          <option value=""></option>
51
          <option value=""/>
52
          [% IF whole.value.other.type.lower == "book" %]
59
          [% IF whole.value.other.type.lower == "book" %]
53
          <option value="book" selected="selected">Book</option>
60
          <option value="book" selected="selected">Book</option>
54
          [% ELSE %]
61
          [% ELSE %]
Lines 94-101 Link Here
94
          [% ELSE %]
101
          [% ELSE %]
95
          <option value="resource">Generic resource</option>
102
          <option value="resource">Generic resource</option>
96
          [% END %]
103
          [% END %]
97
        </li>
104
        [% END #ill_select_field %]
98
    [% END #ill_select_field %]
99
    </ol>
105
    </ol>
100
  </fieldset>
106
  </fieldset>
101
  [% type = whole.value.other.type %]
107
  [% type = whole.value.other.type %]
Lines 122-125 Link Here
122
    [% INCLUDE "${cwd}/shared-includes/shared.js" %]
128
    [% INCLUDE "${cwd}/shared-includes/shared.js" %]
123
    // ]]>
129
    // ]]>
124
</script>
130
</script>
125
[% END %]
131
[% END %]
(-)a/Koha/ILL/Backend/shared-includes/form_input_helpers.inc (-17 / +25 lines)
Lines 1-25 Link Here
1
[% BLOCK ill_text_input_field %]
1
[% BLOCK ill_text_input_field %]
2
    <li>
2
    <li>
3
      <label for="[% id | html %]">[% label | html %][% IF required %]*[% END %]</label>
3
        <label for="[% id | html %]">[% label | html %]:</label>
4
      [% IF opac %]
4
        [% IF opac %]
5
        <input class="form-control input-fluid" type="text" name="[% id | html %]" id="[% id | html%]" value="[% value | html %]" />
5
            <input class="form-control input-fluid" type="text" name="[% id | html %]" id="[% id | html%]" value="[% value | html %]" />
6
      [% ELSE %]
6
        [% ELSE %]
7
        <input type="text" name="[% id | html %]" id="[% id | html%]" value="[% value | html %]" />
7
            <input type="text" name="[% id | html %]" id="[% id | html%]" value="[% value | html %]" />
8
      [% END %]
8
        [% END %]
9
        [% IF required %]
10
            <div class="required_label required">Required</div>
11
        [% END %]
12
        [% SET required = 0 %]
9
    </li>
13
    </li>
10
    [% SET required = 0 %]
11
[% END %]
14
[% END %]
12
15
13
[% BLOCK ill_select_field %]
16
[% BLOCK ill_select_field %]
14
      <label for="[% id | html %]">[% label | html %][% IF required %]*[% END %]</label>
17
    <li>
15
      [% IF opac %]
18
        <label for="[% id | html %]">[% label | html %]:</label>
16
        <select class="form-control input-fluid" name="[% id | html %]" id="[% id | html %]">
19
        [% IF opac %]
17
      [% ELSE %]
20
            <select class="form-select input-fluid" name="[% id | html %]" id="[% id | html %]">
18
        <select name="[% id | html %]" id="[% id | html %]">
21
        [% ELSE %]
19
      [% END %]
22
            <select name="[% id | html %]" id="[% id | html %]">
20
        [% content | $raw %]
23
        [% END %]
21
      </select>
24
            [% content | $raw %]
22
      [% SET required = 0 %]
25
        </select>
26
        [% IF required %]
27
            <div class="required_label required">Required</div>
28
        [% END %]
29
        [% SET required = 0 %]
30
    </li>
23
[% END %]
31
[% END %]
24
32
25
[% BLOCK book_text_input_fields %]
33
[% BLOCK book_text_input_fields %]
Lines 41-44 Link Here
41
  [% PROCESS ill_text_input_field id = 'issue' label = t('Issue number') value = whole.value.other.issue %]
49
  [% PROCESS ill_text_input_field id = 'issue' label = t('Issue number') value = whole.value.other.issue %]
42
  [% PROCESS ill_text_input_field id = 'year' label = t('Year') value = whole.value.other.year %]
50
  [% PROCESS ill_text_input_field id = 'year' label = t('Year') value = whole.value.other.year %]
43
  [% PROCESS ill_text_input_field id = 'issn' label = t('ISSN') value = whole.value.other.issn %]
51
  [% PROCESS ill_text_input_field id = 'issn' label = t('ISSN') value = whole.value.other.issn %]
44
[% END %]
52
[% END %]
(-)a/Koha/ILL/Backend/shared-includes/shared.js (-4 / +4 lines)
Lines 12-19 document.addEventListener('DOMContentLoaded', function() { Link Here
12
            ( opac ? 'form-control input-fluid custom-field-input' : '') +'" placeholder="'+__('value')+'"> ' +
12
            ( opac ? 'form-control input-fluid custom-field-input' : '') +'" placeholder="'+__('value')+'"> ' +
13
            '<button type="button" class="btn btn-danger btn-sm ' +
13
            '<button type="button" class="btn btn-danger btn-sm ' +
14
            'delete-new-field">' +
14
            'delete-new-field">' +
15
            '<span class="fa fa-delete">' +
15
            '<span class="fa fa-trash-can"></span> ' +
16
            '</span>Delete</button></li>';
16
            __('Delete') +
17
            '</button></li>';
17
        $('#standard-fields').append(row);
18
        $('#standard-fields').append(row);
18
    });
19
    });
19
    $('#standard-fields').on('click', '.delete-new-field',
20
    $('#standard-fields').on('click', '.delete-new-field',
Lines 31-37 document.addEventListener('DOMContentLoaded', function() { Link Here
31
    $('#standard-fields').on('keyup', '.custom-name', function() {
32
    $('#standard-fields').on('keyup', '.custom-name', function() {
32
        var val = $(this).val();
33
        var val = $(this).val();
33
        if (core.indexOf(val.toLowerCase()) > -1) {
34
        if (core.indexOf(val.toLowerCase()) > -1) {
34
            $('#custom-warning').text(_('The name "' + val + '" is not permitted')).show();
35
            $('#custom-warning').text(__('The name "' + val + '" is not permitted')).show();
35
            $('#ill-submit').attr('disabled', true);
36
            $('#ill-submit').attr('disabled', true);
36
            $('#add-new-fields').attr('disabled', true);
37
            $('#add-new-fields').attr('disabled', true);
37
        } else {
38
        } else {
38
- 

Return to bug 36221