Skip to content
Snippets Groups Projects
Commit 185430f0 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

usage of banner depends on context, not content

parent ff4c8ab7
No related branches found
No related tags found
No related merge requests found
......@@ -211,7 +211,7 @@ sub req_select_email {
unless ($self->{in}->{entityid}) {
$self->{logger}->error("Missing parameter entityid");
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
content => 'errors.tt2.html',
errors => [ "missing_entityid" ]
......@@ -239,7 +239,7 @@ sub req_select_email {
if ($EVAL_ERROR) {
$self->{logger}->error("Failed to load federation metadata: $EVAL_ERROR");
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
content => 'errors.tt2.html',
errors => [ "internal" ]
......@@ -253,7 +253,7 @@ sub req_select_email {
"No such SP '%s' in metadata", $self->{in}->{entityid}
);
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
content => 'errors.tt2.html',
errors => [ "no_such_entity" ]
......@@ -271,7 +271,7 @@ sub req_select_email {
unless ($provider->save()) {
$self->{logger}->error("Failed to save service provider object");
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
content => 'errors.tt2.html',
errors => [ "internal" ]
......@@ -310,7 +310,7 @@ sub req_complete_challenge {
unless ($self->{in}->{entityid}) {
$self->{logger}->error("Missing parameter entityid");
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
errors => [ "missing_entityid" ]
}
......@@ -320,7 +320,7 @@ sub req_complete_challenge {
unless ($self->{in}->{email}) {
$self->{logger}->error("Missing parameter email");
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
content => 'errors.tt2.html',
errors => [ "missing_email" ]
......@@ -336,7 +336,7 @@ sub req_complete_challenge {
unless ($provider->load(speculative => 1)) {
$self->{logger}->errorf("No such SP '%s' in database", $self->{in}->{entityid});
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
content => 'errors.tt2.html',
errors => [ "no_such_entity" ]
......@@ -368,7 +368,7 @@ sub req_complete_challenge {
$self->{in}->{email}
);
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
content => 'errors.tt2.html',
errors => [ "internal" ]
......@@ -390,7 +390,7 @@ sub req_complete_challenge {
$old_token->id()
);
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
content => 'errors.tt2.html',
errors => [ "internal" ]
......@@ -414,7 +414,7 @@ sub req_complete_challenge {
unless ($token->save()) {
$self->{logger}->error("Failed to save authentication token");
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
content => 'errors.tt2.html',
errors => [ "internal" ]
......@@ -430,7 +430,7 @@ sub req_complete_challenge {
open(my $handle, '|-', "$sendmail -f $sender $recipient") or do {
$self->{logger}->errorf("Unable to run sendmail executable: %s", $ERRNO);
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
content => 'errors.tt2.html',
errors => [ "mail_notification_error" ]
......@@ -461,7 +461,7 @@ sub req_complete_challenge {
unless ($tt2->process($template, $data, $handle)) {
$self->{logger}->errorf("Mail notification error: %s", $tt2->error());
$self->respond(
template => 'index.tt2.html',
template => 'index-nobanner.tt2.html',
data => {
content => 'errors.tt2.html',
errors => [ "mail_notification_error" ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment