Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(style): correct style
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinsivy authored and sc979 committed Sep 24, 2019
1 parent c4a1624 commit 89c7d89
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 99 deletions.
204 changes: 108 additions & 96 deletions www/include/configuration/configObject/command/formCommand.ihtml
Original file line number Diff line number Diff line change
@@ -1,100 +1,112 @@
{$form.javascript}
<form {$form.attributes}>
<div id="validFormTop">
{if $o == "a" || $o == "c"}
<p class="oreonbutton">{$form.submitC.html}{$form.submitA.html}&nbsp;&nbsp;&nbsp;{$form.reset.html}</p>
{else if $o == "w"}
<p class="oreonbutton">{$form.change.html}</p>
{/if}
</div>
<div id='tab1' class='tab'>
<table class="formTable table">
<tr class="ListHeader">
<td class="FormHeader" colspan="2">
<h3>| {$form.header.title}</h3>
</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="command_name"> {$form.command_name.label}</td><td class="FormRowValue">{$form.command_name.html}</td></tr>
<tr class="list_two"><td class="FormRowField"><img class="helpTooltip" name="command_type"> {$form.command_type.label}</td><td class="FormRowValue">{$form.command_type.html}</td></tr>
<tr class="list_one">
<td class="FormRowField"><img class="helpTooltip" name="command_line_help"> {$form.command_line.label}</td>
<td>
<table border="0">
<tr>
<td>
&nbsp;{$form.command_line.html}
</td>
{if $o == "a" || $o == "c"}
<td>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="&nbsp;&nbsp;&lt;&nbsp;&lt;&nbsp;&nbsp;" onclick="insertValueQuery(1)" />
&nbsp;&nbsp;&nbsp;&nbsp;
{$form.resource.html}
<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="&nbsp;&nbsp;&lt;&nbsp;&lt;&nbsp;&nbsp;" onclick="insertValueQuery(2)" />
&nbsp;&nbsp;&nbsp;&nbsp;
{$form.plugins.html}
&nbsp;<img alt='{$cmd_help}' title='{$cmd_help}' src='./img/icons/info.png' class='ico-14' onClick="window.open('main.php?p=60801&command_name='+ document.Form.plugins.value + '&o=h&min=1','','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no, width=700, height=400');">
<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="&nbsp;&nbsp;&lt;&nbsp;&lt;&nbsp;&nbsp;" onclick="insertValueQuery(3)" />
&nbsp;&nbsp;&nbsp;&nbsp;
{$form.macros.html}
</td>
{/if}
</tr>
</table>
</td>
</tr>
<tr class="list_two"><td class="FormRowField"><img class="helpTooltip" name="enable_shell"> {$form.enable_shell.label}</td><td class="FormRowValue">{$form.enable_shell.html}</td></tr>
<tr class="list_one"><td class="FormRowField"><img class="helpTooltip" name="arg_example"> {$form.command_example.label}</td><td class="FormRowValue">{if $o != "w"}{$form.command_example.html}{/if}</td></tr>
<tr class="list_two">
<td class="FormRowField"><img class="helpTooltip" name="arg_description"> {$arg_desc_label}</td>
<td class="FormRowValue">
{if $o != "w"}{$form.desc_arg.html}&nbsp;{$form.clear_arg.html}<br/><br/>{/if}
<div id="listOfArgDiv">
{$form.listOfArg.html}
</div>
</td>
</tr>
<tr class="list_one">
<td class="FormRowField"><img class="helpTooltip" name="macro_description"> {$macro_desc_label}</td>
<td class="FormRowValue">
<div id="listOfMacroDiv">
{$form.desc_macro.html}
</div>
<div id="listOfArgDiv">
{$form.listOfMacros.html}
</div>
</td>
</tr>
<tr class="list_lvl_1">
<td class="ListColLvl1_name" colspan="2">
<h4>{$form.header.furtherInfos}</h4>
</td>
</tr>
<tr class="list_one"><td class="FormRowField"><img class="helpTooltip" name="connectors"> {$form.connectors.label}</td><td class="FormRowValue">{$form.connectors.html}</td></tr>
<tr class="list_two"><td class="FormRowField"><img class="helpTooltip" name="graph_template"> {$form.graph_id.label}</td><td class="FormRowValue">{$form.graph_id.html}</td></tr>
<tr class="list_one"><td class="FormRowField"><img class="helpTooltip" name="command_activate"> {$form.command_activate.label}</td><td class="FormRowValue">{$form.command_activate.html}</td></tr>
<tr class="list_two"><td class="FormRowField"><img class="helpTooltip" name="command_comment"> {$form.command_comment.label}</td><td class="FormRowValue">{$form.command_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>
{/if}
</table>
</div>
<div id="validForm">
{if $o == "a" || $o == "c"}
<p class="oreonbutton">{$form.submitC.html}{$form.submitA.html}&nbsp;&nbsp;&nbsp;{$form.reset.html}</p>
{else if $o == "w"}
<p class="oreonbutton">{$form.change.html}</p>
{/if}
</div>
{$form.hidden}
<div id="validFormTop">
{if $o == "a" || $o == "c"}
<p class="oreonbutton">{$form.submitC.html}{$form.submitA.html}&nbsp;&nbsp;&nbsp;{$form.reset.html}</p>
{else if $o == "w"}
<p class="oreonbutton">{$form.change.html}</p>
{/if}
</div>
<div id='tab1' class='tab'>
<table class="formTable table">
<tr class="ListHeader">
<td class="FormHeader" colspan="2"><h3>| {$form.header.title}</h3></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="command_name"> {$form.command_name.label}</td>
<td class="FormRowValue">{$form.command_name.html}</td>
</tr>
<tr class="list_two">
<td class="FormRowField"><img class="helpTooltip" name="command_type"> {$form.command_type.label}</td>
<td class="FormRowValue">{$form.command_type.html}</td>
</tr>
<tr class="list_one">
<td class="FormRowField"><img class="helpTooltip" name="command_line_help"> {$form.command_line.label}</td>
<td>
<table border="0">
<tr>
<td>&nbsp;{$form.command_line.html}</td>
{if $o == "a" || $o == "c"}
<td>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="&nbsp;&nbsp;&lt;&nbsp;&lt;&nbsp;&nbsp;" onclick="insertValueQuery(1)" />
&nbsp;&nbsp;&nbsp;&nbsp;
{$form.resource.html}
<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="&nbsp;&nbsp;&lt;&nbsp;&lt;&nbsp;&nbsp;" onclick="insertValueQuery(2)" />
&nbsp;&nbsp;&nbsp;&nbsp;
{$form.plugins.html}
&nbsp;<img alt='{$cmd_help}' title='{$cmd_help}' src='./img/icons/info.png' class='ico-14' onClick="window.open('main.php?p=60801&command_name='+ document.Form.plugins.value + '&o=h&min=1','','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no, width=700, height=400');">
<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="&nbsp;&nbsp;&lt;&nbsp;&lt;&nbsp;&nbsp;" onclick="insertValueQuery(3)" />
&nbsp;&nbsp;&nbsp;&nbsp;
{$form.macros.html}
</td>
{/if}
</tr>
</table>
</td>
</tr>
<tr class="list_two">
<td class="FormRowField"><img class="helpTooltip" name="enable_shell"> {$form.enable_shell.label}</td>
<td class="FormRowValue">{$form.enable_shell.html}</td>
</tr>
<tr class="list_one">
<td class="FormRowField"><img class="helpTooltip" name="arg_example"> {$form.command_example.label}</td>
<td class="FormRowValue">{if $o != "w"}{$form.command_example.html}{/if}</td>
</tr>
<tr class="list_two">
<td class="FormRowField"><img class="helpTooltip" name="arg_description"> {$arg_desc_label}</td>
<td class="FormRowValue">
{if $o != "w"}{$form.desc_arg.html}&nbsp;{$form.clear_arg.html}<br/><br/>{/if}
<div id="listOfArgDiv">{$form.listOfArg.html}</div>
</td>
</tr>
<tr class="list_one">
<td class="FormRowField"><img class="helpTooltip" name="macro_description"> {$macro_desc_label}</td>
<td class="FormRowValue">
<div id="listOfMacroDiv">{$form.desc_macro.html}</div>
<div id="listOfArgDiv">{$form.listOfMacros.html}</div>
</td>
</tr>
<tr class="list_lvl_1">
<td class="ListColLvl1_name" colspan="2"><h4>{$form.header.furtherInfos}</h4></td>
</tr>
<tr class="list_one">
<td class="FormRowField"><img class="helpTooltip" name="connectors"> {$form.connectors.label}</td>
<td class="FormRowValue">{$form.connectors.html}</td>
</tr>
<tr class="list_two">
<td class="FormRowField"><img class="helpTooltip" name="graph_template"> {$form.graph_id.label}</td>
<td class="FormRowValue">{$form.graph_id.html}</td>
</tr>
<tr class="list_one">
<td class="FormRowField"><img class="helpTooltip" name="command_activate"> {$form.command_activate.label}</td>
<td class="FormRowValue">{$form.command_activate.html}</td>
</tr>
<tr class="list_two">
<td class="FormRowField"><img class="helpTooltip" name="command_comment"> {$form.command_comment.label}</td>
<td class="FormRowValue">{$form.command_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>
{/if}
</table>
</div>
<div id="validForm">
{if $o == "a" || $o == "c"}
<p class="oreonbutton">{$form.submitC.html}{$form.submitA.html}&nbsp;&nbsp;&nbsp;{$form.reset.html}</p>
{else if $o == "w"}
<p class="oreonbutton">{$form.change.html}</p>
{/if}
</div>
{$form.hidden}
</form>
{$helptext}
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ function myReplace()
}

$form->addElement('text', 'command_name', _("Command Name"), $attrsText);
$form->addElement('text', 'command_example', _("Argument Example"), $attrsText);
$form->addElement('textarea', 'command_line', _("Command Line"), $attrsTextarea);
$form->addElement('checkbox', 'enable_shell', _("Enable shell"), null, $attrsText);

Expand Down Expand Up @@ -249,7 +250,6 @@ function myReplace()
$form->addRule('command_line', _("Compulsory Command Line"), 'required');
$form->registerRule('exist', 'callback', 'testCmdExistence');
$form->addRule('command_name', _("Name is already in use"), 'exist');
$form->addElement('text', 'command_example', _("Argument Example"), $attrsText);
$form->setRequiredNote("<font style='color: red;'>*</font>&nbsp;" . _("Required fields"));

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}

$commandId = filter_var(
$commandId ?? null,
$commandId,
FILTER_SANITIZE_NUMBER_INT
);

Expand All @@ -59,7 +59,7 @@
}

$commandName = filter_var(
$commandName ?? null,
$commandName,
FILTER_SANITIZE_STRING
);

Expand Down

0 comments on commit 89c7d89

Please sign in to comment.