cerebrate/templates/LocalTools/connection_request.php

32 lines
1.0 KiB
PHP

<?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',
'default' => $data['remoteTool']['connectorName'],
'type' => 'hidden'
],
],
'submit' => [
'action' => $this->request->getParam('action')
]
]
]);
?>