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 |
} |