cerebrate/templates/LocalTools/connection_request.php

32 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2021-06-10 13:45:46 +02:00
<?php
$dropdown = [];
foreach ($data['local_tools'] as $local_tool) {
$dropdown[$local_tool['id']] = $local_tool['name'];
}
echo $this->element('genericElements/Form/genericForm', [
'data' => [
'description' => __(
'Connect the remote tool ({0}) on remote brood ({1}) using the local tool selected below.',
h($data['remoteTool']['name']),
h($data['remoteCerebrate']['name'])
),
'model' => 'LocalTools',
'fields' => [
[
'field' => 'local_tool_id',
'options' => $dropdown,
'type' => 'dropdown'
],
[
'field' => 'tool_name',
2021-06-16 09:47:26 +02:00
'default' => $data['remoteTool']['connectorName'],
'type' => 'hidden'
],
2021-06-10 13:45:46 +02:00
],
'submit' => [
'action' => $this->request->getParam('action')
]
]
]);
?>