Fixed the error that caused the create button dissapeared under certain circunstances

(When no downtimes was retrieved)

TICKET #2580
This commit is contained in:
Alejandro Gallardo Escobar 2015-08-05 14:33:17 +02:00
parent dd9c2029e2
commit 9f57329f65
1 changed files with 20 additions and 0 deletions

View File

@ -322,9 +322,29 @@ else {
$downtimes = array();
}
// No downtimes
if (!$downtimes) {
// Filter form
echo "<form method='post' action='index.php?sec=estado&sec2=godmode/agentes/planned_downtime.list'>";
html_print_table($table_form);
echo "</form>";
// Info message
echo '<div class="nf">'.__('No planned downtime').'</div>';
echo '<div class="action-buttons" style="width: 98%">';
// Create button
if ($write_permisson) {
echo '&nbsp;';
echo '<form method="post" action="index.php?sec=estado&amp;sec2=godmode/agentes/planned_downtime.editor" style="display: inline;">';
html_print_submit_button (__('Create'), 'create', false, 'class="sub next"');
echo '</form>';
}
echo '</div>';
}
// Has downtimes
else {
echo "<form method='post' action='index.php?sec=estado&sec2=godmode/agentes/planned_downtime.list'>";
html_print_table($table_form);