Skip to content
Snippets Groups Projects
Commit e145ede0 authored by Jared Hancock's avatar Jared Hancock
Browse files

Add intial content for system management templates

parent 240d091a
No related branches found
No related tags found
No related merge requests found
Showing
with 206 additions and 7 deletions
......@@ -85,9 +85,12 @@ class Internationalization {
}
}
// Pages
// Pages and content
$_config = new OsticketConfig();
foreach (array('landing','thank-you','offline') as $type) {
foreach (array('landing','thank-you','offline',
'registration-staff', 'pwreset-staff', 'banner-staff',
'registration-client', 'pwreset-client', 'banner-client',
'access-link') as $type) {
$tpl = $this->getTemplate("templates/page/{$type}.yaml");
if (!($page = $tpl->getData()))
continue;
......
......@@ -3,8 +3,12 @@ if(!defined('OSTCLIENTINC')) die('Access Denied');
$email=Format::input($_POST['luser']?:$_GET['e']);
$passwd=Format::input($_POST['lpasswd']?:$_GET['t']);
$content = Page::lookup(Page::getIdByType('registration-policy'));
?>
<h1>Sign In</h1>
<h1><?php echo Format::display($content->getName()); ?></h1>
<p><?php echo Format::viewableImages($content->getBody()); ?></p>
<form action="login.php" method="post" id="clientLogin">
<?php csrf_token(); ?>
<div style="display:table-row">
......
#
# access-link.yaml
#
# Ticket access link sent to clients for guest-only systems where the ticket
# number and email address will trigger an access link sent via email
#
---
notes: >
Ticket access link sent to clients for guest-only systems where the ticket
number and email address will trigger an access link sent via email
name: "Ticket [#%{ticket.number}] Access Link"
body: >
<h3><strong>Hi %{recipient.name.first},</strong></h3>
An access link request for ticket #%{ticket.number} has been submitted
on your behalf for the helpdesk at %{url}.<br />
<br />
Follow the link below to check the status of the ticket
#%{ticket.number}.<br />
<br />
<a href="%{recipient.ticket_link}">%{recipient.ticket_link}</a><br />
<br />
If you <strong>did not</strong> make the request, please delete and
disregard this email. Your account is still secure and no one has been
given access to the ticket. Someone could have mistakenly entered your
email address.<br />
<br />
--<br />
%{company.name}
#
# banner-client.yaml
#
# This forms the header on the staff login page. It can be useful to inform
# your clients about your login and registration policies.
---
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"
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.
#
# banner-staff.yaml
#
# This is the initial message and banner shown on the staff login page
---
notes: >
This is the initial message and banner shown on the staff login page
name: "Authentication Required"
body: ""
#
# pwreset-client.yaml
#
# Template of the email sent to clients when using the Forgot My Password
# link on the login page
---
notes: >
Template of the email sent to clients when using the Forgot My Password
link on the login page
name: "%{company.name} Help Desk Access"
body: >
<h3><strong>Hi %{user.name.first},</strong></h3>
A password reset request has been submitted on your behalf for the
helpdesk at %{url}.<br />
<br />
If you feel that this has been done in error, delete and disregard this
email. Your account is still secure and no one has been given access to
it. It is not locked and your password has not been reset. Someone could
have mistakenly entered your email address.<br />
<br />
Follow the link below to login to the help desk and change your
password.<br />
<br />
<a href="%{reset_link}">%{reset_link}</a><br />
<br />
<em style="font-size: small">Your friendly Customer Support System
<br />
%{company.name}</em>
#
# pwreset-staff.yaml
#
# Template of the email sent to staff members when using the Forgot My
# Password link
---
notes: >
Template of the email sent to staff members when using the Forgot My
Password link
name: "osTicket Staff Password Reset"
body: >
<h3><strong>Hi %{staff.name.first},</strong></h3>
A password reset request has been submitted on your behalf for the
helpdesk at %{url}.<br />
<br />
If you feel that this has been done in error, delete and disregard this
email. Your account is still secure and no one has been given access to
it. It is not locked and your password has not been reset. Someone could
have mistakenly entered your email address.<br />
<br />
Follow the link below to login to the help desk and change your
password.<br />
<br />
<a href="%{reset_link}">%{reset_link}</a><br />
<br />
<em style="font-size: small">Your friendly Customer Support System</em>
<br />
<img src="cid:b56944cb4722cc5cda9d1e23a3ea7fbc" alt="Powered by
osTicket" width="126" height="19" style="width: 126px" />
#
# registration-staff.yaml
#
# Confirmation email sent to clients when accounts are created for them by
# staff or via the client portal. This email serves as an email address
# verification.
#
---
notes: >
Confirmation email sent to clients when accounts are created for them by
staff or via the client portal. This email serves as an email address
verification.
name: "Welcome to %{company.name}"
body: >
<h3><strong>Hi %{user.name.first},</strong></h3> We've created an
account for you at our help desk at %{url}.<br />
<br />
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 />
<br />
<em style="font-size: small">Your friendly Customer Support System<br
/>%{company.name}</em>
#
# registration-staff.yaml
#
# Initial (optional) email sent to staff members when accounts are created
# for them in the staff control panel
#
---
notes: >
Initial (optional) email sent to staff members when accounts are created
for them in the staff control panel
name: "Welcome to osTicket"
body: >
<h3><strong>Hi %{user.name.first},</strong></h3>
We've created an account for you at our help desk at %{url}.<br />
<br />
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 />
<br />
<em style="font-size: small">Your friendly Customer Support System
<br />%{company.name}</em>
......@@ -5,6 +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><?php echo Format::viewableImages($content->getBody()); ?></div>
<form action="login.php" method="post">
<?php csrf_token(); ?>
<input type="hidden" name="do" value="scplogin">
......
......@@ -137,12 +137,24 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config)
<em><b>Authentication and Registration Templates</b></em>
</th>
</tr>
<?php foreach (array(
'pwreset-staff' => 'Password Reset for Staff',
'staff-banner' => 'Login banner for Staff',
'registration-staff' => 'New Staff Account',
'pwreset-client' => 'Password Reset for Clients',
'registration-client' => 'Account Registration Email',
'registration-policy' => 'Client Registration Policy',
) as $content => $title) { ?>
<tr>
<td>New Registration Email</td>
<td><a href="ajax.php/content/new-registration/manage"
<td><?php echo $title; ?></td>
<td><a href="ajax.php/content/<?php echo $content; ?>/manage"
onclick="javascript:
$.dialog($(this).attr('href'), 200);
return false;">Manage</a></td>
return false;">Manage</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<p style="text-align:center">
......
<h3>Manage Content &mdash; <?php echo Format::htmlchars($content->getName()); ?></h3>
<a class="close" href=""><i class="icon-remove-circle"></i></a>
<hr/>
<form method="post" action="#content/<?php echo $content->getId(); ?>">
<input type="text" style="width: 100%; font-size: 14pt" name="name" value="<?php
echo Format::htmlchars($content->getName()); ?>" />
<div style="margin-top: 5px"></div>
<textarea class="richtext no-bar" name="body"><?php
echo Format::viewableImages($content->getBody());
?></textarea>
<hr/>
<p class="full-width">
<span class="buttons" style="float:left">
<input type="reset" value="Reset">
<input type="button" name="cancel" class="<?php echo $user ? 'cancel' : 'close' ?>" value="Cancel">
</span>
<span class="buttons" style="float:right">
<input type="submit" value="Save Changes">
</span>
</p>
</form>
</div>
<div class="clear"></div>
......@@ -19,9 +19,11 @@ if(!defined('INCLUDE_DIR')) die('Fatal Error. Kwaheri!');
require_once(INCLUDE_DIR.'class.staff.php');
require_once(INCLUDE_DIR.'class.csrf.php');
$content = Page::lookup(Page::getIdByType('staff-banner'));
$dest = $_SESSION['_staff']['auth']['dest'];
$msg = $_SESSION['_staff']['auth']['msg'];
$msg = $msg?$msg:'Authentication Required';
$msg = $msg ?: $content->getName();
$dest=($dest && (!strstr($dest,'login.php') && !strstr($dest,'ajax.php')))?$dest:'index.php';
$show_reset = false;
if($_POST) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment