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

(-)a/cataloguing/additem.pl (+2 lines)
Lines 158-163 sub generate_subfield_form { Link Here
158
        $subfield_data{important}  = $subfieldlib->{important};
158
        $subfield_data{important}  = $subfieldlib->{important};
159
        $subfield_data{repeatable} = $subfieldlib->{repeatable};
159
        $subfield_data{repeatable} = $subfieldlib->{repeatable};
160
        $subfield_data{maxlength}  = $subfieldlib->{maxlength};
160
        $subfield_data{maxlength}  = $subfieldlib->{maxlength};
161
        $subfield_data{kohafield}  = $subfieldlib->{kohafield} || 'unlinked';
162
        $subfield_data{kohafield} =~ s/\./-/g;
161
        
163
        
162
        if ( ! defined( $value ) || $value eq '')  {
164
        if ( ! defined( $value ) || $value eq '')  {
163
            $value = $subfieldlib->{defaultvalue};
165
            $value = $subfieldlib->{defaultvalue};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-12 / +14 lines)
Lines 148-159 Link Here
148
148
149
                [% SET mv = ite.marc_value %]
149
                [% SET mv = ite.marc_value %]
150
                [% IF ( mv.type == 'hidden' ) %]
150
                [% IF ( mv.type == 'hidden' ) %]
151
                    <input type="hidden" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]">
151
                    <input type="hidden" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor [% ite.kohafield | html %]" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]">
152
                [% ELSIF ( mv.type == 'select' ) %]
152
                [% ELSIF ( mv.type == 'select' ) %]
153
                    [% IF ( mv.readonly ) %]
153
                    [% IF ( mv.readonly ) %]
154
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor" readonly="readonly" disabled="disabled">
154
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor [% ite.kohafield | html %]" readonly="readonly" disabled="disabled">
155
                    [% ELSE %]
155
                    [% ELSE %]
156
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor">
156
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor [% ite.kohafield | html %]">
157
                    [% END %]
157
                    [% END %]
158
                    [% FOREACH aval IN mv.values %]
158
                    [% FOREACH aval IN mv.values %]
159
                        [% IF aval == mv.default %]
159
                        [% IF aval == mv.default %]
Lines 165-181 Link Here
165
                    </select>
165
                    </select>
166
                [% ELSIF ( mv.type == 'text_auth' ) %]
166
                [% ELSIF ( mv.type == 'text_auth' ) %]
167
                    [% IF mv.readonly %]
167
                    [% IF mv.readonly %]
168
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
168
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor [% ite.kohafield | html %]" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
169
                    [% ELSE %]
169
                    [% ELSE %]
170
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
170
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor [% ite.kohafield | html %]" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
171
                        [% SET dopop = "Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=\"${mv.authtypecode}\"&index=${mv.id}','${mv.id}')" %]
171
                        [% SET dopop = "Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=\"${mv.authtypecode}\"&index=${mv.id}','${mv.id}')" %]
172
                        <a href="#" class="buttonDot"  onclick="[%- dopop | html -%]; return false;" title="Tag editor">...</a>
172
                        <a href="#" class="buttonDot"  onclick="[%- dopop | html -%]; return false;" title="Tag editor">...</a>
173
                    [% END %]
173
                    [% END %]
174
                [% ELSIF ( mv.type == 'text_plugin' ) %]
174
                [% ELSIF ( mv.type == 'text_plugin' ) %]
175
                    [% IF mv.readonly %]
175
                    [% IF mv.readonly %]
176
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
176
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor [% ite.kohafield | html %]" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
177
                    [% ELSE %]
177
                    [% ELSE %]
178
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
178
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor [% ite.kohafield | html %]" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
179
                        [% IF ( mv.nopopup ) %]
179
                        [% IF ( mv.nopopup ) %]
180
                            <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="No popup">...</a>
180
                            <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="No popup">...</a>
181
                        [% ELSE  %]
181
                        [% ELSE  %]
Lines 185-199 Link Here
185
                    [% END %]
185
                    [% END %]
186
                [% ELSIF ( mv.type == 'text' ) %]
186
                [% ELSIF ( mv.type == 'text' ) %]
187
                    [% IF mv.readonly %]
187
                    [% IF mv.readonly %]
188
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
188
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor [% ite.kohafield | html %]" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
189
                    [% ELSE %]
189
                    [% ELSE %]
190
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
190
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor [% ite.kohafield | html %]" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
191
                    [% END %]
191
                    [% END %]
192
                [% ELSIF ( mv.type == 'textarea' ) %]
192
                [% ELSIF ( mv.type == 'textarea' ) %]
193
                    [% IF mv.readonly %]
193
                    [% IF mv.readonly %]
194
                        <textarea id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" rows="5" cols="64" readonly="readonly" >[% mv.value | html %]</textarea>
194
                        <textarea id="[%- mv.id | html -%]" name="field_value" class="input_marceditor [% ite.kohafield | html %]" rows="5" cols="64" readonly="readonly" >[% mv.value | html %]</textarea>
195
                    [% ELSE %]
195
                    [% ELSE %]
196
                        <textarea id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" rows="5" cols="64" >[% mv.value | html %]</textarea>
196
                        <textarea id="[%- mv.id | html -%]" name="field_value" class="input_marceditor [% ite.kohafield | html %]" rows="5" cols="64" >[% mv.value | html %]</textarea>
197
                    [% END %]
197
                    [% END %]
198
                [% END %]
198
                [% END %]
199
199
Lines 220-226 Link Here
220
[% IF volumes.count && op != 'saveitem' %]
220
[% IF volumes.count && op != 'saveitem' %]
221
    <fieldset class="rows">
221
    <fieldset class="rows">
222
        <legend><i class="fa fa-plus"></i> Add to volume</legend>
222
        <legend><i class="fa fa-plus"></i> Add to volume</legend>
223
223
        [% FOREACH v IN volumes %]
224
            <input type="hidden" id="volume-[% v.id | html %]" value="[% v.description | html %]" />
225
        [% END %]
224
        <p>
226
        <p>
225
            <label for="select_volume">Options: </label>
227
            <label for="select_volume">Options: </label>
226
            <select name="volume" id="volume-add-or-create-form-select">
228
            <select name="volume" id="volume-add-or-create-form-select">
(-)a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js (-1 / +7 lines)
Lines 94-99 $(document).ready(function(){ Link Here
94
        });
94
        });
95
    }
95
    }
96
96
97
    $('#volume-add-or-create-form-select').on('change', function() {
98
        if ( ! $('input.items-enumchron').val() ) {
99
            let volume_selector = '#volume-' + $(this).val();
100
            let enumchron = $(volume_selector).val();
101
            $('input.items-enumchron').val( enumchron );
102
        }
103
    });
97
});
104
});
98
105
99
function Check(f) {
106
function Check(f) {
100
- 

Return to bug 24857