Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Pedro Amorim 2025-12-18 12:48:24 +00:00 committed by Lucas Gass
parent 51c718b184
commit 53a78c501d
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 9 additions and 0 deletions

View File

@ -1196,7 +1196,16 @@ sub expand_template {
# Set files to load
$params->{template} = $template_name;
$params->{opac_template} = $template_name;
} elsif ( $params->{error}
&& $params->{status} eq 'failed_captcha'
&& C4::Context->preference("AutoILLBackendPriority") )
{
my $template_name = 'ill/backends/Standard/' . ( $params->{method} // q{} ) . '.inc';
# Set files to load
$params->{template} = $template_name;
$params->{opac_template} = $template_name;
$params->{stage} = 'form';
} else {
my $plugin = $self->get_backend_plugin( $self->_backend->name );