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 158-169 Link Here
158
158
159
                [% SET mv = ite.marc_value %]
159
                [% SET mv = ite.marc_value %]
160
                [% IF ( mv.type == 'hidden' ) %]
160
                [% IF ( mv.type == 'hidden' ) %]
161
                    <input type="hidden" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]">
161
                    <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 -%]">
162
                [% ELSIF ( mv.type == 'select' ) %]
162
                [% ELSIF ( mv.type == 'select' ) %]
163
                    [% IF ( mv.readonly || ite.IS_RETURN_CLAIM ) %]
163
                    [% IF ( mv.readonly || ite.IS_RETURN_CLAIM ) %]
164
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor" readonly="readonly" disabled="disabled">
164
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor [% ite.kohafield | html %]" readonly="readonly" disabled="disabled">
165
                    [% ELSE %]
165
                    [% ELSE %]
166
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor">
166
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor [% ite.kohafield | html %]">
167
                    [% END %]
167
                    [% END %]
168
                    [% FOREACH aval IN mv.values %]
168
                    [% FOREACH aval IN mv.values %]
169
                        [% IF aval == mv.default %]
169
                        [% IF aval == mv.default %]
Lines 179-195 Link Here
179
                    </select>
179
                    </select>
180
                [% ELSIF ( mv.type == 'text_auth' ) %]
180
                [% ELSIF ( mv.type == 'text_auth' ) %]
181
                    [% IF mv.readonly %]
181
                    [% IF mv.readonly %]
182
                        <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" />
182
                        <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" />
183
                    [% ELSE %]
183
                    [% ELSE %]
184
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
184
                        <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 -%]" />
185
                        [% SET dopop = "Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=\"${mv.authtypecode}\"&index=${mv.id}','${mv.id}')" %]
185
                        [% SET dopop = "Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=\"${mv.authtypecode}\"&index=${mv.id}','${mv.id}')" %]
186
                        <a href="#" class="buttonDot"  onclick="[%- dopop | html -%]; return false;" title="Tag editor">...</a>
186
                        <a href="#" class="buttonDot"  onclick="[%- dopop | html -%]; return false;" title="Tag editor">...</a>
187
                    [% END %]
187
                    [% END %]
188
                [% ELSIF ( mv.type == 'text_plugin' ) %]
188
                [% ELSIF ( mv.type == 'text_plugin' ) %]
189
                    [% IF mv.readonly %]
189
                    [% IF mv.readonly %]
190
                        <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" />
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 -%]" readonly="readonly" />
191
                    [% ELSE %]
191
                    [% ELSE %]
192
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
192
                        <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 -%]" />
193
                        [% IF ( mv.nopopup ) %]
193
                        [% IF ( mv.nopopup ) %]
194
                            <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="No popup">...</a>
194
                            <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="No popup">...</a>
195
                        [% ELSE  %]
195
                        [% ELSE  %]
Lines 199-213 Link Here
199
                    [% END %]
199
                    [% END %]
200
                [% ELSIF ( mv.type == 'text' ) %]
200
                [% ELSIF ( mv.type == 'text' ) %]
201
                    [% IF mv.readonly %]
201
                    [% IF mv.readonly %]
202
                        <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" />
202
                        <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" />
203
                    [% ELSE %]
203
                    [% ELSE %]
204
                        <input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
204
                        <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 -%]" />
205
                    [% END %]
205
                    [% END %]
206
                [% ELSIF ( mv.type == 'textarea' ) %]
206
                [% ELSIF ( mv.type == 'textarea' ) %]
207
                    [% IF mv.readonly %]
207
                    [% IF mv.readonly %]
208
                        <textarea id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" rows="5" cols="64" readonly="readonly" >[% mv.value | html %]</textarea>
208
                        <textarea id="[%- mv.id | html -%]" name="field_value" class="input_marceditor [% ite.kohafield | html %]" rows="5" cols="64" readonly="readonly" >[% mv.value | html %]</textarea>
209
                    [% ELSE %]
209
                    [% ELSE %]
210
                        <textarea id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" rows="5" cols="64" >[% mv.value | html %]</textarea>
210
                        <textarea id="[%- mv.id | html -%]" name="field_value" class="input_marceditor [% ite.kohafield | html %]" rows="5" cols="64" >[% mv.value | html %]</textarea>
211
                    [% END %]
211
                    [% END %]
212
                [% END %]
212
                [% END %]
213
213
Lines 234-240 Link Here
234
[% IF volumes.count && op != 'saveitem' %]
234
[% IF volumes.count && op != 'saveitem' %]
235
    <fieldset class="rows">
235
    <fieldset class="rows">
236
        <legend><i class="fa fa-plus"></i> Add to volume</legend>
236
        <legend><i class="fa fa-plus"></i> Add to volume</legend>
237
237
        [% FOREACH v IN volumes %]
238
            <input type="hidden" id="volume-[% v.id | html %]" value="[% v.description | html %]" />
239
        [% END %]
238
        <p>
240
        <p>
239
            <label for="select_volume">Options: </label>
241
            <label for="select_volume">Options: </label>
240
            <select name="volume" id="volume-add-or-create-form-select">
242
            <select name="volume" id="volume-add-or-create-form-select">
(-)a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js (-1 / +7 lines)
Lines 91-96 $(document).ready(function(){ Link Here
91
        });
91
        });
92
    }
92
    }
93
93
94
    $('#volume-add-or-create-form-select').on('change', function() {
95
        if ( ! $('input.items-enumchron').val() ) {
96
            let volume_selector = '#volume-' + $(this).val();
97
            let enumchron = $(volume_selector).val();
98
            $('input.items-enumchron').val( enumchron );
99
        }
100
    });
94
});
101
});
95
102
96
function Check(f) {
103
function Check(f) {
97
- 

Return to bug 24857