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

drop useless indirection

parent 2ab1c9d3
Branches
Tags
No related merge requests found
...@@ -35,7 +35,6 @@ my %patterns = ( ...@@ -35,7 +35,6 @@ my %patterns = (
my %actions = ( my %actions = (
home => 'req_home', home => 'req_home',
start => 'req_start',
select_federation => 'req_select_federation', select_federation => 'req_select_federation',
select_sp => 'req_select_sp', select_sp => 'req_select_sp',
select_email => 'req_select_email', select_email => 'req_select_email',
...@@ -247,27 +246,21 @@ sub abort { ...@@ -247,27 +246,21 @@ sub abort {
); );
} }
sub req_start { sub req_select_federation {
my ($self, %args) = @_; my ($self, %args) = @_;
my $federations = $self->{configuration}->{federations}->{list}; my $federations = $self->{configuration}->{federations}->{list};
my @federations = split(/, */, $federations); my @federations = split(/, */, $federations);
# skip this step if there is only one federation,
# or if no explicit distinction is required
if ( if (
@federations == 1 || @federations == 1 ||
$self->{configuration}->{federations}->{merge} $self->{configuration}->{federations}->{merge}
) { ) {
$self->req_select_sp(); $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; my %federations = map { $_ => $self->{configuration}->{$_}->{label} } @federations;
$self->respond( $self->respond(
......
...@@ -91,5 +91,5 @@ ...@@ -91,5 +91,5 @@
</div> </div>
</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 %] [% END %]
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
<h2>[% lh.maketext("Get started") %]</h2> <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>[% 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 %] [% END %]
...@@ -95,5 +95,5 @@ ...@@ -95,5 +95,5 @@
</div> </div>
</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 %] [% END %]
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
<h2>[% lh.maketext("Get started") %]</h2> <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>[% 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 %] [% END %]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment