diff --git a/app/src/Controller/ApiUsersController.php b/app/src/Controller/ApiUsersController.php index c00389945..b119806b1 100644 --- a/app/src/Controller/ApiUsersController.php +++ b/app/src/Controller/ApiUsersController.php @@ -68,7 +68,8 @@ public function generate(string $id) { 'Cous', 'ApiUsers', 'CoSettings', 'Cos', 'Addresses', 'EmailAddresses', 'Groups', 'Servers', 'Types', 'Urls', 'Identifiers', 'HistoryRecords', 'TelephoneNumbers', 'Names', 'AdHocAttributes', 'PersonRoles', 'ExternalIdentities', - 'ExternalIdentityRoles', 'ExternalIdentitySources' + 'ExternalIdentityRoles', 'ExternalIdentitySources', 'ExternalIdentitySourceRecords', + 'IdentifierAssignments' ]) ) { $this->render('/Standard/add-edit-view-new'); diff --git a/app/src/Controller/StandardController.php b/app/src/Controller/StandardController.php index 87de46b0d..e2507b2e5 100644 --- a/app/src/Controller/StandardController.php +++ b/app/src/Controller/StandardController.php @@ -130,7 +130,8 @@ public function add() { 'Cous', 'ApiUsers', 'CoSettings', 'Cos', 'Addresses', 'EmailAddresses', 'Groups', 'Servers', 'Types', 'Urls', 'Identifiers', 'HistoryRecords', 'TelephoneNumbers', 'Names', 'AdHocAttributes', 'PersonRoles', 'ExternalIdentities', - 'ExternalIdentityRoles', 'ExternalIdentitySources' + 'ExternalIdentityRoles', 'ExternalIdentitySources', 'ExternalIdentitySourceRecords', + 'IdentifierAssignments' ]) ) { $this->render('/Standard/add-edit-view-new'); @@ -435,7 +436,8 @@ public function edit(string $id) { 'Cous', 'CoSettings', 'ApiUsers', 'Cos', 'Addresses', 'EmailAddresses', 'Groups', 'Servers', 'Types', 'Urls', 'Identifiers', 'HistoryRecords', 'TelephoneNumbers', 'Names', 'AdHocAttributes', 'PersonRoles', 'ExternalIdentities', - 'ExternalIdentityRoles', 'ExternalIdentitySources' + 'ExternalIdentityRoles', 'ExternalIdentitySources', 'ExternalIdentitySourceRecords', + 'IdentifierAssignments' ]) ) { $this->render('/Standard/add-edit-view-new'); @@ -893,7 +895,8 @@ public function view($id = null) { 'Cous', 'ApiUsers', 'CoSettings', 'Cos', 'Addresses', 'EmailAddresses', 'Groups', 'Servers', 'Types', 'Urls', 'Identifiers', 'HistoryRecords', 'TelephoneNumbers', 'Names', 'AdHocAttributes', 'PersonRoles', 'ExternalIdentities', - 'ExternalIdentityRoles', 'ExternalIdentitySources' + 'ExternalIdentityRoles', 'ExternalIdentitySources', 'ExternalIdentitySourceRecords', + 'IdentifierAssignments' ]) ) { $this->render('/Standard/add-edit-view-new'); diff --git a/app/templates/ExtIdentitySourceRecords/fields.inc b/app/templates/ExtIdentitySourceRecords/fields.inc index 59d62580c..b1eb8aa5f 100644 --- a/app/templates/ExtIdentitySourceRecords/fields.inc +++ b/app/templates/ExtIdentitySourceRecords/fields.inc @@ -47,12 +47,15 @@ print $this->Alert->alert($noticeText, 'information', false); // This view does not support add or edit if($vv_action == 'view') { // Link to External Identity, if known - - print $this->Field->control('source_key'); - - print $this->Field->control('last_update'); - - print $this->Field->control('reference_identifier'); - - print $this->Field->control(fieldName: 'source_record', cssClass: 'source-record'); + foreach([ + 'source_key', + 'last_update', + 'reference_identifier', + 'source_record' + ] as $field) { + print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => $field, + ]]); + } } diff --git a/app/templates/IdentifierAssignments/fields.inc b/app/templates/IdentifierAssignments/fields.inc index 864157b9b..7dfcb6d43 100644 --- a/app/templates/IdentifierAssignments/fields.inc +++ b/app/templates/IdentifierAssignments/fields.inc @@ -1,6 +1,6 @@ Field->control('description'); + foreach([ + 'description', + 'status', + 'plugin' + ] as $field) { + print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => $field, + ]]); + } - print $this->Field->control('status'); - - print $this->Field->control('plugin'); - - print $this->Field->control( - fieldName: 'context', - options: [ - 'onChange' => 'updateGadgets()' - ] - ); - - print $this->Field->control( - fieldName: 'identifier_type_id', - options: [ - 'onChange' => 'resetType("email-address-type-id")' + print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => 'context', + 'options' => [ + 'onChange' => 'updateGadgets()' + ] ] - ); - - print $this->Field->control( - fieldName: 'login', - cssClass: 'subfield' - ); + ]); - print $this->Field->control( - fieldName: 'email_address_type_id', - options: [ - 'onChange' => 'resetType("identifier-type-id")' + print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => 'identifier_type_id', + 'options' => [ + 'onChange' => 'resetType("email-address-type-id")' + ] ] - ); + ]); - print $this->Field->control('group_id'); + print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => 'login' + ] + ]); - print $this->Field->control('allow_empty'); + print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => 'email_address_type_id', + 'options' => [ + 'onChange' => 'resetType("identifier-type-id")' + ] + ] + ]); - print $this->Field->control('ordr'); + foreach(['group_id', + 'allow_empty', + 'ordr' + ] as $field) { + print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => $field, + ]]); + } } \ No newline at end of file diff --git a/app/templates/element/form/listItem.php b/app/templates/element/form/listItem.php index 7d1490ca4..0c6ff4995 100644 --- a/app/templates/element/form/listItem.php +++ b/app/templates/element/form/listItem.php @@ -38,14 +38,17 @@ $this->set('vv_field_arguments', $arguments); // Additional classes calculation -$classes = ''; -// XXX Even though i set the view vars above i can not access their values here/yet. -if(in_array($this->Fieeld->getFieldType($arguments['fieldName']), ['date', 'datetime', 'timestamp'])) { - $classes .= 'fields-datepicker '; -} +$classes = match ($arguments['fieldName']) { + 'date', + 'datetime', + 'timestamp' => 'fields-datepicker ', + 'source_record' => 'source-record ', + 'login' => 'subfield ', + default => '' +}; ?> -
  • +
  • element('form/fieldDiv')?>
  • diff --git a/app/templates/element/form/nameDiv.php b/app/templates/element/form/nameDiv.php index 8eca8c6c6..9d90cf458 100644 --- a/app/templates/element/form/nameDiv.php +++ b/app/templates/element/form/nameDiv.php @@ -64,6 +64,8 @@ ?>
    + +
    - + +
    \ No newline at end of file