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

drop useless indirection

parent 2ab1c9d3
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,6 @@ my %patterns = (
my %actions = (
home => 'req_home',
start => 'req_start',
select_federation => 'req_select_federation',
select_sp => 'req_select_sp',
select_email => 'req_select_email',
......@@ -247,27 +246,21 @@ sub abort {
);
}
sub req_start {
sub req_select_federation {
my ($self, %args) = @_;
my $federations = $self->{configuration}->{federations}->{list};
my @federations = split(/, */, $federations);
# skip this step if there is only one federation,
# or if no explicit distinction is required
if (
@federations == 1 ||
$self->{configuration}->{federations}->{merge}
) {
$self->req_select_sp();
} else {
$self->req_select_federation();
}
}
sub req_select_federation {
my ($self, %args) = @_;
my $federations = $self->{configuration}->{federations}->{list};
my @federations = split(/, */, $federations);
my %federations = map { $_ => $self->{configuration}->{$_}->{label} } @federations;
$self->respond(
......
......@@ -91,5 +91,5 @@
</div>
</div>
<p class="text-center"><a href="[% app.url %]?action=start" class="button">[% lh.maketext("Test another service") %]</a></p>
<p class="text-center"><a href="[% app.url %]?action=select_federation" class="button">[% lh.maketext("Test another service") %]</a></p>
[% END %]
......@@ -9,6 +9,6 @@
<h2>[% lh.maketext("Get started") %]</h2>
<p>[% lh.maketext("To start testing your own services, start by selecting one your are administrator for.") %]</p>
<p class="text-center"><a href="[% app.url %]?action=start" class="button">[% lh.maketext("Get started") %]</a></p>
<p class="text-center"><a href="[% app.url %]?action=select_federation" class="button">[% lh.maketext("Get started") %]</a></p>
[% END %]
......@@ -95,5 +95,5 @@
</div>
</div>
<p class="text-center"><a href="[% app.url %]?action=start" class="button">[% lh.maketext("Test another service") %]</a></p>
<p class="text-center"><a href="[% app.url %]?action=select_federation" class="button">[% lh.maketext("Test another service") %]</a></p>
[% END %]
......@@ -9,6 +9,6 @@
<h2>[% lh.maketext("Get started") %]</h2>
<p>[% lh.maketext("To start testing your own services, start by selecting one your are administrator for.") %]</p>
<p class="text-center"><a href="[% app.url %]?action=start" class="button">[% lh.maketext("Get started") %]</a></p>
<p class="text-center"><a href="[% app.url %]?action=select_federation" class="button">[% lh.maketext("Get started") %]</a></p>
[% END %]
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