Merge branch '2457-Formulario-de-creacion-repetido' into 'develop'

added check to prevent alert creation form from being printed in alert cluster for step 5

See merge request artica/pandorafms!1854
This commit is contained in:
vgilc 2018-10-15 00:06:41 +02:00
commit f3c8b14b32
1 changed files with 13 additions and 10 deletions

View File

@ -137,22 +137,25 @@ if (check_acl ($config['id_user'], 0, "LM")) {
$table->data[3][1] .= ' ' . __('seconds') . ui_print_help_icon ('action_threshold', true);
echo '<form class="add_alert_form" method="post">';
if (!isset($step) || $step!=5)
if (!isset($step) || $step!=5) {
echo '<form class="add_alert_form" method="post">';
html_print_table ($table);
}
echo '<div class="action-buttons" style="width: '.$table->width.'">';
if($id_cluster){
echo "<input onclick='window.location.replace(\"index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_view&id=".$id_cluster."\");' type=button style='float:right;margin-left:20px;' name='store' class='sub upd' value='".__('Finish and view cluster')."'>";
if (!isset($step) || $step!=5) {
if($id_cluster){
echo "<input onclick='window.location.replace(\"index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_view&id=".$id_cluster."\");' type=button style='float:right;margin-left:20px;' name='store' class='sub upd' value='".__('Finish and view cluster')."'>";
}
html_print_submit_button (__('Add alert'), 'add', false, 'class="sub wand"');
html_print_input_hidden ('create_alert', 1);
echo '</div></form>';
}
html_print_submit_button (__('Add alert'), 'add', false, 'class="sub wand"');
html_print_input_hidden ('create_alert', 1);
echo '</div></form>';
ui_require_css_file ('cluetip');
ui_require_jquery_file ('cluetip');
ui_require_jquery_file ('pandora.controls');