From f20be776ed0ec0ee3fd8b02c2538635974e3f982 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Thu, 2 Aug 2018 15:07:22 -0400 Subject: [PATCH] Better profile field display, custom field styles, and remove extra custom field errata --- classes/data/dataContacts.php | 2 +- css/admin.css | 22 +++++++++++++++------- models/admin/contacts/index.php | 2 +- setup/adminTabs.php | 2 +- views/admin/contacts/edit.html | 4 ++-- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/classes/data/dataContacts.php b/classes/data/dataContacts.php index f856fd8..c7e8a5e 100644 --- a/classes/data/dataContacts.php +++ b/classes/data/dataContacts.php @@ -854,7 +854,7 @@ class GlmDataContacts extends GlmDataAbstract if ( $contact_id = filter_var( $contact_id, FILTER_VALIDATE_INT ) ) { return $this->wpdb->get_var( "SELECT user_id - FROM " . $this->wpdb->prefix . "usermeta + FROM glm_usermeta WHERE meta_key = 'glmMembersContactID' AND meta_value = '$contact_id'" ); diff --git a/css/admin.css b/css/admin.css index e3912d2..b7709a0 100644 --- a/css/admin.css +++ b/css/admin.css @@ -139,18 +139,19 @@ input::placeholder { } #glm-table-profile input[type=text] { background-color: #fff; - border-bottom: 1px solid #ddd; + /* border-bottom: 1px solid #ddd; */ border-width: 0 0 1px 0; - box-shadow: inset 0px 0px 4px 1px rgba(0,0,0,.07); + /* box-shadow: inset 0px 0px 4px 1px rgba(0,0,0,.07); */ + box-shadow: inset 0px -1px 1px 1px rgba(0,0,0,.07); color: #32373c; outline: 0; transition: 50ms border-color ease-in-out; padding: 4px 7px; - transition: 0.2s box-shadow ease-in-out; + transition: 0.3s box-shadow ease-in-out; } #glm-table-profile input[type=text]:focus { - box-shadow: inset 0px -1px 5px 0px rgba(50,50,200,.7); - transition: 0.2s box-shadow ease-in-out; + box-shadow: inset 0px -1px 4px -1px rgba(30,140,190,.8); + transition: 0.3s box-shadow ease-in-out; } #glm-table-profile.glm-admin-table [name="notes"] { width: 100%; @@ -188,12 +189,16 @@ input::placeholder { padding: 4px 7px; min-width: 200px; } +#glm-table-profile #glm-table-custom-fields { + max-width: 100%; +} #glm-table-profile #glm-members-custom-fields-glm-member-db-contacts { - background-color: #f8ffff; + background-color: white; border: 1px solid lightgrey; border-radius: 3px; - width: 100%; + width: auto; padding: 10px; + margin-bottom: 5px; } #glm-table-profile .glm-admin-table.glm-admin-table-inner { border-top-left-radius: 0; @@ -219,6 +224,9 @@ input::placeholder { border: 1px solid lightgrey; margin-bottom: 10px; } +#glm-table-profile #glm-members-custom-fields-glm-member-db-contacts fieldset { + background: #f8ffff; +} #glm-table-profile fieldset legend { text-decoration: underline; font-size: 15px; diff --git a/models/admin/contacts/index.php b/models/admin/contacts/index.php index 9ffb3ba..fa7419c 100644 --- a/models/admin/contacts/index.php +++ b/models/admin/contacts/index.php @@ -643,7 +643,7 @@ class GlmMembersAdmin_contacts_index extends GlmDataContacts // We need to check if they manage multiple members $other_members_refs = $this->wpdb->get_var( "SELECT meta_value - FROM " . $this->wpdb->prefix . "usermeta + FROM glm_usermeta WHERE meta_key = 'glmMembersContactMembers' AND user_id = " . $this->config['loggedInUser']['wpUser']['ID'] ); diff --git a/setup/adminTabs.php b/setup/adminTabs.php index 52a0947..6258711 100644 --- a/setup/adminTabs.php +++ b/setup/adminTabs.php @@ -56,7 +56,7 @@ if (current_user_can('glm_members_member')) { // We need to check if they manage multiple members $other_members_refs = $this->wpdb->get_var( "SELECT meta_value - FROM " . $this->wpdb->prefix . "usermeta + FROM glm_usermeta WHERE meta_key = 'glmMembersContactMembers' AND user_id = " . $this->config['loggedInUser']['wpUser']['ID'] ); diff --git a/views/admin/contacts/edit.html b/views/admin/contacts/edit.html index 80cc6b7..59ae48b 100644 --- a/views/admin/contacts/edit.html +++ b/views/admin/contacts/edit.html @@ -791,12 +791,12 @@ {$prefix = $slug|cat:'_'} {$uid = $prefix|cat:$contactInfo.fieldData.id} {apply_filters('glm-members-custom-fields-form', '', $slug,$contactInfo.fieldData.id,'')} - {apply_filters('glm-members-custom-fields-form', '', $uid,$contactInfo.fieldData.id,'')} + {*apply_filters('glm-members-custom-fields-form', '', $uid,$contactInfo.fieldData.id,'')*} {/if} -- 2.17.1