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

(-)a/admin/marc_subfields_structure.pl (-14 / +13 lines)
Lines 274-287 if ( $op eq 'add_form' ) { Link Here
274
    }
274
    }
275
275
276
    # add more_subfields empty lines for add if needed
276
    # add more_subfields empty lines for add if needed
277
    for ( my $j = 1 ; $j <= 1 ; $j++ ) {
278
        my %row_data;    # get a fresh hash for the row data
277
        my %row_data;    # get a fresh hash for the row data
279
        $row_data{'new_subfield'} = 1;
278
        $row_data{'new_subfield'} = 1;
280
        $row_data{'subfieldcode'} = '';
279
        $row_data{'subfieldcode'} = '';
281
280
282
        $row_data{tab} = CGI::scrolling_list(
281
        $row_data{tab} = CGI::scrolling_list(
283
            -name   => 'tab',
282
            -name   => 'tab',
284
            -id     => "tab$j",
283
            -id     => "tab$i",
285
            -values =>
284
            -values =>
286
              [ '-1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ],
285
              [ '-1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ],
287
            -labels => {
286
            -labels => {
Lines 311-317 if ( $op eq 'add_form' ) { Link Here
311
        $row_data{seealso}      = "";
310
        $row_data{seealso}      = "";
312
        $row_data{kohafield}    = CGI::scrolling_list(
311
        $row_data{kohafield}    = CGI::scrolling_list(
313
            -name     => 'kohafield',
312
            -name     => 'kohafield',
314
            -id       => "kohafield$j",
313
            -id       => "kohafield$i",
315
            -values   => \@kohafields,
314
            -values   => \@kohafields,
316
            -default  => "",
315
            -default  => "",
317
            -size     => 1,
316
            -size     => 1,
Lines 319-347 if ( $op eq 'add_form' ) { Link Here
319
        );
318
        );
320
        $row_data{hidden}     = "";
319
        $row_data{hidden}     = "";
321
        $row_data{repeatable} = CGI::checkbox(
320
        $row_data{repeatable} = CGI::checkbox(
322
            -name     => "repeatable$j",
321
            -name     => "repeatable$i",
323
            -id       => "repeatable$j",
322
            -id       => "repeatable$i",
324
            -checked  => '',
323
            -checked  => '',
325
            -value    => 1,
324
            -value    => 1,
326
            -label    => ''
325
            -label    => ''
327
        );
326
        );
328
        $row_data{mandatory} = CGI::checkbox(
327
        $row_data{mandatory} = CGI::checkbox(
329
            -name     => "mandatory$j",
328
            -name     => "mandatory$i",
330
            -id       => "mandatory$j",
329
            -id       => "mandatory$i",
331
            -checked  => '',
330
            -checked  => '',
332
            -value    => 1,
331
            -value    => 1,
333
            -label    => ''
332
            -label    => ''
334
        );
333
        );
335
        $row_data{isurl} = CGI::checkbox(
334
        $row_data{isurl} = CGI::checkbox(
336
            -name     => "isurl$j",
335
            -name     => "isurl$i",
337
            -id       => "isurl$j",
336
            -id       => "isurl$i",
338
            -checked  => '',
337
            -checked  => '',
339
            -value    => 1,
338
            -value    => 1,
340
            -label    => ''
339
            -label    => ''
341
        );
340
        );
342
        $row_data{value_builder} = CGI::scrolling_list(
341
        $row_data{value_builder} = CGI::scrolling_list(
343
            -name     => "value_builder",
342
            -name     => "value_builder",
344
            -id       => "value_builder$j",
343
            -id       => "value_builder$i",
345
            -values   => \@value_builder,
344
            -values   => \@value_builder,
346
            -default  => $data->{'value_builder'},
345
            -default  => $data->{'value_builder'},
347
            -size     => 1,
346
            -size     => 1,
Lines 349-370 if ( $op eq 'add_form' ) { Link Here
349
        );
348
        );
350
        $row_data{authorised_value} = CGI::scrolling_list(
349
        $row_data{authorised_value} = CGI::scrolling_list(
351
            -name     => "authorised_value",
350
            -name     => "authorised_value",
352
            -id       => "authorised_value$j",
351
            -id       => "authorised_value$i",
353
            -values   => \@authorised_values,
352
            -values   => \@authorised_values,
354
            -size     => 1,
353
            -size     => 1,
355
            -multiple => 0,
354
            -multiple => 0,
356
        );
355
        );
357
        $row_data{authtypes} = CGI::scrolling_list(
356
        $row_data{authtypes} = CGI::scrolling_list(
358
            -name     => "authtypecode",
357
            -name     => "authtypecode",
359
            -id       => "authtypecode$j",
358
            -id       => "authtypecode$i",
360
            -values   => \@authtypes,
359
            -values   => \@authtypes,
361
            -size     => 1,
360
            -size     => 1,
362
            -multiple => 0,
361
            -multiple => 0,
363
        );
362
        );
364
        $row_data{link}   = CGI::escapeHTML( $data->{'link'} );
363
        $row_data{link}   = CGI::escapeHTML( $data->{'link'} );
365
        $row_data{row}    = $j;
364
        $row_data{row}    = $i;
366
        push( @loop_data, \%row_data );
365
        push( @loop_data, \%row_data );
367
    }
366
368
    $template->param( 'use_heading_flags_p'      => 1 );
367
    $template->param( 'use_heading_flags_p'      => 1 );
369
    $template->param( 'heading_edit_subfields_p' => 1 );
368
    $template->param( 'heading_edit_subfields_p' => 1 );
370
    $template->param(
369
    $template->param(
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt (-4 / +3 lines)
Lines 112-119 $(document).ready(function() { Link Here
112
                    <input type="text" name="defaultvalue" id="defaultvalue[% loo.row %]" value="[% loo.defaultvalue %]" /></li>
112
                    <input type="text" name="defaultvalue" id="defaultvalue[% loo.row %]" value="[% loo.defaultvalue %]" /></li>
113
				<li><label for="maxlength[% loo.row %]">Max length:</label><input type="text" id="maxlength[% loo.row %]" name="maxlength" value="[% loo.maxlength %]" size="4" /> (see online help)</li>
113
				<li><label for="maxlength[% loo.row %]">Max length:</label><input type="text" id="maxlength[% loo.row %]" name="maxlength" value="[% loo.maxlength %]" size="4" /> (see online help)</li>
114
                <li><label for="hidden[% loo.row %]">hidden</label><input type="text" id="hidden[% loo.row %]" name="hidden" value="[% loo.hidden %]" size="2" /> (see online help)</li>
114
                <li><label for="hidden[% loo.row %]">hidden</label><input type="text" id="hidden[% loo.row %]" name="hidden" value="[% loo.hidden %]" size="2" /> (see online help)</li>
115
                <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>
115
                <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>
116
                <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>
116
                <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>
117
                <li><label for="kohafield[% loo.row %]">Koha link:</label>[% loo.kohafield %]</li>
117
                <li><label for="kohafield[% loo.row %]">Koha link:</label>[% loo.kohafield %]</li>
118
			</ol>
118
			</ol>
119
	</fieldset>
119
	</fieldset>
Lines 202-208 $(document).ready(function() { Link Here
202
            [% IF ( loo.mandatory ) %]Mandatory, [% ELSE %]Not mandatory,[% END %]
202
            [% IF ( loo.mandatory ) %]Mandatory, [% ELSE %]Not mandatory,[% END %]
203
            [% IF ( loo.seealso ) %] | See Also: [% loo.seealso %],[% END %]
203
            [% IF ( loo.seealso ) %] | See Also: [% loo.seealso %],[% END %]
204
            [% IF ( loo.hidden ) %]hidden,[% END %]
204
            [% IF ( loo.hidden ) %]hidden,[% END %]
205
            [% IF ( loo.isurl ) %]is a url,[% END %]
205
            [% IF ( loo.isurl ) %]is a URL,[% END %]
206
            [% IF ( loo.authorised_value ) %] | Auth value:[% loo.authorised_value %],[% END %]
206
            [% IF ( loo.authorised_value ) %] | Auth value:[% loo.authorised_value %],[% END %]
207
            [% IF ( loo.authtypecode ) %] | Authority:[% loo.authtypecode %],[% END %]
207
            [% IF ( loo.authtypecode ) %] | Authority:[% loo.authtypecode %],[% END %]
208
            [% IF ( loo.value_builder ) %] | Plugin:[% loo.value_builder %],[% END %]
208
            [% IF ( loo.value_builder ) %] | Plugin:[% loo.value_builder %],[% END %]
209
- 

Return to bug 3413