Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(policies): fixed inherit method which shows HTML input
Browse files Browse the repository at this point in the history
Signed-off-by: Domingo Oropeza <doropeza@teclib.com>
  • Loading branch information
DIOHz0r committed Feb 8, 2018
1 parent 2b59152 commit b89c662
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
5 changes: 4 additions & 1 deletion inc/policybase.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,12 @@ public function unapply(PluginFlyvemdmFleet $fleet, $value, $itemtype, $itemId)
}

/**
* @param string $value value of the task
* @param string $itemType type of the item linked to the task
* @param integer $itemId ID of the item
* @return string
*/
public function showValueInput($value = '', $itemtype = '', $itemId = 0) {
public function showValueInput($value = '', $itemType = '', $itemId = 0) {
$html = '<input name="value" value="' . $value . '" >';

return $html;
Expand Down
8 changes: 7 additions & 1 deletion inc/policyboolean.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ public function getMqttMessage($value, $itemtype, $itemId) {
return $array;
}

public function showValueInput($value = '', $itemtype = '', $itemId = 0) {
/**
* @param string $value
* @param string $itemType
* @param int $itemId
* @return int|string
*/
public function showValueInput($value = '', $itemType = '', $itemId = 0) {
return Dropdown::showYesNo('value', $value, -1, ['display' => false]);
}

Expand Down
2 changes: 1 addition & 1 deletion inc/policydeployapplication.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public function unapply(PluginFlyvemdmFleet $fleet, $value, $itemtype, $itemId)
return true;
}

public function showValueInput($value = '', $itemtype = '', $itemId = 0) {
public function showValueInput($value = '', $itemType = '', $itemId = 0) {
$value = json_decode($value, JSON_OBJECT_AS_ARRAY);
$out = PluginFlyvemdmPackage::dropdown([
'display' => false,
Expand Down
5 changes: 4 additions & 1 deletion inc/policydeployfile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,12 @@ public function unapply(PluginFlyvemdmFleet $fleet, $value, $itemtype, $itemId)
}

/**
* @param string $value
* @param string $itemType
* @param int $itemId
* @return string|void
*/
public function showValueInput($value = '') {
public function showValueInput($value = '', $itemType = '', $itemId = 0) {
$out = PluginFlyvemdmFile::dropdown([
'display' => false,
'name' => 'items_id',
Expand Down
5 changes: 4 additions & 1 deletion inc/policydropdown.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ public function translateData() {
}

/**
* @param string $value
* @param string $itemType
* @param int $itemId
* @return int|string
*/
public function showValueInput($value = '', $itemtype = '', $itemId = 0) {
public function showValueInput($value = '', $itemType = '', $itemId = 0) {
return Dropdown::showFromArray('value', $this->valueList, ['display' => false, 'value' => $value]);
}

Expand Down
4 changes: 2 additions & 2 deletions inc/policyinterface.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ public function unapply(PluginFlyvemdmFleet $fleet, $value, $itemtype, $itemId);
/**
* return HTML input to set policy value
* @param string $value value of the task
* @param string $itemtype type of the item linked to the task
* @param string $itemType type of the item linked to the task
* @param integer $itemId ID of the item
* @return string
*/
public function showValueInput($value = '', $itemtype = '', $itemId = 0);
public function showValueInput($value = '', $itemType = '', $itemId = 0);


/**
Expand Down

0 comments on commit b89c662

Please sign in to comment.