From 5bdfbdb6f52e2cee8e0302e062db84c31b6046b9 Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Sat, 27 Apr 2024 20:39:54 +0300 Subject: [PATCH] Pipelines --- app/src/View/Helper/FieeldHelper.php | 2 +- app/templates/Pipelines/fields.inc | 63 ++++++++++++++++------------ 2 files changed, 37 insertions(+), 28 deletions(-) diff --git a/app/src/View/Helper/FieeldHelper.php b/app/src/View/Helper/FieeldHelper.php index 6ca565231..21e69ed2e 100644 --- a/app/src/View/Helper/FieeldHelper.php +++ b/app/src/View/Helper/FieeldHelper.php @@ -313,7 +313,7 @@ public function formField(string $fieldName, // Cause any select (except status) to render with a blank option, even // if the field is required. This makes it clear when a value needs to be set. // Note this will be ignored for non-select controls. - if($fieldName === 'status') { + if(\in_array($fieldName, ['status', 'sync_status_on_delete'], true)) { $fieldArgs['empty'] = false; } elseif(isset($options['empty'])) { $fieldArgs['empty'] = $options['empty']; diff --git a/app/templates/Pipelines/fields.inc b/app/templates/Pipelines/fields.inc index e4efd0ca2..a9ee9794f 100644 --- a/app/templates/Pipelines/fields.inc +++ b/app/templates/Pipelines/fields.inc @@ -50,37 +50,46 @@ Field->control('description'); - - print $this->Field->control('status'); - - // Match Strategy - print $this->Field->control( - fieldName: 'match_strategy', - controlType: 'select', - options: [ - 'onChange' => 'updateGadgets()' + print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => 'description' ] - ); - - print $this->Field->control('match_email_address_type_id'); - - print $this->Field->control('match_identifier_type_id'); - - // Sync Strategy -// print $this->Field->control('sync_on_update'); - -// print $this->Field->control('sync_on_delete'); + ]); - print $this->Field->control('sync_status_on_delete', ['empty' => false]); - - print $this->Field->control('sync_cou_id'); - - print $this->Field->control('sync_replace_cou_id'); + print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => 'status' + ] + ]); - print $this->Field->control('sync_affiliation_type_id'); + // Match Strategy + print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => 'match_strategy', + 'options' => [ + 'onChange' => 'updateGadgets()' + ], + 'fieldType' => 'select' + ] + ]); - print $this->Field->control('sync_identifier_type_id'); + foreach([ + 'match_email_address_type_id', + 'match_identifier_type_id', +// 'sync_on_update', +// 'sync_on_delete', + 'sync_status_on_delete', + 'sync_cou_id', + 'sync_replace_cou_id', + 'sync_affiliation_type_id', + 'sync_identifier_type_id', + ] as $field) { + print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => $field, + ] + ]); + } // Connections //XXX