Private GIT

Skip to content
Snippets Groups Projects
Commit ff462d67 authored by Maximilien Bersoult's avatar Maximilien Bersoult
Browse files

* Apply style to graph template listing and form

parent 742f79b2
Branches
Tags
No related merge requests found
......@@ -2,10 +2,18 @@
{$form.javascript}
<form {$form.attributes}>
<table class="ListTable">
<tr class="ListHeader"><td class="FormHeader" colspan="2"><img src='./img/icones/16x16/layout_vertical.gif'>&nbsp;&nbsp;{$form.header.ftitle}</td></tr>
<table class="formTable table">
<tr class="ListHeader">
<td class="FormHeader" colspan="2">
<h3>| {$form.header.ftitle}</h3>
</td>
</tr>
<tr class="list_lvl_1"><td class="ListColLvl1_name" colspan="2"><img src='./img/icones/16x16/note.gif'>&nbsp;&nbsp;{$form.header.information}</td></tr>
<tr class="list_lvl_1">
<td class="ListColLvl1_name" colspan="2">
<h4>{$form.header.information}</h4>
</td>
</tr>
<tr class="list_one"><td class="FormRowField"><img class="helpTooltip" name="tip_template_name">{$form.name.label}</td><td class="FormRowValue">{$form.name.html}</td></tr>
<tr class="list_two"><td class="FormRowField"><img class="helpTooltip" name="tip_vertical_label">{$form.vertical_label.label}</td><td class="FormRowValue">{$form.vertical_label.html}</td></tr>
<tr class="list_one"><td class="FormRowField"><img class="helpTooltip" name="tip_width">{$form.width.label}</td><td class="FormRowValue">{$form.width.html}&nbsp;px</td></tr>
......@@ -21,7 +29,11 @@
</tr>
<tr class="list_one"><td class="FormRowField"><img class="helpTooltip" name="tip_base">{$form.base.label}</td><td class="FormRowValue">{$form.base.html}</td></tr>
<tr class="list_lvl_1"><td class="ListColLvl1_name" colspan="2"><img src='./img/icones/16x16/note.gif'>&nbsp;&nbsp;{$form.header.color}</td></tr>
<tr class="list_lvl_1">
<td class="ListColLvl1_name" colspan="2">
<h4>{$form.header.color}</h4>
</td>
</tr>
<tr class="list_one">
<td class="FormRowField"><img class="helpTooltip" name="tip_grid_background_color">{$form.bg_grid_color.label}</td>
<td class="FormRowValue">{$form.bg_grid_color.html}&nbsp;&nbsp;{$form.bg_grid_color_color.html}&nbsp;&nbsp;{$form.bg_grid_color_modify.html}</td>
......@@ -63,12 +75,11 @@
<tr class="list_one"><td class="FormRowField"><img class="helpTooltip" name="tip_default_centreon_graph_template">{$form.default_tpl1.label}</td><td class="FormRowValue">{$form.default_tpl1.html}</td></tr>
<tr class="list_two"><td class="FormRowField"><img class="helpTooltip" name="tip_comments">{$form.comment.label}</td><td class="FormRowValue">{$form.comment.html}</td></tr>
{if $o == "a" || $o == "c"}
<tr class="list_lvl_2"><td class="ListColLvl2_name" colspan="2">{$form.required._note}</td></tr>
<tr class="list_lvl_1"><td class="ListColLvl1_name" colspan="2">{$form.required._note}</td></tr>
{/if}
</table>
<div id="validForm">
{if $o == "a" || $o == "c"}
<p>{$form.action.html}</p>
<p>{$form.submitC.html}{$form.submitA.html}&nbsp;&nbsp;&nbsp;{$form.reset.html}</p>
{else if $o == "w"}
<p>{$form.change.html}</p>
......
......@@ -143,7 +143,7 @@
isset($graph[$nameColor]) ? $codeColor = $graph[$nameColor] : $codeColor = NULL;
$attrsText3 = array("value"=>$codeColor,"size"=>"8","maxlength"=>"7");
$attrsText4 = array("style"=>"width:50px; height:18px; background-color:".$codeColor."; border-color:".$codeColor.";");
$attrsText5 = array("onclick"=>"popup_color_picker('$nameColor','".addslashes($nameLang)."');");
$attrsText5 = array("onclick"=>"popup_color_picker('$nameColor','".addslashes($nameLang)."');", "class" => "btc bt_info");
$form->addElement('text', $nameColor, $nameLang, $attrsText3);
$form->addElement('button', $nameColor.'_color', "", $attrsText4);
......@@ -169,12 +169,6 @@
$ams1->setElementTemplate($eTemplate);
echo $ams1->getElementJs(false);
$tab = array();
$tab[] = HTML_QuickForm::createElement('radio', 'action', null, _("List"), '1');
$tab[] = HTML_QuickForm::createElement('radio', 'action', null, _("Form"), '0');
$form->addGroup($tab, 'action', _("Post Validation"), '&nbsp;');
$form->setDefaults(array('action'=>'1'));
$form->addElement('hidden', 'graph_id');
$redirect = $form->addElement('hidden', 'o');
$redirect->setValue($o);
......@@ -206,12 +200,12 @@
$form->setDefaults($graph);
$form->freeze();
} else if ($o == "c") {
$subC = $form->addElement('submit', 'submitC', _("Save"));
$res = $form->addElement('reset', 'reset', _("Delete"));
$subC = $form->addElement('submit', 'submitC', _("Save"), array("class" => "btc bt_success"));
$res = $form->addElement('reset', 'reset', _("Delete"), array("class" => "btc bt_danger"));
$form->setDefaults($graph);
} else if ($o == "a") {
$subA = $form->addElement('submit', 'submitA', _("Save"));
$res = $form->addElement('reset', 'reset', _("Delete"));
$subA = $form->addElement('submit', 'submitA', _("Save"), array("class" => "btc bt_success"));
$res = $form->addElement('reset', 'reset', _("Delete"), array("class" => "btc bt_danger"));
}
$tpl->assign('msg', array ("changeL"=>"?p=".$p."&o=c&graph_id=".$graph_id, "changeT"=>_("Modify")));
......@@ -272,7 +266,7 @@
}
$action = $form->getSubmitValue("action");
if ($valid && $action["action"]["action"])
if ($valid)
require_once("listGraphTemplates.php");
else {
#Apply a template definition
......
<script type="text/javascript" src="./include/common/javascript/tool.js"></script>
<form name='form' method='POST'>
<table class="ajaxOption table">
<tr>
<th><h5>{t}Filters{/t}</h5></th>
</tr>
<tr>
<td><h5>{t}Graph template{/t}</h5></td>
</tr>
<tr>
<td><input type="text" name="searchGT" value="{$searchGT}"></td>
<td><input type="submit" value="{t}Search{/t}" class="btc bt_success"></td>
</tr>
</table>
<table class="ToolbarTable table">
<tr class="ToolbarTR">
<td>
......@@ -34,7 +46,7 @@
{/section}
</table>
<table class="ToolbarTable table">
<tr>
<tr class="ToolbarTR">
<td>
{$msg.options} {$form.o2.html}
&nbsp;&nbsp;&nbsp;
......
......@@ -41,14 +41,12 @@
include("./include/common/autoNumLimit.php");
/*
* start quickSearch form
*/
include_once("./include/common/quickSearch.php");
$SearchTool = NULL;
if (isset($search) && $search)
$search = '';
if (isset($_POST['searchGT']) && $_POST['searchGT']) {
$search = $_POST['searchGT'];
$SearchTool = " WHERE name LIKE '%".$search."%'";
}
$res = $pearDB->query("SELECT COUNT(*) FROM giv_graphs_template".$SearchTool);
$tmp = $res->fetchRow();
......@@ -145,6 +143,7 @@
$o2->setValue(NULL);
$tpl->assign('limit', $limit);
$tpl->assign('searchGT', $search);
/*
* Apply a template definition
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment