Skip to content

Commit

Permalink
refactor(condition): cleanup JS, use method to get type
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Aug 7, 2020
1 parent 4491e7a commit 57a9831
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/condition.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function getConditionsFromItem(CommonDBTM $item) {
'SELECT' => ['id'],
'FROM' => self::getTable(),
'WHERE' => [
'itemtype' => get_class($item),
'itemtype' => $item->getType(),
'items_id' => $item->getID()
],
'ORDER' => 'order ASC'
Expand Down Expand Up @@ -243,7 +243,7 @@ public function showConditionsForItem(CommonDBTM $item) {
$this->getEnumShowRule(),
[
'value' => $item->fields['show_rule'],
'on_change' => 'plugin_formcreator_toggleCondition(this, "' . $item->getType() . '");',
'on_change' => 'plugin_formcreator_toggleCondition(this);',
'rand' => $rand,
]
);
Expand Down

0 comments on commit 57a9831

Please sign in to comment.