From cea82ae3b8dac190b55dcc0c09a9a2cde6e7de2d Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Fri, 28 Mar 2014 16:49:30 -0500 Subject: [PATCH] A few fixups for the registration content --- include/client/login.inc.php | 13 +++++++++++-- include/client/register.confirm.inc.php | 8 +++++--- include/client/register.confirmed.inc.php | 8 +++++--- .../i18n/en_US/templates/page/banner-client.yaml | 7 +++---- .../i18n/en_US/templates/page/pwreset-client.yaml | 2 +- .../i18n/en_US/templates/page/pwreset-staff.yaml | 2 +- .../en_US/templates/page/registration-staff.yaml | 2 +- include/staff/login.tpl.php | 2 +- 8 files changed, 28 insertions(+), 16 deletions(-) diff --git a/include/client/login.inc.php b/include/client/login.inc.php index 321668e24..fd1d7bc80 100644 --- a/include/client/login.inc.php +++ b/include/client/login.inc.php @@ -6,9 +6,18 @@ $passwd=Format::input($_POST['lpasswd']?:$_GET['t']); $content = Page::lookup(Page::getIdByType('banner-client')); +if ($content) { + list($title, $body) = $ost->replaceTemplateVariables( + array($content->getName(), $content->getBody())); +} else { + $title = 'Sign In'; + $body = 'To better serve you, we encourage our clients to register for + an account and verify the email address we have on record.'; +} + ?> -<h1><?php echo Format::display($content->getName()); ?></h1> -<p><?php echo Format::viewableImages($content->getBody()); ?></p> +<h1><?php echo Format::display($title); ?></h1> +<p><?php echo Format::display($body); ?></p> <form action="login.php" method="post" id="clientLogin"> <?php csrf_token(); ?> <div style="display:table-row"> diff --git a/include/client/register.confirm.inc.php b/include/client/register.confirm.inc.php index 2f70d5c54..a0628c0bc 100644 --- a/include/client/register.confirm.inc.php +++ b/include/client/register.confirm.inc.php @@ -1,7 +1,9 @@ -<?php if ($content) { ?> -<h1><?php echo Format::display($content->getName()); ?></h1> +<?php if ($content) { + list($title, $body) = $ost->replaceTemplateVariables( + array($content->getName(), $content->getBody())); ?> +<h1><?php echo Format::display($title); ?></h1> <p><?php -echo Format::display($content->getBody()); ?> +echo Format::display($body); ?> </p> <?php } else { ?> <h1>Account Registration</h1> diff --git a/include/client/register.confirmed.inc.php b/include/client/register.confirmed.inc.php index 5a739aac1..5bba31e8c 100644 --- a/include/client/register.confirmed.inc.php +++ b/include/client/register.confirmed.inc.php @@ -1,7 +1,9 @@ -<?php if ($content) { ?> -<h1><?php echo Format::display($content->getName()); ?></h1> +<?php if ($content) { + list($title, $body) = $ost->replaceTemplateVariables( + array($content->getName(), $content->getBody())); ?> +<h1><?php echo Format::display($title); ?></h1> <p><?php -echo Format::display($content->getBody()); ?> +echo Format::display($body); ?> </p> <?php } else { ?> <h1>Account Registration</h1> diff --git a/include/i18n/en_US/templates/page/banner-client.yaml b/include/i18n/en_US/templates/page/banner-client.yaml index 95c4d51ac..5bab4cd11 100644 --- a/include/i18n/en_US/templates/page/banner-client.yaml +++ b/include/i18n/en_US/templates/page/banner-client.yaml @@ -7,8 +7,7 @@ notes: > This forms the header on the staff login page. It can be useful to inform your clients about your login and registration policies. -name: "Sign In" +name: "Sign in to %{company.name}" body: > - This help desk is for registered customers only. Please contact our - support team directly to have an account created so you can access the - help desk to submit tickets. + To better serve you, we encourage our clients to register for an account + and verify the email address we have on record. diff --git a/include/i18n/en_US/templates/page/pwreset-client.yaml b/include/i18n/en_US/templates/page/pwreset-client.yaml index 29ad10eab..d3ea3a391 100644 --- a/include/i18n/en_US/templates/page/pwreset-client.yaml +++ b/include/i18n/en_US/templates/page/pwreset-client.yaml @@ -21,7 +21,7 @@ body: > Follow the link below to login to the help desk and change your password.<br /> <br /> - <a href="%{reset_link}">%{reset_link}</a><br /> + <a href="%{link}">%{link}</a><br /> <br /> <em style="font-size: small">Your friendly Customer Support System <br /> diff --git a/include/i18n/en_US/templates/page/pwreset-staff.yaml b/include/i18n/en_US/templates/page/pwreset-staff.yaml index b742ff5b3..ff8c8c157 100644 --- a/include/i18n/en_US/templates/page/pwreset-staff.yaml +++ b/include/i18n/en_US/templates/page/pwreset-staff.yaml @@ -21,7 +21,7 @@ body: > Follow the link below to login to the help desk and change your password.<br /> <br /> - <a href="%{reset_link}">%{reset_link}</a><br /> + <a href="%{link}">%{link}</a><br /> <br /> <em style="font-size: small">Your friendly Customer Support System</em> <br /> diff --git a/include/i18n/en_US/templates/page/registration-staff.yaml b/include/i18n/en_US/templates/page/registration-staff.yaml index 0c458fb4b..c544a06f0 100644 --- a/include/i18n/en_US/templates/page/registration-staff.yaml +++ b/include/i18n/en_US/templates/page/registration-staff.yaml @@ -16,7 +16,7 @@ body: > Please follow the link below to confirm your account and gain access to your tickets.<br /> <br /> - <a href="%{reset_link}">%{confirmation_link}</a><br /> + <a href="%{link}">%{link}</a><br /> <br /> <em style="font-size: small">Your friendly Customer Support System <br />%{company.name}</em> diff --git a/include/staff/login.tpl.php b/include/staff/login.tpl.php index c0cbbb5b7..d65aeea47 100644 --- a/include/staff/login.tpl.php +++ b/include/staff/login.tpl.php @@ -5,7 +5,7 @@ $info = ($_POST && $errors)?Format::htmlchars($_POST):array(); <div id="loginBox"> <h1 id="logo"><a href="index.php">osTicket Staff Control Panel</a></h1> <h3><?php echo Format::htmlchars($msg); ?></h3> - <div><small><?php echo ($content) ? Format::viewableImages($content->getBody()) : ''; ?></small></div> + <div><small><?php echo ($content) ? Format::display($content->getBody()) : ''; ?></small></div> <form action="login.php" method="post"> <?php csrf_token(); ?> <input type="hidden" name="do" value="scplogin"> -- GitLab