#209 Build modals at end to prevent nested forms, provide suggestions from language file
This commit is contained in:
parent
90903e8491
commit
bb00445ae2
@ -89,6 +89,10 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
$openStatusesSql = 'SELECT `ID`, `IsNewTicketStatus`, `IsStaffReopenedStatus`, `IsDefaultStaffReplyStatus` FROM
|
$openStatusesSql = 'SELECT `ID`, `IsNewTicketStatus`, `IsStaffReopenedStatus`, `IsDefaultStaffReplyStatus` FROM
|
||||||
`'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsClosed` = 0';
|
`'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsClosed` = 0';
|
||||||
$statusesRS = hesk_dbQuery($statusesSql);
|
$statusesRS = hesk_dbQuery($statusesSql);
|
||||||
|
$statuses = array();
|
||||||
|
while ($row = hesk_dbFetchAssoc($statusesRS)) {
|
||||||
|
array_push($statuses, $row);
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<form class="form-horizontal" method="post" action="manage_statuses.php" role="form">
|
<form class="form-horizontal" method="post" action="manage_statuses.php" role="form">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
@ -117,7 +121,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$j = 1;
|
$j = 1;
|
||||||
while ($row = hesk_dbFetchAssoc($statusesRS)):
|
foreach ($statuses as $row):
|
||||||
?>
|
?>
|
||||||
<tr id="s<?php echo $row['ID']; ?>_row">
|
<tr id="s<?php echo $row['ID']; ?>_row">
|
||||||
<td style="color: <?php echo $row['TextColor']; ?>; font-weight: bold">
|
<td style="color: <?php echo $row['TextColor']; ?>; font-weight: bold">
|
||||||
@ -156,10 +160,8 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
buildEditModal($row['ID']);
|
|
||||||
buildConfirmDeleteModal($row['ID']);
|
|
||||||
$j++;
|
$j++;
|
||||||
endwhile; ?>
|
endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -301,6 +303,10 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
foreach ($statuses as $status) {
|
||||||
|
buildEditModal($status['ID']);
|
||||||
|
buildConfirmDeleteModal($status['ID']);
|
||||||
|
}
|
||||||
buildCreateModal();
|
buildCreateModal();
|
||||||
|
|
||||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||||
@ -477,7 +483,9 @@ function buildEditModal($statusId) {
|
|||||||
if (isset($textArray[$language])) {
|
if (isset($textArray[$language])) {
|
||||||
$text = $textArray[$language];
|
$text = $textArray[$language];
|
||||||
} else {
|
} else {
|
||||||
|
hesk_setLanguage($language);
|
||||||
$text = $hesklang[$status['Key']];
|
$text = $hesklang[$status['Key']];
|
||||||
|
hesk_resetLanguage();
|
||||||
$warning = 'has-warning';
|
$warning = 'has-warning';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user