cerebrate/templates/LocalTools/add.php

40 lines
1.2 KiB
PHP
Raw Normal View History

2021-04-30 23:59:53 +02:00
<?php
echo $this->element('genericElements/Form/genericForm', [
'data' => [
'description' => __('Add connections to local tools via any of the available connectors below.'),
'model' => 'LocalTools',
'fields' => [
[
'field' => 'connector',
'options' => $dropdownData['connectors'],
'type' => 'dropdown'
],
[
'field' => 'name'
],
2021-06-01 07:45:58 +02:00
[
'field' => 'exposed',
'type' => 'checkbox'
],
2021-04-30 23:59:53 +02:00
[
'field' => 'settings',
'type' => 'codemirror',
'codemirror' => [
'height' => '10rem',
2021-07-05 17:15:21 +02:00
'hints' => $connectors[0]['connector_settings']
]
2021-06-01 07:45:58 +02:00
],
[
'field' => 'description',
'type' => 'textarea'
],
2021-04-30 23:59:53 +02:00
],
'submit' => [
'action' => $this->request->getParam('action')
2021-06-01 07:45:58 +02:00
],
'url' => empty($redirect) ? null : $redirect
2021-04-30 23:59:53 +02:00
]
]);
?>
</div>