Restyled select ticket category for new ticket
This commit is contained in:
parent
59cc8498cf
commit
f176f2238f
@ -1042,58 +1042,79 @@ function print_select_category($number_of_categories) {
|
|||||||
/* This will handle error, success and notice messages */
|
/* This will handle error, success and notice messages */
|
||||||
hesk_handle_messages();
|
hesk_handle_messages();
|
||||||
?>
|
?>
|
||||||
|
<section class="content">
|
||||||
<div style="text-align: center">
|
<div class="box">
|
||||||
|
<div class="box-header with-border">
|
||||||
<h3><?php echo $hesklang['select_category_staff']; ?></h3>
|
<h1 class="box-title">
|
||||||
|
<?php echo $hesklang['select_category_staff']; ?>
|
||||||
<div class="select_category">
|
</h1>
|
||||||
<?php
|
</div>
|
||||||
// Print a select box if number of categories is large
|
<div class="box-body">
|
||||||
if ($number_of_categories > $hesk_settings['cat_show_select'])
|
<div class="select_category">
|
||||||
{
|
|
||||||
?>
|
|
||||||
<form action="new_ticket.php" method="get">
|
|
||||||
<select name="category" id="select_category">
|
|
||||||
<?php
|
|
||||||
if ($hesk_settings['select_cat'])
|
|
||||||
{
|
|
||||||
echo '<option value="">'.$hesklang['select'].'</option>';
|
|
||||||
}
|
|
||||||
foreach ($hesk_settings['categories'] as $k=>$v)
|
|
||||||
{
|
|
||||||
echo '<option value="'.$k.'">'.$v.'</option>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div style="text-align:center">
|
|
||||||
<input type="submit" value="<?php echo $hesklang['c2c']; ?>" class="btn btn-default">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
// Otherwise print quick links
|
|
||||||
else
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<ul id="ul_category">
|
|
||||||
<?php
|
<?php
|
||||||
foreach ($hesk_settings['categories'] as $k=>$v)
|
// Print a select box if number of categories is large
|
||||||
|
if ($number_of_categories > $hesk_settings['cat_show_select'])
|
||||||
{
|
{
|
||||||
echo '<li><a href="new_ticket.php?a=add&category='.$k.'">» '.$v.'</a></li>';
|
?>
|
||||||
|
<form action="new_ticket.php" method="get">
|
||||||
|
<select name="category" id="select_category" class="form-control">
|
||||||
|
<?php
|
||||||
|
if ($hesk_settings['select_cat'])
|
||||||
|
{
|
||||||
|
echo '<option value="">'.$hesklang['select'].'</option>';
|
||||||
|
}
|
||||||
|
foreach ($hesk_settings['categories'] as $k=>$v)
|
||||||
|
{
|
||||||
|
echo '<option value="'.$k.'">'.$v.'</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div style="text-align:center">
|
||||||
|
<input type="submit" value="<?php echo $hesklang['c2c']; ?>" class="btn btn-default">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
// Otherwise print quick links
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// echo '<li><a href="new_ticket.php?a=add&category='.$k.'">» '.$v.'</a></li>';
|
||||||
|
$new_row = 1;
|
||||||
|
|
||||||
|
foreach ($hesk_settings['categories'] as $k=>$v):
|
||||||
|
if ($new_row == 1) {
|
||||||
|
echo '<div class="row">';
|
||||||
|
$new_row = -1;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="col-md-5 col-sm-12 <?php if ($new_row == -1) {echo 'col-md-offset-1';} ?>">
|
||||||
|
<a href="new_ticket.php?a=add&category=<?php echo $k; ?>" class="button-link">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<?php echo $v; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
$new_row++;
|
||||||
|
if ($new_row == 1) {
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
endforeach;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</ul>
|
</div>
|
||||||
<?php
|
</div>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
<p> </p>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -150,4 +150,22 @@ button.dropdown-submit {
|
|||||||
|
|
||||||
.login-box-body {
|
.login-box-body {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-link {
|
||||||
|
color: #4a5571;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-link:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-link .col-xs-1 {
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-link .panel-body:hover {
|
||||||
|
background-color: #EEE;
|
||||||
}
|
}
|
132
index.php
132
index.php
@ -90,86 +90,78 @@ function print_select_category($number_of_categories)
|
|||||||
<li><a href="<?php echo $hesk_settings['hesk_url']; ?>"><?php echo $hesk_settings['hesk_title']; ?></a></li>
|
<li><a href="<?php echo $hesk_settings['hesk_url']; ?>"><?php echo $hesk_settings['hesk_title']; ?></a></li>
|
||||||
<li class="active"><?php echo $hesklang['submit_ticket']; ?></li>
|
<li class="active"><?php echo $hesklang['submit_ticket']; ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
<?php
|
||||||
|
/* This will handle error, success and notice messages */
|
||||||
|
hesk_handle_messages();
|
||||||
|
?>
|
||||||
|
|
||||||
<tr>
|
<div style="text-align: center">
|
||||||
<td>
|
|
||||||
|
|
||||||
<br />
|
<h3><?php echo $hesklang['select_category_text']; ?></h3>
|
||||||
|
|
||||||
|
<div class="select_category">
|
||||||
<?php
|
<?php
|
||||||
/* This will handle error, success and notice messages */
|
// Print a select box if number of categories is large
|
||||||
hesk_handle_messages();
|
if ($number_of_categories > $hesk_settings['cat_show_select'])
|
||||||
?>
|
{
|
||||||
|
?>
|
||||||
<div style="text-align: center">
|
<form action="index.php" method="get">
|
||||||
|
<select name="category" id="select_category" class="form-control">
|
||||||
<h3><?php echo $hesklang['select_category_text']; ?></h3>
|
|
||||||
|
|
||||||
<div class="select_category">
|
|
||||||
<?php
|
|
||||||
// Print a select box if number of categories is large
|
|
||||||
if ($number_of_categories > $hesk_settings['cat_show_select'])
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<form action="index.php" method="get">
|
|
||||||
<select name="category" id="select_category" class="form-control">
|
|
||||||
<?php
|
|
||||||
if ($hesk_settings['select_cat'])
|
|
||||||
{
|
|
||||||
echo '<option value="">'.$hesklang['select'].'</option>';
|
|
||||||
}
|
|
||||||
foreach ($hesk_settings['categories'] as $k=>$v)
|
|
||||||
{
|
|
||||||
echo '<option value="'.$k.'">'.$v.'</option>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div style="text-align:center">
|
|
||||||
<input type="submit" value="<?php echo $hesklang['c2c']; ?>" class="orangebutton" onmouseover="hesk_btn(this,'orangebuttonover');" onmouseout="hesk_btn(this,'orangebutton');" />
|
|
||||||
<input type="hidden" name="a" value="add" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<?php
|
<?php
|
||||||
}
|
if ($hesk_settings['select_cat'])
|
||||||
// Otherwise print quick links
|
{
|
||||||
else
|
echo '<option value="">'.$hesklang['select'].'</option>';
|
||||||
{
|
}
|
||||||
$new_row = 1;
|
foreach ($hesk_settings['categories'] as $k=>$v)
|
||||||
|
{
|
||||||
foreach ($hesk_settings['categories'] as $k=>$v):
|
echo '<option value="'.$k.'">'.$v.'</option>';
|
||||||
if ($new_row == 1) {
|
}
|
||||||
echo '<div class="row">';
|
|
||||||
$new_row = -1;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<div class="col-md-5 col-sm-10 col-md-offset-1 col-sm-offset-1">
|
</select>
|
||||||
<a href="index.php?a=add&category=<?php echo $k; ?>" class="button-link">
|
|
||||||
<div class="panel panel-default">
|
<br />
|
||||||
<div class="panel-body">
|
|
||||||
<div class="row">
|
<div style="text-align:center">
|
||||||
<div class="col-xs-12">
|
<input type="submit" value="<?php echo $hesklang['c2c']; ?>" class="btn btn-default">
|
||||||
<?php echo $v; ?>
|
<input type="hidden" name="a" value="add" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
// Otherwise print quick links
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$new_row = 1;
|
||||||
|
|
||||||
|
foreach ($hesk_settings['categories'] as $k=>$v):
|
||||||
|
if ($new_row == 1) {
|
||||||
|
echo '<div class="row">';
|
||||||
|
$new_row = -1;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="col-md-5 col-sm-10 col-md-offset-1 col-sm-offset-1">
|
||||||
|
<a href="index.php?a=add&category=<?php echo $k; ?>" class="button-link">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<?php echo $v; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
</a>
|
||||||
$new_row++;
|
</div>
|
||||||
if ($new_row == 1) {
|
<?php
|
||||||
echo '</div>';
|
$new_row++;
|
||||||
}
|
if ($new_row == 1) {
|
||||||
endforeach;
|
echo '</div>';
|
||||||
}
|
}
|
||||||
?>
|
endforeach;
|
||||||
</div>
|
}
|
||||||
</div>
|
?>
|
||||||
|
</div>
|
||||||
<p> </p>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user