From 0f1c857d3fbafbeefcc75079d2396ee7e86c3c6e Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Mon, 10 Dec 2007 17:40:59 +0100 Subject: [PATCH] Changing some patron management rules (#1631) - the guarantor is no more readonly: it can be typed manually - useless fields in case of an institution are removed (like DoB, Firstname, gender) - reintroducing the relashionship select, that was missing in the template (but was handled by the pl) - moving B_phone to a more logical place (with alternate coordinate) - reintrocing contactnote in "alt contact" - changing the select_city behaviour : when a city is choosen, the zipcode & city are automatically filled. Signed-off-by: Joshua Ferraro --- C4/Members.pm | 11 +- .../en/modules/members/memberentrygen.tmpl | 173 ++++++++++-------- members/memberentry.pl | 5 +- 3 files changed, 103 insertions(+), 86 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 7d77e84f4a..2647e7172d 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -1461,7 +1461,7 @@ sub GetCities { #my ($type_city) = @_; my $dbh = C4::Context->dbh; - my $query = qq|SELECT cityid,city_name + my $query = qq|SELECT cityid,city_zipcode,city_name FROM cities ORDER BY city_name|; my $sth = $dbh->prepare($query); @@ -1470,13 +1470,12 @@ sub GetCities { $sth->execute(); my %city; my @id; - # insert empty value to create a empty choice in cgi popup - + push @id, " "; + $city{""} = ""; while ( my $data = $sth->fetchrow_hashref ) { - - push @id, $data->{'cityid'}; - $city{ $data->{'cityid'} } = $data->{'city_name'}; + push @id, $data->{'city_zipcode'}."|".$data->{'city_name'}; + $city{ $data->{'city_zipcode'}."|".$data->{'city_name'} } = $data->{'city_name'}; } #test to know if the table contain some records if no the function return nothing diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl index 82e1890c16..d207ce1516 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl @@ -16,6 +16,12 @@ patron ,
Organisation Patron identity
    -
  1. - -
  2. - + +
  3. + +
  4. +
  5. -
  6. - -
  7. -
  8. - -
  9. -
  10. - -
  11. + +
  12. + +
  13. +
  14. + +
  15. +
  16. + +
  17. +
  18. - - " disabled="disabled" readonly="readonly" /> - " disabled="disabled" readonly="readonly" /> + + " /> + " /> -
  19. +
@@ -251,18 +268,6 @@ patron " /> Required - -
  • - -
  • -
  • @@ -299,16 +306,6 @@ patron E-mail (home): " /> Required
  • -
  • - -
  • @@ -410,6 +407,26 @@ patron " /> Required
  • +
  • + +
  • +
  • + +
  • diff --git a/members/memberentry.pl b/members/memberentry.pl index 04173209ec..9f8e0ae277 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -314,9 +314,10 @@ my($cityid); $template->param( city_cgipopup => 1) if ($cityid ); my $citypopup = CGI::popup_menu(-name=>'select_city', -id => 'select_city', - -values=>$cityid, + -values=>$name_city, -labels=>$name_city, - -default=>$default_city + -default=>$default_city, + -onChange => "javascript:changecity()", ); my $default_roadtype; -- 2.39.5