-
-
Notifications
You must be signed in to change notification settings - Fork 827
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev/core#5670 My Account and Edit my account pages
- Loading branch information
Showing
6 changed files
with
187 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<af-form ctrl="afform"> | ||
<af-entity password="password123haha" type="User" name="User1" label="User 1" actions="{create: false, update: true}" security="RBAC" url-autofill="1" data="{}" /> | ||
<div class="af-markup"> | ||
<p><a href="/civicrm/my-account">My Account</a></p> | ||
</div> | ||
<fieldset af-fieldset="User1" class="af-container" af-title="Account info"> | ||
<div class="af-markup"></div> | ||
<af-field name="username" /> | ||
<af-field name="uf_name" defn="{help_pre: 'Email used for password resets.', input_attrs: {placeholder: 'Leave blank to use the primary email from the selected contact'}}" /> | ||
<af-field name="timezone" defn="{help_pre: 'Set the timezone of the user. Date and times will be shown in this timezone. You can also leave it empty to use the default system timezone (which is a server setting).', input_attrs: {placeholder: 'Server default timezone'}}" /> | ||
<af-field name="language" defn="{help_pre: 'Set the user interface language of this user. You can also leave it empty to use the default system language.', input_attrs: {placeholder: 'System default language'}}" /> | ||
<div class="af-container af-container-style-pane"> | ||
<af-field name="roles" defn="{input_type: 'DisplayOnly', input_attrs: {}}" /> | ||
</div> | ||
</fieldset> | ||
<button class="af-button btn btn-primary" crm-icon="fa-check" ng-click="afform.submit()">Submit</button> | ||
</af-form> |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
use CRM_BobBase_ExtensionUtil as E; | ||
|
||
return [ | ||
'type' => 'form', | ||
'title' => E::ts('Edit my account'), | ||
'icon' => 'fa-user', | ||
'server_route' => 'civicrm/user/edit', | ||
'permission' => [ | ||
'edit my contact', | ||
], | ||
'redirect' => '/civicrm/my-account', | ||
]; |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div af-fieldset=""> | ||
<crm-search-display-grid search-name="My_account" display-name="My_account" filters="{'contact_id': options.contact_id}"></crm-search-display-grid> | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
use CRM_BobBase_ExtensionUtil as E; | ||
|
||
return [ | ||
'type' => 'search', | ||
'title' => E::ts('My Account'), | ||
'placement' => [], | ||
'summary_contact_type' => ['Individual'], | ||
'icon' => 'fa-user', | ||
'server_route' => 'civicrm/my-account', | ||
]; |
132 changes: 132 additions & 0 deletions
132
ext/standaloneusers/managed/SavedSearch_My_account.mgd.php
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 |
---|---|---|
@@ -0,0 +1,132 @@ | ||
<?php | ||
use CRM_BobBase_ExtensionUtil as E; | ||
|
||
return [ | ||
[ | ||
'name' => 'SavedSearch_My_account', | ||
'entity' => 'SavedSearch', | ||
'cleanup' => 'unused', | ||
'update' => 'unmodified', | ||
'params' => [ | ||
'version' => 4, | ||
'values' => [ | ||
'name' => 'My_account', | ||
'label' => E::ts('My account'), | ||
'api_entity' => 'UFMatch', | ||
'api_params' => [ | ||
'version' => 4, | ||
'select' => [ | ||
'uf_id', | ||
'contact_id', | ||
'contact_id.display_name', | ||
'uf_name', | ||
], | ||
'orderBy' => [], | ||
'where' => [ | ||
[ | ||
'contact_id', | ||
'=', | ||
'user_contact_id', | ||
], | ||
], | ||
'groupBy' => [], | ||
'join' => [ | ||
[ | ||
'Contact AS UFMatch_Contact_contact_id_01', | ||
'LEFT', | ||
[ | ||
'contact_id', | ||
'=', | ||
'UFMatch_Contact_contact_id_01.id', | ||
], | ||
], | ||
], | ||
'having' => [], | ||
], | ||
], | ||
'match' => ['name'], | ||
], | ||
], | ||
[ | ||
'name' => 'SavedSearch_My_account_SearchDisplay_My_account', | ||
'entity' => 'SearchDisplay', | ||
'cleanup' => 'unused', | ||
'update' => 'unmodified', | ||
'params' => [ | ||
'version' => 4, | ||
'values' => [ | ||
'name' => 'My_account', | ||
'label' => E::ts('My account'), | ||
'saved_search_id.name' => 'My_account', | ||
'type' => 'grid', | ||
'settings' => [ | ||
'colno' => '2', | ||
'limit' => 0, | ||
'sort' => [], | ||
'pager' => FALSE, | ||
'columns' => [ | ||
[ | ||
'type' => 'field', | ||
'key' => 'contact_id.display_name', | ||
'dataType' => 'String', | ||
'label' => E::ts('Donor'), | ||
'link' => [ | ||
'path' => '', | ||
'entity' => 'Contact', | ||
'action' => 'view', | ||
'join' => 'contact_id', | ||
'target' => '', | ||
], | ||
'title' => E::ts('View Donor'), | ||
'break' => TRUE, | ||
], | ||
[ | ||
'type' => 'field', | ||
'key' => 'uf_name', | ||
'dataType' => 'String', | ||
'label' => E::ts('Username'), | ||
'break' => TRUE, | ||
], | ||
[ | ||
'size' => '', | ||
'links' => [ | ||
[ | ||
'path' => '/civicrm/user/edit#?User1=[uf_id]', | ||
'icon' => 'fa-key', | ||
'text' => E::ts('Update account'), | ||
'style' => 'default', | ||
'condition' => [], | ||
'task' => '', | ||
'entity' => '', | ||
'action' => '', | ||
'join' => '', | ||
'target' => '', | ||
], | ||
[ | ||
'path' => '/civicrm/admin/user/password', | ||
'icon' => 'fa-keyboard', | ||
'text' => E::ts('Update password'), | ||
'style' => 'default', | ||
'condition' => [], | ||
'task' => '', | ||
'entity' => '', | ||
'action' => '', | ||
'join' => '', | ||
'target' => '', | ||
], | ||
'type' => 'buttons', | ||
'label' => E::ts('Actions'), | ||
'break' => TRUE, | ||
], | ||
], | ||
'placeholder' => 5, | ||
], | ||
'acl_bypass' => TRUE, | ||
], | ||
'match' => [ | ||
'saved_search_id', | ||
'name', | ||
], | ||
], | ||
], | ||
]; |