Changed register form + tried getting messages passed
This commit is contained in:
parent
55acd2aab2
commit
bcc19a09d4
5 changed files with 76 additions and 117 deletions
|
@ -27,13 +27,13 @@ class Users{
|
||||||
'status' => 1,
|
'status' => 1,
|
||||||
'access' => REQUEST_TIME
|
'access' => REQUEST_TIME
|
||||||
);
|
);
|
||||||
user_save( NULL, $edit );
|
//user_save( NULL, $edit );
|
||||||
header( 'Location: email_sent.php' );
|
header( 'Location: email_sent.php' );
|
||||||
exit;
|
exit;
|
||||||
}else{
|
}else{
|
||||||
$pageElements = array(
|
$pageElements = array(
|
||||||
'GAME_NAME' => variable_get( 'ryzommanage_game-name', '' ),
|
//'GAME_NAME' => variable_get( 'ryzommanage_game-name', '' ),
|
||||||
'WELCOME_MESSAGE' => variable_get( 'ryzommanage_register-welcome', '' ),
|
//'WELCOME_MESSAGE' => variable_get( 'ryzommanage_register-welcome', '' ),
|
||||||
'USERNAME' => $user,
|
'USERNAME' => $user,
|
||||||
'PASSWORD' => $pass,
|
'PASSWORD' => $pass,
|
||||||
'CPASSWORD' => $cpass,
|
'CPASSWORD' => $cpass,
|
||||||
|
|
|
@ -7,18 +7,21 @@
|
||||||
|
|
||||||
[register]
|
[register]
|
||||||
title = "RYZOM CORE INGAME REGISTRATION"
|
title = "RYZOM CORE INGAME REGISTRATION"
|
||||||
welcome_message = "Welcome! Please fill in the following fields to get your new Ryzom Core account:"
|
welcome_message = "Welcome! Please fill in the following fields to get your new Ryzom Core account"
|
||||||
|
|
||||||
username_tag = "Desired Username:"
|
username_tag = "Desired Username"
|
||||||
username_tooltip = "5-12 lower-case characters and numbers. The login (username) you create here will be your login name. The name of your game characters will be chosen later on."
|
username_tooltip = "5-12 lower-case characters and numbers. The login (username) you create here will be your login name. The name of your game characters will be chosen later on."
|
||||||
|
|
||||||
password_tag = "Desired Password:"
|
password_tag = "Desired Password"
|
||||||
|
password_tooltip = "Pick a hard to guess password (5-20 characters)."
|
||||||
password_message = "Password must be 5-20 characters."
|
password_message = "Password must be 5-20 characters."
|
||||||
|
|
||||||
cpassword_tag = "Confirm Password:"
|
cpassword_tag = "Confirm Password"
|
||||||
|
cpassword_tooltip = "Retype your Password"
|
||||||
cpassword_message = "Retype your Password"
|
cpassword_message = "Retype your Password"
|
||||||
|
|
||||||
email_tag = "Email Address (to which a confirmation email will be sent):"
|
email_tag = "Email Address"
|
||||||
|
email_tooltip = "Email Address to which a confirmation email will be sent."
|
||||||
email_message = "Please verify that the e-mail address you enter here is valid and will remain valid in the future. It will only be used to manage your Ryzom Core account."
|
email_message = "Please verify that the e-mail address you enter here is valid and will remain valid in the future. It will only be used to manage your Ryzom Core account."
|
||||||
|
|
||||||
tac_tag = "YES, I agree to the terms of service."
|
tac_tag = "YES, I agree to the terms of service."
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
function add_user(){
|
require( '../../../ams_lib/libinclude.php' );
|
||||||
|
|
||||||
|
|
||||||
|
function add_user(){
|
||||||
// add user locally here
|
// add user locally here
|
||||||
$return = users :: add_user();
|
$return = users :: add_user();
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,6 +133,8 @@
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{block name=content}{/block}
|
{block name=content}{/block}
|
||||||
|
|
||||||
|
|
||||||
{if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"}
|
{if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"}
|
||||||
</div><!--/#content.span10-->
|
</div><!--/#content.span10-->
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -12,119 +12,71 @@
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
{$welcome_message}
|
{$welcome_message}
|
||||||
</div>
|
</div>
|
||||||
|
<form id="signup" class="form-vertical" method="post" action="users::add_user()">
|
||||||
|
<legend>Register Account</legend>
|
||||||
<form name="Page1"method="post">
|
|
||||||
<table>
|
<div class="control-group">
|
||||||
<tr>
|
<label class="control-label">Username</label>
|
||||||
<td width="33%" {if isset($USERNAME_ERROR) && $USERNAME_ERROR eq "TRUE"}class="error"{/if} id="caption-Username">{$username_tag} </td>
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
<td width="25%">
|
<span class="add-on"><i class="icon-user"></i></span>
|
||||||
<input type="text"
|
<input type="text" class="input-xlarge" id="Username" name="Username" placeholder="Username">
|
||||||
name="Username"
|
</div>
|
||||||
value="{if isset($Username)}{$Username}{/if}"
|
</div>
|
||||||
maxlength="12"
|
|
||||||
onfocus=
|
|
||||||
"javascript:showTooltip('{$username_tooltip}', this);" />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td id="comment-Username" {if isset($USERNAME_ERROR) && $USERNAME_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($Username)}{$Username}{/if}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td width="33%" {if isset($PASSWORD_ERROR) && $PASSWORD_ERROR eq "TRUE"}class="error"{/if} id="caption-Password">{$password_tag}</td>
|
|
||||||
|
|
||||||
<td width="25%">
|
|
||||||
<input type="password"
|
|
||||||
name="Password"
|
|
||||||
value=""
|
|
||||||
maxlength="20"
|
|
||||||
onkeyup=
|
|
||||||
"testPassword(document.Page1.Password.value, 'comment-Password')"
|
|
||||||
onfocus="javascript:showTooltip('{$password_message}', this);" />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td id="comment-Password" {if isset($PASSWORD_ERROR) && $PASSWORD_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($PASSWORD_ERROR) && $PASSWORD_ERROR eq "TRUE"}{$Password}{/if}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td width="33%" {if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}class="error"{/if} id="caption-ConfirmPass">{$cpassword_tag}</td>
|
|
||||||
|
|
||||||
<td width="25%"><input type="password"
|
|
||||||
name="ConfirmPass"
|
|
||||||
value=""
|
|
||||||
maxlength="20"
|
|
||||||
onfocus="javascript:showTooltip('{$cpassword_message}', this);" />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td id="comment-ConfirmPass" {if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}{$ConfirmPass}{/if}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td width="33%" {if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}class="error"{/if} id="caption-Email">{$email_tag}</td>
|
|
||||||
|
|
||||||
<td width="25%">
|
|
||||||
<input type="text"
|
|
||||||
name="Email"
|
|
||||||
value=""
|
|
||||||
maxlength="255"
|
|
||||||
onfocus=
|
|
||||||
"javascript:showTooltip('{$email_message}', this);" />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td id="comment-Email" {if isset($EMAIL_ERROR) && $EMAIL_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($EMAIL_ERROR) && $EMAIL_ERROR eq "TRUE"}{$Email}{/if}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td width=
|
|
||||||
"33%" {if isset($TAC_ERROR) && $TAC_ERROR eq "TRUE"}class="error"{/if}
|
|
||||||
colspan="2"><input type="checkbox"
|
|
||||||
name="TaC"
|
|
||||||
value="1"
|
|
||||||
onfocus="javascript:showTooltip('', this);" /><span id=
|
|
||||||
"caption-TaC">{$tac_tag}</span></td>
|
|
||||||
<td id="comment-TaC" {if isset($TAC_ERROR) && $TAC_ERROR eq "TRUE"}class="error"{/if} width="42%"><div class="alert alert-danger">{$tac_message}</div></td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="c1">
|
|
||||||
<input type="submit"
|
|
||||||
name="Submit"
|
|
||||||
value="Continue" />
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="function" value="add_user">
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div id="signupTooltip"
|
|
||||||
class="c2"
|
|
||||||
inset=""></div>
|
|
||||||
|
|
||||||
<div id="tooltip-Username">
|
|
||||||
<div class="alert alert-danger">
|
|
||||||
{$username_tooltip}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tooltip-Password">
|
|
||||||
<div class="alert alert-danger">
|
|
||||||
{$password_message}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tooltip-ConfirmPass">
|
|
||||||
<div class="alert alert-danger">
|
|
||||||
{$cpassword_message}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tooltip-Email">
|
<div class="control-group">
|
||||||
<div class="alert alert-danger">
|
<label class="control-label">Password</label>
|
||||||
{$email_message}
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
|
<span class="add-on"><i class="icon-lock"></i></span>
|
||||||
|
<input type="Password" id="Password" class="input-xlarge" name="Password" placeholder="Password">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="control-group">
|
||||||
|
<label class="control-label">Confirm Password</label>
|
||||||
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
|
<span class="add-on"><i class="icon-lock"></i></span>
|
||||||
|
<input type="Password" id="ConfirmPass" class="input-xlarge" name="ConfirmPass" placeholder="Re-enter Password">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Email</label>
|
||||||
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
|
<span class="add-on"><i class="icon-envelope"></i></span>
|
||||||
|
<input type="text" class="input-xlarge" id="Email" name="Email" placeholder="Email">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
|
<input type="checkbox" class="input-xlarge" id="TaC" name="TaC" placeholder="Email">{$tac_tag}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label"></label>
|
||||||
|
<div class="controls">
|
||||||
|
<button type="submit" class="btn btn-large btn-primary" >Create My Account</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
</div><!--/span-->
|
</div><!--/span-->
|
||||||
</div><!--/row-->
|
</div><!--/row-->
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue