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

(-)a/C4/Members/AttributeTypes.pm (+4 lines)
Lines 333-338 sub unique_id { Link Here
333
    my $self = shift;
333
    my $self = shift;
334
    @_ ? $self->{'unique_id'} = ((shift) ? 1 : 0) : $self->{'unique_id'};
334
    @_ ? $self->{'unique_id'} = ((shift) ? 1 : 0) : $self->{'unique_id'};
335
}
335
}
336
336
=head2 opac_display
337
=head2 opac_display
337
338
338
  my $opac_display = $attr_type->opac_display();
339
  my $opac_display = $attr_type->opac_display();
Lines 347-352 sub opac_display { Link Here
347
    my $self = shift;
348
    my $self = shift;
348
    @_ ? $self->{'opac_display'} = ((shift) ? 1 : 0) : $self->{'opac_display'};
349
    @_ ? $self->{'opac_display'} = ((shift) ? 1 : 0) : $self->{'opac_display'};
349
}
350
}
351
350
=head2 opac_editable
352
=head2 opac_editable
351
353
352
  my $opac_editable = $attr_type->opac_editable();
354
  my $opac_editable = $attr_type->opac_editable();
Lines 361-366 sub opac_editable { Link Here
361
    my $self = shift;
363
    my $self = shift;
362
    @_ ? $self->{'opac_editable'} = ((shift) ? 1 : 0) : $self->{'opac_editable'};
364
    @_ ? $self->{'opac_editable'} = ((shift) ? 1 : 0) : $self->{'opac_editable'};
363
}
365
}
366
364
=head2 password_allowed
367
=head2 password_allowed
365
368
366
  my $password_allowed = $attr_type->password_allowed();
369
  my $password_allowed = $attr_type->password_allowed();
Lines 375-380 sub password_allowed { Link Here
375
    my $self = shift;
378
    my $self = shift;
376
    @_ ? $self->{'password_allowed'} = ((shift) ? 1 : 0) : $self->{'password_allowed'};
379
    @_ ? $self->{'password_allowed'} = ((shift) ? 1 : 0) : $self->{'password_allowed'};
377
}
380
}
381
378
=head2 staff_searchable
382
=head2 staff_searchable
379
383
380
  my $staff_searchable = $attr_type->staff_searchable();
384
  my $staff_searchable = $attr_type->staff_searchable();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-1 / +1 lines)
Lines 169-175 function CheckAttributeTypeForm(f) { Link Here
169
          [% ELSE %]
169
          [% ELSE %]
170
            <input type="checkbox" id="opac_editable" name="opac_editable" />
170
            <input type="checkbox" id="opac_editable" name="opac_editable" />
171
          [% END %]
171
          [% END %]
172
            <span>Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above.)</span>
172
            <span>Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above, does not work with <a href="/cgi-bin/koha/admin/preferences.pl?op=search&amp;searchfield=PatronSelfRegistrationVerifyByEmail" target="_blank">PatronSelfRegistrationVerifyByEmail</a>.)</span>
173
       </li>
173
       </li>
174
       <li><label for="staff_searchable">Searchable: </label>
174
       <li><label for="staff_searchable">Searchable: </label>
175
          [% IF ( staff_searchable_checked ) %]
175
          [% IF ( staff_searchable_checked ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (-7 / +7 lines)
Lines 866-872 Link Here
866
                    </fieldset>
866
                    </fieldset>
867
               [% END %]
867
               [% END %]
868
868
869
                [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size ) %]
869
                [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && !Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) %]
870
                    [% FOREACH pa_class IN patron_attribute_classes %]
870
                    [% FOREACH pa_class IN patron_attribute_classes %]
871
                        [% IF pa_class.class %]
871
                        [% IF pa_class.class %]
872
                            <fieldset id="aai_[% pa_loo.class %]" class="rows patron-attributes">
872
                            <fieldset id="aai_[% pa_loo.class %]" class="rows patron-attributes">
Lines 903-919 Link Here
903
                                            [% ELSE %]
903
                                            [% ELSE %]
904
                                                <textarea rows="2" cols="30" id="[% form_id %]" name="patron_attribute_value">[% pa_value.value %]</textarea>
904
                                                <textarea rows="2" cols="30" id="[% form_id %]" name="patron_attribute_value">[% pa_value.value %]</textarea>
905
                                            [% END %]
905
                                            [% END %]
906
                                            <a href="#" class="clear-attribute">Clear</a>
907
                                            [% IF ( pa.type.repeatable ) %]
908
                                            <a href="#" class="clone-attribute">New</a>
909
                                            [% END %]
906
                                            [% IF ( pa.type.password_allowed ) %]
910
                                            [% IF ( pa.type.password_allowed ) %]
907
                                                (<label class="lradio" for="[% form_id %]_password">Password:</label>
911
                                                </li><li><label for="[% form_id %]_password">Password:</label>
908
                                                <input type="password" maxlength="64" value="[% pa_value.password %]" id="[% form_id %]_password" name="patron_attribute_password" />)
912
                                                <input type="password" maxlength="64" value="[% pa_value.password %]" id="[% form_id %]_password" name="patron_attribute_password" />
909
                                            [% ELSE %]
913
                                            [% ELSE %]
910
                                                [%# To keep the form inputs lined up in the POST %]
914
                                                [%# To keep the form inputs lined up in the POST %]
911
                                                <input type="hidden" name="patron_attribute_password" value="" />
915
                                                <input type="hidden" name="patron_attribute_password" value="" />
912
                                            [% END %]
916
                                            [% END %]
913
                                            <a href="#" class="clear-attribute">Clear</a>
914
                                            [% IF ( pa.type.repeatable ) %]
915
                                            <a href="#" class="clone-attribute">New</a>
916
                                            [% END %]
917
                                        [% ELSE %]
917
                                        [% ELSE %]
918
                                            [% IF ( pa.type.authorised_value_category ) %]
918
                                            [% IF ( pa.type.authorised_value_category ) %]
919
                                                [% AuthorisedValues.GetByCode( pa.type.authorised_value, pa_value.value, 1 ) %]
919
                                                [% AuthorisedValues.GetByCode( pa.type.authorised_value, pa_value.value, 1 ) %]
(-)a/opac/opac-memberentry.pl (-5 lines)
Lines 417-424 sub DelEmptyFields { Link Here
417
sub GeneratePatronAttributesForm {
417
sub GeneratePatronAttributesForm {
418
    my ( $borrower, $entered_attributes ) = @_;
418
    my ( $borrower, $entered_attributes ) = @_;
419
419
420
    use Data::Dumper; warn Dumper( $entered_attributes );
421
422
    # Get all attribute types and the values for this patron (if applicable)
420
    # Get all attribute types and the values for this patron (if applicable)
423
    my @types = C4::Members::AttributeTypes::GetAttributeTypes();
421
    my @types = C4::Members::AttributeTypes::GetAttributeTypes();
424
422
Lines 463-470 sub GeneratePatronAttributesForm { Link Here
463
        };
461
        };
464
    }
462
    }
465
463
466
    use Data::Dumper; warn Dumper( \%items_by_class );
467
468
    # Finally, build a list of containing classes
464
    # Finally, build a list of containing classes
469
    my @class_loop;
465
    my @class_loop;
470
    foreach my $class (@classes) {
466
    foreach my $class (@classes) {
471
- 

Return to bug 13757