<script type="text/javascript">
function showOwner (ownerbox, box, regform) {
var vis = (box.checked) ? "block" : "none";
var vis2 = (box.checked) ? "none" : "block";
document.getElementById(ownerbox).style.display = vis;
document.getElementById(regform).style.display = vis2;
}
function checkPass(){
//Store the password field objects into variables ...
var password1 = document.getElementById('join_password');
var confirm_password = document.getElementById('join_confirm_password');
var message = document.getElementById('confirmMessage');
var goodColor = "#66cc66";
var badColor = "#ff6666";
if(password1.value == confirm_password.value){
confirm_password.style.backgroundColor = goodColor;
message.style.color = goodColor;
message.innerHTML = "{$lng->join_password_match}"
}else{
confirm_password.style.backgroundColor = badColor;
message.style.color = badColor;
//message.innerHTML = '<img src="skins/default/img/icons/delete.png" alt="{$lng->join_password_match_error}">'
message.innerHTML = '{$lng->join_password_match_error}'
}
}
</script>
<script type="text/javascript">
$( document ).ready(function() {
// validate signup form on keyup and submit
$("#signupForm").validate({
rules: {
u: "required",
url: "required",
title: "required",
username: {
required: true,
minlength: 2
},
password: {
required: true,
minlength: 3
},
confirm_password: {
required: true,
minlength: 3,
equalTo: "#join_password"
},
email: {
required: true,
email: true
}
},
messages: {
u: " *",
url: " *",
title: " *",
username: {
required: " *",
minlength: " *"
},
password: {
required: " *",
minlength: ' {$lng->join_password_match_error}'
},
confirm_password: {
required: " *",
minlength: " *",
equalTo: ""
},
email: "*"
}
});
});
</script>
<style type="text/css">
.error {
color:red;
display: inline;
}
</style>
<fieldset>
<legend><b>Já tem uma conta de Membro?</b></legend>
{$lng->g_already} <input type="checkbox" id="owner" name="owner" onclick="showOwner('ownerbox', this, 'regform')"/>
<div id="ownerbox" style="display: none;">
<form action="{$list_url}/index.php?a=user_cpl" method="post">
<label>{$lng->g_username}</label>
<input name="u" size="20" type="text" class="form-control"/>
<label>{$lng->g_password}</label>
<input name="password" size="20" type="password" class="form-control"><br/>
<label><input type="checkbox" name="keep_alive" id="keep_alive" /> {$lng->remember_me}</label>
<button class="btn btn-primary" name="submit" type="submit">{$lng->user_cp_login}</button> <a href="{$list_url}/index.php?a=lost_pw" class="btn btn-secondary">{$lng->lost_pw_set_new}</a>
</form>
</div>
</fieldset>
<p class="{$error_style_top}">{$error_top}</p>
<form action="{$list_url}/{$url_helper_a}join{$url_tail}" method="post" name="join_form" id="signupForm">
<div id="regform" style="display: block">
<fieldset>
<legend>{$lng->join_user}</legend>
<div class="row">
<div class="col">
<div class="form-group">
<label for="join_username">{$lng->g_username}</label>
<input type="text" name="u" size="20" value="{$username}" class="form-control {$error_style_username}"/>
{$error_username}
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="form-group">
<label for="join_password">{$lng->g_password}</label>
<input type="password" name="password" onkeyup="checkPass(); return false;" id="join_password" class="form-control {$error_style_password}"/>
</div>
</div>
<div class="col">
<div class="form-group">
<label for="join_confirm_password">{$lng->join_confirm_password}</label>
<input type="password" name="confirm_password" class="form-control {$error_style_password}" onkeyup="checkPass(); return false;" id="join_confirm_password" />
<span id="confirmMessage" class="confirmMessage"></span>
{$error_password}
</div>
</div>
</div>
{$join_user_extra}
</fieldset>
<fieldset>
<legend>{$lng->join_website}</legend>
<div class="row">
<div class="col">
<div class="form-group">
<label for="join_url">{$lng->g_url}</label>
<input type="text" name="url" value="{$url}" id="join_url" class="form-control {$error_style_url}" placeholder="http://" />
{$error_url}
</div>
<div class="form-group">
<label for="join_title">{$lng->g_title}</label>
<input type="text" name="title" value="{$title}" id="join_title" class="form-control {$error_style_title}"/>
{$error_title}
</div>
<div class="form-group">
<label for="join_description">{$lng->g_description}</label>
<textarea cols="50" rows="5" name="description" id="join_description" class="form-control">{$description}</textarea>
</div>
<div class="form-group">
<label for="join_category">{$lng->g_category}</label>
{$categories_menu}
</div>
<div class="form-group">
<label for="join_email">{$lng->g_email}</label>
<input type="text" name="email" value="{$email}" id="join_email" class="form-control {$error_style_email}" />
{$error_email}
</div>
</div>
<div class="col">
{$join_captcha}
{$join_recaptcha}
{$join_adscaptcha}
{$join_question}
{$join_security_extra}
{$form_acf_rgpd_novomembro}
<div id="privacy-link-container">
<a href="http://topsites.avespt.com/?a=page&id=rgpd">Ler a PolÃtica de Privacidade</a>
</div>
</div>
</div>
<div>
<div id="capbag"> </div>
<div id="capops"> </div>
</div>
<div id="submitButtonDiv"><br>
<button class="btn btn-primary" name="submit" type="submit">{$lng->join_header}</button>
</div>
</fieldset>
</div>
</form>