Verified Commit e9d7be2d authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(plugins) Adapt code to core changes on renderInputField

issue #6061
parent b4515c83
......@@ -31,7 +31,8 @@ class CertificateOrderedArrayAttribute extends OrderedArrayAttribute
'title' => _('Download'),
'alt' => _('Download'),
'class' => 'center'
]
],
FALSE
).$img;
$nbicons++;
......
......@@ -122,7 +122,8 @@ class DhcpSectionsAttribute extends DialogOrderedArrayAttribute
'title' => _('Insert new DHCP section'),
'alt' => _('Insert new DHCP section'),
'class' => 'center',
]
],
FALSE
).$img;
$nbicons++;
......
......@@ -117,18 +117,42 @@ class PackagesAttribute extends DialogOrderedArrayAttribute
list ($img, $nbicons) = parent::genRowIcons($key, $value);
$key64 = base64_encode($key);
if (preg_match('/\-$/', $value)) {
$img = '<input type="image" formnovalidate="formnovalidate" src="geticon.php?context=actions&icon=add&size=16"'.
' name="'.$id.'_removal_'.$key64.'" class="center" alt="'._('Mark for installation').'" title="'._('Mark for installation').'"/>'.
$img;
$img = $this->renderInputField(
'image', $id.'_removal_'.$key64,
[
'src' => 'geticon.php?context=actions&icon=add&size=16',
'title' => _('Mark for installation'),
'alt' => _('Mark for installation'),
'formnovalidate' => 'formnovalidate',
'class' => 'center'
],
FALSE
).$img;
} else {
$img = '<input type="image" formnovalidate="formnovalidate" src="geticon.php?context=actions&icon=remove&size=16"'.
' name="'.$id.'_removal_'.$key64.'" class="center" alt="'._('Mark for removal').'" title="'._('Mark for removal').'"/>'.
$img;
$img = $this->renderInputField(
'image', $id.'_removal_'.$key64,
[
'src' => 'geticon.php?context=actions&icon=remove&size=16',
'title' => _('Mark for removal'),
'alt' => _('Mark for removal'),
'formnovalidate' => 'formnovalidate',
'class' => 'center'
],
FALSE
).$img;
}
if (isset($this->buffer[$key]['HASTEMPLATE']) && $this->buffer[$key]['HASTEMPLATE']) {
$img = '<input type="image" formnovalidate="formnovalidate" src="geticon.php?context=actions&icon=package-configure&size=16"'.
' name="'.$id.'_config_'.$key64.'" class="center" alt="'._('Edit configuration').'" title="'._('Edit configuration').'"/>'.
$img;
$img = $this->renderInputField(
'image', $id.'_config_'.$key64,
[
'src' => 'geticon.php?context=actions&icon=package-configure&size=16',
'title' => _('Edit configuration'),
'alt' => _('Edit configuration'),
'formnovalidate' => 'formnovalidate',
'class' => 'center'
],
FALSE
).$img;
} else {
$img = '<img src="images/empty.png" alt="" style="width:16px;"/>'.$img;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment