Skip to content
Snippets Groups Projects
Commit 8172154b authored by Yas Naoi's avatar Yas Naoi Committed by Yas Naoi
Browse files

Issue #3167105 by yas, Xiaohua Guan: Refactor VMware admin settings form

parent d7b2089b
No related branches found
No related tags found
No related merge requests found
......@@ -84,19 +84,6 @@ class VmwareAdminSettings extends ConfigFormBase {
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->config('vmware.settings');
$form['vmware_cloud_config_icon'] = [
'#type' => 'managed_file',
'#title' => $this->t('VMware Cloud Config Icon'),
'#default_value' => [
'fids' => $config->get('vmware_cloud_config_icon'),
],
'#description' => $this->t('Upload an image to represent VMware.'),
'#upload_location' => 'public://images/icons',
'#upload_validators' => [
'file_validate_is_image' => [],
],
];
$form['views'] = [
'#type' => 'details',
'#title' => $this->t('Views'),
......@@ -125,6 +112,25 @@ class VmwareAdminSettings extends ConfigFormBase {
'#default_value' => $config->get('vmware_view_items_per_page'),
];
$form['icon'] = [
'#type' => 'details',
'#title' => $this->t('Icon'),
'#open' => TRUE,
];
$form['icon']['vmware_cloud_config_icon'] = [
'#type' => 'managed_file',
'#title' => $this->t('VMware cloud service provider icon'),
'#default_value' => [
'fids' => $config->get('vmware_cloud_config_icon'),
],
'#description' => $this->t('Upload an image to represent VMware.'),
'#upload_location' => 'public://images/icons',
'#upload_validators' => [
'file_validate_is_image' => [],
],
];
return parent::buildForm($form, $form_state);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment