Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/class/cmd.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,8 @@ public function toHtml($_version = 'dashboard', $_options = '') {
$coupleArray = explode('|', $element);
$cmdValue = $this->getCmdValue();
if (is_object($cmdValue) && $cmdValue->getType() == 'info') {
if ($cmdValue->execCmd() == $coupleArray[0] || $cmdValue->execCmd() == $coupleArray[1]) {
$keySeclected = intval($this->getConfiguration('listValueSelected', 0));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$keySelected (instead of $keySeclected)

if ($cmdValue->execCmd() == $coupleArray[$keySeclected]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$keySelected

$listOption .= '<option value="' . $coupleArray[0] . '" selected>' . $coupleArray[1] . '</option>';
$foundSelect = true;
} else {
Expand Down
6 changes: 6 additions & 0 deletions desktop/modal/cmd.configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@
?>
</div>
</div>
<div class="form-group">
<label class="col-xs-4 control-label">{{Sélection par index de valeur}}</label>
<div class="col-xs-8">
<input type="checkbox" class="cmdAttr" data-l1key="configuration" data-l2key="listValueSelected" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a select input will be more appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.
Should be easier to understand, I think.

</div>
</div>
<?php } ?>
<div class="form-group">
<label class="col-xs-4 control-label">{{Dernière exécution par}}</label>
Expand Down