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

(-)a/admin/marc_subfields_structure.pl (-108 / +49 lines)
Lines 179-207 if ( $op eq 'add_form' ) { Link Here
179
        my %row_data;    # get a fresh hash for the row data
179
        my %row_data;    # get a fresh hash for the row data
180
        $row_data{defaultvalue} = $data->{defaultvalue};
180
        $row_data{defaultvalue} = $data->{defaultvalue};
181
        $row_data{maxlength} = $data->{maxlength};
181
        $row_data{maxlength} = $data->{maxlength};
182
        $row_data{tab} = CGI::scrolling_list(
182
        $row_data{tab} = {
183
            -name   => 'tab',
183
                    id      => "tab$i",
184
            -id     => "tab$i",
184
                    default => $data->{'tab'},
185
            -values =>
185
                    };
186
              [ '-1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ],
186
187
            -labels => {
188
                '-1' => 'ignore',
189
                '0'  => '0',
190
                '1'  => '1',
191
                '2'  => '2',
192
                '3'  => '3',
193
                '4'  => '4',
194
                '5'  => '5',
195
                '6'  => '6',
196
                '7'  => '7',
197
                '8'  => '8',
198
                '9'  => '9',
199
                '10' => 'items (10)',
200
            },
201
            -default  => $data->{'tab'},
202
            -size     => 1,
203
            -multiple => 0,
204
        );
205
        $row_data{tagsubfield} =
187
        $row_data{tagsubfield} =
206
            $data->{'tagsubfield'}
188
            $data->{'tagsubfield'}
207
          . "<input type=\"hidden\" name=\"tagsubfield\" value=\""
189
          . "<input type=\"hidden\" name=\"tagsubfield\" value=\""
Lines 212-249 if ( $op eq 'add_form' ) { Link Here
212
        $row_data{liblibrarian} = CGI::escapeHTML( $data->{'liblibrarian'} );
194
        $row_data{liblibrarian} = CGI::escapeHTML( $data->{'liblibrarian'} );
213
        $row_data{libopac}      = CGI::escapeHTML( $data->{'libopac'} );
195
        $row_data{libopac}      = CGI::escapeHTML( $data->{'libopac'} );
214
        $row_data{seealso}      = CGI::escapeHTML( $data->{'seealso'} );
196
        $row_data{seealso}      = CGI::escapeHTML( $data->{'seealso'} );
215
        $row_data{kohafield}    = CGI::scrolling_list(
197
        $row_data{kohafield} = {
216
            -name     => "kohafield",
198
                    id      => "kohafield$i",
217
            -id       => "kohafield$i",
199
                    values  => \@kohafields,
218
            -values   => \@kohafields,
200
                    default => "$data->{'kohafield'}",
219
            -default  => "$data->{'kohafield'}",
201
                    };
220
            -size     => 1,
202
        $row_data{authorised_value} = {
221
            -multiple => 0,
203
                    id      => "authorised_value$i",
222
        );
204
                    values  => \@authorised_values,
223
        $row_data{authorised_value} = CGI::scrolling_list(
205
                    default => $data->{'authorised_value'},
224
            -name     => "authorised_value",
206
        };
225
            -id       => "authorised_value$i",
207
        $row_data{value_builder} = {
226
            -values   => \@authorised_values,
208
                    id      => "value_builder$i",
227
            -default  => $data->{'authorised_value'},
209
                    values  => \@value_builder,
228
            -size     => 1,
210
                    default => $data->{'value_builder'},
229
            -multiple => 0,
211
        };
230
        );
212
        $row_data{authtypes} = {
231
        $row_data{value_builder} = CGI::scrolling_list(
213
                    id      => "authtypecode$i",
232
            -name     => "value_builder",
214
                    values  => \@authtypes,
233
            -id       => "value_builder$i",
215
                    default => $data->{'authtypecode'},
234
            -values   => \@value_builder,
216
        };
235
            -default  => $data->{'value_builder'},
236
            -size     => 1,
237
            -multiple => 0,
238
        );
239
        $row_data{authtypes} = CGI::scrolling_list(
240
            -name     => "authtypecode",
241
            -id       => "authtypecode$i",
242
            -values   => \@authtypes,
243
            -default  => $data->{'authtypecode'},
244
            -size     => 1,
245
            -multiple => 0,
246
        );
247
        $row_data{repeatable} = CGI::checkbox(
217
        $row_data{repeatable} = CGI::checkbox(
248
            -name     => "repeatable$i",
218
            -name     => "repeatable$i",
249
            -checked  => $data->{'repeatable'} ? 'checked' : '',
219
            -checked  => $data->{'repeatable'} ? 'checked' : '',
Lines 278-306 if ( $op eq 'add_form' ) { Link Here
278
        $row_data{'subfieldcode'} = '';
248
        $row_data{'subfieldcode'} = '';
279
        $row_data{'maxlength'} = 9999;
249
        $row_data{'maxlength'} = 9999;
280
250
281
        $row_data{tab} = CGI::scrolling_list(
251
        $row_data{tab} = {
282
            -name   => 'tab',
252
                    id      => "tab$i",
283
            -id     => "tab$i",
253
                    default => $data->{'tab'},
284
            -values =>
254
                    };
285
              [ '-1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ],
286
            -labels => {
287
                '-1' => 'ignore',
288
                '0'  => '0',
289
                '1'  => '1',
290
                '2'  => '2',
291
                '3'  => '3',
292
                '4'  => '4',
293
                '5'  => '5',
294
                '6'  => '6',
295
                '7'  => '7',
296
                '8'  => '8',
297
                '9'  => '9',
298
                '10' => 'items (10)',
299
            },
300
            -default  => "",
301
            -size     => 1,
302
            -multiple => 0,
303
        );
304
        $row_data{tagsubfield} =
255
        $row_data{tagsubfield} =
305
            "<input type=\"text\" name=\"tagsubfield\" value=\""
256
            "<input type=\"text\" name=\"tagsubfield\" value=\""
306
          . $data->{'tagsubfield'}
257
          . $data->{'tagsubfield'}
Lines 308-321 if ( $op eq 'add_form' ) { Link Here
308
        $row_data{liblibrarian} = "";
259
        $row_data{liblibrarian} = "";
309
        $row_data{libopac}      = "";
260
        $row_data{libopac}      = "";
310
        $row_data{seealso}      = "";
261
        $row_data{seealso}      = "";
311
        $row_data{kohafield}    = CGI::scrolling_list(
262
        $row_data{kohafield} = {
312
            -name     => 'kohafield',
263
                    id      => "kohafield$i",
313
            -id       => "kohafield$i",
264
                    values  => \@kohafields,
314
            -values   => \@kohafields,
265
                    default => "$data->{'kohafield'}",
315
            -default  => "",
266
                    };
316
            -size     => 1,
317
            -multiple => 0,
318
        );
319
        $row_data{hidden}     = "";
267
        $row_data{hidden}     = "";
320
        $row_data{repeatable} = CGI::checkbox(
268
        $row_data{repeatable} = CGI::checkbox(
321
            -name     => "repeatable$i",
269
            -name     => "repeatable$i",
Lines 338-365 if ( $op eq 'add_form' ) { Link Here
338
            -value    => 1,
286
            -value    => 1,
339
            -label    => ''
287
            -label    => ''
340
        );
288
        );
341
        $row_data{value_builder} = CGI::scrolling_list(
289
        $row_data{value_builder} = {
342
            -name     => "value_builder",
290
                    id      => "value_builder$i",
343
            -id       => "value_builder$i",
291
                    values  => \@value_builder,
344
            -values   => \@value_builder,
292
                    default => $data->{'value_builder'},
345
            -default  => $data->{'value_builder'},
293
        };
346
            -size     => 1,
294
        $row_data{authorised_value} = {
347
            -multiple => 0,
295
                    id      => "authorised_value$i",
348
        );
296
                    values  => \@authorised_values,
349
        $row_data{authorised_value} = CGI::scrolling_list(
297
                    default => $data->{'authorised_value'},
350
            -name     => "authorised_value",
298
        };
351
            -id       => "authorised_value$i",
299
        $row_data{authtypes} = {
352
            -values   => \@authorised_values,
300
                    id      => "authtypecode$i",
353
            -size     => 1,
301
                    values  => \@authtypes,
354
            -multiple => 0,
302
                    default => $data->{'authtypecode'},
355
        );
303
        };
356
        $row_data{authtypes} = CGI::scrolling_list(
357
            -name     => "authtypecode",
358
            -id       => "authtypecode$i",
359
            -values   => \@authtypes,
360
            -size     => 1,
361
            -multiple => 0,
362
        );
363
        $row_data{link}   = CGI::escapeHTML( $data->{'link'} );
304
        $row_data{link}   = CGI::escapeHTML( $data->{'link'} );
364
        $row_data{row}    = $i;
305
        $row_data{row}    = $i;
365
        push( @loop_data, \%row_data );
306
        push( @loop_data, \%row_data );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt (-6 / +70 lines)
Lines 229-235 function populateHiddenCheckboxes(tab) { Link Here
229
                		<li><label for="libopac[% loo.row %]">Text for OPAC: </label><input type="text" id="libopac[% loo.row %]" name="libopac" value="[% loo.libopac %]" size="40" maxlength="80" /></li>
229
                		<li><label for="libopac[% loo.row %]">Text for OPAC: </label><input type="text" id="libopac[% loo.row %]" name="libopac" value="[% loo.libopac %]" size="40" maxlength="80" /></li>
230
                		<li><label for="repeatable[% loo.row %]">Repeatable: </label>[% loo.repeatable %]</li>
230
                		<li><label for="repeatable[% loo.row %]">Repeatable: </label>[% loo.repeatable %]</li>
231
                		<li><label for="mandatory[% loo.row %]">Mandatory: </label>[% loo.mandatory %]</li>
231
                		<li><label for="mandatory[% loo.row %]">Mandatory: </label>[% loo.mandatory %]</li>
232
                		<li><label for="tab[% loo.row %]">Managed in tab: </label>[% loo.tab %] (ignore means that the subfield does not display in the record editor)</li>
232
                        <li><label for="tab[% loo.row %]">Managed in tab: </label>
233
                            <select name="tab" tabindex="" size="1" id="[% loo.tab.id %]">
234
                            [%- IF ( loo.tab.default ==  -1 ) -%]
235
                                <option value="-1" selected="selected">ignore</option>
236
                            [%- ELSE -%]
237
                                <option value="-1">ignore</option>
238
                            [%- END -%]
239
                            [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -%]
240
                                [%- IF ( loo.tab.default ==  t ) -%]
241
                                <option value="[%- t -%]" selected="selected">[%- t -%]</option>
242
                                [%- ELSE -%]
243
                                <option value="[%- t -%]">[%- t -%]</option>
244
                                [%- END -%]
245
                            [%- END -%]
246
                            [%- IF ( loo.tab.default ==  10 ) -%]
247
                                <option value="10" selected="selected">items (10)</option>
248
                            [%- ELSE -%]
249
                                <option value="10">items (10)</option>
250
                            [%- END -%]
251
                            </select>
252
                            (ignore means that the subfield does not display in the record editor)
253
                        </li>
233
                	</ol>
254
                	</ol>
234
                    </fieldset>
255
                    </fieldset>
235
                    </div>
256
                    </div>
Lines 256-262 function populateHiddenCheckboxes(tab) { Link Here
256
                </li>
277
                </li>
257
                <li><label for="isurl[% loo.row %]">Is a URL:</label>[% loo.isurl %] (if checked, it means that the subfield is a URL and can be clicked)</li>
278
                <li><label for="isurl[% loo.row %]">Is a URL:</label>[% loo.isurl %] (if checked, it means that the subfield is a URL and can be clicked)</li>
258
                <li><label for="link[% loo.row %]">Link:</label><input type="text" id="link[% loo.row %]" name="link" value="[% loo.link %]" size="10" maxlength="80" /> (e.g., Title or Local-Number) <span class="error"><em>NOTE: If you change this value you must ask your administrator to run misc/batchRebuildBiblioTables.pl.</em></span></li>
279
                <li><label for="link[% loo.row %]">Link:</label><input type="text" id="link[% loo.row %]" name="link" value="[% loo.link %]" size="10" maxlength="80" /> (e.g., Title or Local-Number) <span class="error"><em>NOTE: If you change this value you must ask your administrator to run misc/batchRebuildBiblioTables.pl.</em></span></li>
259
                <li><label for="kohafield[% loo.row %]">Koha link:</label>[% loo.kohafield %]</li>
280
                <li>
281
                    <label for="kohafield[% loo.row %]">Koha link:</label>
282
                    <select name="kohafield" id="[% loo.kohafield.id %]" size="1">
283
                    [% FOREACH value IN loo.kohafield.values %]
284
                      [% IF ( value == loo.kohafield.default ) %]
285
                        <option value="[% value %]" selected>[% value %]</option>
286
                      [% ELSE %]
287
                        <option value="[% value %]">[% value %]</option>
288
                      [% END %]
289
                    [% END %]
290
                    </select>
291
                </li>
260
			</ol>
292
			</ol>
261
            </fieldset>
293
            </fieldset>
262
            </div>
294
            </div>
Lines 264-272 function populateHiddenCheckboxes(tab) { Link Here
264
            <div id="oth[% loo.urisubfieldcode %]">
296
            <div id="oth[% loo.urisubfieldcode %]">
265
            <fieldset class="rows">
297
            <fieldset class="rows">
266
                    	<ol>
298
                    	<ol>
267
                    		<li><label for="authorised_value[% loo.row %]">Authorized value:</label>[% loo.authorised_value %]</li>
299
                            <li>
268
                    		<li><label for="authtypecode[% loo.row %]">Thesaurus:</label>[% loo.authtypes %]</li>
300
                                <label for="authorised_value[% loo.row %]">Authorized value:</label>
269
                    		<li><label for="value_builder[% loo.row %]">Plugin:</label>[% loo.value_builder %]</li>
301
                                <select name="authorised_value" id="[% loo.authorised_value.id %]" size="1">
302
                                [% FOREACH value IN loo.authorised_value.values %]
303
                                    [% IF ( value == loo.authorised_value.default ) %]
304
                                    <option value="[% value %]" selected>[% value %]</option>
305
                                    [% ELSE %]
306
                                    <option value="[% value %]">[% value %]</option>
307
                                    [% END %]
308
                                [% END %]
309
                                </select>
310
                            </li>
311
                            <li>
312
                                <label for="authtypecode[% loo.row %]">Thesaurus:</label>
313
                                <select name="authtypecode" id="[% loo.authtypes.id %]" size="1">
314
                                [% FOREACH value IN loo.authtypes.values %]
315
                                    [% IF ( value == loo.authtypes.default ) %]
316
                                    <option value="[% value %]" selected>[% value %]</option>
317
                                    [% ELSE %]
318
                                    <option value="[% value %]">[% value %]</option>
319
                                    [% END %]
320
                                [% END %]
321
                                </select>
322
                            </li>
323
                            <li>
324
                                <label for="value_builder[% loo.row %]">Plugin:</label>
325
                                <select name="value_builder" id="[% loo.value_builder.id %]" size="1">
326
                                [% FOREACH value IN loo.value_builder.values %]
327
                                    [% IF ( value == loo.value_builder.default ) %]
328
                                    <option value="[% value %]" selected>[% value %]</option>
329
                                    [% ELSE %]
330
                                    <option value="[% value %]">[% value %]</option>
331
                                    [% END %]
332
                                [% END %]
333
                                </select>
334
                            </li>
270
                    	</ol>
335
                    	</ol>
271
            </fieldset>
336
            </fieldset>
272
            </div>
337
            </div>
273
- 

Return to bug 12615