Appearance changes for registration event admin management
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 11 Dec 2017 20:35:31 +0000 (15:35 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 11 Dec 2017 20:35:31 +0000 (15:35 -0500)
activate.php
setup/rolesAndCapabilities.php [deleted file]
views/admin/registrations/eventDashboard.html
views/admin/registrations/eventEditCustomFields.html
views/admin/registrations/eventEditLevels.html

index d7c13dc..5f47457 100644 (file)
@@ -70,84 +70,6 @@ class glmMembersRegistrationsPluginActivate
         // Set current plugin version
         update_option('glmMembersRegistrationsPluginVersion', GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION);
 
-        // Set Roles and Capabilities for this plugin
-        require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_SETUP_PATH.'/rolesAndCapabilities.php';
     }
 
-    /*
-     * Add a capability to all current roles
-     *
-     * @param string $capability Name of capability to add
-     * @param array $default Whether capability should be on by default
-     *           array(
-     *               'author' => false,
-     *               'contributor' => false,
-     *               'editor' => false,
-     *               'subscriber' => false
-     *           )
-     *
-     * @return void
-     * @access private
-     */
-    private function addRoleCapability($capability, $default)
-    {
-        // Get list of role objects
-        $roleObjects = $GLOBALS['wp_roles']->role_objects;
-
-        // Get list of roles we can edit
-        $roles = get_editable_roles();
-
-        // For each role object
-        foreach ($roleObjects as $key => $role) {
-
-            // Check if the role exists in list of editable roles and
-            // the capability does not exist
-            if (isset($roles[$key]) && ! isset($role->capabilities[$capability])) {
-
-                // Check if a default value has been specified in the $default array
-                $enabled = false;
-                if (isset($default[$role->name])) {
-
-                    // It has, so use that
-                    $enabled = $default[$role->name];
-
-                }
-
-                // Add the role
-                $role->add_cap($capability, $enabled);
-
-            }
-        }
-    }
-
-
-    /*
-     * Delete a capability from all current roles
-     *
-     * @param string $capability Name of capability to add
-     *
-     * @return void
-     * @access private
-     */
-    private function deleteRoleCapability($capability)
-    {
-        // Get list of role objects
-        $roleObjects = $GLOBALS['wp_roles']->role_objects;
-
-        // Get list of roles we can edit
-        $roles = get_editable_roles();
-
-        // For each role object
-        foreach ($roleObjects as $key => $role) {
-
-            if ( isset($role->capabilities[$capability])) {
-                $role->remove_cap($capability);
-            }
-
-        }
-
-    }
-
-
-
 }
diff --git a/setup/rolesAndCapabilities.php b/setup/rolesAndCapabilities.php
deleted file mode 100644 (file)
index 0c0e7ca..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * Gaslight Media Event Registrations
- * Roles & Capabilities
- *
- * PHP version 5.5
- *
- * @category glmWordPressPlugin
- * @package  glmMembersRegistrations
- * @author   Chuck Scott <cscott@gaslightmedia.com>
- * @license  http://www.gaslightmedia.com Gaslightmedia
- * @release  rolesAndPermissions.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
- * @link     http://dev.gaslightmedia.com/
- */
-
-/**
- * NOTE: This file is only included in the activate.php process.
- *       It is not regularly used during operation.
- */
index c871cec..59290fc 100644 (file)
             <div class="glm-admin-table">
                 <div class="glm-row">
                     <div class="glm-small-12 glm-column">
-                        <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&option=edit&regEventID={$regEvent.id}" class="button button-secondary glm-button">Edit Registration Event</a>
           {$r_link = apply_filters('glm_members_add_link_to_registrations_event_list_entry', $regEvent.event)}
                     </div>
                 </div>
index f5e343a..4794bcf 100644 (file)
@@ -36,7 +36,7 @@
     <p><hr></p>
 
     {* Per Event Form for this event *}
-    <h3>Per submission including this event</h3>
+    <h3>Requested once when registering for this event</h3>
     <p>These are additional fields of information that will be requested for this event in each submission.</p>
     <p>
         {assign var="eventFid" value="glm_reg_customfields_reg_event_`$regEventID`"}
@@ -45,7 +45,7 @@
 
     {* Per Attendee Form for this event *}
     <p><hr></p>
-    <h3>Each attendee for this event</h3>
+    <h3>Requested for each attendee for this event</h3>
     <p>These are additional fields of information that will be requested for each registrant for this event.</p>
     <p> 
         {assign var="attendeeFid" value="glm_reg_customfields_reg_attendee_`$regEventID`"}
@@ -55,7 +55,7 @@
     {* Per Attendee form for each class (level) for this event *}
     <p><hr></p>
   {foreach $classes as $class}
-    <h3>Each attendee for level: {$class.name}</h3>
+    <h3>Requested for each attendee for level: {$class.name}</h3>
     <p>These are additional fields of information that will be requested for each registrant for this event.</p>
     <p> 
         {assign var="levelFid" value="glm_reg_customfields_reg_event_`$regEventID`_level_`$class.id`"}
index de6f2e1..b0ca41b 100644 (file)
@@ -46,7 +46,8 @@
         </script>
     
         <script type="text/template" id="regClass-template">
-            <div class="class-display-template" style="">
+<div style="background-color: white; padding: .25rem; border: 1px solid black;">
+            <div class="class-display-template">
                 <div class="glm-class-header">
                     <div class="glm-right">
                         <a class="class-edit button button-secondary glm-button-small">Edit</a>
@@ -74,6 +75,7 @@
             </div>
             <div class="class-rate-container">
             </div>
+</div>
         </script>
 
         <script type="text/template" id="regRate-template">
@@ -89,7 +91,7 @@
                     </div>
                 </div>
             </div>
-            <div class="rate-edit-template" style="display: none; border: 1px solid black; padding: 1em; margin: 1em;">
+            <div class="rate-edit-template" style="display: none; border: 1px solid black; padding: 1em; background-color: #f8ffff;">
                 <div class="glm-rate-header">
                     <div class="glm-right">
                         <a class="rate-update button glm-button-small-highlighted">Update</a>