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

(-)a/Koha/ILL/Backend/opac-includes/create.inc (+1 lines)
Lines 16-21 Link Here
16
<p>Unhandled error</p>
16
<p>Unhandled error</p>
17
[% END %]
17
[% END %]
18
[% END %]
18
[% END %]
19
[% SET opac = whole.value.other.opac %]
19
20
20
[% IF whole.stage == "form" %]
21
[% IF whole.stage == "form" %]
21
<h2>Create a manual ILL request</h2>
22
<h2>Create a manual ILL request</h2>
(-)a/Koha/ILL/Backend/shared-includes/custom_fields.inc (-1 / +15 lines)
Lines 6-12 Link Here
6
        [% i = 0 %]
6
        [% i = 0 %]
7
        [% FOREACH key IN keys %]
7
        [% FOREACH key IN keys %]
8
            <li class="form-horizontal">
8
            <li class="form-horizontal">
9
                <input type="text" class="custom-name" name="custom_key" value="[% key | html %]"><input type="text" name="custom_value" id="custom-value" value="[% values.$i | html %]">
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" class="custom-name" name="custom_key" value="[% key | html %]">
14
                    <input type="text" name="custom_value" id="custom-value" value="[% values.$i | html %]">
15
                [% END %]
10
                <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">
11
                    <span class="fa fa-delete"></span>Delete
17
                    <span class="fa fa-delete"></span>Delete
12
                </button></li>
18
                </button></li>
Lines 20-22 Link Here
20
        Add new field
26
        Add new field
21
    </button>
27
    </button>
22
</fieldset>
28
</fieldset>
29
30
<style>
31
.custom-field-input {
32
    width: 25%;
33
    display: inline-block;
34
    margin-left: 0.5em;
35
}
36
</style>
(-)a/Koha/ILL/Backend/shared-includes/form_input_helpers.inc (-2 / +10 lines)
Lines 1-13 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 %]:</label>
3
      <label for="[% id | html %]">[% label | html %]:</label>
4
      <input type="[% type | html %]" name="[% id | html %]" id="[% id | html%]" value="[% value | html %]" />
4
      [% IF opac %]
5
        <input class="form-control input-fluid" type="[% type | html %]" name="[% id | html %]" id="[% id | html%]" value="[% value | html %]" />
6
      [% ELSE %]
7
        <input type="[% type | html %]" name="[% id | html %]" id="[% id | html%]" value="[% value | html %]" />
8
      [% END %]
5
    </li>
9
    </li>
6
[% END %]
10
[% END %]
7
11
8
[% BLOCK ill_select_field %]
12
[% BLOCK ill_select_field %]
9
      <label class="required" for="[% id | html %]">[% label | html %]:</label>
13
      <label class="required" for="[% id | html %]">[% label | html %]:</label>
10
      <select name="[% id | html %]" id="[% id | html %]">
14
      [% IF opac %]
15
        <select class="form-control input-fluid" name="[% id | html %]" id="[% id | html %]">
16
      [% ELSE %]
17
        <select name="[% id | html %]" id="[% id | html %]">
18
      [% END %]
11
        [% content | $raw %]
19
        [% content | $raw %]
12
      </select>
20
      </select>
13
[% END %]
21
[% END %]
(-)a/Koha/ILL/Backend/shared-includes/shared.js (-3 / +6 lines)
Lines 1-10 Link Here
1
var core = [ [% whole.core %] ];
1
var core = [ [% whole.core %] ];
2
var opac = [ [% opac %] ];
2
document.addEventListener('DOMContentLoaded', function() {
3
document.addEventListener('DOMContentLoaded', function() {
3
    $('#add-new-fields').click(function(e) {
4
    $('#add-new-fields').click(function(e) {
4
        e.preventDefault();
5
        e.preventDefault();
5
        var row = '<li class="form-horizontal">' +
6
        var row = '<li class="form-horizontal">' +
6
            '<input type="text" class="custom-name" name="custom_key">' +
7
            '<input type="text" class="custom-name ' +
7
            '<input type="text" id="custom-value" name="custom_value"> '+
8
            ( opac ? 'form-control input-fluid custom-field-input' : '') +
9
            '" name="custom_key" placeholder="key">' +
10
            '<input type="text" id="custom-value" name="custom_value" class="' +
11
            ( opac ? 'form-control input-fluid custom-field-input' : '') +'" placeholder="value"> ' +
8
            '<button type="button" class="btn btn-danger btn-sm ' +
12
            '<button type="button" class="btn btn-danger btn-sm ' +
9
            'delete-new-field">' +
13
            'delete-new-field">' +
10
            '<span class="fa fa-delete">' +
14
            '<span class="fa fa-delete">' +
11
- 

Return to bug 36221