[Koha-cvs] CVS: koha/admin marctagstructure.pl,1.25,1.25.2.1

Owen Leonard oleonard at users.sourceforge.net
Fri Feb 11 21:01:15 CET 2005


Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2017/admin

Modified Files:
      Tag: rel_2_2
	marctagstructure.pl 
Log Message:
- Adding id attributes to CGI-generated form inputs so that HTML labels can transfer focus to the appropriate field.
- Modifying table row color toggle so that HTML value can be moved out of the script

Index: marctagstructure.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/marctagstructure.pl,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -C2 -r1.25 -r1.25.2.1
*** marctagstructure.pl	4 Oct 2004 20:37:14 -0000	1.25
--- marctagstructure.pl	11 Feb 2005 20:01:09 -0000	1.25.2.1
***************
*** 119,122 ****
--- 119,123 ----
  			-values=> \@authorised_values,
  			-size=>1,
+ 			-id=>"authorised_value",
  			-multiple=>0,
  			-default => $data->{'authorised_value'},
***************
*** 134,143 ****
  	$template->param('use-heading-flags-p' => 1);
  	$template->param(liblibrarian => $data->{'liblibrarian'},
! 							libopac => $data->{'libopac'},
! 							repeatable => CGI::checkbox('repeatable',$data->{'repeatable'}?'checked':'',1,''),
! 							mandatory => CGI::checkbox('mandatory',$data->{'mandatory'}?'checked':'',1,''),
! 							authorised_value => $authorised_value,
! 							frameworkcode => $frameworkcode,
! 							);
  													# END $OP eq ADD_FORM
  ################## ADD_VALIDATE ##################################
--- 135,152 ----
  	$template->param('use-heading-flags-p' => 1);
  	$template->param(liblibrarian => $data->{'liblibrarian'},
! 			libopac => $data->{'libopac'},
! 			repeatable => CGI::checkbox(-name=>'repeatable',
! 						-checked=> $data->{'repeatable'}?'checked':'',
! 						-value=> 1,
! 						-label => '',
! 						-id=> 'repeatable'),
! 			mandatory => CGI::checkbox(-name => 'mandatory',
! 						-checked => $data->{'mandatory'}?'checked':'',
! 						-value => 1,
! 						-label => '',
! 						-id => 'mandatory'),
! 			authorised_value => $authorised_value,
! 			frameworkcode => $frameworkcode,
! 			);
  													# END $OP eq ADD_FORM
  ################## ADD_VALIDATE ##################################
***************
*** 211,221 ****
  	my $env;
  	my ($count,$results)=StringSearch($env,$searchfield,$frameworkcode);
! 	my $toggle="white";
  	my @loop_data = ();
  	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
! 	  	if ($toggle eq 'white'){
! 			$toggle="#ffffcc";
  	  	} else {
! 			$toggle="white";
  	  	}
  		my %row_data;  # get a fresh hash for the row data
--- 220,230 ----
  	my $env;
  	my ($count,$results)=StringSearch($env,$searchfield,$frameworkcode);
! 	my $toggle=0;
  	my @loop_data = ();
  	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
! 	  	if ($toggle eq 0){
! 			$toggle=1;
  	  	} else {
! 			$toggle=0;
  	  	}
  		my %row_data;  # get a fresh hash for the row data
***************
*** 228,232 ****
  		$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
  		$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
! 		$row_data{bgcolor} = $toggle;
  		push(@loop_data, \%row_data);
  	}
--- 237,241 ----
  		$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
  		$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
! 		$row_data{toggle} = $toggle;
  		push(@loop_data, \%row_data);
  	}





More information about the Koha-cvs mailing list