From 972e3effbdbde0ea58dfaf23bef0efcb5e85ee0e Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Thu, 25 Feb 2016 15:26:31 -0700 Subject: [PATCH] Bug 13757: (QA followup) fix QA issues, add small niceties Remove debug warns, and hide patron attributes in the OPAC if PatronSelfRegistrationVerifyByEmail is enabled (as this enhancement currently does not work with Koha::Borrower::Modifications). Also, slightly improve appearance of attributes with passwords. --- C4/Members/AttributeTypes.pm | 4 ++++ .../prog/en/modules/admin/patron-attr-types.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 14 +++++++------- opac/opac-memberentry.pl | 4 ---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/C4/Members/AttributeTypes.pm b/C4/Members/AttributeTypes.pm index 7e41bce..387e47d 100644 --- a/C4/Members/AttributeTypes.pm +++ b/C4/Members/AttributeTypes.pm @@ -333,6 +333,7 @@ sub unique_id { my $self = shift; @_ ? $self->{'unique_id'} = ((shift) ? 1 : 0) : $self->{'unique_id'}; } + =head2 opac_display my $opac_display = $attr_type->opac_display(); @@ -347,6 +348,7 @@ sub opac_display { my $self = shift; @_ ? $self->{'opac_display'} = ((shift) ? 1 : 0) : $self->{'opac_display'}; } + =head2 opac_editable my $opac_editable = $attr_type->opac_editable(); @@ -361,6 +363,7 @@ sub opac_editable { my $self = shift; @_ ? $self->{'opac_editable'} = ((shift) ? 1 : 0) : $self->{'opac_editable'}; } + =head2 password_allowed my $password_allowed = $attr_type->password_allowed(); @@ -375,6 +378,7 @@ sub password_allowed { my $self = shift; @_ ? $self->{'password_allowed'} = ((shift) ? 1 : 0) : $self->{'password_allowed'}; } + =head2 staff_searchable my $staff_searchable = $attr_type->staff_searchable(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt index 55c476f..a21063f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt @@ -169,7 +169,7 @@ function CheckAttributeTypeForm(f) { [% ELSE %] [% END %] - Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above.) + Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above, does not work with PatronSelfRegistrationVerifyByEmail.)
  • [% IF ( staff_searchable_checked ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index c7d146b..91c252d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -866,7 +866,7 @@ [% END %] - [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size ) %] + [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && !Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) %] [% FOREACH pa_class IN patron_attribute_classes %] [% IF pa_class.class %]
    @@ -903,17 +903,17 @@ [% ELSE %] [% END %] + Clear + [% IF ( pa.type.repeatable ) %] + New + [% END %] [% IF ( pa.type.password_allowed ) %] - ( - ) +
  • + [% ELSE %] [%# To keep the form inputs lined up in the POST %] [% END %] - Clear - [% IF ( pa.type.repeatable ) %] - New - [% END %] [% ELSE %] [% IF ( pa.type.authorised_value_category ) %] [% AuthorisedValues.GetByCode( pa.type.authorised_value, pa_value.value, 1 ) %] diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 2756d5e..cfac647 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -417,8 +417,6 @@ sub DelEmptyFields { sub GeneratePatronAttributesForm { my ( $borrower, $entered_attributes ) = @_; - use Data::Dumper; warn Dumper( $entered_attributes ); - # Get all attribute types and the values for this patron (if applicable) my @types = C4::Members::AttributeTypes::GetAttributeTypes(); @@ -463,8 +461,6 @@ sub GeneratePatronAttributesForm { }; } - use Data::Dumper; warn Dumper( \%items_by_class ); - # Finally, build a list of containing classes my @class_loop; foreach my $class (@classes) { -- 2.7.0