Add ToS agree checkbox
This commit is contained in:
parent
0fd1aa2b54
commit
5f7d45e812
@ -33,6 +33,8 @@ $SETTINGS = [
|
||||
"mobile_enabled" => true,
|
||||
// Allow users to signup for new accounts
|
||||
"signups_enabled" => false,
|
||||
// Terms of Service URL for user signup
|
||||
"tos_url" => "",
|
||||
// For supported values, see http://php.net/manual/en/timezones.php
|
||||
"timezone" => "America/Denver",
|
||||
// List of external apps connected to this system.
|
||||
|
@ -22,6 +22,10 @@ function showHTML($errormsg = null, $genform = true, $noformcontent = "", $title
|
||||
$form->addInput("email", "", "email", false, null, null, "Email", "fas fa-envelope", 6, 5, 255, "", $Strings->get("That email address doesn't look right.", false));
|
||||
$form->addInput("name", "", "text", true, null, null, "Name", "fas fa-user", 6, 2, 200, "", $Strings->get("Enter your name.", false));
|
||||
|
||||
if (!empty($SETTINGS['tos_url'])) {
|
||||
$form->addInput("agree_tos", "1", "checkbox", true, null, null, "I agree to the <a href=\"$SETTINGS[tos_url]\" target=\"_BLANK\">terms of service</a>");
|
||||
}
|
||||
|
||||
$form->addHiddenInput("submit", "1");
|
||||
|
||||
$form->addButton($Strings->get("Create Account", false), "fas fa-user-plus", null, "submit", "savebtn");
|
||||
@ -134,7 +138,7 @@ if (strlen($_POST['password']) < $SETTINGS['min_password_length']) {
|
||||
showHTML($Strings->build("Your password must be at least {n} characters long.", ["n" => $SETTINGS[min_password_length]], false));
|
||||
}
|
||||
require_once __DIR__ . "/../lib/worst_passwords.php";
|
||||
$passrank = checkWorst500List($new);
|
||||
$passrank = checkWorst500List($_POST['password']);
|
||||
if ($passrank !== FALSE) {
|
||||
showHTML($Strings->get("That password is one of the most popular and insecure ever, make a better one.", false));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user