Enhance product links and translations; update styles and add registration modal
- Updated product links in rma.php and rma_manage.php to include icons for better UX. - Improved German, Spanish, Dutch, Polish, Portuguese, and US translations with new phrases for software licenses and user information prompts. - Refactored CSS to remove redundant styles and added new styles for a registration modal, enhancing the overall UI. - Introduced JavaScript variables for user information prompts in softwaretool.php for better localization support.
This commit is contained in:
799
register.php
799
register.php
@@ -10,8 +10,13 @@ $lang = in_array($lang, $supportedLanguages) ? $lang : 'US';
|
||||
//INCLUDE THE TRANSLATION
|
||||
include_once './settings/translations/translations_'.$lang.'.php';
|
||||
|
||||
//=========================================
|
||||
//GET DOMAIN FOR CORRECT STYLING AND SETTINGS
|
||||
//=========================================
|
||||
$domain = getDomainName($_SERVER['SERVER_NAME']);
|
||||
$custom_css = (file_exists(dirname(__FILE__).'/custom/'.$domain.'/style/'.$domain.'_login.css') ? './custom/'.$domain.'/style/'.$domain.'_login.css' : './style/admin_login.css');
|
||||
|
||||
// Default input values
|
||||
$display ='';
|
||||
$register = [
|
||||
'sn' => '',
|
||||
'organization' => '',
|
||||
@@ -50,7 +55,6 @@ if (isset($_POST['register'])){
|
||||
$message_return = ioServer('/v1/application/register', $payload);
|
||||
if (!empty($message_return)){
|
||||
$message_return = decode_payload($message_return);
|
||||
$display = 'display:none;';
|
||||
}
|
||||
else{
|
||||
$message_return = '400';
|
||||
@@ -58,264 +62,589 @@ if (isset($_POST['register'])){
|
||||
}
|
||||
}
|
||||
echo '
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1">
|
||||
<title>'.$register_title.'</title>
|
||||
<link rel="icon" type="image/png" href="'.icon_image.'">
|
||||
<style>
|
||||
<link rel="shortcut icon" href="'.icon_image.'" type="image/x-icon" />
|
||||
<style>
|
||||
:root {
|
||||
--color-white: #FFFFFF;
|
||||
--color-light-green: #2FAC66;
|
||||
--color-green: #005655c2;
|
||||
--color-red: #a75151;
|
||||
--text-color: #333333;
|
||||
--error-background: #f3c3c3;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "segoe ui", roboto, oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
}
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: "Open Sans", Helvetica, sans-serif;
|
||||
accent-color: var(--color-green);
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
background-color: var(--color-white);
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
max-width: 1200px;
|
||||
height: calc(100vh - 40px);
|
||||
background-color: var(--color-white);
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.top-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
padding: 30px 40px 20px 40px;
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.logo {
|
||||
background-image: url(/assets/images/TSS-logo3.png);
|
||||
background-repeat: no-repeat;
|
||||
opacity: inherit;
|
||||
width: 85px;
|
||||
height: 120px;
|
||||
flex-shrink: 0;
|
||||
-webkit-filter: drop-shadow(5px 5px 5px #222);
|
||||
filter: drop-shadow(5px 5px 5px #222);
|
||||
}
|
||||
|
||||
.login-form {
|
||||
width: 45%;
|
||||
padding: 40px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.login-visual {
|
||||
width: 55%;
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
padding: 40px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.header {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-size: 24px;
|
||||
margin: 0;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.back-to-login {
|
||||
margin-left: auto;
|
||||
padding: 8px 16px;
|
||||
background-color: transparent;
|
||||
color: var(--text-color);
|
||||
text-decoration: none;
|
||||
border: 1px solid var(--text-color);
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.back-to-login:hover {
|
||||
background-color: var(--text-color);
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
.left-registration {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.left-registration .step-section {
|
||||
padding: 25px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.right-registration {
|
||||
width: 100%;
|
||||
padding: 30px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.step-section {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.step-section h4 {
|
||||
color: #333;
|
||||
margin-bottom: 12px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.right-registration .step-section h4 {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.step-section img {
|
||||
width: 100%;
|
||||
max-width: 180px;
|
||||
display: block;
|
||||
margin: 15px auto;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
color: #333;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.form-field {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 12px;
|
||||
background-color: #fff;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 10px 20px;
|
||||
background-color: var(--color-light-green);
|
||||
color: var(--color-white);
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background-color: var(--color-green);
|
||||
}
|
||||
|
||||
body {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
color: #555555;
|
||||
background-color: #FFFFFF;
|
||||
margin: 0;
|
||||
padding-bottom: 100px;
|
||||
/* Same height as footer */
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5 {
|
||||
color: #fff;
|
||||
small {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.sn-fields-container {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.sn-field-row {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.sn-field-row input {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.btn-remove {
|
||||
padding: 10px 15px;
|
||||
background-color: var(--color-red);
|
||||
color: var(--color-white);
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
min-width: 40px;
|
||||
}
|
||||
|
||||
.btn-remove:hover {
|
||||
background-color: #8b3a3a;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
z-index: 1000;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
max-width: 600px;
|
||||
margin: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0,0,0,0.3);
|
||||
position: relative;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
text-align: center;
|
||||
padding: 30px 30px 20px 30px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 25px 30px;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
text-align: center;
|
||||
padding: 20px 30px 30px 30px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 20px;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.close:hover {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.success-icon {
|
||||
font-size: 64px;
|
||||
color: var(--color-light-green);
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.modal h2 {
|
||||
color: var(--color-light-green);
|
||||
margin-bottom: 10px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.modal h4 {
|
||||
color: #333;
|
||||
margin: 20px 0 10px 0;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.modal p {
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.modal small {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.collapsible-header {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 0;
|
||||
user-select: none;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
.collapsible-header:hover {
|
||||
background-color: #f8f9fa;
|
||||
margin: 0 -10px;
|
||||
padding: 10px 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.collapsible-indicator {
|
||||
color: var(--color-light-green);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.collapsible-indicator.active {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.collapsible-content {
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.3s ease;
|
||||
}
|
||||
|
||||
.collapsible-content.active {
|
||||
max-height: 500px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.trademark {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
color: var(--text-color);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.language-selector {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.language-selector select {
|
||||
margin-left: 10px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.login-container {
|
||||
height: auto;
|
||||
max-width: 1000px;
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
width: 1050px;
|
||||
margin: 0 auto;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
header {
|
||||
position: relative;
|
||||
border-bottom: 1px solid #EEEEEE;
|
||||
|
||||
.login-form, .login-visual {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
header .content-wrapper {
|
||||
display: flex;
|
||||
|
||||
.login-visual {
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
|
||||
main .myaccount h1 {
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
padding: 40px 0;
|
||||
font-size: 50px;
|
||||
|
||||
.trademark, .language-selector {
|
||||
position: static;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
main .myaccount {
|
||||
display: flex;
|
||||
flex-flow: wrap;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
.login-form, .login-visual {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
main .myaccount form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
main .myaccount h2 {
|
||||
width: 100%;
|
||||
font-weight: normal;
|
||||
|
||||
.header h1 {
|
||||
font-size: 20px;
|
||||
padding: 30px 0 20px 0;
|
||||
margin: 0 0 10px 0;
|
||||
border-bottom: 1px solid #EEEEEE;
|
||||
}
|
||||
|
||||
main .myaccount .login-register {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
margin-top: 40px;
|
||||
.right-registration {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
main .myaccount .login-register h1 {
|
||||
text-align: left;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
main .myaccount .login-register .login {
|
||||
width: 100%;
|
||||
border-right: 1px solid #f6f6f6;
|
||||
padding-right: 45px;
|
||||
}
|
||||
|
||||
main .myaccount .login-register .register {
|
||||
width: 100%;
|
||||
padding-left: 45px;
|
||||
}
|
||||
|
||||
main .myaccount .login-register .btn {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
text-decoration: none;
|
||||
background: #03337a;
|
||||
border: 0;
|
||||
color: #FFFFFF;
|
||||
padding: 11px 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background: #444954;
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
display: block;
|
||||
padding: 20px 0 10px 0;
|
||||
}
|
||||
|
||||
.form-field {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid #d5d5d5;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
footer {
|
||||
position: absolute;
|
||||
padding: 20px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
footer a {
|
||||
text-decoration: none;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
footer a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Responsive CSS below */
|
||||
@media screen and (max-width: 1050px) {
|
||||
.rhide {
|
||||
display: none;
|
||||
}
|
||||
.content-wrapper {
|
||||
width: 100%;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
main .checkout form, main .myaccount form {
|
||||
width: 100%;
|
||||
}
|
||||
main .myaccount .login-register {
|
||||
flex-flow: column;
|
||||
}
|
||||
main .myaccount .login-register .login {
|
||||
border-right: 0;
|
||||
padding: 10px;
|
||||
}
|
||||
main .myaccount .login-register .register {
|
||||
padding: 10px;
|
||||
}
|
||||
main .myaccount .menu {
|
||||
width: 100%;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="background-image:linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url(./assets/images/emergencyplug-auto-in-licht.jpg);
|
||||
background-position: center center;background-size: 100% 100%; min-height: 100vh;background-repeat: no-repeat;">
|
||||
<main style="color:#fff">
|
||||
<div class="myaccount content-wrapper">
|
||||
<h1>'.$register_title.'</h1>
|
||||
<div class="login-register">
|
||||
<div class="login">
|
||||
<h4>'.$register_1_find.'</h4>
|
||||
<img style="width: 80%;
|
||||
margin-top: -75px;
|
||||
margin-bottom: -40px;" src="./assets/images/EP_register.gif" alt="">
|
||||
|
||||
<h4>'.$register_2_enter.'</h4>
|
||||
<form action="" method="post">
|
||||
<label for="email" class="form-label">'.$register_2_label.' *</label>
|
||||
<input type="text" name="sn[]" id="sn" placeholder="'.$register_2_placeholder.'" style="margin-bottom:10px;" minlength="8" maxlength="8" required="" class="form-field">
|
||||
<button type="button" class="btn" onclick="addField(\'sn\',\'sn[]\');"> + </button><small>'.$register_2_add.'</small>
|
||||
|
||||
</div>
|
||||
<div class="register" style="'.$display.'">
|
||||
<h4>'.$register_3_register.'</h4>
|
||||
<label for="company" class="form-label">'.$register_3_name.' *</label>
|
||||
<input type="text" name="organization" placeholder="'.$register_3_name.'" value="'.$register['organization'].'" required="" class="form-field">
|
||||
<label for="email" class="form-label">'.$register_3_mail.' *</label>
|
||||
<input type="email" name="email" id="email" placeholder="info@example.com" value="'.$register['email'].'" required="" class="form-field">
|
||||
<label for="company" class="form-label">'.$register_3_phone.' *</label>
|
||||
<input type="text" name="phone" placeholder="'.$register_3_phone.'" value="'.$register['phone'].'" required="" class="form-field">
|
||||
<label for="city" class="form-label">'.$register_3_city.' *</label>
|
||||
<input type="text" name="city" placeholder="'.$register_3_city.'" value="'.$register['city'].'" required="" class="form-field">
|
||||
<label for="city" class="form-label">'.$register_3_country.' *</label>
|
||||
<input type="text" name="country" placeholder="'.$register_3_country.'" value="'.$register['country'].'" required="" class="form-field" style="margin-bottom: 20px;">
|
||||
<input type="checkbox" name="email_consent" checked required/>'.$register_3_email_consent.' <br>
|
||||
<input type="checkbox" name="terms_consent" required/>'.$register_3_term_consent_1.' <a href="" target="blank">'.$register_3_term_consent_2.'</a> *<br>
|
||||
|
||||
<input name="register" type="submit" value="'.$register_button.'" class="btn">
|
||||
</form>
|
||||
<br>
|
||||
<small>* '.$register_mandatory.'</small>
|
||||
</div>';
|
||||
|
||||
//IF MESSAGES ARE RETURN SHOW THEM
|
||||
if (!empty($message_return)){
|
||||
echo '
|
||||
<div class="register">
|
||||
<h4>'.$register_4_completed.'</h4>
|
||||
|
||||
<p>'.$register_message_4.' '.software_update_user.'/'.software_update_pw.'</b></p>
|
||||
<h4>'.$register_5_details.'</h4>';
|
||||
foreach($message_return as $return_message){
|
||||
echo'
|
||||
<p>'.$return_message.'"</p>
|
||||
';
|
||||
}
|
||||
|
||||
echo'
|
||||
<h4>'.$register_6_return.'</h4>
|
||||
<p> <a href="register.php" class="btn alt mar-right-2">'.$register_6_button.'</a><p>
|
||||
';
|
||||
|
||||
}
|
||||
<body>
|
||||
';
|
||||
|
||||
//Register view
|
||||
echo'
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<div class="login-container">
|
||||
<div class="top-header">
|
||||
<div class="logo"></div>
|
||||
<div class="header">
|
||||
<h1>'.$register_title.'</h1>
|
||||
</div>
|
||||
<a href="index.php" class="back-to-login">'.($button_back_to_login ?? 'Back to login').'</a>
|
||||
</div>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="login-form">
|
||||
<div class="left-registration">
|
||||
<div class="step-section">
|
||||
<h4>'.$register_1_find.'</h4>
|
||||
<img src="./assets/images/EP_register.gif" alt="Registration guide">
|
||||
</div>
|
||||
|
||||
<div class="step-section">
|
||||
<h4>'.$register_2_enter.'</h4>
|
||||
<form action="" method="post" id="regForm">
|
||||
<label for="sn" class="form-label">'.$register_2_label.' *</label>
|
||||
<div class="sn-fields-container" id="snFieldsContainer">
|
||||
<div class="sn-field-row">
|
||||
<input type="text" name="sn[]" id="sn" placeholder="'.$register_2_placeholder.'" minlength="8" maxlength="8" required="" class="form-field">
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-add" onclick="addField();">+</button><small> '.$register_2_add.'</small>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-visual">
|
||||
<div class="right-registration">
|
||||
<div class="step-section">
|
||||
<h4>'.$register_3_register.'</h4>
|
||||
<label for="organization" class="form-label">'.$register_3_name.' *</label>
|
||||
<input type="text" name="organization" form="regForm" placeholder="'.$register_3_name.'" value="'.$register['organization'].'" required="" class="form-field">
|
||||
|
||||
<label for="email" class="form-label">'.$register_3_mail.' *</label>
|
||||
<input type="email" name="email" form="regForm" id="email" placeholder="info@example.com" value="'.$register['email'].'" required="" class="form-field">
|
||||
|
||||
<label for="phone" class="form-label">'.$register_3_phone.' *</label>
|
||||
<input type="text" name="phone" form="regForm" placeholder="'.$register_3_phone.'" value="'.$register['phone'].'" required="" class="form-field">
|
||||
|
||||
<label for="city" class="form-label">'.$register_3_city.' *</label>
|
||||
<input type="text" name="city" form="regForm" placeholder="'.$register_3_city.'" value="'.$register['city'].'" required="" class="form-field">
|
||||
|
||||
<label for="country" class="form-label">'.$register_3_country.' *</label>
|
||||
<input type="text" name="country" form="regForm" placeholder="'.$register_3_country.'" value="'.$register['country'].'" required="" class="form-field">
|
||||
|
||||
<div style="margin-bottom: 15px;">
|
||||
<input type="checkbox" name="email_consent" form="regForm" checked required/>'.$register_3_email_consent.'<br>
|
||||
<input type="checkbox" name="terms_consent" form="regForm" required/>'.$register_3_term_consent_1.' <a href="" target="blank">'.$register_3_term_consent_2.'</a> *
|
||||
</div>
|
||||
|
||||
<input name="register" form="regForm" type="submit" value="'.$register_button.'" class="btn">
|
||||
<br><br>
|
||||
<small>* '.$register_mandatory.'</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
//IF MESSAGES ARE RETURN SHOW THEM IN MODAL
|
||||
if (!empty($message_return)){
|
||||
echo '
|
||||
<div id="successModal" class="modal" style="display: flex;">
|
||||
<div class="modal-content">
|
||||
<span class="close" onclick="closeModal()">×</span>
|
||||
<div class="modal-header">
|
||||
<div class="success-icon">✓</div>
|
||||
<h2>'.$register_4_completed.'</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>'.$register_message_4.' <strong>'.software_update_user.'/'.software_update_pw.'</strong></p>
|
||||
<div class="collapsible-header" onclick="toggleDetails()">
|
||||
'.$register_5_details.'
|
||||
<span class="collapsible-indicator" id="detailsIndicator">▼</span>
|
||||
</div>
|
||||
<div class="collapsible-content" id="detailsContent">';
|
||||
foreach($message_return as $return_message){
|
||||
echo'<p>'.$return_message.'</p>';
|
||||
}
|
||||
echo'
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="register.php" class="btn">'.$register_6_button.'</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
echo'
|
||||
</body>
|
||||
<script>
|
||||
function addField(id, name) {
|
||||
var x = document.createElement("INPUT");
|
||||
x.setAttribute("type", "text");
|
||||
x.setAttribute("name", name);
|
||||
x.setAttribute("value", "");
|
||||
x.setAttribute("placeholder", "'.$register_2_placeholder.'");
|
||||
x.setAttribute("class", "form-field");
|
||||
x.setAttribute("style", "margin-bottom:10px;");
|
||||
x.setAttribute("minlength", "8");
|
||||
x.setAttribute("maxlength", "8");
|
||||
x.setAttribute("required", "");
|
||||
var td_new = document.getElementById(id);
|
||||
td_new.parentNode.insertBefore(x, td_new.nextSibling);
|
||||
|
||||
function closeModal() {
|
||||
document.getElementById("successModal").style.display = "none";
|
||||
}
|
||||
|
||||
function toggleDetails() {
|
||||
var content = document.getElementById("detailsContent");
|
||||
var indicator = document.getElementById("detailsIndicator");
|
||||
|
||||
if (content.classList.contains("active")) {
|
||||
content.classList.remove("active");
|
||||
indicator.classList.remove("active");
|
||||
} else {
|
||||
content.classList.add("active");
|
||||
indicator.classList.add("active");
|
||||
}
|
||||
}
|
||||
|
||||
function addField() {
|
||||
var container = document.getElementById("snFieldsContainer");
|
||||
var fieldRow = document.createElement("div");
|
||||
fieldRow.className = "sn-field-row";
|
||||
|
||||
var input = document.createElement("INPUT");
|
||||
input.setAttribute("type", "text");
|
||||
input.setAttribute("name", "sn[]");
|
||||
input.setAttribute("value", "");
|
||||
input.setAttribute("placeholder", "'.$register_2_placeholder.'");
|
||||
input.setAttribute("class", "form-field");
|
||||
input.setAttribute("minlength", "8");
|
||||
input.setAttribute("maxlength", "8");
|
||||
input.setAttribute("required", "");
|
||||
|
||||
var removeBtn = document.createElement("button");
|
||||
removeBtn.setAttribute("type", "button");
|
||||
removeBtn.setAttribute("class", "btn-remove");
|
||||
removeBtn.innerHTML = "×";
|
||||
removeBtn.onclick = function() { removeField(this); };
|
||||
|
||||
fieldRow.appendChild(input);
|
||||
fieldRow.appendChild(removeBtn);
|
||||
container.appendChild(fieldRow);
|
||||
|
||||
// Focus on the new input
|
||||
input.focus();
|
||||
}
|
||||
|
||||
function removeField(btn) {
|
||||
var container = document.getElementById("snFieldsContainer");
|
||||
// Only allow removal if there is more than one field
|
||||
if (container.children.length > 1) {
|
||||
btn.parentElement.remove();
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById(\'language-selector\').addEventListener(\'change\', function() {
|
||||
if (this.value) {
|
||||
window.location.href = `register.php?language=${this.value}`;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
';
|
||||
|
||||
Reference in New Issue
Block a user