mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2024-11-22 09:25:46 +03:00
Merge pull request #52 from Gusted/close-register-page
Hide register page when registrations are closed
This commit is contained in:
commit
c1f6ce3ae2
2 changed files with 43 additions and 0 deletions
|
@ -8,6 +8,16 @@
|
|||
class="auth__logo" alt="mcaptcha logo" />
|
||||
|
||||
|
||||
<. if !crate::SETTINGS.allow_registration { .>
|
||||
<table class="reg-closed__table">
|
||||
<thead class="reg-closed__table-heading">
|
||||
<tr><th colspan="4" class="reg-closed__table-title-text">Registration closed</th></tr>
|
||||
</thead>
|
||||
<tbody class="reg-closed__body">
|
||||
<tr><td class="reg-closed__body-text">This mCaptcha instance is closed for registrations.</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<. } else {.>
|
||||
<form
|
||||
method="POST"
|
||||
action="<.= crate::V1_API_ROUTES.auth.register .>"
|
||||
|
@ -73,5 +83,6 @@
|
|||
<a href="<.= crate::PAGES.auth.login .>" class="auth__secondary-action__link">Log in</a>
|
||||
</p>
|
||||
<. include!("../demo-user-banner.html"); .>
|
||||
<. } .>
|
||||
</div>
|
||||
<. include!("../../components/footers.html"); .>
|
||||
|
|
32
templates/auth/register/main.scss
Normal file
32
templates/auth/register/main.scss
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (C) 2022 Gusted <postmaster@gusted.xyz>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../../components/table/main';
|
||||
|
||||
.reg-closed__table {
|
||||
@include table;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.reg-closed__table-title-text {
|
||||
@include table__title-text;
|
||||
}
|
||||
|
||||
.reg-closed__body-text {
|
||||
display: block;
|
||||
margin: 0.5em 0;
|
||||
}
|
Loading…
Reference in a new issue