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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-us.inc (+4 lines)
Lines 141-147 Link Here
141
          <label for="B_email">
141
          <label for="B_email">
142
        [% END %]
142
        [% END %]
143
        Email: </label>
143
        Email: </label>
144
        [% IF ( NoUpdateEmail ) %]
145
            <input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" disabled="disabled" />
146
        [% ELSE %]
144
            <input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" />
147
            <input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" />
148
        [% END %]
145
        [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li>
149
        [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li>
146
        [% END %]
150
        [% END %]
147
        [% UNLESS nocontactnote %]
151
        [% UNLESS nocontactnote %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-2 / +10 lines)
Lines 550-556 Link Here
550
                    <label for="email">
550
                    <label for="email">
551
                [% END %]
551
                [% END %]
552
                Primary email: </label>
552
                Primary email: </label>
553
                <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
553
                [% IF ( NoUpdateEmail ) %]
554
                    <input type="text" id="email" name="email" size="45" value="[% email | html %]" disabled="disabled" />
555
                [% ELSE %]
556
                    <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
557
                [% END %]
554
                [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
558
                [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
555
            </li>
559
            </li>
556
        [% END %]
560
        [% END %]
Lines 563-569 Link Here
563
                    <label for="emailpro">
567
                    <label for="emailpro">
564
                [% END %]
568
                [% END %]
565
                Secondary email: </label>
569
                Secondary email: </label>
566
                <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
570
                [% IF ( NoUpdateEmail ) %]
571
                    <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" disabled="disabled"/>
572
                [% ELSE %]
573
                    <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
574
                [% END %]
567
                [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
575
                [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
568
            </li>
576
            </li>
569
        [% END %]
577
        [% END %]
(-)a/members/memberentry.pl (-2 / +9 lines)
Lines 102-107 my $step = $input->param('step') || 0; Link Here
102
my @errors;
102
my @errors;
103
my $borrower_data;
103
my $borrower_data;
104
my $NoUpdateLogin;
104
my $NoUpdateLogin;
105
my $NoUpdateEmail;
105
my $userenv = C4::Context->userenv;
106
my $userenv = C4::Context->userenv;
106
107
107
## Deal with guarantor stuff
108
## Deal with guarantor stuff
Lines 165-170 $template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 ); Link Here
165
if ( $op eq 'modify' or $op eq 'save' or $op eq 'duplicate' ) {
166
if ( $op eq 'modify' or $op eq 'save' or $op eq 'duplicate' ) {
166
    my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
167
    my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
167
    output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
168
    output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
169
    
170
    # check permission to modify email info.
171
    if ( $patron->is_superlibrarian && !$logged_in_user->is_superlibrarian ) {
172
        $NoUpdateEmail = 1;
173
    }
168
174
169
    $borrower_data = $patron->unblessed;
175
    $borrower_data = $patron->unblessed;
170
    $borrower_data->{category_type} = $patron->category->category_type;
176
    $borrower_data->{category_type} = $patron->category->category_type;
Lines 206-212 if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) Link Here
206
            push(@errors,"ERROR_$_");
212
            push(@errors,"ERROR_$_");
207
        }
213
        }
208
    }
214
    }
209
  # check permission to modify login info.
215
216
    # check permission to modify login info.
210
    if (ref($borrower_data) && ($borrower_data->{'category_type'} eq 'S') && ! (C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) )  {
217
    if (ref($borrower_data) && ($borrower_data->{'category_type'} eq 'S') && ! (C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) )  {
211
        $NoUpdateLogin = 1;
218
        $NoUpdateLogin = 1;
212
    }
219
    }
Lines 782-787 $template->param( Link Here
782
  modify          => $modify,
789
  modify          => $modify,
783
  nok     => $nok,#flag to know if an error
790
  nok     => $nok,#flag to know if an error
784
  NoUpdateLogin =>  $NoUpdateLogin,
791
  NoUpdateLogin =>  $NoUpdateLogin,
792
  NoUpdateEmail =>  $NoUpdateEmail,
785
  );
793
  );
786
794
787
# Generate CSRF token
795
# Generate CSRF token
788
- 

Return to bug 23634