adding mandatory fields to the account creation form, Fixes #132
This commit is contained in:
parent
a320c061fe
commit
cd310b355a
|
@ -1,15 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
$Id: adm_add.php,v 1.9 2006/01/24 05:03:30 joe Exp $
|
adm_add.php
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
AlternC - Web Hosting System
|
AlternC - Web Hosting System
|
||||||
Copyright (C) 2006 Le r<EFBFBD>seau Koumbit Inc.
|
Copyright (C) 2002-2017 by the AlternC Development Team.
|
||||||
http://koumbit.org/
|
https://alternc.com/
|
||||||
Copyright (C) 2002 by the AlternC Development Team.
|
|
||||||
http://alternc.org/
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
Based on:
|
|
||||||
Valentin Lacambre's web hosting softwares: http://altern.org/
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
LICENSE
|
LICENSE
|
||||||
|
|
||||||
|
@ -26,7 +21,7 @@
|
||||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
Original Author of file: Benjamin Sonntag
|
Original Author of file: Benjamin Sonntag
|
||||||
Purpose of file: Member managment
|
Purpose of file: new Member managment
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
require_once("../class/config.php");
|
require_once("../class/config.php");
|
||||||
|
@ -61,20 +56,17 @@ if (isset($error) && $error) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="adm_doadd.php" id="main" name="main" autocomplete="off">
|
<form method="post" action="adm_doadd.php" id="main" name="main" autocomplete="off">
|
||||||
<?php csrf_get(); ?>
|
<?php csrf_get(); ?>
|
||||||
<!-- honeypot fields -->
|
|
||||||
<input type="text" style="display: none" id="fakeUsername" name="fakeUsername" value="" />
|
|
||||||
<input type="password" style="display: none" id="fakePassword" name="fakePassword" value="" />
|
|
||||||
|
|
||||||
<table class="tedit">
|
<table class="tedit">
|
||||||
<tr><th><label for="login"><?php __("Username"); ?></label></th><td>
|
<tr><th><label for="login"><?php __("Username"); ?></label><span class="mandatory">*</span></th><td>
|
||||||
<input type="text" class="int" name="login" id="login" value="<?php ehe($login); ?>" size="20" maxlength="16" />
|
<input type="text" class="int" name="login" id="login" autocomplete="off" value="<?php ehe($login); ?>" size="20" maxlength="16" />
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="pass"><?php __("Initial password"); ?></label></th>
|
<th><label for="pass"><?php __("Initial password"); ?></label><span class="mandatory">*</span></th>
|
||||||
<td><input type="password" id="pass" name="pass" autocomplete="off" class="int" value="<?php ehe($pass); ?>" size="20" maxlength="64" /><?php display_div_generate_password(DEFAULT_PASS_SIZE,"#pass","#passconf"); ?></td>
|
<td><input type="password" id="pass" name="pass" autocomplete="off" class="int" value="<?php ehe($pass); ?>" size="20" maxlength="64" /><?php display_div_generate_password(DEFAULT_PASS_SIZE,"#pass","#passconf"); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="passconf"><?php __("Confirm password"); ?></label></th>
|
<th><label for="passconf"><?php __("Confirm password"); ?></label><span class="mandatory">*</span></th>
|
||||||
<td><input type="password" id="passconf" name="passconf" autocomplete="off" class="int" value="<?php ehe($passconf); ?>" size="20" maxlength="64" /></td>
|
<td><input type="password" id="passconf" name="passconf" autocomplete="off" class="int" value="<?php ehe($passconf); ?>" size="20" maxlength="64" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -93,7 +85,7 @@ if (isset($error) && $error) {
|
||||||
<td><input class="int" type="text" id="nom" name="nom" value="<?php ehe($nom); ?>" size="16" maxlength="128" /> / <input type="text" name="prenom" id="prenom" value="<?php ehe($prenom); ?>" class="int" size="16" maxlength="128" /></td>
|
<td><input class="int" type="text" id="nom" name="nom" value="<?php ehe($nom); ?>" size="16" maxlength="128" /> / <input type="text" name="prenom" id="prenom" value="<?php ehe($prenom); ?>" class="int" size="16" maxlength="128" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="nmail"><?php __("Email address"); ?></label></th>
|
<th><label for="nmail"><?php __("Email address"); ?></label><span class="mandatory">*</span></th>
|
||||||
<td><input type="text" name="nmail" id="nmail" class="int" value="<?php ehe($nmail); ?>" size="30" maxlength="128" /></td>
|
<td><input type="text" name="nmail" id="nmail" class="int" value="<?php ehe($nmail); ?>" size="30" maxlength="128" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -107,7 +99,7 @@ if (isset($error) && $error) {
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<?php
|
<?php
|
||||||
__("Wich database server for this user ?");
|
__("Associate this new user to this database server:");
|
||||||
echo "<br/>";
|
echo "<br/>";
|
||||||
echo "<i>"._("Warning: you can't change it after the creation of the user.")."</i>";
|
echo "<i>"._("Warning: you can't change it after the creation of the user.")."</i>";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
|
adm_doadd.php
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
AlternC - Web Hosting System
|
AlternC - Web Hosting System
|
||||||
Copyright (C) 2000-2012 by the AlternC Development Team.
|
Copyright (C) 2002-2017 by the AlternC Development Team.
|
||||||
https://alternc.org/
|
https://alternc.com/
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
LICENSE
|
LICENSE
|
||||||
|
|
||||||
|
@ -19,6 +20,9 @@
|
||||||
|
|
||||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
Original Author of file: Benjamin Sonntag
|
||||||
|
Purpose of file: validate and create a new member
|
||||||
|
----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
require_once("../class/config.php");
|
require_once("../class/config.php");
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,28 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
----------------------------------------------------------------------
|
mem_admin.php
|
||||||
AlternC - Web Hosting System
|
----------------------------------------------------------------------
|
||||||
Copyright (C) 2006 Le r<EFBFBD>seau Koumbit Inc.
|
AlternC - Web Hosting System
|
||||||
http://koumbit.org/
|
Copyright (C) 2002-2017 by the AlternC Development Team.
|
||||||
Copyright (C) 2002 by the AlternC Development Team.
|
https://alternc.com/
|
||||||
http://alternc.org/
|
----------------------------------------------------------------------
|
||||||
----------------------------------------------------------------------
|
LICENSE
|
||||||
LICENSE
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License (GPL)
|
modify it under the terms of the GNU General Public License (GPL)
|
||||||
as published by the Free Software Foundation; either version 2
|
as published by the Free Software Foundation; either version 2
|
||||||
of the License, or (at your option) any later version.
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
Original Author of file: Benjamin Sonntag
|
Original Author of file: Benjamin Sonntag
|
||||||
Purpose of file: Show the member list
|
Purpose of file: Show the member list
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
require_once("../class/config.php");
|
require_once("../class/config.php");
|
||||||
include_once("head.php");
|
include_once("head.php");
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
$Id: mem_admin.php,v 1.2 2003/06/10 08:18:26 root Exp $
|
mem_admin.php
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
AlternC - Web Hosting System
|
AlternC - Web Hosting System
|
||||||
Copyright (C) 2002 by the AlternC Development Team.
|
Copyright (C) 2002-2017 by the AlternC Development Team.
|
||||||
http://alternc.org/
|
https://alternc.com/
|
||||||
----------------------------------------------------------------------
|
|
||||||
Based on:
|
|
||||||
Valentin Lacambre's web hosting softwares: http://altern.org/
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
LICENSE
|
LICENSE
|
||||||
|
|
||||||
|
|
|
@ -379,6 +379,14 @@ img {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mandatory {
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: small;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
.code {
|
.code {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: Courier New, Fixed;
|
font-family: Courier New, Fixed;
|
||||||
|
|
|
@ -587,12 +587,12 @@ class m_admin {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (($login == "") || ($pass == "")) {
|
if (($login == "") || ($pass == "")) {
|
||||||
$err->raise("admin", _("All fields are mandatory"));
|
$err->raise("admin", _("Please fill all mandatory fields"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!$force) {
|
if (!$force) {
|
||||||
if ($mail == "") {
|
if ($mail == "") {
|
||||||
$err->raise("admin", _("All fields are mandatory"));
|
$err->raise("admin", _("Please fill all mandatory fields"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//@todo remove cf functions.php
|
//@todo remove cf functions.php
|
||||||
|
@ -641,17 +641,10 @@ class m_admin {
|
||||||
|
|
||||||
// Triggering hooks
|
// Triggering hooks
|
||||||
$mem->su($uid);
|
$mem->su($uid);
|
||||||
// TODO: old hook method FIXME: when unused remove this
|
|
||||||
/*
|
|
||||||
foreach($classes as $c) {
|
|
||||||
if (method_exists($GLOBALS[$c],"alternc_add_member")) {
|
|
||||||
$GLOBALS[$c]->alternc_add_member();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
$hooks->invoke("alternc_add_member");
|
$hooks->invoke("alternc_add_member");
|
||||||
// New hook way
|
// New hook way
|
||||||
$hooks->invoke("hook_admin_add_member", array(), array('quota')); // First !!! The quota !!! Etherway, we can't be sure to be able to create all
|
$hooks->invoke("hook_admin_add_member", array(), array('quota')); // First !!! The quota !!! Eitherway, we can't be sure to be able to create all
|
||||||
$hooks->invoke("hook_admin_add_member");
|
$hooks->invoke("hook_admin_add_member");
|
||||||
$mem->unsu();
|
$mem->unsu();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue