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

(-)a/C4/Members.pm (-67 lines)
Lines 70-77 BEGIN { Link Here
70
70
71
        &GetAge
71
        &GetAge
72
        &GetCities
72
        &GetCities
73
        &GetRoadTypes
74
        &GetRoadTypeDetails
75
        &GetSortDetails
73
        &GetSortDetails
76
        &GetTitles
74
        &GetTitles
77
75
Lines 1857-1904 EOF Link Here
1857
    return 0;
1855
    return 0;
1858
}
1856
}
1859
1857
1860
=head2 GetRoadTypes (OUEST-PROVENCE)
1861
1862
  ($idroadtypearrayref, $roadttype_hashref) = &GetRoadTypes();
1863
1864
Looks up the different road type . Returns two
1865
elements: a reference-to-array, which lists the id_roadtype
1866
codes, and a reference-to-hash, which maps the road type of the road .
1867
1868
=cut
1869
1870
sub GetRoadTypes {
1871
    my $dbh   = C4::Context->dbh;
1872
    my $query = qq|
1873
SELECT roadtypeid,road_type 
1874
FROM roadtype 
1875
ORDER BY road_type|;
1876
    my $sth = $dbh->prepare($query);
1877
    $sth->execute();
1878
    my %roadtype;
1879
    my @id;
1880
1881
    #    insert empty value to create a empty choice in cgi popup
1882
1883
    while ( my $data = $sth->fetchrow_hashref ) {
1884
1885
        push @id, $data->{'roadtypeid'};
1886
        $roadtype{ $data->{'roadtypeid'} } = $data->{'road_type'};
1887
    }
1888
1889
#test to know if the table contain some records if no the function return nothing
1890
    my $id = @id;
1891
    if ( $id eq 0 ) {
1892
        return ();
1893
    }
1894
    else {
1895
        unshift( @id, "" );
1896
        return ( \@id, \%roadtype );
1897
    }
1898
}
1899
1900
1901
1902
=head2 GetTitles (OUEST-PROVENCE)
1858
=head2 GetTitles (OUEST-PROVENCE)
1903
1859
1904
  ($borrowertitle)= &GetTitles();
1860
  ($borrowertitle)= &GetTitles();
Lines 1998-2026 sub GetHideLostItemsPreference { Link Here
1998
    return $hidelostitems;    
1954
    return $hidelostitems;    
1999
}
1955
}
2000
1956
2001
=head2 GetRoadTypeDetails (OUEST-PROVENCE)
2002
2003
  ($roadtype) = &GetRoadTypeDetails($roadtypeid);
