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 ...@@ -50,7 +50,11 @@ else
</form> </form>
<br> <br>
<p> <p>
<?php echo sprintf( <?php
__("If this is your first time contacting us or you've lost the ticket number, please %s open a new ticket %s"), if ($cfg->getClientRegistrationMode() != 'disabled'
'<a href="open.php">','</a>'); ?> || !$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> </p>
...@@ -63,7 +63,9 @@ if ($cfg && $cfg->isClientRegistrationEnabled()) { ...@@ -63,7 +63,9 @@ if ($cfg && $cfg->isClientRegistrationEnabled()) {
</form> </form>
<br> <br>
<p> <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'), 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>'); '<a href="open.php">', '</a>');
} ?> } ?>
......
...@@ -5,15 +5,17 @@ $BUTTONS = isset($BUTTONS) ? $BUTTONS : true; ...@@ -5,15 +5,17 @@ $BUTTONS = isset($BUTTONS) ? $BUTTONS : true;
<?php if ($BUTTONS) { ?> <?php if ($BUTTONS) { ?>
<div class="front-page-button flush-right"> <div class="front-page-button flush-right">
<p> <p>
<?php
if ($cfg->getClientRegistrationMode() != 'disabled'
|| !$cfg->isClientLoginRequired()) { ?>
<a href="open.php" style="display:block" class="blue button"><?php <a href="open.php" style="display:block" class="blue button"><?php
echo __('Open a New Ticket');?></a> echo __('Open a New Ticket');?></a>
</p> </p>
<?php if ($cfg && !$cfg->isKnowledgebaseEnabled()) { ?> <?php } ?>
<p> <p>
<a href="view.php" style="display:block" class="green button"><?php <a href="view.php" style="display:block" class="green button"><?php
echo __('Check Ticket Status');?></a> echo __('Check Ticket Status');?></a>
</p> </p>
<?php } ?>
</div> </div>
<?php } ?> <?php } ?>
<div class="content"><?php <div class="content"><?php
......
...@@ -57,7 +57,10 @@ if ($_POST) { ...@@ -57,7 +57,10 @@ if ($_POST) {
//page //page
$nav->setActiveNav('new'); $nav->setActiveNav('new');
if ($cfg->isClientLoginRequired()) { if ($cfg->isClientLoginRequired()) {
if (!$thisclient) { if ($cfg->getClientRegistrationMode() == 'disabled') {
Http::redirect('view.php');
}
elseif (!$thisclient) {
require_once 'secure.inc.php'; require_once 'secure.inc.php';
} }
elseif ($thisclient->isGuest()) { elseif ($thisclient->isGuest()) {
......
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