Add new config variable SERVICE_NAME
diff --git a/templates/email.php b/templates/email.php
index 2516d25..41c1eae 100644
--- a/templates/email.php
+++ b/templates/email.php
@@ -1,29 +1,66 @@
<?php
$MAIL_TEMPLATE = (object)[
- "subject" => "Confirm your email",
+ "subject" => "[" . $SERVICE_NAME . "] Confirm your email address",
"text" => "To complete your registration please paste this to your browser: {{url}}",
- "html" => "<html><body>
- <h2>Almost there! Click on the link bellow to confirm your email address</h2>
- <a href='{{url}}'>Confirm</a>
+ "html" => "<html><body>
+ <p>Almost there! Click on the confirm button below to confirm your email address and to complete your " . $SERVICE_NAME . " registration</p>
+ <a style='display: inline-block; outline: 0; cursor: pointer;
+ padding: 5px 16px;
+ font-size: 14px;
+ font-weight: bold;
+ text-decoration: none;
+ line-height: 20px;
+ vertical-align: middle;
+ border: 1px solid;
+ border-radius: 6px;
+ color: #ffffff;
+ background-color: #2ea44f;
+ border-color: #1b1f2326;
+ box-shadow: rgba(27, 31, 35, 0.04) 0px 1px 0px 0px, rgba(255, 255, 255, 0.25) 0px 1px 0px 0px inset;
+ transition: 0.2s cubic-bezier(0.3, 0, 0.5, 1);
+ transition-property: color, background-color, border-color;
+ :hover {
+ background-color: #2c974b;
+ border-color: #1b1f2326;
+ transition-duration: 0.1s;
+ }
+ ' href='{{url}}'>Confirm " . $SERVICE_NAME . " registration</a>
</body></html>"
];
$RECOVERY_EMAIL_TEMPLATE = (object)[
- "subject" => "Change your password!",
- "text" => "Seems you requested a password change. If that wasn't you please ignore this message. Otherwise go to this url to change your password: {{url}}",
- "html" => "<html><body>
- <h3>Seems you requested a password change. If that wasn't you please ignore this message. Otherwise go to this url to change your password</h3>
- <a href='{{url}}'>Click here</a> to change your password
+ "subject" => "[" . $SERVICE_NAME . "] Reset password for your " . $SERVICE_NAME . " account",
+ "text" => "Seems you requested a password reset. If that wasn't you please ignore this message. Otherwise go to this url to change your password: {{url}}",
+ "html" => "<html><body><h3>Forgot your " . $SERVICE_NAME . " password?</h3>
+ <p>It seems that you requested a password reset. If that wasn't you please ignore this message. Otherwise click the button below to reset your password</p>
+ <a style='
+ display: inline-block;
+ outline: none;
+ cursor: pointer;
+ font-weight: bold;
+ text-decoration: none;
+ border-radius: 3px;
+ padding: 12px 24px;
+ border: 0;
+ color: #fff;
+ background: #ff5000;
+ line-height: 1.15;
+ font-size: 14px;
+ :hover {
+ transition: all .1s ease;
+ box-shadow: 0 0 0 0 #fff, 0 0 0 3px #1de9b6;
+ }
+ ' href='{{url}}'>Reset your " . $SERVICE_NAME . " password</a>
</body></html>"
];
// Add the support email there
$PASSWORD_CHANGED_EMAIL_TEMPLATE = (object)[
- "subject" => "Your password was changed",
+ "subject" => "[" . $SERVICE_NAME . "] Your " . $SERVICE_NAME . " password was changed",
"text" => "Your password was changed successfully. If this wasn't you please contact support",
"html" => "<html><body>
- <h3>Your password was changed successfully. If this wasn't you please contact support</h3>
+ <h3>" . $SERVICE_NAME . " password changed</h3><p>Your password was changed successfully. If this wasn't you please contact support.</p>
</body></html>"
];
diff --git a/templates/header.htm b/templates/header.htm
index 1d450df..23acf05 100644
--- a/templates/header.htm
+++ b/templates/header.htm
@@ -5,7 +5,7 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <title>Sign Up</title>
+ <title>Sign up for <?php echo $SERVICE_NAME; ?></title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">
<link rel="stylesheet" href="<?php echo $BASE_URL?>/static/main.css" >
diff --git a/templates/recover_email_form.htm b/templates/recover_email_form.htm
index 0f10ae8..393d166 100644
--- a/templates/recover_email_form.htm
+++ b/templates/recover_email_form.htm
@@ -1,4 +1,4 @@
-<h1>Change your password</h1>
+<h1>Reset your <?php echo $SERVICE_NAME;?> password</h1>
<form action="" method="POST">
<!-- Email input -->
diff --git a/templates/recover_new_password_form.htm b/templates/recover_new_password_form.htm
index 5eca37c..95dbe7e 100644
--- a/templates/recover_new_password_form.htm
+++ b/templates/recover_new_password_form.htm
@@ -1,9 +1,9 @@
-<h2>Renewing: <?php echo $_SESSION['email_change'];?></h2>
+<h2>Renewing <?php echo "$SERVICE_NAME password for " . $_SESSION['email_change'];?></h2>
<form action="" method="POST">
<!-- Password input -->
<div class="form-outline mb-3">
- <label class="form-label font-weight-bold" for="form3Example4">Password*</label>
+ <label class="form-label font-weight-bold" for="form3Example4">New password*</label>
<input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characters" name="password"
type="password" id="form3Example4"
class="form-control <?php if(isset($error) && $error && !isset($_POST['password'])){echo 'border-danger';}?>"
@@ -12,7 +12,7 @@
</div>
<!-- Password input -->
<div class="form-outline mb-3">
- <label class="form-label font-weight-bold" for="form3Example4">Confirm your Password*</label>
+ <label class="form-label font-weight-bold" for="form3Example4">Confirm your new password*</label>
<input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characters" name="password_confirm"
type="password" id="form3Example5"
class="form-control <?php if(isset($error) && $error && !isset($_POST['password_confirm'])){echo 'border-danger';}?>"
diff --git a/templates/register.htm b/templates/register.htm
index ce2a061..ef869ad 100644
--- a/templates/register.htm
+++ b/templates/register.htm
@@ -1,4 +1,4 @@
-<h1>Sign up Now!</h1>
+<h1>Sign up for <?php echo $SERVICE_NAME;?></h1>
<form action="" method="POST">
<!-- Username input -->