2004
2005
Returns the description of roadtype
2006
C<&$roadtype>return description of road type
2007
C<&$roadtypeid>this is the value of roadtype s
2008
2009
=cut
2010
2011
sub GetRoadTypeDetails {
2012
    my ($roadtypeid) = @_;
2013
    my $dbh          = C4::Context->dbh;
2014
    my $query        = qq|
2015
SELECT road_type 
2016
FROM roadtype 
2017
WHERE roadtypeid=?|;
2018
    my $sth = $dbh->prepare($query);
2019
    $sth->execute($roadtypeid);
2020
    my $roadtype = $sth->fetchrow;
2021
    return ($roadtype);
2022
}
2023
2024
=head2 GetBorrowersToExpunge
1957
=head2 GetBorrowersToExpunge
2025
1958
2026
  $borrowers = &GetBorrowersToExpunge(
1959
  $borrowers = &GetBorrowersToExpunge(
(-)a/admin/roadtype.pl (-129 lines)
Lines 1-129 Link Here
1
#! /usr/bin/perl
2
3
# Copyright 2006 SAN OUEST-PROVENCE et Paul POULAIN
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 2 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use strict;
21
use warnings;
22
23
use CGI;
24
use C4::Context;
25
use C4::Output;
26
use C4::Auth;
27
28
29
sub StringSearch  {
30
    my $sth = C4::Context->dbh->prepare("Select * from roadtype where (road_type like ?) ORDER BY road_type");
31
    $sth->execute((shift || '') . '%');
32
    return $sth->fetchall_arrayref({});
33
}
34
35
my $input = new CGI;
36
my $searchfield=$input->param('road_type');
37
my $script_name="/cgi-bin/koha/admin/roadtype.pl";
38
my $roadtypeid=$input->param('roadtypeid');
39
my $op = $input->param('op') || '';
40
41
my ($template, $loggedinuser, $cookie)
42
    = get_template_and_user({template_name => "admin/roadtype.tmpl",
43
			     query => $input,
44
			     type => "intranet",
45
			     authnotrequired => 0,
46
                 flagsrequired => {parameters => 'parameters_remaining_permissions'},
47
			     debug => 1,
48
			     });
49
50
51
$template->param(	script_name => $script_name,
52
		 	roadtypeid => $roadtypeid ,
53
		 	searchfield => $searchfield);
54
55
56
################## ADD_FORM ##################################
57
# called by default. Used to create form to add or  modify a record
58
if ($op eq 'add_form') {
59
	$template->param(add_form => 1);
60
	
61
	#---- if primkey exists, it's a modify action, so read values to modify...
62
	my $data;
63
	if ($roadtypeid) {
64
		my $dbh = C4::Context->dbh;
65
		my $sth=$dbh->prepare("select roadtypeid,road_type from roadtype where roadtypeid=?");
66
		$sth->execute($roadtypeid);
67
		$data=$sth->fetchrow_hashref;
68
		$sth->finish;
69
	}
70
71
	$template->param(	
72
				road_type       => $data->{'road_type'},
73
			);
74
##############ICI#####################
75
# END $OP eq ADD_FORM
76
################## ADD_VALIDATE #################################
77
# called by add_form, used to insert/modify data in DB
78
} elsif ($op eq 'add_validate') {
79
	my $dbh = C4::Context->dbh;
80
 	my $sth;
81
	
82
	if ($input->param('roadtypeid') ){
83
		$sth=$dbh->prepare("UPDATE roadtype SET road_type=? WHERE roadtypeid=?");
84
		$sth->execute($input->param('road_type'),$input->param('roadtypeid'));
85
	
86
	}
87
	else{	
88
		$sth=$dbh->prepare("INSERT INTO roadtype (road_type) VALUES (?)");
89
		$sth->execute($input->param('road_type'));
90
	}
91
	$sth->finish;
92
    print $input->redirect("/cgi-bin/koha/admin/roadtype.pl");
93
	exit;
94
95
# END $OP eq ADD_VALIDATE
96
################## DELETE_CONFIRM ##################################
97
# called by default form, used to confirm deletion of data in DB
98
} elsif ($op eq 'delete_confirm') {
99
	$template->param(delete_confirm => 1);
100
	my $dbh = C4::Context->dbh;
101
	my $sth2=$dbh->prepare("select roadtypeid,road_type from roadtype where  roadtypeid=?");
102
	$sth2->execute($roadtypeid);
103
	my $data=$sth2->fetchrow_hashref;
104
	$sth2->finish;
105
106
        $template->param(	
107
				road_type       =>	( $data->{'road_type'}),
108
				);
109
110
111
													# END $OP eq DELETE_CONFIRM
112
################## DELETE_CONFIRMED ##################################
113
# called by delete_confirm, used to effectively confirm deletion of data in DB
114
} elsif ($op eq 'delete_confirmed') {
115
	my $dbh = C4::Context->dbh;
116
	my $categorycode=uc($input->param('roadtypeid'));
117
	my $sth=$dbh->prepare("delete from roadtype where roadtypeid=?");
118
	$sth->execute($roadtypeid);
119
	$sth->finish;
120
	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=roadtype.pl\"></html>";
121
	exit;
122
													# END $OP eq DELETE_CONFIRMED
123
} else { # DEFAULT
124
	$template->param(else => 1);
125
	$template->param(loop => StringSearch($searchfield));
126
127
128
} #---- END $OP eq DEFAULT
129
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/circ/circulation.pl (-1 / +1 lines)
Lines 686-692 if($bor_messages_loop){ $template->param(flagged => 1 ); } Link Here
686
# Computes full borrower address
686
# Computes full borrower address
687
my @fulladdress;
687
my @fulladdress;
688
push @fulladdress, $borrower->{'streetnumber'} if ( $borrower->{'streetnumber'} );
688
push @fulladdress, $borrower->{'streetnumber'} if ( $borrower->{'streetnumber'} );
689
push @fulladdress, &GetRoadTypeDetails( $borrower->{'streettype'} ) if ( $borrower->{'streettype'} );
689
push @fulladdress, C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{'streettype'} ) if ( $borrower->{'streettype'} );
690
push @fulladdress, $borrower->{'address'} if ( $borrower->{'address'} );
690
push @fulladdress, $borrower->{'address'} if ( $borrower->{'address'} );
691
691
692
my $fast_cataloging = 0;
692
my $fast_cataloging = 0;
(-)a/installer/data/mysql/updatedatabase.pl (+32 lines)
Lines 7330-7335 if ( CheckVersion($DBversion) ) { Link Here
7330
    SetVersion($DBversion);
7330
    SetVersion($DBversion);
7331
}
7331
}
7332
7332
7333
7334
$DBversion = "3.13.00.XXX";
7335
if ( CheckVersion($DBversion) ) {
7336
    $dbh->{AutoCommit} = 0;
7337
    $dbh->{RaiseError} = 1;
7338
7339
    my $av_added = $dbh->do(q|
7340
        INSERT INTO authorised_values(category, authorised_value, lib, lib_opac)
7341
            SELECT 'ROADTYPE', roadtypeid, road_type, road_type
7342
            FROM roadtype;
7343
    |);
7344
7345
    my $rt_deleted = $dbh->do(q|
7346
        DELETE FROM roadtype
7347
    |);
7348
7349
    if ( $av_added == $rt_deleted or $rt_deleted eq "0E0" ) {
7350
        $dbh->do(q|
7351
            DROP TABLE roadtype;
7352
        |);
7353
        $dbh->commit;
7354
        print "Upgrade to $DBversion done (Bug 7372: Move road types from the roadtype table to the ROADTYPE authorised values)\n";
7355
        SetVersion($DBversion);
7356
    } else {
7357
        print "Upgrade to $DBversion failed (Bug 7372: Move road types from the roadtype table to the ROADTYPE authorised values.\nTransaction aborted because $@\n)";
7358
        $dbh->rollback;
7359
    }
7360
7361
    $dbh->{AutoCommit} = 1;
7362
    $dbh->{RaiseError} = 0;
7363
}
7364
7333
=head1 FUNCTIONS
7365
=head1 FUNCTIONS
7334
7366
7335
=head2 TableExists($table)
7367
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc (-1 lines)
Lines 33-39 Link Here
33
	<li><a href="/cgi-bin/koha/admin/transport-cost-matrix.pl">Transport cost matrix</a></li>
33
	<li><a href="/cgi-bin/koha/admin/transport-cost-matrix.pl">Transport cost matrix</a></li>
34
	<li><a href="/cgi-bin/koha/admin/item_circulation_alerts.pl">Item circulation alerts</a></li>
34
	<li><a href="/cgi-bin/koha/admin/item_circulation_alerts.pl">Item circulation alerts</a></li>
35
    <li><a href="/cgi-bin/koha/admin/cities.pl">Cities and towns</a></li>
35
    <li><a href="/cgi-bin/koha/admin/cities.pl">Cities and towns</a></li>
36
    <li><a href="/cgi-bin/koha/admin/roadtype.pl">Road types</a></li>
37
</ul>
36
</ul>
38
37
39
<h5>Catalog</h5>
38
<h5>Catalog</h5>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt (-3 lines)
Lines 56-64 Link Here
56
	<dd>Define rules for check-in and checkout notifications for combinations of libraries, patron categories, and item types</dd>
56
	<dd>Define rules for check-in and checkout notifications for combinations of libraries, patron categories, and item types</dd>
57
    <dt><a href="/cgi-bin/koha/admin/cities.pl">Cities and towns</a></dt>
57
    <dt><a href="/cgi-bin/koha/admin/cities.pl">Cities and towns</a></dt>
58
    <dd>Define cities and towns that your patrons live in.</dd>
58
    <dd>Define cities and towns that your patrons live in.</dd>
59
    <dt><a href="/cgi-bin/koha/admin/roadtype.pl" >Road types</a>
60
    </dt>
61
    <dd>Define road types (street, avenue, way, etc.). Road types display as authorized values when adding/editing patrons and can be used in geographic statistics.</dd>
