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

client: Drop open new ticket links if web tickets disabled

parent ab5a6423
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,11 @@ else
</form>
<br>
<p>
<?php echo sprintf(
__("If this is your first time contacting us or you've lost the ticket number, please %s open a new ticket %s"),
'<a href="open.php">','</a>'); ?>
<?php
if ($cfg->getClientRegistrationMode() != 'disabled'
|| !$cfg->isClientLoginRequired()) {
echo sprintf(
__("If this is your first time contacting us or you've lost the ticket number, please %s open a new ticket %s"),
'<a href="open.php">','</a>');
} ?>
</p>
......@@ -63,7 +63,9 @@ if ($cfg && $cfg->isClientRegistrationEnabled()) {
</form>
<br>
<p>
<?php if ($cfg && !$cfg->isClientLoginRequired()) {
<?php
if ($cfg->getClientRegistrationMode() != 'disabled'
|| !$cfg->isClientLoginRequired()) {
echo sprintf(__('If this is your first time contacting us or you\'ve lost the ticket number, please %s open a new ticket %s'),
'<a href="open.php">', '</a>');
} ?>
......
......@@ -5,15 +5,17 @@ $BUTTONS = isset($BUTTONS) ? $BUTTONS : true;
<?php if ($BUTTONS) { ?>
<div class="front-page-button flush-right">
<p>
<?php
if ($cfg->getClientRegistrationMode() != 'disabled'
|| !$cfg->isClientLoginRequired()) { ?>
<a href="open.php" style="display:block" class="blue button"><?php
echo __('Open a New Ticket');?></a>
</p>
<?php if ($cfg && !$cfg->isKnowledgebaseEnabled()) { ?>
<?php } ?>
<p>
<a href="view.php" style="display:block" class="green button"><?php
echo __('Check Ticket Status');?></a>
</p>
<?php } ?>
</div>
<?php } ?>
<div class="content"><?php
......
......@@ -57,7 +57,10 @@ if ($_POST) {
//page
$nav->setActiveNav('new');
if ($cfg->isClientLoginRequired()) {
if (!$thisclient) {
if ($cfg->getClientRegistrationMode() == 'disabled') {
Http::redirect('view.php');
}
elseif (!$thisclient) {
require_once 'secure.inc.php';
}
elseif ($thisclient->isGuest()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment