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

(-)a/admin/auth_subfields_structure.pl (-137 / +49 lines)
Lines 148-209 if ($op eq 'add_form') { Link Here
148
                    id      => "ohidden$i",
148
                    id      => "ohidden$i",
149
                    default => $data->{'hidden'}
149
                    default => $data->{'hidden'}
150
                    };
150
                    };
151
		#$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden',
152
		#			-id=>"ihidden$i",
153
		#			-values=>['0','1','2'],
154
		#			-labels => {'0'=>'Show','1'=>'Show Collapsed',
155
		#							'2' =>'Hide',
156
		#							},
157
		#			-default=>substr($data->{'hidden'},1,1),
158
		#			-size=>1,
159
		#			-multiple=>0,
160
		#			);
161
		#$row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden',
162
		#			-id=>"ehidden$i",
163
		#			-values=>['0','1','2'],
164
		#			-labels => {'0'=>'Show','1'=>'Show Collapsed',
165
		#							'2' =>'Hide',
166
		#							},
167
		#			-default=>substr($data->{'hidden'}."  ",2,1),
168
		#			-size=>1,
169
		#			-multiple=>0,
170
		#			);
171
		$row_data{tagsubfieldinput} = "<input type=\"hidden\" name=\"tagsubfield\" value=\"".$data->{'tagsubfield'}."\" id=\"tagsubfield\" />";
151
		$row_data{tagsubfieldinput} = "<input type=\"hidden\" name=\"tagsubfield\" value=\"".$data->{'tagsubfield'}."\" id=\"tagsubfield\" />";
172
		$row_data{tagsubfield} = $data->{'tagsubfield'};
152
		$row_data{tagsubfield} = $data->{'tagsubfield'};
173
		$row_data{liblibrarian} = CGI::escapeHTML($data->{'liblibrarian'});
153
		$row_data{liblibrarian} = CGI::escapeHTML($data->{'liblibrarian'});
174
		$row_data{libopac} = CGI::escapeHTML($data->{'libopac'});
154
		$row_data{libopac} = CGI::escapeHTML($data->{'libopac'});
175
		$row_data{seealso} = CGI::escapeHTML($data->{'seealso'});
155
		$row_data{seealso} = CGI::escapeHTML($data->{'seealso'});
176
		$row_data{kohafield}= CGI::scrolling_list( -name=>"kohafield",
156
        $row_data{kohafield} = {
177
					-id=>"kohafield$i",
157
                    id      => "kohafield$i",
178
					-values=> \@kohafields,
158
                    values  => \@kohafields,
179
					-default=> "$data->{'kohafield'}",
159
                    default => "$data->{'kohafield'}",
180
					-size=>1,
160
                    };
181
					-multiple=>0,
161
        $row_data{authorised_value} = {
182
					);
162
                    id      => "authorised_value$i",
183
		$row_data{authorised_value}  = CGI::scrolling_list(-name=>'authorised_value',
163
                    values  => \@authorised_values,
184
					-id=>"authorised_value$i",
164
                    default => $data->{'authorised_value'},
185
					-values=> \@authorised_values,
165
        };
186
					-default=>$data->{'authorised_value'},
166
        $row_data{frameworkcode} = {
187
					-size=>1,
167
                    id      => "frameworkcode$i",
188
		 			-tabindex=>'',
168
                    values  => \@authtypes,
189
					-multiple=>0,
169
                    default => $data->{'frameworkcode'},
190
					);
170
        };
191
		$row_data{frameworkcode}  = CGI::scrolling_list(-name=>'frameworkcode',
171
        $row_data{value_builder} = {
192
					-id=>"frameworkcode$i",
172
                    id      => "value_builder$i",
193
					-values=> \@authtypes,
173
                    values  => \@value_builder,
194
					-default=>$data->{'frameworkcode'},
174
                    default => $data->{'value_builder'},
195
					-size=>1,
175
        };
196
		 			-tabindex=>'',
197
					-multiple=>0,
198
					);
199
		$row_data{value_builder}  = CGI::scrolling_list(-name=>'value_builder',
200
					-id=>"value_builder$i",
201
					-values=> \@value_builder,
202
					-default=>$data->{'value_builder'},
203
					-size=>1,
204
		 			-tabindex=>'',
205
					-multiple=>0,
206
					);
207
		
176
		