62
</dl>
59
</dl>
63
</div>
60
</div>
64
<div class="yui-u">
61
<div class="yui-u">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt (-147 lines)
Lines 1-147 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Administration &rsaquo; [% IF ( add_form ) %]Road types &rsaquo; [% IF ( roadtypeid ) %] Modify road type[% ELSE %] New road type[% END %][% ELSE %][% IF ( delete_confirm ) %]Road types &rsaquo; Confirm deletion of road type[% ELSE %] Road type[% END %][% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript">
5
//<![CDATA[
6
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7
        function isNotNull(f,noalert) {
8
                if (f.value.length == 0) {
9
        return false;
10
                }
11
        return true;
12
        }
13
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
14
        function toUC(f) {
15
                var x=f.value.toUpperCase();
16
                f.value=x;
17
                return true;
18
        }
19
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
20
        function isNum(v,maybenull) {
21
        var n = new Number(v.value);
22
        if (isNaN(n)) {
23
                return false;
24
                }
25
        if (maybenull == 0 && v.value =='') {
26
                return false;
27
        }
28
        return true;
29
        }
30
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
31
        function isDate(f) {
32
                var t = Date.parse(f.value);
33
                if (isNaN(t)) {
34
                        return false;
35
                }
36
        }
37
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
38
        function Check(f) {
39
                var ok=1;
40
                var _alertString="";
41
                var alertString2;
42
                if (f.road_type.value.length == 0  ) {
43
                        _alertString += "\n- " + _("Road type");
44
                        alert(_alertString);	
45
                }
46
                else{
47
                document.Aform.submit();
48
                }
49
        }
50
//]]>
51
</script>
52
</head>
53
<body id="admin_roadtype" class="admin">
54
[% INCLUDE 'header.inc' %]
55
[% INCLUDE 'roadtype-admin-search.inc' %]
56
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF ( add_form ) %]<a href="/cgi-bin/koha/admin/roadtype.pl">Road types</a> &rsaquo; [% IF ( roadtypeid ) %] Modify road type[% ELSE %] New road type[% END %][% ELSE %][% IF ( delete_confirm ) %]<a href="/cgi-bin/koha/admin/roadtype.pl">Road types</a> &rsaquo; Confirm deletion of road type[% ELSE %] Road type[% END %][% END %]</div>
57
58
<div id="doc3" class="yui-t2">
59
   
60
   <div id="bd">
61
	<div id="yui-main">
62
	<div class="yui-b">
63
64
[% IF ( add_form ) %]
65
	[% IF ( roadtypeid ) %]
66
		<h1>Modify road type</h1>
67
	[% ELSE %]
68
		<h1>New road type</h1>
69
	[% END %]
70
71
	<form action="[% script_name %]" name="Aform" method="post">
72
	<input type="hidden" name="op" value="add_validate" />
73
	<input type="hidden" name="checked" value="0" />
74
	<input type="hidden" name="roadtypeid" value="[% roadtypeid %]" />
75
76
<fieldset class="rows"><ol>
77
[% IF ( roadtypeid ) %]
78
<li>
79
	<span class="label">Road type: </span>[% roadtypeid %]
80
	</li>
81
[% END %]
82
	<li>			
83
		<label for="road_type">Road type: </label>
84
	<input  type="text" name="road_type" id="road_type" size="80" maxlength="100" value="[% road_type |html %]" />
85
	</li></ol></fieldset>
86
	
87
	<fieldset class="action">					  
88
	<input class="button" type="button" onclick="Check(this.form)" value="Submit" />	<a class="cancel" href="/cgi-bin/koha/admin/roadtype.pl">Cancel</a>
89
	</fieldset>
90
	</form>
91
[% END %]
92
93
[% IF ( delete_confirm ) %]
94
    <div class="dialog alert"><h3>Delete road type "[% road_type %]?"</h3>
95
<table>	<tr>
96
        <th>Road type id: </th>
97
			<td>[% roadtypeid %]</td>
98
		</tr>
99
	<tr>	<th>Road type: </th>
100
		<td>[% road_type %]
101
		</td>
102
103
	</tr></table><form action="[% script_name %]" method="post">
104
			<input type="hidden" name="op" value="delete_confirmed" />
105
            <input type="hidden" name="roadtypeid" value="[% roadtypeid %]" /><input type="submit" class="approve" value="Yes, delete" /></form> <form action="[% script_name %]" method="post">
106
            <input type="submit" class="deny" value="No, do not delete" /></form></div>
107
[% END %]
108
109
[% IF ( else ) %]
110
111
<div id="toolbar" class="btn-toolbar">
112
    <a class="btn btn-small" id="addroad" href="/cgi-bin/koha/admin/roadtype.pl?op=add_form"><i class="icon-plus"></i> New road type</a>
113
</div>
114
115
	<h2>Road type</h2>
116
	[% IF ( searchfield ) %]
117
		Search on  [% searchfield %]
118
	[% END %]
119
120
[% IF ( loop ) %]	<table>
121
		<tr>
122
			<th>Road type</th>
123
			<th colspan="2">&nbsp;</th>
124
		</tr>
125
		[% FOREACH loo IN loop %]
126
		[% UNLESS ( loop.odd ) %]
127
		<tr class="highlight">
128
		[% ELSE %]
129
		<tr>
130
		[% END %]
131
			<td>[% loo.road_type %]</td>
132
			<td><a href="[% loo.script_name %]?op=add_form&amp;roadtypeid=[% loo.roadtypeid %]">Edit</a></td>
133
			<td><a href="[% loo.script_name %]?op=delete_confirm&amp;roadtypeid=[% loo.roadtypeid %]">Delete</a></td>
134
		</tr>
135
		[% END %]
136
	</table>[% END %]
137
[% END %]
138
139
</div>
140
</div>
141
<div class="yui-b">
142
[% INCLUDE 'admin-menu.inc' %]
143
</div>
144
</div>
145
[% INCLUDE 'intranet-bottom.inc' %]
146
147
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-3 / +11 lines)
Lines 200-206 Link Here
200
<input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
200
<input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" />
201
<input type="hidden" name="category_type" value="[% category_type %]" />
201
<input type="hidden" name="category_type" value="[% category_type %]" />
202
<input type="hidden" name="updtype" value="[% updtype %]" />
202
<input type="hidden" name="updtype" value="[% updtype %]" />
203
<input type="hidden" name="select_roadtype" value="[% select_roadtype %]" />
204
<input type="hidden" name="destination" value="[% destination %]" />
203
<input type="hidden" name="destination" value="[% destination %]" />
205
<input type="hidden" name="check_member" value="[% check_member %]" />
204
<input type="hidden" name="check_member" value="[% check_member %]" />
206
<input type="hidden" name="borrowernumber" value="[% IF ( opduplicate ) %][% ELSE %][% borrowernumber %][% END %]" />
205
<input type="hidden" name="borrowernumber" value="[% IF ( opduplicate ) %][% ELSE %][% borrowernumber %][% END %]" />
Lines 438-444 Link Here
438
    </li>
437
    </li>
439
        [% END %]
438
        [% END %]
440
        [% UNLESS nostreettype %]
439
        [% UNLESS nostreettype %]
441
    [% IF ( road_cgipopup ) %]
440
    [% IF roadtypes %]
442
      <li>
441
      <li>
443
      [% IF ( mandatorystreettype ) %]
442
      [% IF ( mandatorystreettype ) %]
444
      <label for="streettype" class="required">
443
      <label for="streettype" class="required">
Lines 446-452 Link Here
446
      <label for="streettype">
445
      <label for="streettype">
447
      [% END %]
446
      [% END %]
448
      Street type: </label>
447
      Street type: </label>
449
      [% roadpopup %]
448
      <select name="streettype">
449
        <option value=""></option>
450
        [% FOR roadtype IN roadtypes %]
451
          [% IF roadtype.selected %]
452
            <option value="[% roadtype.authorised_value %]" selected="selected">[% roadtype.lib %]</option>
453
          [% ELSE %]
454
            <option value="[% roadtype.authorised_value %]">[% roadtype.lib %]</option>
455
          [% END %]
456
        [% END %]
457
      </select>
450
	  [% IF ( mandatorystreettype ) %]<span class="required">Required</span>[% END %]
458
	  [% IF ( mandatorystreettype ) %]<span class="required">Required</span>[% END %]
451
      </li>
459
      </li>
452
    [% END %] 
460
    [% END %] 
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-3 / +1 lines)
Lines 214-222 function validate1(date) { Link Here
214
     [% UNLESS ( I ) %][% IF ( othernames ) %]&ldquo;[% othernames %]&rdquo;[% END %]
214
     [% UNLESS ( I ) %][% IF ( othernames ) %]&ldquo;[% othernames %]&rdquo;[% END %]
215
215
216
<p class="address">[% streetnumber %]
216
<p class="address">[% streetnumber %]
217
        [% IF ( roaddetails ) %]
217
        [% IF roadtype %][% roadtype %][% END %]
218
         [% roaddetails %]
219
        [% END %]
220
        [% address %]<br />
218
        [% address %]<br />
221
        [% IF ( address2 ) %][% address2 %]<br />[% END %]
219
        [% IF ( address2 ) %][% address2 %]<br />[% END %]
222
    	[% IF ( city ) %][% city %][% END %] 
220
    	[% IF ( city ) %][% city %][% END %] 
(-)a/members/memberentry.pl (-13 / +2 lines)
Lines 184-190 if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) Link Here
184
        qr/^nodouble$/,
