Skip to content

Commit

Permalink
Pronouns,ProvisioningTargets,ProvisioningHistoryRecords
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Apr 27, 2024
1 parent 63d3719 commit ccee52a
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 47 deletions.
31 changes: 26 additions & 5 deletions app/templates/Pronouns/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,34 @@
*/

if($vv_action == 'add' || $vv_action == 'edit' || $vv_action == 'view') {
print $this->Field->control('pronouns');
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'pronouns'
]]);

print $this->Field->control('type_id', ['default' => $vv_default_type]);
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'type_id',
'options' => [
'default' => $vv_default_type
]
]]);

print $this->Field->control('language');
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'language'
]]);

print $this->Field->control('frozen');
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'frozen'
]]);
}

print $this->Field->sourceControl($vv_obj);
if($vv_action == 'edit' || $vv_action == 'view') {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'source',
'entity' => $vv_obj
]]);
}
54 changes: 33 additions & 21 deletions app/templates/ProvisioningHistoryRecords/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,41 @@ if($vv_action == 'view') {
$vv_obj->person->id
],
];

print $this->Field->statusControl(
'person_id',
$vv_obj->person->primary_name->full_name,
$viewLink
);

print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'person_id',
'status' => $vv_obj->person->primary_name->full_name,
'link' => $viewLink,
]
]);
} else {
print $this->Field->statusControl(
'group_id',
$vv_obj->group->name,
[
'url' => [
'controller' => 'groups',
'action' => 'edit',
$vv_obj->group->id
]
$viewLink = [
'url' => [
'controller' => 'groups',
'action' => 'edit',
$vv_obj->group->id
]
);
}
];

print $this->Field->control('subject_model');
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'group_id',
'status' => $vv_obj->group->name,
'link' => $viewLink,
]
]);
}

print $this->Field->control('subjectid');

print $this->Field->control('created');
foreach([
'subject_model',
'subjectid',
'created',
] as $field) {
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => $field
]
]);
}
}
55 changes: 34 additions & 21 deletions app/templates/ProvisioningTargets/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,41 @@ alert("Queue modes not yet implemented"); // XXX CFM-26
<?php
// This view does not support read-only
if($vv_action == 'add' || $vv_action == 'edit') {
print $this->Field->control('description');
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'description'
]]);

print $this->Field->control(
fieldName: 'status',
options: [
'onChange' => 'updateGadgets()',
'default' => \App\Lib\Enum\ProvisionerModeEnum::QueueOnError
]
);

print $this->Field->control(
fieldName: 'retry_interval',
options: [
'default' => 900
],
cssClass: 'subfield'
);
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'description',
'options' => [
'onChange' => 'updateGadgets()',
'default' => \App\Lib\Enum\ProvisionerModeEnum::QueueOnError
]
]]);

print $this->Field->control('plugin');
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'description',
'options' => [
'default' => 900
]
]]);

// Not yet implemented (CFM-26)
// print $this->Field->control('provisioning_group_id');

print $this->Field->control('ordr');
print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'plugin'
]]);

// // todo: Not yet implemented (CFM-26)
// print $this->element('form/listItem', [
// 'arguments' => [
// 'fieldName' => 'provisioning_group_id'
// ]]);

print $this->element('form/listItem', [
'arguments' => [
'fieldName' => 'ordr'
]]);
}
1 change: 1 addition & 0 deletions app/templates/element/form/listItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
'datetime',
'timestamp' => 'fields-datepicker ',
'source_record' => 'source-record ',
'retry_interval',
'login' => 'subfield ',
default => ''
};
Expand Down

0 comments on commit ccee52a

Please sign in to comment.