protected function SmartlingTranslatorUi::checkoutSettingsCreateJobForm in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 src/SmartlingTranslatorUi.php \Drupal\tmgmt_smartling\SmartlingTranslatorUi::checkoutSettingsCreateJobForm()
Returns "Create job" form part.
Parameters
\Drupal\tmgmt\TranslatorInterface $translator:
Return value
array
1 call to SmartlingTranslatorUi::checkoutSettingsCreateJobForm()
- SmartlingTranslatorUi::checkoutSettingsForm in src/
SmartlingTranslatorUi.php - Form callback for the checkout settings form.
File
- src/
SmartlingTranslatorUi.php, line 600 - Contains \Drupal\tmgmt_smartling\SmartlingTranslatorUi.
Class
- SmartlingTranslatorUi
- Smartling translator UI.
Namespace
Drupal\tmgmt_smartlingCode
protected function checkoutSettingsCreateJobForm(TranslatorInterface $translator) {
return [
'name' => [
'#type' => 'textfield',
'#title' => t('Name'),
'#states' => [
'required' => [
':input[name="settings[switcher]"]' => [
'value' => 0,
],
],
],
],
'description' => [
'#type' => 'textarea',
'#title' => t('Description'),
],
'due_date' => [
'#type' => 'datetime',
'#date_year_range' => date('Y') . ':+5',
'#default_value' => NULL,
'#title' => t('Due date'),
'#date_increment' => 60,
],
'authorize' => [
'#type' => 'checkbox',
'#title' => t('Authorize'),
'#default_value' => $translator
->getSetting('auto_authorize_locales'),
],
];
}