continue;
}
if (!preg_match('/^[a-zA-Z0-9\-]+$/', $attrName)) {
- throw new \RuntimeException("Malformed HTML attribute");
+ throw new \RuntimeException("Malformed HTML attribute $attrName → $attrValue");
}
$type = $this->pickAttrType($tag, $attrName);
*
* Generated from standaloneusers/xml/schema/CRM/Standaloneusers/Role.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d28fa09f872be30740de728c9e344a6d)
+ * (GenCodeChecksum:d5053ae97fba22b13adecdce76ebb30f)
*/
use CRM_Standaloneusers_ExtensionUtil as E;
'entity' => 'Role',
'bao' => 'CRM_Standaloneusers_DAO_Role',
'localizable' => 0,
+ 'html' => [
+ 'type' => 'Text',
+ ],
'add' => NULL,
],
'label' => [
'entity' => 'Role',
'bao' => 'CRM_Standaloneusers_DAO_Role',
'localizable' => 0,
+ 'html' => [
+ 'type' => 'Text',
+ ],
'add' => NULL,
],
'permissions' => [
--- /dev/null
+<?php
+return [
+ 'type' => 'primary',
+ 'entity' => 'Role',
+ 'label' => 'Role',
+ 'defaults' => '{}',
+ 'icon' => 'fa-graduation-cap',
+ 'unique_fields' => ['name'],
+];
--- /dev/null
+<af-form ctrl="afform">
+ <af-entity type="Role" name="Role1" label="Role 1" actions="{create: true, update: true}" security="RBAC" url-autofill="1" />
+ <fieldset af-fieldset="Role1" class="af-container" af-title="Role 1">
+ <af-field name="name" />
+ <af-field name="label" />
+ <af-field name="permissions" />
+ <af-field name="is_active" />
+ </fieldset>
+ <button class="af-button btn btn-primary" crm-icon="fa-check" ng-click="afform.submit()">Submit</button>
+</af-form>
--- /dev/null
+{
+ "type": "form",
+ "title": "Edit Role",
+ "icon": "fa-list-alt",
+ "server_route": "civicrm/admin/role",
+ "permission": "access CiviCRM",
+ "redirect": "civicrm/admin/roles",
+ "create_submission": true,
+ "requires": [],
+ "description": "",
+ "is_dashlet": false,
+ "is_public": false,
+ "is_token": false,
+ "entity_type": null,
+ "join_entity": null,
+ "contact_summary": null,
+ "summary_contact_type": null,
+ "navigation": null
+}
--- /dev/null
+<p class="af-text">Enter text</p>
+<div class="af-markup">
+ <div class="help">
+ <p>{{:: ts('Roles define sets of permissions for different types of users. You can give users roles to grant them permissions appropriate to their needs.') }}</p>
+ </div>
+
+</div>
+<div af-fieldset="">
+ <crm-search-display-table search-name="Roles" display-name="Roles_Table_1"></crm-search-display-table>
+</div>
--- /dev/null
+{
+ "type": "search",
+ "title": "User Roles",
+ "description": "List of roles defined on the system.",
+ "icon": "fa-graduation-cap",
+ "server_route": "civicrm/admin/roles",
+ "permission": "cms:administer users",
+ "navigation": {
+ "parent": "Administer",
+ "label": "User Roles",
+ "weight": 0
+ },
+ "requires": [],
+ "is_dashlet": false,
+ "is_public": false,
+ "is_token": false,
+ "entity_type": null,
+ "join_entity": null,
+ "contact_summary": null,
+ "summary_contact_type": null,
+ "redirect": null,
+ "create_submission": null
+}
--- /dev/null
+<?php
+use CRM_Standaloneusers_ExtensionUtil as E;
+
+return [
+ [
+ 'name' => 'SavedSearch_Roles',
+ 'entity' => 'SavedSearch',
+ 'cleanup' => 'always',
+ 'update' => 'unmodified',
+ 'params' => [
+ 'version' => 4,
+ 'values' => [
+ 'name' => 'Roles',
+ 'label' => E::ts('Roles'),
+ 'form_values' => NULL,
+ 'mapping_id' => NULL,
+ 'search_custom_id' => NULL,
+ 'api_entity' => 'Role',
+ 'api_params' => [
+ 'version' => 4,
+ 'select' => [
+ 'id',
+ 'label',
+ 'is_active',
+ ],
+ 'orderBy' => [],
+ 'where' => [],
+ 'groupBy' => [],
+ 'join' => [],
+ 'having' => [],
+ ],
+ 'expires_date' => NULL,
+ 'description' => NULL,
+ ],
+ 'match' => [
+ 'name',
+ ],
+ ],
+ ],
+ [
+ 'name' => 'SavedSearch_Roles_SearchDisplay_Roles_Table_1',
+ 'entity' => 'SearchDisplay',
+ 'cleanup' => 'always',
+ 'update' => 'unmodified',
+ 'params' => [
+ 'version' => 4,
+ 'values' => [
+ 'name' => 'Roles_Table_1',
+ 'label' => E::ts('Roles Table 1'),
+ 'saved_search_id.name' => 'Roles',
+ 'type' => 'table',
+ 'settings' => [
+ 'description' => NULL,
+ 'sort' => [],
+ 'limit' => 50,
+ 'pager' => [],
+ 'placeholder' => 5,
+ 'columns' => [
+ [
+ 'type' => 'field',
+ 'key' => 'label',
+ 'dataType' => 'String',
+ 'label' => E::ts('Label'),
+ 'sortable' => TRUE,
+ 'link' => [
+ 'path' => '/civicrm/admin/role#?Role1=[id]',
+ 'entity' => '',
+ 'action' => '',
+ 'join' => '',
+ 'target' => '',
+ ],
+ ],
+ [
+ 'type' => 'field',
+ 'key' => 'is_active',
+ 'dataType' => 'Boolean',
+ 'label' => E::ts('Active'),
+ 'sortable' => TRUE,
+ 'rewrite' => '',
+ 'alignment' => '',
+ ],
+ ],
+ 'actions' => TRUE,
+ 'classes' => [
+ 'table',
+ 'table-striped',
+ ],
+ ],
+ 'acl_bypass' => FALSE,
+ ],
+ 'match' => [
+ 'name',
+ 'saved_search_id',
+ ],
+ ],
+ ],
+];
<type>varchar</type>
<length>60</length>
<required>true</required>
+ <html>
+ <type>Text</type>
+ </html>
</field>
<field>
<type>varchar</type>
<length>128</length>
<required>true</required>
+ <html>
+ <type>Text</type>
+ </html>
</field>
<field>