Skip to content

Commit

Permalink
rename field parameters. Added prefix field.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Apr 28, 2024
1 parent 2818eec commit 2e1efb2
Show file tree
Hide file tree
Showing 29 changed files with 54 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Cake\Validation\Validator;
use App\Lib\Enum\ProvisioningEligibilityEnum;
use App\Lib\Enum\ProvisioningStatusEnum;
use \FileConnector\Model\Entity\FileProvisioner;
use \FileProvisioner\Model\Entity\FileProvisioner;

class FileProvisionersTable extends Table {
use \App\Lib\Traits\ChangelogBehaviorTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ protected function resultToEntityData(array $result): array {
*/

public function retrieve(
\App\Model\Entity\ExternalIdentitySource $source,
\App\Model\Entity\ExternalIdentitySource $source,
string $source_key
): array {
// Read the field configuration (for resultToEntity)
Expand Down Expand Up @@ -423,7 +423,7 @@ public function ruleIsFileReadable($entity, array $options): string|bool {
*/

public function search(
\App\Model\Entity\ExternalIdentitySource $source,
\App\Model\Entity\ExternalIdentitySource $source,
array $searchAttrs
): array {
// Read the field configuration (for resultToEntity)
Expand Down
3 changes: 2 additions & 1 deletion app/src/Controller/ApiUsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public function generate(string $id) {
'Groups', 'Servers', 'Types', 'Urls', 'Identifiers', 'HistoryRecords',
'TelephoneNumbers', 'Names', 'AdHocAttributes', 'PersonRoles', 'ExternalIdentities',
'ExternalIdentityRoles', 'ExternalIdentitySources', 'ExternalIdentitySourceRecords',
'IdentifierAssignments', 'Jobs', 'JobHistoryRecords', 'People', 'GroupNestings'
'IdentifierAssignments', 'Jobs', 'JobHistoryRecords', 'People', 'GroupNestings',
'GroupMembers'
])
) {
$this->render('/Standard/add-edit-view-new');
Expand Down
9 changes: 6 additions & 3 deletions app/src/Controller/StandardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ public function add() {
'Groups', 'Servers', 'Types', 'Urls', 'Identifiers', 'HistoryRecords',
'TelephoneNumbers', 'Names', 'AdHocAttributes', 'PersonRoles', 'ExternalIdentities',
'ExternalIdentityRoles', 'ExternalIdentitySources', 'ExternalIdentitySourceRecords',
'IdentifierAssignments', 'Jobs', 'JobHistoryRecords', 'People', 'GroupNestings'
'IdentifierAssignments', 'Jobs', 'JobHistoryRecords', 'People', 'GroupNestings',
'GroupMembers'
])
) {
$this->render('/Standard/add-edit-view-new');
Expand Down Expand Up @@ -437,7 +438,8 @@ public function edit(string $id) {
'Groups', 'Servers', 'Types', 'Urls', 'Identifiers', 'HistoryRecords',
'TelephoneNumbers', 'Names', 'AdHocAttributes', 'PersonRoles', 'ExternalIdentities',
'ExternalIdentityRoles', 'ExternalIdentitySources', 'ExternalIdentitySourceRecords',
'IdentifierAssignments', 'Jobs', 'JobHistoryRecords', 'People', 'GroupNestings'
'IdentifierAssignments', 'Jobs', 'JobHistoryRecords', 'People', 'GroupNestings',
'GroupMembers'
])
) {
$this->render('/Standard/add-edit-view-new');
Expand Down Expand Up @@ -896,7 +898,8 @@ public function view($id = null) {
'Groups', 'Servers', 'Types', 'Urls', 'Identifiers', 'HistoryRecords',
'TelephoneNumbers', 'Names', 'AdHocAttributes', 'PersonRoles', 'ExternalIdentities',
'ExternalIdentityRoles', 'ExternalIdentitySources', 'ExternalIdentitySourceRecords',
'IdentifierAssignments', 'Jobs', 'JobHistoryRecords', 'People', 'GroupNestings'
'IdentifierAssignments', 'Jobs', 'JobHistoryRecords', 'People', 'GroupNestings',
'GroupMembers'
])
) {
$this->render('/Standard/add-edit-view-new');
Expand Down
2 changes: 1 addition & 1 deletion app/templates/Addresses/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'type_id',
'options' => [
'fieldOptions' => [
'default' => $vv_default_type
]
]]);
Expand Down
2 changes: 1 addition & 1 deletion app/templates/ApiUsers/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if($vv_action == 'add' || $vv_action == 'edit') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'username', // string
'prefix' => 'co_' . $vv_cur_co->id . '.'
'fieldPrefix' => 'co_' . $vv_cur_co->id . '.'
]
]);

Expand Down
14 changes: 6 additions & 8 deletions app/templates/CoSettings/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if($vv_action == 'edit') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'required_fields_address',
'options' => ['empty' => false]
'fieldOptions' => ['empty' => false]
]]);

print $this->element('form/listItem', [
Expand All @@ -57,13 +57,13 @@ if($vv_action == 'edit') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'permitted_fields_name',
'options' => ['empty' => false]
'fieldOptions' => ['empty' => false]
]]);

print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'required_fields_name',
'options' => ['empty' => false]
'fieldOptions' => ['empty' => false]
]]);

print $this->element('form/listItem', [
Expand All @@ -79,7 +79,7 @@ if($vv_action == 'edit') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'permitted_fields_telephone_number',
'options' => ['empty' => false]
'fieldOptions' => ['empty' => false]
]]);

print $this->element('form/listItem', [
Expand All @@ -103,14 +103,12 @@ if($vv_action == 'edit') {
'groupedControls' => [
// each key is the fieldName of the control we are going to create
'person_picker_email_address_type_id' => [
'options' => [
'empty' => true,
'fieldOptions' => [
'label' => __d('field', 'mail'),
],
],
'person_picker_identifier_type_id' => [
'options' => [
'empty' => true,
'fieldOptions' => [
'label' => __d('field', 'identifier'),
],
],
Expand Down
3 changes: 1 addition & 2 deletions app/templates/Cous/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ if($vv_action == 'add' || $vv_action == 'edit') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'parent_id',
'options' => ['empty' => true],
'labelText' => __d('field', 'parent_id')
'fieldLabel' => __d('field', 'parent_id')
]
]);
}
Expand Down
4 changes: 2 additions & 2 deletions app/templates/EmailAddresses/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'type_id',
'options' => [
'fieldOptions' => [
'default' => $vv_default_type
]
]]);
Expand All @@ -48,7 +48,7 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'verified',
'options' => [
'fieldOptions' => [
'readonly' => true
]
]]);
Expand Down
6 changes: 3 additions & 3 deletions app/templates/ExternalIdentityRoles/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'affiliation_type_id',
'labelText' => __d('field', 'affiliation')
'fieldLabel' => __d('field', 'affiliation')
]
]);

Expand Down Expand Up @@ -57,13 +57,13 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'sponsor_identifier',
'labelText' => __d('field', 'sponsor')
'fieldLabel' => __d('field', 'sponsor')
]
]);
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'manager_identifier',
'labelText' => __d('field', 'manager')
'fieldLabel' => __d('field', 'manager')
]
]);

