Bug 38005: Pass opac_editable to search params when interface is OPAC
1. Create a patron attribute.
2. Check it as Mandatory.
3. Do NOT make it display or editable in the OPAC.
4. Go to OPAC self reg form
5. You will not see the attribute.
6. Submit the form and see the 500 error.
7. Apply patch, restart_all.
8. Try again, now you should be able to submit the OPAC form.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fbdd43a6a1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
718ecb5328
commit
e198c2afde
|
|
@ -2208,14 +2208,19 @@ sub extended_attributes {
|
|||
}
|
||||
|
||||
# Check globally mandatory types
|
||||
my @required_attribute_types =
|
||||
Koha::Patron::Attribute::Types->search(
|
||||
{
|
||||
my $interface = C4::Context->interface;
|
||||
my $params = {
|
||||
mandatory => 1,
|
||||
category_code => [ undef, $self->categorycode ],
|
||||
'borrower_attribute_types_branches.b_branchcode' =>
|
||||
undef,
|
||||
},
|
||||
'borrower_attribute_types_branches.b_branchcode' => undef,
|
||||
};
|
||||
|
||||
if ( $interface eq 'opac' ) {
|
||||
$params->{opac_editable} = 1;
|
||||
}
|
||||
|
||||
my @required_attribute_types = Koha::Patron::Attribute::Types->search(
|
||||
$params,
|
||||
{ join => 'borrower_attribute_types_branches' }
|
||||
)->get_column('code');
|
||||
for my $type (@required_attribute_types) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue