Move registration button above login form, remove angeltype button from login page

2022-03-24
Luca 3 years ago
parent f8d7c080d9
commit 8dfabec920

@ -28,6 +28,22 @@
{% endfor %}
</div>
<div class="row mb-5">
<div class="col text-center">
<h2>{{ __('Register') }}</h2>
{% if has_permission_to('register') and config('registration_enabled') %}
{% if config('enable_password') %}
<p>{{ __('Please sign up, if you want to help us!') }}</p>
<a href="{{ url('register') }}" class="btn btn-primary">{{ __('Register') }} &raquo;</a>
{% else %}
<p>{{ __('Registration is only available via external login.') }}</p>
{% endif %}
{% else %}
{{ m.alert(__('Registration is disabled.'), 'danger') }}
{% endif %}
</div>
</div>
<div class="row mb-5">
<div class="col-md-6 offset-md-3 col-lg-4 offset-lg-4">
<div class="card {{ m.type_bg_class() }}">
@ -95,33 +111,5 @@
</div>
</div>
</div>
<div class="row mb-5">
<div class="col-sm-6 text-center">
<h2>{{ __('Register') }}</h2>
{% if has_permission_to('register') and config('registration_enabled') %}
{% if config('enable_password') %}
<p>{{ __('Please sign up, if you want to help us!') }}</p>
<a href="{{ url('register') }}" class="btn btn-primary">{{ __('Register') }} &raquo;</a>
{% else %}
<p>{{ __('Registration is only available via external login.') }}</p>
{% endif %}
{% else %}
{{ m.alert(__('Registration is disabled.'), 'danger') }}
{% endif %}
</div>
<div class="col-sm-6 text-center">
<h2>{{ __('What can I do?') }}</h2>
<p>{{ __('Please read about the jobs you can do to help us.') }}</p>
<a href="{{ url('angeltypes', {'action': 'about'}) }}" class="btn btn-primary">
{{ __('Teams/Job description') }} &raquo;
</a>
</div>
<!--<div class="col-md-12 text-center">
{{ m.icon('info-circle') }} {{ __('Please note: You have to activate cookies!') }}
</div>-->
</div>
</div>
{% endblock %}

@ -62,7 +62,7 @@ class AuthController extends BaseController
*/
public function login(): Response
{
return $this->showLogin();
return !$this->auth->user() ? $this->showLogin() : $this->redirect->to($this->config->get('home_site'));
}
/**

Loading…
Cancel
Save