From: Laury GvR Date: Tue, 31 Jul 2018 20:49:09 +0000 (-0400) Subject: Revamp changes to the contact profile table X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=3da820f53522c1917ef556d17ee78f3ec6209a93;p=WP-Plugins%2Fglm-member-db-contacts.git Revamp changes to the contact profile table - Layout changed to single column, widths/responsiveness edited - Cities display more appealing - New tabs added; account settings separated from account profile - Collapse/To Top links fixed - Publish checkboxes in their own subsection at the top - Repositioning of several form fields - Normalize like field widths - Custom field styles - other changes --- diff --git a/assets/info.png b/assets/info.png new file mode 100644 index 0000000..9d5b97e Binary files /dev/null and b/assets/info.png differ diff --git a/classes/data/dataContacts.php b/classes/data/dataContacts.php index 77ed806..9e04991 100644 --- a/classes/data/dataContacts.php +++ b/classes/data/dataContacts.php @@ -192,7 +192,8 @@ class GlmDataContacts extends GlmDataAbstract 'as' => 'contact_role_short', 'type' => 'list', 'list' => $this->config['contact_role_short'], - 'use' => 'lged' + 'default' => $this->config['contact_role_numb']['EntityManager'], + 'use' => 'a' ), // Organization name diff --git a/css/admin.css b/css/admin.css index 91eed44..33c8949 100644 --- a/css/admin.css +++ b/css/admin.css @@ -36,6 +36,11 @@ text-transform: uppercase; margin-bottom: 5px; } +@media only screen and (max-width: 639px) { + .glm-contact-content-toggle { + margin-top: 50px; + } +} #glm-admin-content-container .glm-contact-content-toggle h3 { color: #32373c; font-size: 13px; @@ -73,11 +78,8 @@ border-bottom-right-radius: 0; box-shadow: 1px 1px 4px lightgrey inset; } -.glm-contact-sub-data-links > * { - width: 50%; -} - .glm-contact-content-data:not(#glm-contact-account-profile-container) { +/*.glm-contact-content-data:not(#glm-contact-account-contact-container) {*/ display: none; } #glm-contact-fullprofile-toggle { @@ -89,20 +91,30 @@ float: right; width: 85px; } -.glm-contact-sub-data-links .glm-contact-content-toggle { - border: 0; -} -.glm-contact-sub-data-links .glm-contact-link-to-top { - text-align: right; -} #glm-table-profile .glm-contact-sub-data-links { border-width: 0 1px 1px 1px; border-color: lightgrey; border-style: solid; margin-top: -5px; margin-bottom: 10px; + padding: 8px; +} +#glm-table-profile .glm-contact-sub-data-links > a { + text-transform: uppercase; + font-size: 12px; + font-weight: bold; + margin: 0; +} +#glm-table-profile .glm-contact-sub-data-links > .glm-contact-content-toggle { + } -.glm-contact-sub-data-links .glm-contact-link-to-top { +#glm-table-profile .glm-contact-sub-data-links .glm-contact-content-toggle { + border: 0; +} +#glm-table-profile .glm-contact-sub-data-links .glm-contact-link-to-top { + text-align: right; +} +#glm-table-profile .glm-contact-sub-data-links .glm-contact-link-to-top { float: right; } @@ -122,6 +134,11 @@ input::placeholder { transition: 50ms border-color ease-in-out; border-width: 0 0 1px 0; } +#glm-table-profile.glm-admin-table [name="notes"] { + width: 100%; + max-width: 640px; + height: 120px; +} #glm-table-profile.glm-admin-table { width: 100%; clear: both; @@ -135,7 +152,25 @@ input::placeholder { padding-top: 14px; line-height: 1.6px; } - +#glm-table-profile.glm-admin-table td.glm-contact-citybox { + max-width: 320px; +} +#glm-table-profile.glm-admin-table td > .glm-admin-noinput { + background: #f3f3f9; + border: 1px solid #e1e1e1; + color: #575757; + display: inline-block; + margin: 1px; + padding: 4px 6px; + min-width: 200px; +} +#glm-table-profile #glm-members-custom-fields-glm-member-db-contacts { + border: 1px solid lightgrey; + border-radius: 3px; + width: 100%; + padding: 10px; + background-color: #f8ffff; +} #glm-table-profile .glm-admin-table.glm-admin-table-inner { border-top-left-radius: 0; border-top-right-radius: 0; @@ -147,13 +182,25 @@ input::placeholder { display: block; max-width: 400px; } -@media only screen and (max-width: 640px) { +#glm-table-profile fieldset { + background: white; + border: 1px solid lightgrey; + +} +#glm-table-profile fieldset legend { + text-decoration: underline; + font-size: 15px; + margin-left: 5px; + margin-bottom: 10px; +} +@media only screen and (max-width: 9999px) { #glm-table-profile input[type=text] { font-size: 14px; } #glm-table-profile.glm-admin-table { table-layout: fixed; } + #glm-table-profile.glm-admin-table .glm-custom-field-label, #glm-table-profile.glm-admin-table th { clear: both; display: block; @@ -161,15 +208,16 @@ input::placeholder { width: 100%; max-width: 100%; } + #glm-table-profile.glm-admin-table tr { + display: block; + margin-bottom: 10px; + } + #glm-table-profile.glm-admin-table .glm-custom-field, #glm-table-profile.glm-admin-table td { clear: both; display: block; width: 100%; - max-width: 100%; - } - #glm-table-profile.glm-admin-table tr { - display: block; - margin-bottom: 15px; + max-width: 640px; } } @@ -243,7 +291,15 @@ a.tooltip, a.tooltip_bottomleft, a.tooltip_left { color: grey; zoom: 1; position: relative; - +} +@media only screen and (max-width: 639px) { + a.tooltip, a.tooltip_bottomleft, a.tooltip_left { + left: 5%; + width: 80%; + } +} +.tooltip > p { + white-space: normal; } .fa { font: normal normal normal 14px/1 FontAwesome; @@ -257,5 +313,6 @@ a.tooltip, a.tooltip_bottomleft, a.tooltip_left { display: inline-block; } .fa-question-circle:before { -content: "\f059"; + content: url("../assets/info.png"); + margin-left: 3px; } \ No newline at end of file diff --git a/views/admin/contacts/edit.html b/views/admin/contacts/edit.html index 9b2778c..5783ecb 100644 --- a/views/admin/contacts/edit.html +++ b/views/admin/contacts/edit.html @@ -139,24 +139,82 @@ -
Expand All
-
+
Expand All
+
+
Account Settings
+
+
-
Account Profile
-
-
+ + + + + + + + + + {if $option != 'create'} + + + + + + + + + {/if} +
+ Permissions + +

