-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor fields.inc to be configuration only (CFM-218) #342
Merged
benno
merged 14 commits into
COmanage:develop
from
arlen:feature-cfm218-fieldsIncConfigOnly
Nov 22, 2025
+3,008
−4,858
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e39142f
Refactor fields.inc to be configuration only - first pass. (CFM-218)
arlen b258a34
Fix fields.inc for EmailVerifiers to use grouped controls. (CFM-218)
arlen d25b30b
Simplify fields.inc configuration. (CFM-218)
arlen 34c2d2d
Remove 'edit only' blocking statements. (CFM-218)
arlen f2d52ba
Remove leftover call to jsLocalOnLoad function (CFM-218)
arlen ef43d64
Standardize fields.inc 'type' and 'options'; add arbitrary HTML field…
arlen 7f166fa
Add 'public' keyword to new FieldHelper functions (CFM-218)
arlen 9bd9f99
Improve tests for COmanange CO (CFM-218)
arlen 11829dd
Refactor clonable fields for configuration-only approach (CFM-218)
arlen e8084bf
Re-label clonable fields collection as "metadata" (CFM-218)
arlen e015a94
Improve alert banner configuration (CFM-218/CFM-465)
arlen 1e4f910
Adjust Passwords/fields.inc to be configuration only and work in the …
arlen 010b380
Cleanup small inconsistencies (CFM-218)
arlen dca3f88
Improve restructureFieldArguments method (CFM-218)
arlen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
app/availableplugins/ApiConnector/templates/ApiSources/fields-nav.inc
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 54 additions & 39 deletions
93
app/availableplugins/PasswordAuthenticator/templates/Passwords/fields.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,48 +1,63 @@ | ||
| <?php | ||
| /** | ||
| * COmanage Registry Passwords Fields | ||
| * | ||
| * Portions licensed to the University Corporation for Advanced Internet | ||
| * Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
| * See the NOTICE file distributed with this work for additional information | ||
| * regarding copyright ownership. | ||
| * | ||
| * UCAID licenses this file to you under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with the | ||
| * License. You may obtain a copy of the License at: | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| * @link https://www.internet2.edu/comanage COmanage Project | ||
| * @package registry | ||
| * @since COmanage Registry v5.2.0 | ||
| * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
| */ | ||
| /** | ||
| * COmanage Registry Passwords Fields | ||
| * | ||
| * Portions licensed to the University Corporation for Advanced Internet | ||
| * Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
| * See the NOTICE file distributed with this work for additional information | ||
| * regarding copyright ownership. | ||
| * | ||
| * UCAID licenses this file to you under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with the | ||
| * License. You may obtain a copy of the License at: | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| * @link https://www.internet2.edu/comanage COmanage Project | ||
| * @package registry | ||
| * @since COmanage Registry v5.2.0 | ||
| * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
| */ | ||
|
|
||
| // We provide the current password status in a banner message since that's all the | ||
| // information we really want to display about a password. | ||
| $alerts = [ | ||
| [ | ||
| 'type' => 'information', | ||
| 'message' => $vv_status->comment | ||
| ] | ||
| ]; | ||
|
|
||
| print $this->element('notify/banner', ['info' => $vv_status->comment]); | ||
| $fields = []; | ||
|
|
||
| if(!$vv_status->locked) { | ||
| print $this->element('form/listItem', [ | ||
| 'arguments' => [ | ||
| 'fieldName' => 'password', | ||
| $fields = [ | ||
| 'password', | ||
| 'password2' => [ | ||
| 'type' => 'password' | ||
| ] | ||
| ]); | ||
| ]; | ||
| // Inject the parent keys | ||
| $hidden = [ | ||
| 'password_authenticator_id' => $vv_authenticator->password_authenticator->id, | ||
| 'person_id' => $vv_status->person_id | ||
| ]; | ||
| } else { | ||
| $suppress_submit = true; | ||
| } | ||
|
|
||
| print $this->element('form/listItem', [ | ||
| 'arguments' => [ | ||
| 'fieldName' => 'password2', | ||
| 'fieldOptions' => [ | ||
| 'type' => 'password' | ||
| ] | ||
| ] | ||
| ]); | ||
| } | ||
| $topLinks[] = [ | ||
| 'icon' => 'history', | ||
| 'order' => 'Default', | ||
| 'label' => __d('operation', 'reset'), | ||
| 'link' => [ | ||
| 'controller' => 'authenticators', | ||
| 'action' => 'reset', | ||
| ] | ||
| ]; |
44 changes: 0 additions & 44 deletions
44
app/availableplugins/PipelineToolkit/templates/IdentifierMappers/fields-nav.inc
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I attempted to add the subnavigation for API Sources config similar to File Sources, Sql Sources (etc). When this block is included it throws an error similar to what we see in https://todos.internet2.edu/browse/CFM-475
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the plan to address this? ie: CFM-475 is marked resolved, so either we should have a plan to address the underlying issue or we shouldn't commit a bunch of commented out broken code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will pull this code out for now. We'll need to review all such places where subnavigation should be used - where configuration (for example) should be on a tab next to its entity.