208
		$row_data{repeatable} = CGI::checkbox(-name=>"repeatable$i",
177
		$row_data{repeatable} = CGI::checkbox(-name=>"repeatable$i",
209
	-checked => $data->{'repeatable'}?'checked':'',
178
	-checked => $data->{'repeatable'}?'checked':'',
Lines 229-291 if ($op eq 'add_form') { Link Here
229
	for (my $i=1;$i<=$more_subfields;$i++) {
198
	for (my $i=1;$i<=$more_subfields;$i++) {
230
		my %row_data;  # get a fresh hash for the row data
199
		my %row_data;  # get a fresh hash for the row data
231
        $row_data{'new_subfield'} = 1;
200
        $row_data{'new_subfield'} = 1;
232
		$row_data{tab} = CGI::scrolling_list(-name=>'tab',
201
        $row_data{tab} = {
233
					-id => "tab$i",
202
                    id      => "tab$i",
234
                                        -values =>
203
                    default => $data->{'tab'},
235
                                        [ '-1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ],
204
                    };
236
                                        -labels => {
205
        $row_data{ohidden} = {
237
                                            '-1' => 'ignore',
206
                    id      => "ohidden$i",
238
                                            '0'  => '0',
207
                    default => $data->{'hidden'}
239
                                            '1'  => '1',
208
                    };
240
                                            '2'  => '2',
241
                                            '3'  => '3',
242
                                            '4'  => '4',
243
                                            '5'  => '5',
244
                                            '6'  => '6',
245
                                            '7'  => '7',
246
                                            '8'  => '8',
247
                                            '9'  => '9',
248
                                        },
249
					-default=>"",
250
					-size=>1,
251
		 			-tabindex=>'',
252
					-multiple=>0,
253
					);
254
		$row_data{ohidden} = CGI::scrolling_list(-name=>'ohidden',
255
					-id=>"ohidden$i",
256
					#-values=>['0','1','2'],
257
					#-labels => {'0'=>'Show','1'=>'Show Collapsed',
258
					#				'2' =>'Hide',
259
					#				},
260
					-values=>['0','-5'],
261
					-labels => {'0'=>'Show All','-5'=>'Hide All',},
262
					#-default=>"0",
263
					-default=>$data->{'hidden'},
264
					#-default=>"-5",
265
					-size=>1,
266
					-multiple=>0,
267
					);
268
209
269
		#$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden',
270
		#			-id=>"ihidden$i",
271
		#			-values=>['0','1','2'],
272
		#			-labels => {'0'=>'Show','1'=>'Show Collapsed',
273
		#							'2' =>'Hide',
274
		#							},
275
		#			-default=>"0",
276
		#			-size=>1,
277
		#			-multiple=>0,
278
		#			);
279
		#$row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden',
280
		#			-id=>"ehidden$i",
281
		#			-values=>['0','1','2'],
282
		#			-labels => {'0'=>'Show','1'=>'Show Collapsed',
283
		#							'2' =>'Hide',
284
		#							},
285
		#			-default=>"0",
286
		#			-size=>1,
287
		#			-multiple=>0,
288
		#			);
289
		$row_data{tagsubfieldinput} = "<input type=\"text\" name=\"tagsubfield\" value=\"".$data->{'tagsubfield'}."\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\" />";
210
		$row_data{tagsubfieldinput} = "<input type=\"text\" name=\"tagsubfield\" value=\"".$data->{'tagsubfield'}."\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\" />";
290
                $row_data{tagsubfieldinput} = 
211
                $row_data{tagsubfieldinput} = 
291
                        "<label><input type=\"text\" name=\"tagsubfield\" value=\""
212
                        "<label><input type=\"text\" name=\"tagsubfield\" value=\""
Lines 311-346 if ($op eq 'add_form') { Link Here
311
			-checked => '',
232
			-checked => '',
312
			-value => 1,
233
			-value => 1,
313
			-label => '');
234
			-label => '');
314
		$row_data{kohafield}= CGI::scrolling_list( -name=>'kohafield',
235
        $row_data{kohafield} = {
315
					-id => "kohafield$i",
236
                    id      => "kohafield$i",
316
					-values=> \@kohafields,
237
                    values  => \@kohafields,
317
					-default=> "",
238
                    default => "",
318
					-size=>1,
239
                    };
319
					-multiple=>0,
240
        $row_data{authorised_value} = {
320
					);
241
                    id      => "authorised_value",
321
		$row_data{frameworkcode}  = CGI::scrolling_list(-name=>'frameworkcode',
242
                    values  => \@authorised_values,
322
					-id=>'frameworkcode',
243
                    default => "",
323
					-values=> \@authtypes,
244
        };
324
					-default=>$data->{'frameworkcode'},
245
        $row_data{frameworkcode} = {
325
					-size=>1,
246
                    id      => "frameworkcode",
326
		 			-tabindex=>'',
247
                    values  => \@authtypes,
327
					-multiple=>0,
248
                    default => $data->{'frameworkcode'},
328
					);
249
        };
329
		$row_data{authorised_value}  = CGI::scrolling_list(-name=>'authorised_value',
250
        $row_data{value_builder} = {
330
					-id => 'authorised_value',
251
                    id      => "value_builder",
331
					-values=> \@authorised_values,
252
                    values  => \@value_builder,
332
					-size=>1,
253
                    default => $data->{'value_builder'},
333
		 			-tabindex=>'',
254
        };
334
					-multiple=>0,
255
335
					);
336
		$row_data{value_builder}  = CGI::scrolling_list(-name=>'value_builder',
337
					-id=>'value_builder',
338
					-values=> \@value_builder,
339
					-default=>$data->{'value_builder'},
340
					-size=>1,
341
		 			-tabindex=>'',
342
					-multiple=>0,
343
					);
344
		$row_data{row} = $i;
256
		$row_data{row} = $i;
345
		push(@loop_data, \%row_data);
257
		push(@loop_data, \%row_data);
346
	}
258
	}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt (-6 / +48 lines)
Lines 123-130 function displayMoreConstraint(numlayer){ Link Here
123
                                    [%- END -%]
123
                                    [%- END -%]
124
                                </select>
124
                                </select>
125
                            </li>
125
                            </li>
126
                            <!-- <li><label for="ihidden[% loo.row %]">Intranet:</label>[% loo.ihidden %] </li> -->
127
                            <!-- <li><label for="ehidden[% loo.row %]">Editor:</label>[% loo.ehidden %] (see online help)</li> -->
128
                        </ol>
126
                        </ol>
129
                    </fieldset>
127
                    </fieldset>
130
                </li>
128
                </li>
Lines 143-151 function displayMoreConstraint(numlayer){ Link Here
143
                <li>
141
                <li>
144
                    <fieldset><legend>Help input</legend>    
142
                    <fieldset><legend>Help input</legend>    
145
                        <ol>
143
                        <ol>
146
                            <li><label for="authorised_value[% loo.row %]">Authorized value:</label> [% loo.authorised_value %]</li>
144
                            <li>
147
                            <li><label for="frameworkcode[% loo.row %]">Thesaurus:</label> [% loo.frameworkcode %]</li>
145
                                <label for="kohafield[% loo.row %]">Koha field:</label>
148
                            <li><label for="value_builder[% loo.row %]">Plugin:</label> [% loo.value_builder %]</li>
146
                                <select name="kohafield" id="[% loo.kohafield.id %]" size="1">
147
                                [% FOREACH value IN loo.kohafield.values %]
148
                                    [% IF ( value == loo.kohafield.default ) %]
149
                                    <option value="[% value %]" selected>[% value %]</option>
150
                                    [% ELSE %]
151
                                    <option value="[% value %]">[% value %]</option>
152
                                    [% END %]
153
                                [% END %]
154
                                </select>
155
                            </li>
156
                            <li>
157
                                <label for="authorised_value[% loo.row %]">Authorized value:</label>
158
                                <select name="authorised_value" id="[% loo.authorised_value.id %]" size="1">
159
                                [% FOREACH value IN loo.authorised_value.values %]
160
                                    [% IF ( value == loo.authorised_value.default ) %]
161
                                    <option value="[% value %]" selected>[% value %]</option>
162
                                    [% ELSE %]
163
                                    <option value="[% value %]">[% value %]</option>
164
                                    [% END %]
165
                                [% END %]
166
                                </select>
167
                            </li>
168
                            <li>
169
                                <label for="frameworkcode[% loo.row %]">Thesaurus:</label>
170
                                <select name="frameworkcode" id="[% loo.frameworkcode.id %]" size="1">
171
                                [% FOREACH value IN loo.frameworkcode.values %]
172
                                    [% IF ( value == loo.frameworkcode.default ) %]
173
                                    <option value="[% value %]" selected>[% value %]</option>
174
                                    [% ELSE %]
175
                                    <option value="[% value %]">[% value %]</option>
176
                                    [% END %]
177
                                [% END %]
178
                                </select>
179
                            </li>
180
                            <li>
181
                                <label for="value_builder[% loo.row %]">Plugin:</label>
182
                                <select name="value_builder" id="[% loo.value_builder.id %]" size="1">
183
                                [% FOREACH value IN loo.value_builder.values %]
184
                                    [% IF ( value == loo.value_builder.default ) %]
185
                                    <option value="[% value %]" selected>[% value %]</option>
186
                                    [% ELSE %]
187
                                    <option value="[% value %]">[% value %]</option>
188
                                    [% END %]
189
                                [% END %]
190
                                </select>
191
                            </li>
149
                        </ol>
192
                        </ol>
150
                    </fieldset>
193
                    </fieldset>
151
                </li>
194
                </li>
152
- 

Return to bug 12614