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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-4 / +4 lines)
Lines 154-160 Link Here
154
        var dob = new Date($("#dateofbirth").datepicker( 'getDate' ));
154
        var dob = new Date($("#dateofbirth").datepicker( 'getDate' ));
155
155
156
        var year = dob.getFullYear();
156
        var year = dob.getFullYear();
157
        var month = dob.getMonth();
157
        var month = dob.getMonth() + 1;
158
        var day = dob.getDate();
158
        var day = dob.getDate();
159
159
160
        $.ajax({
160
        $.ajax({
Lines 163-171 Link Here
163
            data: 'dateofbirth=' + year + '-' + month + '-' + day,
163
            data: 'dateofbirth=' + year + '-' + month + '-' + day,
164
            dataType: 'json',
164
            dataType: 'json',
165
            success : function(json, statut){
165
            success : function(json, statut){
166
                var age_string = "Age: ";
166
                var age_string = _('Age: ');
167
                if (json.years) { age_string += json.years + " year(s) "; }
167
                if (json.years) { age_string += json.years + _(' year(s) '); }
168
                if (json.months) { age_string += json.months + " month(s) "; }
168
                if (json.months) { age_string += json.months + _(' month(s)'); }
169
                var elem = $("#dateofbirth").siblings(".hint").first().html(age_string);
169
                var elem = $("#dateofbirth").siblings(".hint").first().html(age_string);
170
            },
170
            },
171
        });
171
        });
(-)a/members/moremember.pl (-3 / +3 lines)
Lines 61-66 if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preferen Link Here
61
use DateTime;
61
use DateTime;
62
use Koha::DateUtils;
62
use Koha::DateUtils;
63
use Koha::Database;
63
use Koha::Database;
64
use Koha::I18N;
64
65
65
use vars qw($debug);
66
use vars qw($debug);
66
67
Lines 141-148 $data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); Link Here
141
142
142
my @age;
143
my @age;
143
my ($years, $months) = GetAge($data->{dateofbirth});
144
my ($years, $months) = GetAge($data->{dateofbirth});
144
push @age, "$years year(s)" if $years;
145
push @age, $years . gettext(' year(s)') if $years;
145
push @age, "$months month(s)" if $months;
146
push @age, $months . gettext(' month(s)') if $months;
146
$template->param( age => join(', ', @age) );
147
$template->param( age => join(', ', @age) );
147
148
148
for (qw(gonenoaddress lost borrowernotes)) {
149
for (qw(gonenoaddress lost borrowernotes)) {
149
- 

Return to bug 15206