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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-9 / +2 lines)
Lines 356-364 function validate1(date) { Link Here
356
 </div>
356
 </div>
357
    <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=3">Edit</a></div>
357
    <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=3">Edit</a></div>
358
 
358
 
359
    [% UNLESS ( I ) %]
359
 <div id="patron-alternate-address" style="padding-top: 1em;">
360
 <div id="patron-alternate-address" style="padding-top: 1em;">
360
    <h3>Alternate Address</h3>
361
    <h3>Alternate Address</h3>
361
    [% UNLESS ( I ) %][% UNLESS ( C ) %]
362
    <div class="rows">  <ol><li><span class="label">Address: </span>[% B_address %]</li>
362
    <div class="rows">  <ol><li><span class="label">Address: </span>[% B_address %]</li>
363
      <li><span class="label">Address 2: </span>[% B_address2 %]</li>
363
      <li><span class="label">Address 2: </span>[% B_address2 %]</li>
364
      <li><span class="label">City: </span>[% B_city %]</li>
364
      <li><span class="label">City: </span>[% B_city %]</li>
Lines 367-382 function validate1(date) { Link Here
367
      <li><span class="label">Country: </span>[% B_country %]</li>
367
      <li><span class="label">Country: </span>[% B_country %]</li>
368
      [% IF ( B_phone ) %]<li><span class="label">Phone: </span>[% B_phone %]</li>[% END %]
368
      [% IF ( B_phone ) %]<li><span class="label">Phone: </span>[% B_phone %]</li>[% END %]
369
      [% IF ( B_email ) %]<li><span class="label">Email: </span>[% B_email %]</li>[% END %]</ol></div>
369
      [% IF ( B_email ) %]<li><span class="label">Email: </span>[% B_email %]</li>[% END %]</ol></div>
370
    [% END %][% END %]
371
     [% IF ( C ) %]
372
   <div class="rows"> <ol><li><span class="label">Surname: </span>[% contactname %]</li>
373
    <li><span class="label">First name: </span>[% contactfirstname %]</li>    
374
    <li><span class="label">Phone: </span>[% phone %]</li>
375
    <li><span class="label">Email: </span>[% email %]</li>
376
    <li><span class="label">Relationship: </span>[% relationship %]</li></ol></div>
377
   [% END %]
378
</div>
370
</div>
379
<div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=6">Edit</a></div>
371
<div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=6">Edit</a></div>
372
    [% END %]
380
373
381
 <div id="patron-alternative-contact" style="padding-top: 1em;">
374
 <div id="patron-alternative-contact" style="padding-top: 1em;">
382
 <h3>Alternative Contact</h3>	
375
 <h3>Alternative Contact</h3>	
(-)a/members/memberentry.pl (-13 / +12 lines)
Lines 211-223 if ( ( $op eq 'insert' ) and !$nodouble ) { Link Here
211
if ( $guarantorid and ( $category_type eq 'C' || $category_type eq 'P' )) {
211
if ( $guarantorid and ( $category_type eq 'C' || $category_type eq 'P' )) {
212
    if (my $guarantordata=GetMember(borrowernumber => $guarantorid)) {
212
    if (my $guarantordata=GetMember(borrowernumber => $guarantorid)) {
213
        $guarantorinfo=$guarantordata->{'surname'}." , ".$guarantordata->{'firstname'};
213
        $guarantorinfo=$guarantordata->{'surname'}." , ".$guarantordata->{'firstname'};
214
        if ( !defined($data{'contactname'}) or $data{'contactname'} eq '' or
214
        $newdata{'contactfirstname'}= $guarantordata->{'firstname'};
215
             $data{'contactname'} ne $guarantordata->{'surname'} ) {
215
        $newdata{'contactname'}     = $guarantordata->{'surname'};
216
            $newdata{'contactfirstname'}= $guarantordata->{'firstname'};
216
        $newdata{'contacttitle'}    = $guarantordata->{'title'};
217
            $newdata{'contactname'}     = $guarantordata->{'surname'};
217
        if ( $op eq 'add' ) {
218
            $newdata{'contacttitle'}    = $guarantordata->{'title'};
219
	        foreach (qw(streetnumber address streettype address2
218
	        foreach (qw(streetnumber address streettype address2
220
                        zipcode country city phone phonepro mobile fax email emailpro branchcode)) {
219
                        zipcode country city state phone phonepro mobile fax email emailpro branchcode
220
                        B_streetnumber B_streettype B_address B_address2
221
                        B_city B_state B_zipcode B_country B_email B_phone)) {
221
		        $newdata{$_} = $guarantordata->{$_};
222
		        $newdata{$_} = $guarantordata->{$_};
222
	        }
223
	        }
223
        }
224
        }
Lines 225-236 if ( $guarantorid and ( $category_type eq 'C' || $category_type eq 'P' )) { Link Here
225
}
226
}
226
227
227
###############test to take the right zipcode, country and city name ##############
228
###############test to take the right zipcode, country and city name ##############
228
if (!defined($guarantorid) or $guarantorid eq '' or $guarantorid eq '0') {
229
# set only if parameter was passed from the form
229
    # set only if parameter was passed from the form
230
$newdata{'city'}    = $input->param('city')    if defined($input->param('city'));
230
    $newdata{'city'}    = $input->param('city')    if defined($input->param('city'));
231
$newdata{'zipcode'} = $input->param('zipcode') if defined($input->param('zipcode'));
231
    $newdata{'zipcode'} = $input->param('zipcode') if defined($input->param('zipcode'));
232
$newdata{'country'} = $input->param('country') if defined($input->param('country'));
232
    $newdata{'country'} = $input->param('country') if defined($input->param('country'));
233
}
234
233
235
#builds default userid
234
#builds default userid
236
if ( (defined $newdata{'userid'}) && ($newdata{'userid'} eq '')){
235
if ( (defined $newdata{'userid'}) && ($newdata{'userid'} eq '')){
Lines 677-683 $template->param(CGIbranch=>$CGIbranch) if ($CGIbranch); Link Here
677
$template->param(
676
$template->param(
678
  nodouble  => $nodouble,
677
  nodouble  => $nodouble,
679
  borrowernumber  => $borrowernumber, #register number
678
  borrowernumber  => $borrowernumber, #register number
680
  guarantorid => (($borrower_data->{'guarantorid'})) ? $borrower_data->{'guarantorid'} : $guarantorid,
679
  guarantorid => ($borrower_data->{'guarantorid'} || $guarantorid),
681
  ethcatpopup => $ethcatpopup,
680
  ethcatpopup => $ethcatpopup,
682
  relshiploop => \@relshipdata,
681
  relshiploop => \@relshipdata,
683
  city_loop => $city_arrayref,
682
  city_loop => $city_arrayref,
(-)a/members/moremember.pl (-7 lines)
Lines 157-168 $data->{ "sex_".$data->{'sex'}."_p" } = 1; Link Here
157
157
158
my $catcode;
158
my $catcode;
159
if ( $category_type eq 'C') {
159
if ( $category_type eq 'C') {
160
	if ($data->{guarantorid} ) {
161
    	my $data2 = GetMember( 'borrowernumber' => $data->{'guarantorid'} );
162
    	foreach (qw(address address2 city state B_address B_address2 B_city B_state phone mobile zipcode B_zipcode country B_country)) {
163
    	    $data->{$_} = $data2->{$_};
164
    	}
165
   }
166
   my  ( $catcodes, $labels ) =  GetborCatFromCatType( 'A', 'WHERE category_type = ?' );
160
   my  ( $catcodes, $labels ) =  GetborCatFromCatType( 'A', 'WHERE category_type = ?' );
167
   my $cnt = scalar(@$catcodes);
161
   my $cnt = scalar(@$catcodes);
168
162
169
- 

Return to bug 4415