use Civi\Api4\Generic\AutocompleteAction;
use Civi\Api4\Generic\BasicGetFieldsAction;
+use CRM_Afform_ExtensionUtil as E;
/**
* User-configurable forms.
$fields = [
[
'name' => 'name',
+ 'title' => E::ts('Name'),
],
[
'name' => 'type',
+ 'title' => E::ts('Type'),
'pseudoconstant' => ['optionGroupName' => 'afform_type'],
],
[
'name' => 'requires',
+ 'title' => E::ts('Requires'),
'data_type' => 'Array',
],
[
'name' => 'entity_type',
+ 'title' => E::ts('Block Entity'),
'description' => 'Block used for this entity type',
],
[
'name' => 'join_entity',
+ 'title' => E::ts('Join Entity'),
'description' => 'Used for blocks that join a sub-entity (e.g. Emails for a Contact)',
],
[
'name' => 'title',
+ 'title' => E::ts('Title'),
'required' => $self->getAction() === 'create',
],
[
'name' => 'description',
+ 'title' => E::ts('Description'),
],
[
'name' => 'is_dashlet',
+ 'title' => E::ts('Dashboard Dashlet'),
'data_type' => 'Boolean',
],
[
'name' => 'is_public',
+ 'title' => E::ts('Is Public'),
'data_type' => 'Boolean',
],
[
'name' => 'is_token',
+ 'title' => E::ts('Generate Tokens'),
'data_type' => 'Boolean',
],
[
'name' => 'contact_summary',
+ 'title' => E::ts('Contact Summary'),
'data_type' => 'String',
'options' => [
- 'block' => ts('Contact Summary Block'),
- 'tab' => ts('Contact Summary Tab'),
+ 'block' => E::ts('Contact Summary Block'),
+ 'tab' => E::ts('Contact Summary Tab'),
],
],
[
'name' => 'summary_contact_type',
+ 'title' => E::ts('Summary Contact Type'),
'data_type' => 'Array',
'options' => \CRM_Contact_BAO_ContactType::contactTypePairs(),
],
[
'name' => 'icon',
+ 'title' => E::ts('Icon'),
'description' => 'Icon shown in the contact summary tab',
],
[
'name' => 'server_route',
+ 'title' => E::ts('Page Route'),
],
[
'name' => 'permission',
+ 'title' => E::ts('Permission'),
'data_type' => 'Array',
],
[
'name' => 'permission_operator',
+ 'title' => E::ts('Permission Operator'),
'data_type' => 'String',
'options' => \CRM_Core_SelectValues::andOr(),
],
[
'name' => 'redirect',
+ 'title' => E::ts('Post-Submit Page'),
],
[
'name' => 'create_submission',
+ 'title' => E::ts('Log Submissions'),
'data_type' => 'Boolean',
],
[
'name' => 'navigation',
+ 'title' => E::ts('Navigation Menu'),
'data_type' => 'Array',
'description' => 'Insert into navigation menu {parent: string, label: string, weight: int}',
],
[
'name' => 'layout',
+ 'title' => E::ts('Layout'),
'data_type' => 'Array',
'description' => 'HTML form layout; format is controlled by layoutFormat param',
],
$fields[] = [
'name' => 'module_name',
'type' => 'Extra',
+ 'description' => 'Name of generated Angular module (CamelCase)',
'readonly' => TRUE,
];
$fields[] = [
'name' => 'directive_name',
'type' => 'Extra',
+ 'description' => 'Html tag name to invoke this form (dash-case)',
'readonly' => TRUE,
];
$fields[] = [