+ {foreach from=$contactInfo.fieldData.contact_role.list item=v} + {$v.name}
+ {/foreach} +

+ + + +
+
+ + {if $contactInfo.fieldFail.contact_role_short}

{$contactInfo.fieldFail.contact_role_short}

{/if} +
Display/Moderate/Archive + + {if $contactInfo.fieldFail.access}

{$contactInfo.fieldFail.access}

{/if} +
Created{$contactInfo.fieldData.create_time.datetime}
Last Updated{$contactInfo.fieldData.modify_time.datetime}
+ +
+
- - - - {if $haveMember} +
Account Profile
+
+
+ +
+ + + {if $haveMember} - - - - - - - - - - - - - - - - - - {if $option != 'create'} - - - - - - - - - {/if} - - - - - - - - - - - - {if $option == 'create'} - - - {else} - - - {/if} - - - - - + + + + - {if $option == 'create'} - - - - - {else} - - - - - + + + + + + + + + + + + + + + + {if $option == 'create'} + + + {else} + + + {/if} + + + + + + + {if $option == 'create'} + + + + + {else} - - - + + + - - - - + + + {/if} + + + + + + + + - - - -
Contact For - {$memberData.name} - {else} + {$memberData.name} + {else} Contact For
Active - -
- Permissions - -

- {foreach from=$contactInfo.fieldData.contact_role.list item=v} - {$v.name}
- {/foreach} -

- - - -
-
- - {if $contactInfo.fieldFail.contact_role}

{$contactInfo.fieldFail.contact_role}

{/if} -
Display/Moderate/Archive - - {if $contactInfo.fieldFail.access}

{$contactInfo.fieldFail.access}

{/if} -
- Primary Contact - -

(Only one contact at a time may be the primary contact. If there is another primary contact, it will be deselected.)

- - - -
-
- {if apply_filters('glm_members_permit_admin_member_contacts_set_as_primary', true)} - - {else} - {$contactInfo.fieldData.primary_contact.name} - {/if} -
Created{$contactInfo.fieldData.create_time.datetime}
Last Updated{$contactInfo.fieldData.modify_time.datetime}
-

-
First Name - - {if $contactInfo.fieldFail.fname}

{$contactInfo.fieldFail.fname}

{/if} -
Last Name - - {if $contactInfo.fieldFail.lname}

{$contactInfo.fieldFail.lname}

{/if} -
Login Username - -
NOTE: The username cannot be changed once the contact is created. - {if $contactInfo.fieldFail.username}

{$contactInfo.fieldFail.username}

{/if} -
Login Username{$contactInfo.fieldData.username}
- Login password - -

The password must be at least 8 characters and include at least one number, one letter, and at least one special character. (# . - _ , $ % & !)

- - - -
-
- - {if $option == 'create'} - Save this password. -
A randomly generated password has been supplied. You may change this as desired. - There is no way to view a password once it's set. However, a user may recover a password using their - Email address at the login page. - {else} -
Enter a password here only if you need to change it. - {/if} - {if $contactInfo.fieldFail.password}

{$contactInfo.fieldFail.password}

{/if} -
Active + +
Email Address - -
NOTE: This field is only required for users who will have login privileges. - {if $contactInfo.fieldFail.email}

{$contactInfo.fieldFail.email}

{/if} -
Email Address{$contactInfo.fieldData.email}
- New Email Address - -

To change your E-Mail address, enter your new address here. This address must not be used by any other contact or user in this site.

- - - -
-
- - {if $newEmailError == 'BAD_CHARACTERS'} -
- The E-Mail address you submitted contained invalid characters. {$new_email} - Please check the address and submit again. - - {/if} - {if $newEmailError == 'BAD_FORMAT'} -
- The E-Mail address you submitted is formatted incorrectly. An example of a correctly formatted E-Mail address is "name@domain.com". - Please check the address and submit again. - - {/if} - {if $newEmailError == 'IN_USE'} -
- The E-Mail address you submitted is already in use for this site. - You may only change your address to one that is not currently in use. - - {/if} -
+ Primary Contact + +

(Only one contact at a time may be the primary contact. If there is another primary contact, it will be deselected.)

+ - {/if} + +
+
+ {if apply_filters('glm_members_permit_admin_member_contacts_set_as_primary', true)} + + {else} + {$contactInfo.fieldData.primary_contact.name} + {/if} +
+

+
First Name + + {if $contactInfo.fieldFail.fname}

{$contactInfo.fieldFail.fname}

{/if} +
Last Name + + {if $contactInfo.fieldFail.lname}

{$contactInfo.fieldFail.lname}

{/if} +
Login Username + +
NOTE: The username cannot be changed once the contact is created. + {if $contactInfo.fieldFail.username}

{$contactInfo.fieldFail.username}

{/if} +
Login Username{$contactInfo.fieldData.username}
+ Login password + +

The password must be at least 8 characters and include at least one number, one letter, and at least one special character. (# . - _ , $ % & !)

+ + + +
+
+ + {if $option == 'create'} + Save this password. +
A randomly generated password has been supplied. You may change this as desired. + There is no way to view a password once it's set. However, a user may recover a password using their + Email address at the login page. + {else} +
Enter a password here only if you need to change it. + {/if} + {if $contactInfo.fieldFail.password}

{$contactInfo.fieldFail.password}

{/if} +
Email Address + +
NOTE: This field is only required for users who will have login privileges. + {if $contactInfo.fieldFail.email}

{$contactInfo.fieldFail.email}

{/if} +
Profile Image - {if $contactInfo.fieldData.image} -
- - Close
-
- - - - - - -
- Delete Image
- {$contactInfo.fieldData.image}
-

Show Large Image

-
+
Email Address{$contactInfo.fieldData.email}
+ New Email Address + +

To change your E-Mail address, enter your new address here. This address must not be used by any other contact or user in this site.

+ + + +
+
+ + {if $newEmailError == 'BAD_CHARACTERS'} +
+ The E-Mail address you submitted contained invalid characters. {$new_email} + Please check the address and submit again. + {/if} - - {if $contactInfo.fieldFail.image}

{$contactInfo.fieldFail.image}

{/if} -
Management/Access to - {if $membersList && apply_filters('glm_members_menu_members',true)} - -    Select a member to add.
-
- {if $contactMembers} - {foreach $contactMembers as $m} -
- {$m.name} + {if $newEmailError == 'BAD_FORMAT'} +
+ The E-Mail address you submitted is formatted incorrectly. An example of a correctly formatted E-Mail address is "name@domain.com". + Please check the address and submit again. + + {/if} + {if $newEmailError == 'IN_USE'} +
+ The E-Mail address you submitted is already in use for this site. + You may only change your address to one that is not currently in use. + + {/if} +
Profile Image + {if $contactInfo.fieldData.image} +
+ + Close
+
+ + + + + + +
+ Delete Image
+ {$contactInfo.fieldData.image}
+

Show Large Image

+
+ {/if} + + {if $contactInfo.fieldFail.image}

{$contactInfo.fieldFail.image}

{/if} +
Management/Access to + {if $membersList && apply_filters('glm_members_menu_members',true)} + + - {else} - (Primary {$terms.term_member_cap}) + + {/if} + {/foreach} +    Select a member to add.
+
+ {if $contactMembers} + {foreach $contactMembers as $m} +
+ {$m.name} + {if $m.id != $memberID} + X + + {else} + (Primary {$terms.term_member_cap}) + {/if} +
+ {/foreach} {/if}
- {/foreach} - {/if} - - {else} - {if $contactMembers} - - {foreach $contactMembers as $m} -
- {$m.name} -
- {/foreach} + {else} + {if $contactMembers} + + {foreach $contactMembers as $m} +
+ {$m.name} +
+ {/foreach} + {/if} {/if} - {/if} -
- This contact has no access or can manage all members, so no selection is needed here. -
-
-

Account Contact Info (section title)

+

Account Contact Info

+ + + + + + + + + + + - @@ -615,22 +634,22 @@ -
Publish on Front End + +
Use for Billing Information + +
+

+
Mailing Address Type @@ -444,22 +475,21 @@
Address Line 1 - + {if $contactInfo.fieldFail.addr1}

{$contactInfo.fieldFail.addr1}

{/if}
Address Line 2 - + {if $contactInfo.fieldFail.addr2}

{$contactInfo.fieldFail.addr2}

{/if}
City + -
Add a new City
@@ -484,6 +514,7 @@ {/foreach} +
Add a new City
@@ -540,18 +571,6 @@ {if $contactInfo.fieldFail.alt_email}

{$contactInfo.fieldFail.alt_email}

{/if} - - - - - - - -
Publish on Front End - -
Use for Billing Information - -
-

Organization/Company Mailing Address

+
Address Line 1 - + {if $contactInfo.fieldFail.business_addr1}

{$contactInfo.fieldFail.business_addr1}

{/if}
Address Line 2 - + {if $contactInfo.fieldFail.business_addr2}

{$contactInfo.fieldFail.business_addr2}

{/if}
City + -
Add a new City
+
Add a new City
@@ -739,18 +758,29 @@ - - {if apply_filters( 'glm-members-billing-enabled', false )} -
-

Billing Info

-
-
+ {if apply_filters( 'glm-members-billing-enabled', false )} +
+

Billing Info

+
+
+
{apply_filters( 'glm-members-billing-contact-form', '', $contactInfo.fieldData.ref_dest )} +
- {/if} +
+ {/if}
-

{apply_filters( 'glm-members-billing-contact-tab-name', '' )}

+

+ {if apply_filters( 'glm-members-billing-contact-tab-name', '' )} + {apply_filters( 'glm-members-billing-contact-tab-name', '' )} + {else} + Custom Fields + {/if} +

@@ -778,6 +808,10 @@
+
@@ -960,11 +994,16 @@ }, 500); }); + $('.glm-contact-link-to-top').click(function () { + $('body,html').animate({ + scrollTop: $("#glm-contact-fullprofile-toggle").offset().top-10 + }, 75); + }); // Open or close the appropriate section if a toggle is clicked $(".glm-contact-content-toggle").not("#glm-contact-fullprofile-toggle").click(function() { if($(this).parents('.glm-contact-sub-data-links').length) { - var target = $(this).parent().parent().attr("id").slice(0, -10); + var target = $(this).parent().parent().parent().attr("id").slice(0, -10); } else { var target = $(this).attr("id").slice(0, -7); }