Skip to content

Improve accept/decline layout in InvitationAccepters plugin (CFM-428) #259

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
9fec427
Initial implementation of Enrollment Flow infrastructure and Attribut…
Feb 27, 2024
a1ea421
Miscellaneous Enrollment fixes (CFM-31)
Feb 28, 2024
e3332e5
Refactor EnrollmentFlow* files:setPermissions
Ioannis Mar 3, 2024
2557d43
Add top-level subnavigation to Enrollment Flow and Enrollment Flow St…
arlen Mar 7, 2024
fe55799
Add main-menu navigation for Petitions and Enrollments (CFM-31)
arlen Mar 8, 2024
b56f338
Add titles to Petition steps and buttons to the steps index (CFM-31) …
arlen Mar 13, 2024
4549f2e
Simplify end-user Petition views (CFM-31) (#175)
arlen Mar 13, 2024
7e469d5
Subnavigation fix for Enrollment Flow steps (CFM-31) (#177)
arlen Mar 27, 2024
e92b586
Post-rebase vs. develop corrections (CFM-31)
arlen Aug 14, 2024
0101b94
Update AttributeCollectors permissions definition (CFM-31)
Sep 22, 2024
c8fc075
fix EnrollmetFlow and EnrollmentFlowSteps fields
Ioannis Sep 23, 2024
42ee120
Fix EnrollmentAttributes fiels
Ioannis Sep 24, 2024
23bac8d
lookupPersonByLogin vs lookupPersonForLogin fix
Ioannis Sep 24, 2024
63c5968
Render Enrollment Attributes edit/add/view in a modal
Ioannis Sep 24, 2024
8788021
remove duplicate field
Ioannis Sep 24, 2024
bae9488
Correct test for $rowActions post-rebase. (CFM-31)
arlen Sep 24, 2024
9a427e2
feature-cfm31-subnavigation (#217)
Ioannis Sep 26, 2024
7be2d7d
Fix EnrollmentFlow broken start view. Fix petitions view.
Ioannis Sep 27, 2024
bb01666
Fix dispatch View to use the new FieldHelper.php
Ioannis Sep 27, 2024
1c97ecb
Fix missing curly brach error
Ioannis Sep 27, 2024
8fcfc71
Improve Form global edit mode handling
Ioannis Sep 27, 2024
7c54415
Fix petition view issue
Ioannis Sep 27, 2024
b97ba33
Add filter block for Enrollment Flows and Petitions
Ioannis Sep 27, 2024
65f370d
Filter Petitions by COU
Ioannis Sep 27, 2024
0e4f691
Make dispatch view editable
Ioannis Sep 27, 2024
2774525
Add petition "start" action to $isActivePetition boolean in default.p…
arlen Sep 27, 2024
651eccc
Add enrollment attribute view should redirect to "self" (CFM-31) (#219)
arlen Sep 27, 2024
1587699
Remove deprecated subnavigation config (CFM-31) (#220)
arlen Sep 27, 2024
20ba5da
fix iframe flash message rendering
Ioannis Sep 27, 2024
27fc36e
Simple fix for h1 title (CFM-31) (#221)
arlen Sep 27, 2024
bfe37bd
Ensure a title exists on Petition start, dispatch, and resume (CFM-31…
arlen Sep 27, 2024
4289852
Remove unnecessary top-link from Enrollment Flow properties (CFM-31) …
arlen Sep 27, 2024
13b9e1c
fix deep nested navigation tab id calculation
Ioannis Sep 28, 2024
6ab65c2
Add TabHelper missing dependency
Ioannis Sep 29, 2024
b9f19e9
Refactor Enrollment Attributes Add/Edit view (#224)
Ioannis Sep 30, 2024
b8c14db
Fix wrong url id harvest (#225)
Ioannis Sep 30, 2024
5e8df10
Set petition titles (Enrollment Flow name, Flow Step description) in …
arlen Sep 30, 2024
f064512
fix subnavigation issues (#228)
Ioannis Oct 1, 2024
d206890
Cleanup to subnavigation and titling (CFM-31) (#229)
arlen Oct 2, 2024
80b200f
Initial implementation of BasicAttributeCollector (CFM-415) (#231)
benno Oct 3, 2024
d6cb69b
Subnavigation fixes (#230)
Ioannis Oct 3, 2024
7e73653
Fix field config for select elements in Pipelines and Message Templat…
arlen Oct 10, 2024
f4c5359
fix FieldHelper.php fieldType missing fieldSelectOptions issue
Ioannis Oct 14, 2024
69e710c
Fix tab rendering for EnrollmentFlow plugins (#235)
Ioannis Oct 14, 2024
5c52be2
Conditionally include a 'Cancel' button next to 'Save' (CFM-31) (#236)
arlen Oct 14, 2024
1008163
Fix use case:Plugin.Hierarchy deep nested when no hasMany association.
Ioannis Oct 15, 2024
59e1267
Merge pull request #237 from Ioannis/fix_deep_nested_association_calc…
Ioannis Oct 15, 2024
d592cf4
Check for hasMany associations before rendering a tab
Ioannis Oct 16, 2024
23ec40a
Merge pull request #238 from Ioannis/Fix_missing_associations_tablist
Ioannis Oct 16, 2024
e24ecc7
Fix misspelled variable
Ioannis Oct 21, 2024
fd0e917
Fix Petition Attributes Form rendering (#241)
Ioannis Oct 23, 2024
039d678
Initial theme commit for Enrollment Flow Attribute Collector (CFM-31)…
arlen Oct 23, 2024
7378151
Update of attribute collector list-element class names for better con…
arlen Oct 23, 2024
77ccfbb
Fix Attribute Collectors dispatch view dependency data
Ioannis Oct 24, 2024
4ca3036
Select attribute fields by css class name (CFM-31) (#245)
arlen Oct 24, 2024
444fede
Initial commit of Mostly Static Pages (CFM-62), InvitationAccepter (C…
Oct 31, 2024
68db3dd
Initial implementation of Identifier Collector Enroller (CFM-111)
Nov 3, 2024
641d73d
Update attribute collector CSS selectors to reflect updated DOM class…
arlen Nov 6, 2024
7d8135a
First pass at cleaning up Petition view (CFM-31) (#246)
arlen Nov 8, 2024
6a90028
Add support for attribute collection fieldsets (#244)
Ioannis Nov 13, 2024
701b8d1
Switch to Material Symbols (CFM-404) (#248)
arlen Nov 13, 2024
5ce3f4a
Style Basic Attribute Collector and ensure that names and telephone n…
arlen Nov 15, 2024
b444d89
Fix flash error construction.name type_id field is required
Ioannis Nov 15, 2024
7474127
method parameters must not come before the required ones as of php 8.1
Ioannis Nov 15, 2024
89bb59d
cfm-31_people-picker (#250)
Ioannis Nov 18, 2024
814d1e1
Add special "Start" button to Enrollment Flow views (CFM-428) (#251)
arlen Nov 21, 2024
71d494b
Small stylistic improvements to Enrollment Flow dispatch and start vi…
arlen Nov 21, 2024
b68282f
Improve Petition index and add a label prefix config for index view (…
arlen Nov 21, 2024
cce29b6
Allow null coid for AutoViewVarsTrait (nojira)
arlen Nov 22, 2024
6c2e6a4
Merge pull request #254 from arlen/nojira-allowNullCoIDAutoViewVars
Ioannis Nov 23, 2024
11cd46c
Make Add drop-down menu a panel. Also fix welcome message and main me…
arlen Nov 27, 2024
045abe1
Initial commit of Email Verifier Enroller Plugin (CFM-333)
Nov 28, 2024
4787fbd
Additional commit for CFM-333
Nov 28, 2024
b72575f
Implement finalization tasks (CFM-31)
Nov 28, 2024
748adb3
Provide better evaluations in upperButtons start enrollment flow link…
arlen Dec 4, 2024
5d8b3ef
Improve accept/decline layout in InvitationAccepters plugin (CFM-428)
arlen Dec 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -30,11 +30,34 @@
namespace FileConnector\Controller;

use App\Controller\StandardPluginController;
use Cake\Event\EventInterface;
use Cake\Http\Response;

class FileSourcesController extends StandardPluginController {
public $paginate = [
'order' => [
'FileSources.id' => 'asc'
]
];

/**
* Callback run prior to the request render.
*
* @param EventInterface $event Cake Event
*
* @return Response|void
* @since COmanage Registry v5.0.0
*/

public function beforeRender(EventInterface $event) {
$link = $this->getPrimaryLink(true);

if(!empty($link->value)) {
$this->set('vv_bc_parent_obj', $this->FileSources->ExternalIdentitySources->get($link->value));
$this->set('vv_bc_parent_displayfield', $this->FileSources->ExternalIdentitySources->getDisplayField());
$this->set('vv_bc_parent_primarykey', $this->FileSources->ExternalIdentitySources->getPrimaryKey());
}

return parent::beforeRender($event);
}
}
Expand Up @@ -44,7 +44,8 @@ class FileSourcesTable extends Table {
use \App\Lib\Traits\PrimaryLinkTrait;
use \App\Lib\Traits\TableMetaTrait;
use \App\Lib\Traits\ValidationTrait;

use \App\Lib\Traits\TabTrait;

// Cache of the field configuration
protected $fieldCfg = null;

Expand Down Expand Up @@ -78,6 +79,23 @@ public function initialize(array $config): void {
]
]);

// All the tabs share the same configuration in the ModelTable file
$this->setTabsConfig(
[
// Ordered list of Tabs
'tabs' => ['ExternalIdentitySources', 'FileConnector.FileSources', 'ExternalIdentitySources@action.search'],
// What actions will include the subnavigation header
'action' => [
// If a model renders in a subnavigation mode in edit/view mode, it cannot
// render in index mode for the same use case/context
// XXX edit should go first.
'ExternalIdentitySources' => ['edit', 'view', 'search'],
'FileConnector.FileSources' => ['edit'],
'ExternalIdentitySources@action.search' => [],
],
]
);

$this->setPermissions([
// Actions that operate over an entity (ie: require an $id)
'entity' => [
Expand Down
2 changes: 2 additions & 0 deletions app/composer.json
Expand Up @@ -32,6 +32,7 @@
"App\\": "src/",
"ApiConnector\\": "availableplugins/ApiConnector/src/",
"CoreAssigner\\": "plugins/CoreAssigner/src/",
"CoreEnroller\\": "plugins/CoreEnroller/src/",
"CoreServer\\": "plugins/CoreServer/src/",
"FileConnector\\": "availableplugins/FileConnector/src/",
"PipelineToolkit\\": "availableplugins/PipelineToolkit/src/",
Expand All @@ -45,6 +46,7 @@
"ApiConnector\\Test\\": "availableplugins/ApiConnector/tests/",
"Cake\\Test\\": "vendor/cakephp/cakephp/tests/",
"CoreAssigner\\Test\\": "plugins/CoreAssigner/tests/",
"CoreEnroller\\Test\\": "plugins/CoreEnroller/tests/",
"CoreServer\\Test\\": "plugins/CoreServer/tests/",
"FileConnector\\Test\\": "availableplugins/FileConnector/tests/",
"PipelineToolkit\\Test\\": "availableplugins/PipelineToolkit/tests/",
Expand Down
14 changes: 14 additions & 0 deletions app/config/routes.php
Expand Up @@ -168,6 +168,20 @@ function (RouteBuilder $builder) {
* ...and connect the rest of 'Pages' controller's URLs.
*/
$builder->connect('/pages/*', ['controller' => 'Pages', 'action' => 'display']);

/**
* Registry allows URLs of the form /coid/name to render as a Mostly Static Page.
*
* Note this will effectively route any URL of the form /registry/x, where x consists of
* digits, to the Pages controller. We need to filter on digits, or we'll end up taking
* over all controllers as well. (The implication is we can't have a controller whose
* name consists entirely of digits, but we probably shouldn't...)
*/
$builder->connect(
'/{coid}/{name}',
['controller' => 'Pages', 'action' => 'show' ],
['coid' => '\d+', 'pass' => ['coid', 'name']]
);

/*
* Connect catchall routes for all controllers.
Expand Down
134 changes: 130 additions & 4 deletions app/config/schema/schema.json
Expand Up @@ -9,12 +9,14 @@
"comment": "Columns with names matching those defined here will by default inherit these properties",

"columns": {
"action": { "type": "string", "size": 4 },
"api_user_id": { "type": "integer", "foreignkey": { "table": "api_users", "column": "id" } },
"co_id": { "type": "integer", "foreignkey": { "table": "cos", "column": "id" }, "notnull": true },
"comment": { "type": "string", "size": 256 },
"context": { "type": "string", "size": 2 },
"cou_id": { "type": "integer", "foreignkey": { "table": "cous", "column": "id" } },
"description": { "type": "string", "size": 128 },
"enrollment_flow_step_id": { "type": "integer", "foreignkey": { "table": "enrollment_flow_steps", "column": "id" } },
"external_identity_id": { "type": "integer", "foreignkey": { "table": "external_identities", "column": "id" } },
"external_identity_role_id": { "type": "integer", "foreignkey": { "table": "external_identity_roles", "column": "id" } },
"external_identity_source_id": { "type": "integer", "foreignkey": { "table": "external_identity_sources", "column": "id" } },
Expand All @@ -23,15 +25,19 @@
"id": { "type": "integer", "autoincrement": true, "primarykey": true },
"identifier_assignment_id": { "type": "integer", "foreignkey": { "table": "identifier_assignments", "column": "id" }, "notnull": true },
"language": { "type": "string", "size": 16 },
"mail": { "type": "string", "size": 256 },
"message_template_id": { "type": "integer", "foreignkey": { "table": "message_templates", "column": "id" } },
"name": { "type": "string", "size": 128, "notnull": true },
"ordr": { "type": "integer" },
"person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" } },
"person_role_id": { "type": "integer", "foreignkey": { "table": "person_roles", "column": "id" } },
"petition_id": { "type": "integer", "foreignkey": { "table": "petitions", "column": "id" } },
"plugin": { "type": "string", "size": 80 },
"provisioning_target_id": { "type": "integer", "foreignkey": { "table": "provisioning_targets", "column": "id" }, "notnull": true },
"reference_identifier": { "type": "string", "size": 40 },
"report_id": { "type": "integer", "foreignkey": { "table": "reports", "column": "id" }, "notnull": true },
"server_id": { "type": "integer", "foreignkey": { "table": "servers", "column": "id" }, "notnull": true },
"sor_label": { "type": "string", "size": 40 },
"status": { "type": "string", "size": 2 },
"type_id": { "type": "integer", "foreignkey": { "table": "types", "column": "id" }, "notnull": true },
"valid_from": { "type": "datetime" },
Expand Down Expand Up @@ -397,11 +403,11 @@
"mvea": [ "person", "person_role", "external_identity", "external_identity_role" ],
"sourced": true
},

"email_addresses": {
"columns": {
"id": {},
"mail": { "type": "string", "size": 256 },
"mail": {},
"description": {},
"type_id": {},
"verified": { "type": "boolean" }
Expand Down Expand Up @@ -517,8 +523,8 @@
"history_records": {
"columns": {
"id": {},
"action": { "type": "string", "size": 4 },
"comment": { "type": "string", "size": 256 },
"action": {},
"comment": {},
"person_id": {},
"person_role_id": {},
"external_identity_id": {},
Expand Down Expand Up @@ -594,6 +600,126 @@
}
},

"mostly_static_pages": {
"columns": {
"id": {},
"co_id": {},
"name": {},
"title": { "type": "string", "size": 256 },
"description": {},
"status": {},
"context": {},
"body": { "type": "text" }
},
"indexes": {
"mostly_static_pages_i1": { "columns": [ "co_id" ] }
}
},

"enrollment_flows": {
"columns": {
"id": {},
"co_id": {},
"name": {},
"status": {},
"sor_label": {},
"authz_type": { "type": "string", "size": 2 },
"authz_cou_id": { "type": "integer", "foreignkey": { "table": "cous", "column": "id" }},
"authz_group_id": { "type": "integer", "foreignkey": { "table": "groups", "column": "id" }},
"collect_enrollee_email": { "type": "boolean" },
"redirect_on_finalize": { "type": "string", "size": 256 }
},
"indexes": {
"enrollment_flows_i1": { "columns": [ "co_id" ]},
"enrollment_flows_i2": { "needed": false, "columns": [ "authz_cou_id" ]},
"enrollment_flows_i3": { "needed": false, "columns": [ "authz_group_id" ]}
}
},

"enrollment_flow_steps": {
"columns": {
"id": {},
"enrollment_flow_id": { "type": "integer", "foreignkey": { "table": "enrollment_flows", "column": "id" }},
"description": {},
"status": {},
"plugin": {},
"ordr": {},
"actor_type": { "type": "string", "size": 2 },
"message_template_id": {},
"redirect_on_handoff": { "type": "string", "size": 256 }
},
"indexes": {
"enrollment_flow_steps_i1": { "columns": [ "enrollment_flow_id" ]},
"enrollment_flow_steps_i2": { "needed": false, "columns": [ "message_template_id" ]}
}
},

"petitions": {
"columns": {
"id": {},
"enrollment_flow_id": { "type": "integer", "foreignkey": { "table": "enrollment_flows", "column": "id" }},
"status": {},
"cou_id": {},
"enrollee_email": { "type": "string", "size": 256 },
"enrollee_identifier": { "type": "string", "size": 256 },
"enrollee_person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" }},
"petitioner_identifier": { "type": "string", "size": 256 },
"petitioner_person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" }},
"token": { "type": "string", "size": 256 }
},
"indexes": {
"petitions_i1": { "columns": [ "enrollment_flow_id" ]},
"petitions_i2": { "columns": [ "cou_id" ]},
"petitions_i3": { "columns": [ "enrollee_person_id" ]},
"petitions_i4": { "columns": [ "petitioner_person_id" ]}
}
},

"petition_step_results": {
"columns": {
"id": {},
"petition_id": {},
"enrollment_flow_step_id": {},
"comment": {}
},
"indexes": {
"petition_step_results_i1": { "columns": [ "petition_id" ] },
"petition_step_results_i2": { "needed": false, "columns": [ "enrollment_flow_step_id" ] }
}
},

"petition_history_records": {
"columns": {
"id": {},
"petition_id": {},
"enrollment_flow_step_id": {},
"action": {},
"comment": {},
"actor_person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" } }
},
"indexes": {
"petition_history_records_i1": { "columns": [ "petition_id" ] },
"petition_history_records_i2": { "columns": [ "actor_person_id" ] },
"petition_history_records_i3": { "needed": false, "columns": [ "enrollment_flow_step_id" ] }
}
},

"verifications": {
"columns": {
"id": {},
"code": { "type": "string", "size": 32 },
"verification_time": { "type": "datetime" },
"request_expiration_time": { "type": "datetime" },
"method": { "type": "string", "size": 2 },
"email_address_id": { "type": "integer", "foreignkey": { "table": "email_addresses", "column": "id" } },
"petition_id": {}
},
"indexes": {
"verifications_i1": { "columns": [ "email_address_id" ] },
"verifications_i2": { "columns": [ "petition_id" ] }
}
},

"jobs": {
"columns": {
"id": {},
Expand Down
24 changes: 24 additions & 0 deletions app/plugins/CoreEnroller/composer.json
@@ -0,0 +1,24 @@
{
"name": "your-name-here/core-enroller",
"description": "CoreEnroller plugin for CakePHP",
"type": "cakephp-plugin",
"license": "MIT",
"require": {
"php": ">=7.2",
"cakephp/cakephp": "4.4.*"
},
"require-dev": {
"phpunit/phpunit": "^8.5 || ^9.3"
},
"autoload": {
"psr-4": {
"CoreEnroller\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"CoreEnroller\\Test\\": "tests/",
"Cake\\Test\\": "vendor/cakephp/cakephp/tests/"
}
}
}
30 changes: 30 additions & 0 deletions app/plugins/CoreEnroller/phpunit.xml.dist
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="tests/bootstrap.php"
>
<php>
<ini name="memory_limit" value="-1"/>
<ini name="apc.enable_cli" value="1"/>
</php>

<!-- Add any additional test suites you want to run here -->
<testsuites>
<testsuite name="CoreEnroller">
<directory>tests/TestCase/</directory>
</testsuite>
</testsuites>

<!-- Setup fixture extension -->
<extensions>
<extension class="Cake\TestSuite\Fixture\PHPUnitExtension" />
</extensions>

<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
</phpunit>