(2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Formfields * */ return [ 'apikey' => [ 'title' => UI::getLng('menue.main.apikeys'), 'sections' => [ 'section_a' => [ 'fields' => [ 'loginname' => [ 'label' => UI::getLng('login.username'), 'type' => 'label', 'value' => $result['loginname'] ?? $result['adminname'] ], 'apikey' => [ 'label' => 'API key', 'type' => 'text', 'readonly' => true, 'value' => $result['apikey'] ], 'secret' => [ 'label' => 'Secret', 'type' => 'text', 'readonly' => true, 'value' => $result['secret'] ], 'allowed_from' => [ 'label' => ['title' => UI::getLng('apikeys.allowed_from'), 'description' => UI::getLng('apikeys.allowed_from_help')], 'type' => 'text', 'value' => $result['allowed_from'], ], 'valid_until' => [ 'label' => ['title' => UI::getLng('apikeys.valid_until'), 'description' => UI::getLng('apikeys.valid_until_help')], /** @TODO datetime-picker */ 'type' => 'text', 'value' => $result['valid_until'] < 0 ? "" : $result['valid_until'] ] ] ] ] ] ];