diff --git a/lib/AccountManager/App.pm b/lib/AccountManager/App.pm index 995a945c5e512aaf5c864d5853bbaa638528ae27..1cdba41c0ebea989b013d23f68949d674bcf9ebe 100644 --- a/lib/AccountManager/App.pm +++ b/lib/AccountManager/App.pm @@ -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( diff --git a/templates/web/edugain/create_accounts.tt2.html b/templates/web/edugain/create_accounts.tt2.html index 9f582e597af27e790abb65fabca3f757cacaecb5..082c3727d7494ab6c99c3a4aa86f5e28eda0e011 100644 --- a/templates/web/edugain/create_accounts.tt2.html +++ b/templates/web/edugain/create_accounts.tt2.html @@ -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 %] diff --git a/templates/web/edugain/home.tt2.html b/templates/web/edugain/home.tt2.html index fb0a6c68f33b9a27f7a293544d6dcbc5fa644397..86a0eac2c462d768297a92aace14f065eb0f1540 100644 --- a/templates/web/edugain/home.tt2.html +++ b/templates/web/edugain/home.tt2.html @@ -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 %] diff --git a/templates/web/renater/create_accounts.tt2.html b/templates/web/renater/create_accounts.tt2.html index 514cfe0f8ce52d7c3022630ac829fd1f47afff97..c8e60f15fd0fea7ed9bdd82bf9aa271316ea0e60 100644 --- a/templates/web/renater/create_accounts.tt2.html +++ b/templates/web/renater/create_accounts.tt2.html @@ -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 %] diff --git a/templates/web/renater/home.tt2.html b/templates/web/renater/home.tt2.html index 14d269041df0d5fbd4200f0b3588f1eb85f51a41..ede31930b9d493129d5db2cf5e60d9741ca41512 100644 --- a/templates/web/renater/home.tt2.html +++ b/templates/web/renater/home.tt2.html @@ -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 %]