184
        qr/^nodouble$/,
185
        qr/^op$/,
185
        qr/^op$/,
186
        qr/^save$/,
186
        qr/^save$/,
187
        qr/^select_roadtype$/,
188
        qr/^updtype$/,
187
        qr/^updtype$/,
189
        qr/^SMSnumber$/,
188
        qr/^SMSnumber$/,
190
        qr/^setting_extended_patron_attributes$/,
189
        qr/^setting_extended_patron_attributes$/,
Lines 523-539 if (@{$city_arrayref} ) { Link Here
523
    }
522
    }
524
}
523
}
525
  
524
  
526
my $default_roadtype;
525
my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE', $data{streettype} );
527
$default_roadtype=$data{'streettype'} ;
526
$template->param( roadtypes => $roadtypes);
528
my($roadtypeid,$road_type)=GetRoadTypes();
529
  $template->param( road_cgipopup => 1) if ($roadtypeid );
530
my $roadpopup = CGI::popup_menu(-name=>'streettype',
531
        -id => 'streettype',
532
        -values=>$roadtypeid,
533
        -labels=>$road_type,
534
        -override => 1,
535
        -default=>$default_roadtype
536
        );  
537
527
538
my $default_borrowertitle = '';
528
my $default_borrowertitle = '';
539
unless ( $op eq 'duplicate' ) { $default_borrowertitle=$data{'title'} }
529
unless ( $op eq 'duplicate' ) { $default_borrowertitle=$data{'title'} }
Lines 707-713 $template->param( Link Here
707
  ethcatpopup => $ethcatpopup,
697
  ethcatpopup => $ethcatpopup,
708
  relshiploop => \@relshipdata,
698
  relshiploop => \@relshipdata,
709
  city_loop => $city_arrayref,
699
  city_loop => $city_arrayref,
710
  roadpopup => $roadpopup,  
711
  borrotitlepopup => $borrotitlepopup,
700
  borrotitlepopup => $borrotitlepopup,
712
  guarantorinfo   => $guarantorinfo,
701
  guarantorinfo   => $guarantorinfo,
713
  flagloop  => \@flagdata,
702
  flagloop  => \@flagdata,
(-)a/members/moremember.pl (-2 / +2 lines)
Lines 244-250 my $relissue = []; Link Here
244
if ( @borrowernumbers ) {
244
if ( @borrowernumbers ) {
245
    $relissue    = GetPendingIssues(@borrowernumbers);
245
    $relissue    = GetPendingIssues(@borrowernumbers);
246
}
246
}
247
my $roaddetails = &GetRoadTypeDetails( $data->{'streettype'} );
247
my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} );
248
my $today       = DateTime->now( time_zone => C4::Context->tz);
248
my $today       = DateTime->now( time_zone => C4::Context->tz);
249
$today->truncate(to => 'day');
249
$today->truncate(to => 'day');
250
my @borrowers_with_issues;
250
my @borrowers_with_issues;
Lines 407-413 $template->param( Link Here
407
    detailview => 1,
407
    detailview => 1,
408
    AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
408
    AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
409
    CANDELETEUSER    => $candeleteuser,
409
    CANDELETEUSER    => $candeleteuser,
410
    roaddetails     => $roaddetails,
410
    roadtype        => $roadtype,
411
    borrowernumber  => $borrowernumber,
411
    borrowernumber  => $borrowernumber,
412
    othernames      => $data->{'othernames'},
412
    othernames      => $data->{'othernames'},
413
    categoryname    => $data->{'description'},
413
    categoryname    => $data->{'description'},
(-)a/members/routing-lists.pl (-3 / +2 lines)
Lines 101-108 if ($borrowernumber) { Link Here
101
101
102
102
103
# Computes full borrower address
103
# Computes full borrower address
104
my (undef, $roadttype_hashref) = &GetRoadTypes();
104
my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{streettype} );
105
my $address = $borrower->{'streetnumber'}.' '.$roadttype_hashref->{$borrower->{'streettype'}}.' '.$borrower->{'address'};
105
my $address = $borrower->{'streetnumber'} . " $roadtype " . $borrower->{'address'};
106
106
107
$template->param(
107
$template->param(
108
108
109
- 

Return to bug 7372