Make active flag required and labelled enabled
authorWilliam Mortada <williammortada@thirdsectordesign.org>
Sun, 3 Dec 2023 12:05:07 +0000 (12:05 +0000)
committerWilliam Mortada <williammortada@thirdsectordesign.org>
Mon, 4 Dec 2023 19:25:21 +0000 (19:25 +0000)
ext/standaloneusers/CRM/Standaloneusers/DAO/Role.php
ext/standaloneusers/CRM/Standaloneusers/DAO/User.php
ext/standaloneusers/managed/SavedSearch_Administer_Roles.mgd.php
ext/standaloneusers/managed/SavedSearch_Administer_Users.mgd.php
ext/standaloneusers/sql/auto_install.sql
ext/standaloneusers/xml/schema/CRM/Standaloneusers/Role.xml
ext/standaloneusers/xml/schema/CRM/Standaloneusers/User.xml

index da141595926a6364f9a9f5f713bb1480f2b24097..31bc1623689dd6e663c6ec20b3341c94f3f89608 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from standaloneusers/xml/schema/CRM/Standaloneusers/Role.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:afe744210fe5b5d38bf16ae05677a749)
+ * (GenCodeChecksum:b027d757eff8ad3b630c304037699382)
  */
 use CRM_Standaloneusers_ExtensionUtil as E;
 
@@ -87,7 +87,7 @@ class CRM_Standaloneusers_DAO_Role extends CRM_Core_DAO {
   /**
    * Only active roles grant permissions
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -221,6 +221,7 @@ class CRM_Standaloneusers_DAO_Role extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => E::ts('Role is active'),
           'description' => E::ts('Only active roles grant permissions'),
+          'required' => TRUE,
           'usage' => [
             'import' => FALSE,
             'export' => FALSE,
@@ -235,6 +236,7 @@ class CRM_Standaloneusers_DAO_Role extends CRM_Core_DAO {
           'localizable' => 0,
           'html' => [
             'type' => 'CheckBox',
+            'label' => E::ts("Enabled"),
           ],
           'add' => NULL,
         ],
index b1e6f21b31ee4a50e4cb3549f2dfe5e0b61e69fe..f06e5c4a56ee855465b86906089f6d34a17f0e81 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from standaloneusers/xml/schema/CRM/Standaloneusers/User.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:bb2c741901a689ff804ab65d05c7795b)
+ * (GenCodeChecksum:08b152ee7b327be88d44e2fce7c528ea)
  */
 use CRM_Standaloneusers_ExtensionUtil as E;
 
@@ -481,6 +481,7 @@ class CRM_Standaloneusers_DAO_User extends CRM_Core_DAO {
           'localizable' => 0,
           'html' => [
             'type' => 'CheckBox',
+            'label' => E::ts("Enabled"),
           ],
           'add' => NULL,
         ],
index daf5cb37720d527ae7dd83c9b63dc68e17fdd744..a17ed750e7c34724e97ca1d052f9eb743af103fb 100644 (file)
@@ -76,7 +76,7 @@ return [
               'type' => 'field',
               'key' => 'is_active',
               'dataType' => 'Boolean',
-              'label' => E::ts('Active'),
+              'label' => E::ts('Enabled'),
               'sortable' => TRUE,
               'rewrite' => '',
               'alignment' => '',
index dccaaeb66073590666210fe7b373980643347398..bce679c4cd947e2b48a7075995b0090e6b42a3c0 100644 (file)
@@ -91,7 +91,7 @@ return [
               'type' => 'field',
               'key' => 'is_active',
               'dataType' => 'Boolean',
-              'label' => E::ts('Active?'),
+              'label' => E::ts('Enabled'),
               'sortable' => TRUE,
               'editable' => TRUE,
             ],
index ec2f3676e9be95a04759ceb64c274c4a7d0b9355..9a482bb76e37c6923844f6b396d6b0e4ca34b3d8 100644 (file)
@@ -39,7 +39,7 @@ CREATE TABLE `civicrm_role` (
   `name` varchar(60) NOT NULL COMMENT 'Machine name for this role',
   `label` varchar(128) NOT NULL COMMENT 'Human friendly name for this role',
   `permissions` text NOT NULL COMMENT 'List of permissions granted by this role',
-  `is_active` tinyint DEFAULT 1 COMMENT 'Only active roles grant permissions',
+  `is_active` tinyint NOT NULL DEFAULT 1 COMMENT 'Only active roles grant permissions',
   PRIMARY KEY (`id`)
 )
 ENGINE=InnoDB;
index f83aa46181bc9e82ec26329d3de3bb4aa12adead..a437a1c45bd0c126d9200fb2b1caca3589110cdc 100644 (file)
     <comment>Only active roles grant permissions</comment>
     <type>boolean</type>
     <default>1</default>
+    <required>true</required>
     <html>
       <type>CheckBox</type>
+      <label>Enabled</label>
     </html>
   </field>
 
index 8b9917f48c5425d556dfa47fea8ea271b9ecc719..40132236800a3c816f3e22c7d5d0c2b0c9328302 100644 (file)
     <required>true</required>
     <html>
       <type>CheckBox</type>
+      <label>Enabled</label>
     </html>
   </field>