Expand Down
2 changes: 1 addition & 1 deletion app/templates/ExternalIdentitySources/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if($vv_action == 'add' || $vv_action == 'edit') {
]
];
if($field == 'status') {
$params['arguments']['options'] = [
$params['arguments']['fieldOptions'] = [
'default' => \App\Lib\Enum\SyncModeEnum::Disabled
];
}
Expand Down
4 changes: 2 additions & 2 deletions app/templates/GroupMembers/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if($vv_action == 'add') {
$this->element('form/listItem', [
'arguments' => [
'fieldName' => '',
'labelText' => __d('field','name'),
'fieldLabel' => __d('field','name'),
'groupmember' => $vv_selected_person
]
]);
Expand All @@ -45,7 +45,7 @@ if($vv_action == 'add') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'person_id',
'options' => [
'fieldOptions' => [
'class' => 'form-control people-autocomplete',
'placeholder' => __d('operation','autocomplete.people.placeholder'),
'id' => 'person_id',
Expand Down
4 changes: 2 additions & 2 deletions app/templates/Groups/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ foreach(['name',
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => $field,
'options' => $options
'fieldOptions' => $options
]
]);
}
Expand All @@ -54,7 +54,7 @@ if($vv_action != 'add') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'group_type',
'options' => [
'fieldOptions' => [
'readonly' => true
]
]
Expand Down
2 changes: 1 addition & 1 deletion app/templates/HistoryRecords/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ if($vv_action == 'add' || $vv_action == 'view') {
'fieldName' => 'actor_person_id',
'status' => $vv_obj->actor_person->names[0]->full_name,
'link' => $viewLink,
'labelText' => __d('field', 'actor')
'fieldLabel' => __d('field', 'actor')
]
]);
}
Expand Down
6 changes: 3 additions & 3 deletions app/templates/IdentifierAssignments/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ if($vv_action == 'add' || $vv_action == 'edit') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'context',
'options' => [
'fieldOptions' => [
'onChange' => 'updateGadgets()'
]
]
Expand All @@ -94,7 +94,7 @@ if($vv_action == 'add' || $vv_action == 'edit') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'identifier_type_id',
'options' => [
'fieldOptions' => [
'onChange' => 'resetType("email-address-type-id")'
]
]
Expand All @@ -109,7 +109,7 @@ if($vv_action == 'add' || $vv_action == 'edit') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'email_address_type_id',
'options' => [
'fieldOptions' => [
'onChange' => 'resetType("identifier-type-id")'
]
]
Expand Down
2 changes: 1 addition & 1 deletion app/templates/Identifiers/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'type_id',
'options' => [
'fieldOptions' => [
'default' => $vv_default_type
]
]]);
Expand Down
2 changes: 1 addition & 1 deletion app/templates/Jobs/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if($vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'plugin',
'labelText' => __d('controller', 'Jobs', [1])
'fieldLabel' => __d('controller', 'Jobs', [1])
]
]);

Expand Down
4 changes: 2 additions & 2 deletions app/templates/Names/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'type_id',
'options' => [
'fieldOptions' => [
'default' => $vv_default_type
]
]]);
Expand All @@ -63,7 +63,7 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'description',
'options' => [
'fieldOptions' => [
'readonly' => $vv_obj->primary_name
]
]]);
Expand Down
4 changes: 2 additions & 2 deletions app/templates/People/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if($vv_action == 'add') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'names.0.'.$f,
'options' => [
'fieldOptions' => [
'required' => in_array($f, $vv_required_name_fields)
],
'fieldType' => 'string'
Expand All @@ -47,7 +47,7 @@ if($vv_action == 'add') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'names.0.type_id',
'options' => [
'fieldOptions' => [
'default' => $vv_default_name_type
],
'fieldType' => 'string'
Expand Down
9 changes: 3 additions & 6 deletions app/templates/PersonRoles/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,13 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' =>'affiliation_type_id',
'labelText' => __d('field', 'affiliation')
'fieldLabel' => __d('field', 'affiliation')
]
]);

print $this->element('form/listItem', [
'arguments' => [
'fieldName' =>'status',
'options' => [
'empty' => false
]
'fieldName' =>'status'
]
]);

Expand Down Expand Up @@ -77,7 +74,7 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
'fieldName' => $f.'_person_id',
'status' => $fname,
'link' => $flink,
'labelText' => __d('field', $f)
'fieldLabel' => __d('field', $f)
]
]);
}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/Pipelines/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if($vv_action == 'add' || $vv_action == 'edit') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'match_strategy',
'options' => [
'fieldOptions' => [
'onChange' => 'updateGadgets()'
],
'fieldType' => 'select'
Expand Down
2 changes: 1 addition & 1 deletion app/templates/Pronouns/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'type_id',
'options' => [
'fieldOptions' => [
'default' => $vv_default_type
]
]]);
Expand Down
4 changes: 2 additions & 2 deletions app/templates/ProvisioningTargets/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if($vv_action == 'add' || $vv_action == 'edit') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'description',
'options' => [
'fieldOptions' => [
'onChange' => 'updateGadgets()',
'default' => \App\Lib\Enum\ProvisionerModeEnum::QueueOnError
]
Expand All @@ -66,7 +66,7 @@ if($vv_action == 'add' || $vv_action == 'edit') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'description',
'options' => [
'fieldOptions' => [
'default' => 900
]
]]);
Expand Down
2 changes: 1 addition & 1 deletion app/templates/TelephoneNumbers/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'type_id',
'options' => [
'fieldOptions' => [
'default' => $vv_default_type
]
]]);
Expand Down
Loading

0 comments on commit 2e1efb2

Please sign in to comment.