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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-15 / +41 lines)
Lines 1309-1346 legend:hover { Link Here
1309
                                [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1309
                                [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1310
1310
1311
                                <!--this zones are not necessary in modif mode -->
1311
                                <!--this zones are not necessary in modif mode -->
1312
                                [% UNLESS ( opadd || opduplicate ) %]
1312
                                [% UNLESS ( opadd || opduplicate || ( nogonenoaddress && nolost ) ) %]
1313
                                    <fieldset class="rows" id="memberentry_account_flags">
1313
                                    <fieldset class="rows" id="memberentry_account_flags">
1314
                                        <legend id="account_flags_lgd">Patron account flags</legend>
1314
                                        <legend id="account_flags_lgd">Patron account flags</legend>
1315
                                        <ol class="radio">
1315
                                        <ol class="radio">
1316
                                            [% FOREACH flagloo IN flagloop %]
1316
                                            [% UNLESS nogonenoaddress %]
1317
                                                <li>
1317
                                                <li>
1318
                                                    <label class="radio" for="yes[% flagloo.name | html %]">
1318
                                                    <label class="radio" for="yesgonenoaddress">
1319
                                                        [% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% END %]
1319
                                                        Gone no address:
1320
                                                        [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %]
1321
                                                    </label>
1320
                                                    </label>
1322
                                                    [% IF CAN_user_circulate_manage_restrictions %]
1321
                                                    [% IF CAN_user_circulate_manage_restrictions %]
1323
                                                        <label for="yes[% flagloo.name | html %]">
1322
                                                        <label for="yesgonenoaddress">
1324
                                                            [% IF ( flagloo.yes ) %]
1323
                                                            [% IF ( borrower_data.gonenoaddress ) %]
1325
                                                                <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" checked="checked" />
1324
                                                                <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" checked="checked" />
1326
                                                            [% ELSE %]
1325
                                                            [% ELSE %]
1327
                                                                <input type="radio" id="yes[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="1" />
1326
                                                                <input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" />
1328
                                                            [% END %]
1327
                                                            [% END %]
1329
                                                                Yes
1328
                                                                Yes
1330
                                                        </label>
1329
                                                        </label>
1331
                                                        <label for="no[% flagloo.name | html %]">
1330
                                                        <label for="nogonenoaddress">
1332
                                                            [% IF ( flagloo.no ) %]
1331
                                                            [% IF ( borrower_data.gonenoaddress ) %]
1333
                                                                <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" checked="checked"/>
1332
                                                                <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" />
1334
                                                            [% ELSE %]
1333
                                                            [% ELSE %]
1335
                                                                <input type="radio" id="no[% flagloo.name | html %]" name="[% flagloo.name | html %]" value="0" />
1334
                                                                <input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" checked="checked"/>
1336
                                                            [% END %]
1335
                                                            [% END %]
1337
                                                                No
1336
                                                                No
1338
                                                        </label>
1337
                                                        </label>
1339
                                                    [% ELSE %]
1338
                                                    [% ELSE %]
1340
                                                        [% IF flagloo.yes %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1339
                                                        [% IF borrower_data.gonenoaddress %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1341
                                                    [% END # /IF CAN_user_circulate_manage_restrictions %]
1340
                                                    [% END # /IF CAN_user_circulate_manage_restrictions %]
1342
                                                </li>
1341
                                                </li>
1343
                                            [% END # /FOREACH flagloo %]
1342
                                            [% END # /UNLESS nogonenoaddress %]
1343
                                            [% UNLESS nolost %]
1344
                                                <li>
1345
                                                    <label class="radio" for="yeslost">
1346
                                                        Lost card:
1347
                                                    </label>
1348
                                                    [% IF CAN_user_circulate_manage_restrictions %]
1349
                                                        <label for="yeslost">
1350
                                                            [% IF ( borrower_data.lost ) %]
1351
                                                                <input type="radio" id="yeslost" name="lost" value="1" checked="checked" />
1352
                                                            [% ELSE %]
1353
                                                                <input type="radio" id="yeslost" name="lost" value="1" />
1354
                                                            [% END %]
1355
                                                                Yes
1356
                                                        </label>
1357
                                                        <label for="nolost">
1358
                                                            [% IF ( borrower_data.lost ) %]
1359
                                                                <input type="radio" id="nolost" name="lost" value="0" />
1360
                                                            [% ELSE %]
1361
                                                                <input type="radio" id="nolost" name="lost" value="0" checked="checked"/>
1362
                                                            [% END %]
1363
                                                                No
1364
                                                        </label>
1365
                                                    [% ELSE %]
1366
                                                        [% IF borrower_data.lost %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]
1367
                                                    [% END # /IF CAN_user_circulate_manage_restrictions %]
1368
                                                </li>
1369
                                            [% END # /UNLESS nogonenoaddress %]
1344
                                        </ol>
1370
                                        </ol>
1345
                                    </fieldset> <!-- /#memberentry_account_flags -->
1371
                                    </fieldset> <!-- /#memberentry_account_flags -->
1346
1372
(-)a/members/memberentry.pl (-25 lines)
Lines 688-716 while (@relationships) { Link Here
688
  push(@relshipdata, \%row);
688
  push(@relshipdata, \%row);
689
}
689
}
690
690
691
my %flags = (
692
    'gonenoaddress' => ['gonenoaddress'],
693
    'lost'          => ['lost']
694
);
695
696
my @flagdata;
697
foreach ( keys(%flags) ) {
698
    my $key = $_;
699
    my %row = (
700
        'key'  => $key,
701
        'name' => $flags{$key}[0]
702
    );
703
    if ( $data{$key} ) {
704
        $row{'yes'} = ' checked';
705
        $row{'no'}  = '';
706
    }
707
    else {
708
        $row{'yes'} = '';
709
        $row{'no'}  = ' checked';
710
    }
711
    push @flagdata, \%row;
712
}
713
714
# get Branch Loop
691
# get Branch Loop
715
# in modify mod: userbranch value comes from borrowers table
692
# in modify mod: userbranch value comes from borrowers table
716
# in add    mod: userbranch value comes from branches table (ip correspondence)
693
# in add    mod: userbranch value comes from branches table (ip correspondence)
Lines 794-800 $template->param( Link Here
794
  borrowernumber  => $borrowernumber, #register number
771
  borrowernumber  => $borrowernumber, #register number
795
  relshiploop => \@relshipdata,
772
  relshiploop => \@relshipdata,
796
  btitle=> $default_borrowertitle,
773
  btitle=> $default_borrowertitle,
797
  flagloop  => \@flagdata,
798
  modify          => $modify,
774
  modify          => $modify,
799
  nok     => $nok,#flag to know if an error
775
  nok     => $nok,#flag to know if an error
800
  NoUpdateLogin =>  $NoUpdateLogin,
776
  NoUpdateLogin =>  $NoUpdateLogin,
801
- 

Return to bug 31562