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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc (-2 / +5 lines)
Lines 103-110 Link Here
103
        [% IF type %]
103
        [% IF type %]
104
            [% INCLUDE "ill/backends/Standard/shared/forms/${type}.inc" %]
104
            [% INCLUDE "ill/backends/Standard/shared/forms/${type}.inc" %]
105
        [% END %]
105
        [% END %]
106
        [% INCLUDE "ill/backends/Standard/shared/notes.inc" %]
106
        <legend>Additional information</legend>
107
        [% INCLUDE "ill/backends/Standard/shared/custom_fields.inc" %]
107
        <fieldset class="rows">
108
            [% INCLUDE "ill/backends/Standard/shared/notes.inc" %]
109
            [% INCLUDE "ill/backends/Standard/shared/custom_fields.inc" %]
110
        </fieldset>
108
        [% IF whole.value.other.type && unauthenticated_ill && !logged_in_user %]
111
        [% IF whole.value.other.type && unauthenticated_ill && !logged_in_user %]
109
            <fieldset class="rows" id="illrequest_captcha">
112
            <fieldset class="rows" id="illrequest_captcha">
110
                <legend>Verification</legend>
113
                <legend>Verification</legend>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/custom_fields.inc (-27 / +24 lines)
Lines 1-34 Link Here
1
<fieldset class="rows">
1
<ol id="standard-fields">
2
    <legend>Custom fields</legend>
2
    [% keys = whole.value.other.custom_key.split('\0') %]
3
    <ol id="standard-fields">
3
    [% values = whole.value.other.custom_value.split('\0') %]
4
        [% keys = whole.value.other.custom_key.split('\0') %]
4
    [% i = 0 %]
5
        [% values = whole.value.other.custom_value.split('\0') %]
5
    [% FOREACH key IN keys %]
6
        [% i = 0 %]
6
        <li class="form-horizontal">
7
        [% FOREACH key IN keys %]
7
            <label>&nbsp;</label>
8
            <li class="form-horizontal">
8
            [% IF opac %]
9
                [% IF opac %]
9
                <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 %]" />
10
                <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 %]" />
11
            [% ELSE %]
12
                [% ELSE %]
12
                <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 %]" />
13
                <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 %]" />
14
            [% END %]
15
                [% END %]
15
            <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>
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>
16
        </li>
17
            </li>
17
        [% i = i + 1 %]
18
            [% i = i + 1 %]
18
    [% END %]
19
        [% END %]
19
</ol>
20
    </ol>
20
<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>
21
<button type="button" id="add-new-fields" class="btn btn-default">
22
    <button type="button" id="add-new-fields" class="btn btn-default">
22
    <span class="fa fa-plus"></span>
23
        <span class="fa fa-plus"></span>
23
    Add new field
24
        Add new field
24
</button>
25
    </button>
26
</fieldset>
27
25
28
<style>
26
<style>
29
    .custom-field-input {
27
    .custom-field-input {
30
        width: 25%;
28
        width: 25%;
31
        display: inline-block;
29
        display: inline-block;
32
        margin-left: 0.5em;
33
    }
30
    }
34
</style>
31
</style>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/notes.inc (-5 / +6 lines)
Lines 1-5 Link Here
1
<fieldset class="rows" id="ill-standard-notes">
1
<ol id="standard-opac-notes">
2
    <legend>Notes</legend>
2
    <li>
3
    <label class="sr-only" for="notesopac">Notes:</label>
3
        <label for="notesopac">Notes:</label>
4
    <textarea name="notesopac" id="notesopac" class="form-control input-fluid">[% whole.value.other.notesopac | html %]</textarea>
4
        <textarea name="notesopac" id="notesopac" class="form-control input-fluid">[% whole.value.other.notesopac | html %]</textarea>
5
</fieldset>
5
    </li>
6
</ol>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/shared.js (-1 / +1 lines)
Lines 3-8 document.addEventListener("DOMContentLoaded", function () { Link Here
3
        e.preventDefault();
3
        e.preventDefault();
4
        var row =
4
        var row =
5
            '<li class="form-horizontal">' +
5
            '<li class="form-horizontal">' +
6
            "<label>&nbsp;</label>" +
6
            '<input type="text" class="custom-name ' +
7
            '<input type="text" class="custom-name ' +
7
            "form-control input-fluid custom-field-input" +
8
            "form-control input-fluid custom-field-input" +
8
            '" name="custom_key" placeholder="' +
9
            '" name="custom_key" placeholder="' +
9
- 

Return to bug 40105