{if $fromMemberMenu}
- {include file='admin/member/header.html'}
+{include file='admin/member/header.html'}
{else}
- {include file='admin/contacts/header.html'}
+{include file='admin/contacts/header.html'}
{/if}
{if $userDeleted}
- <h3><span class="glm-warning">Contact Deleted:</span></h3>
- <ul class="glm-li">
- {if $wpUserDeleted}
- <li>The associated system user was also removed.</li>
- {else}
- <li>Other roles were assigned to the associated system user so that system user has not been removed.</li>
- {/if}
- </ul>
+<h3><span class="glm-warning">Contact Deleted:</span></h3>
+<ul class="glm-li">
+{if $wpUserDeleted}
+ <li>The associated system user was also removed.</li>
+{else}
+ <li>Other roles were assigned to the associated system user so that system user has not been removed.</li>
+{/if}
+</ul>
{/if}
- {if $newContactEmailExists}
- <h4><span class="glm-error">NOTE:</span> The Email address for this contact is already in use. Please check if they already are a contact in this system.</h3>
- {/if}
- {if $newContactUsernameExists}
- <h4><span class="glm-error">NOTE:</span> The Login Username for this contact is already in use. Please check if they already are a contact in this system.</h3>
- {/if}
- {if $misMatchedWpUsers}
- <h4><span class="glm-error">NOTE:</span> There is already a WordPress user with the requested Email address and a different user with the requested Login Username. Please select a different Login Username.</h3>
- {/if}
+{if $newContactEmailExists}
+ <h4><span class="glm-error">NOTE:</span> The Email address for this contact is already in use. Please check if they already are a contact in this system.</h3>
+{/if}
+{if $newContactUsernameExists}
+ <h4><span class="glm-error">NOTE:</span> The Login Username for this contact is already in use. Please check if they already are a contact in this system.</h3>
+{/if}
+{if $misMatchedWpUsers}
+ <h4><span class="glm-error">NOTE:</span> There is already a WordPress user with the requested Email address and a different user with the requested Login Username. Please select a different Login Username.</h3>
+{/if}
<!-- Check for invalid contact ID to edit -->
{if $option == 'edit' && !$contactID}
- <h3><span class="glm-error">ERROR:</span> Specified contact not found!</h3>
+ <h3><span class="glm-error">ERROR:</span> Specified contact not found!</h3>
- {elseif $misMatchedWpUsers}
+{elseif $misMatchedWpUsers}
- <h3>
- <span class="glm-warning">NOTE:</span>
- The Email address for this contact is already in use by an existing system user but the username is in use by a different
- system user. As such we are unable to match this request to a specific existing system user. We suggest you determine what
- the "Username" is for the existing Wordpress user with the Email address you requested. Please call for assistance if needed.
- </h3>
+ <h3>
+ <span class="glm-warning">NOTE:</span>
+ The Email address for this contact is already in use by an existing system user but the username is in use by a different
+ system user. As such we are unable to match this request to a specific existing system user. We suggest you determine what
+ the "Username" is for the existing Wordpress user with the Email address you requested. Please call for assistance if needed.
+ </h3>
- {elseif $newContactCreated}
+{elseif $newContactCreated}
- <h3><span class="glm-warning">New Contact Created:</span> {$contactInfo.fieldData.fname} {$contactInfo.fieldData.lname} - {$contactInfo.fieldData.email}</h3>
- {if $usernameChangedToWP || $usingExistingWPContact}
- <h3><span class="glm-notice">NOTE:</span></h3>
- <ul class="glm-li">
- {/if}
- {if $usingExistingWPContact}
- <li>An existing system user was found with the same Email address. This contact will be associated with that system user. </li>
- <li>The password of the existing system user was not updated. The system user will continue to use their existing password.</li>
- {/if}
- {if $usernameChangedToWP}
- <li>The username was changed to match the username of the system user found with the specified Email address.</li>
- <li>The username for this contact is: <span class="glm-notice">{$contactInfo.fieldData.username}</span></li>
- {/if}
- {if $usernameChangedToWP || $usingExistingWPContact}
- </ul>
- {/if}
+ <h3><span class="glm-warning">New Contact Created:</span> {$contactInfo.fieldData.fname} {$contactInfo.fieldData.lname} - {$contactInfo.fieldData.email}</h3>
+{if $usernameChangedToWP || $usingExistingWPContact}
+ <h3><span class="glm-notice">NOTE:</span></h3>
+ <ul class="glm-li">
+{/if}
+{if $usingExistingWPContact}
+ <li>An existing system user was found with the same Email address. This contact will be associated with that system user. </li>
+ <li>The password of the existing system user was not updated. The system user will continue to use their existing password.</li>
+{/if}
+{if $usernameChangedToWP}
+ <li>The username was changed to match the username of the system user found with the specified Email address.</li>
+ <li>The username for this contact is: <span class="glm-notice">{$contactInfo.fieldData.username}</span></li>
+{/if}
+{if $usernameChangedToWP || $usingExistingWPContact}
+ </ul>
+{/if}
- {else} <!-- !$option -->
+{else} <!-- !$option -->
- {if apply_filters('glm_members_permit_admin_member_contacts_edit_contact', true)}
+{if apply_filters('glm_members_permit_admin_member_contacts_edit_contact', true)}
- {if $option == 'create' || $option == 'edit'}
+{if $option == 'create' || $option == 'edit'}
- {if $fromMemberMenu}
- <a href="{$thisUrl}?page=glm-members-admin-menu-member&glm_action=contacts&member={$memberID}" class="button button-primary glm-button glm-right">Return to Contact List</a>
- {else}
- <a href="{$thisUrl}?page=glm-members-admin-menu-contacts&glm_action=index&member={$memberID}" class="button button-primary glm-button glm-right">Return to Contact List</a>
- {/if}
+ {if $fromMemberMenu}
+ <a href="{$thisUrl}?page=glm-members-admin-menu-member&glm_action=contacts&member={$memberID}" class="button button-primary glm-button glm-right">Return to Contact List</a>
+ {else}
+ <a href="{$thisUrl}?page=glm-members-admin-menu-contacts&glm_action=index&member={$memberID}" class="button button-primary glm-button glm-right">Return to Contact List</a>
+ {/if}
- {if $option == 'create'}
- <h2>Add New Contact</h2>
- {else}
- {if $newEmailError != ''}
- <h2 class="glm-required glm-flash-updated">NOTE: Your new E-Mail address was not valid. Please see below.</h2>
- {else}
- {if $contactUpdated}<h2 class="glm-notice glm-flash-updated">Contact Updated</h2>{/if}
- {/if}
- <a id="deleteContactButton" class="button button-primary glm-button glm-right">Delete this Contact</a>
- <div id="deleteContactDialog" class="glm-dialog-box" title="Delete Contact">
- <center>
- <p><a id="deleteContactCancel" class="button button-primary">Cancel</a></p>
- <p><input id="deleteContactSubmit" type="submit" value="Delete this contact"></p>
- </center>
- <div class="glm-item-container">
- <p><center><span class="glm-error">WARNING:</span></center></p>
- <p>
- <span class="glm-warning">Clicking the "Delete this Contact" button above will
- delete all of the data and images associated with this contact.
- </span>
- </p>
- <p>
- <span class="glm-error">Once deleted, this information will no longer be available and cannot be retrieved!</span>
- </p>
- </div>
+ {if $option == 'create'}
+ <h2>Add New Contact</h2>
+ {else}
+ {if $newEmailError != ''}
+ <h2 class="glm-required glm-flash-updated">NOTE: Your new E-Mail address was not valid. Please see below.</h2>
+ {else}
+ {if $contactUpdated}<h2 class="glm-notice glm-flash-updated">Contact Updated</h2>{/if}
+ {/if}
+ <a id="deleteContactButton" class="button button-primary glm-button glm-right">Delete this Contact</a>
+ <div id="deleteContactDialog" class="glm-dialog-box" title="Delete Contact">
+ <center>
+ <p><a id="deleteContactCancel" class="button button-primary">Cancel</a></p>
+ <p><input id="deleteContactSubmit" type="submit" value="Delete this contact"></p>
+ </center>
+ <div class="glm-item-container">
+ <p><center><span class="glm-error">WARNING:</span></center></p>
+ <p>
+ <span class="glm-warning">Clicking the "Delete this Contact" button above will
+ delete all of the data and images associated with this contact.
+ </span>
+ </p>
<p>
- This contact may instead be "Archived" rather than deleted using the "Contact Display:" pick-list. When archived, the contact is not displayed on the front-end
- of the Web site, any login assoicated with this contact is deactivated, and the contact will not show on contact lists unless "Archived" is selected.
- Unlike delete, an archived contact may be changed back to normal use.
+ <span class="glm-error">Once deleted, this information will no longer be available and cannot be retrieved!</span>
</p>
</div>
- {/if}
+ <p>
+ This contact may instead be "Archived" rather than deleted using the "Contact Display:" pick-list. When archived, the contact is not displayed on the front-end
+ of the Web site, any login assoicated with this contact is deactivated, and the contact will not show on contact lists unless "Archived" is selected.
+ Unlike delete, an archived contact may be changed back to normal use.
+ </p>
+ </div>
+ {/if}
- {if $fromMemberMenu}
- <form action="{$thisUrl}?page=glm-members-admin-menu-member" method="post" enctype="multipart/form-data">
- <input type="hidden" name="glm_action" value="contacts">
- {else}
- <form action="{$thisUrl}?page=glm-members-admin-menu-contacts" method="post" enctype="multipart/form-data">
- <input type="hidden" name="glm_action" value="index">
+ {if $fromMemberMenu}
+ <form action="{$thisUrl}?page=glm-members-admin-menu-member" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="glm_action" value="contacts">
+ {else}
+ <form action="{$thisUrl}?page=glm-members-admin-menu-contacts" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="glm_action" value="index">
+ {/if}
+ <input type="hidden" name="member" value="{$memberData.id}">
+ {if $option == 'create'}
+ <input type="hidden" name="option" value="addNew">
+ <input type="hidden" name="create_time" value="now">
+ <input type="hidden" name="ref_type" value="{$refType}">
+ {if $haveMember}
+ <input type="hidden" name="ref_dest" value="{$memberData.id}">
{/if}
- <input type="hidden" name="member" value="{$memberData.id}">
- {if $option == 'create'}
- <input type="hidden" name="option" value="addNew">
- <input type="hidden" name="create_time" value="now">
- <input type="hidden" name="ref_type" value="{$refType}">
- {if $haveMember}
- <input type="hidden" name="ref_dest" value="{$memberData.id}">
- {/if}
- {else}
- <input type="hidden" name="option" value="submit">
- <input type="hidden" name="contact" value="{$contactInfo.fieldData.id}">
- <input type="hidden" name="id" value="{$contactInfo.fieldData.id}">
- <input type="hidden" name="modify_time" value="now">
- {/if}
- <h2 class="nav-tab-wrapper" style="margin-bottom: 1em;">
- <a id="glm-contact-info-profile" data-show-table="glm-table-profile" class="glm-contact-info-tab nav-tab nav-tab-active">Profile Data</a>
- {apply_filters('glm-member-db-custom-fields-nav', '', 'contact-info')}
-
- <!--{if $contactUpdateError}<span class="glm-error glm-flash-updated glm-right">{$terms.term_contact_cap} Profile Update Error</span>{/if}-->
- <!--{if $errorMessage}<span class="glm-error glm-flash-updated glm-right">{$errorMessage}</span>{/if}-->
- </h2>
-
- <div id="glm-table-custom-fields" class="glm-hidden glm-admin-table glm-table glm-contact-info-table">
- {if $option == 'create'}
- {apply_filters('glm-members-custom-fields-form', '', $slug,'','')}
- {else}
- {$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,'')}
- {/if}
- </div>
- <table id="glm-table-profile" class="glm-admin-table glm-admin-table-outer glm-hidden glm-contact-info-table">
-<!-- <table class="glm-admin-table glm-shrink">-->
- <tr>
- {if $haveMember}
- <th>Contact For:</th>
- <td>
- {$memberData.name}
- {else}
- <th class="glm-required">Contact For:</th>
- <td {if $contactInfo.fieldFail.ref_dest}class="glm-form-bad-input"{/if}>
- <select name="ref_dest">
- <option value="">( Select a {$terms.term_member_cap} )</option>
- {foreach $membersList as $m}
- <option value="{$m.id}"{if isset($m.selected)} selected="selected"{/if}>{$m.name}</option>
- {/foreach}
- </select>
- {/if}
- {if $contactInfo.fieldFail.ref_dest}<p>A {$terms.term_member_cap} was not selected.</p>{/if}
- </td>
- </tr>
- <tr>
- <th>Active:</th>
- <td>
- <input type="checkbox" name="active" {if $contactInfo.fieldData.active.value} checked{/if}>
- </td>
- </tr>
- <tr>
- <th>Primary Contact:</th>
- <td>
- {if apply_filters('glm_members_permit_admin_member_contacts_set_as_primary', true)}
- <input type="checkbox" name="primary_contact" {if $contactInfo.fieldData.primary_contact.value} checked{/if}> (Only one contact at a time may be the primary contact. If there is another primary contact, it will be deselected.)
- {else}
- {$contactInfo.fieldData.primary_contact.name}
- {/if}
- </td>
- </tr>
- {if $option != 'create'}
- <tr>
- <th>Created:</th>
- <td>{$contactInfo.fieldData.create_time.datetime}</td>
- </tr>
- <tr>
- <th>Last Updated:</th>
- <td>{$contactInfo.fieldData.modify_time.datetime}</td>
- </tr>
- {/if}
- <tr>
- <th {if $contactInfo.fieldRequired.fname}class="glm-required"{/if}>First Name:</th>
- <td {if $contactInfo.fieldFail.fname}class="glm-form-bad-input"{/if}>
- <input type="text" name="fname" value="{$contactInfo.fieldData.fname}" class="glm-form-text-input-short">
- {if $contactInfo.fieldFail.fname}<p>{$contactInfo.fieldFail.fname}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.lname}class="glm-required"{/if}>Last Name:</th>
- <td {if $contactInfo.fieldFail.lname}class="glm-form-bad-input"{/if}>
- <input type="text" name="lname" value="{$contactInfo.fieldData.lname}" class="glm-form-text-input-short">
- {if $contactInfo.fieldFail.lname}<p>{$contactInfo.fieldFail.lname}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.contact_type}class="glm-required"{/if}>Contact Type:</th>
- <td {if $contactInfo.fieldFail.contact_type}class="glm-form-bad-input"{/if}>
- <select name="contact_type">
- {foreach from=$contactInfo.fieldData.contact_type.list item=v}
- <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
- {$v.name}
- </option>
- {/foreach}
- </select>
- {if $contactInfo.fieldFail.contact_type}<p>{$contactInfo.fieldFail.contact_type}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.contact_role}class="glm-required"{/if}>Permissions:</th>
- <td {if $contactInfo.fieldFail.contact_role}class="glm-form-bad-input"{/if}>
- <select id="contactRoleSelect" name="contact_role">
- {foreach from=$contactInfo.fieldData.contact_role.list item=v}
- <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
- {$v.name}
- </option>
- {/foreach}
- </select>
- {if $contactInfo.fieldFail.contact_role}<p>{$contactInfo.fieldFail.contact_role}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.access}class="glm-required"{/if}>Display/Moderate/Archive:</th>
- <td {if $contactInfo.fieldFail.access}class="glm-form-bad-input"{/if}>
- <select name="access">
- {foreach from=$contactInfo.fieldData.access.list item=v}
- <option value="{$v.value}"{if $v.default} selected="selected"{/if}>{$v.name}</option>
- {/foreach}
- </select>
- {if $contactInfo.fieldFail.access}<p>{$contactInfo.fieldFail.access}</p>{/if}
- </td>
- </tr>
- {if $option == 'create'}
- <tr>
- <th id="emailRequiredForLoginContacts" class="glm-required">Email Address:</th>
- <td {if $contactInfo.fieldFail.email}class="glm-form-bad-input"{/if}>
- <input type="text" name="email" value="{$contactInfo.fieldData.email}" class="glm-form-text-input-medium" placeholder="(ex: name@domain.com)">
- <br><span class="glm-notice">NOTE:</span> This field is only required for users who will have login privileges.
- {if $contactInfo.fieldFail.email}<p>{$contactInfo.fieldFail.email}</p>{/if}
- </td>
- </tr>
- {else}
-
- <tr><th>Email Address::</th><td>{$contactInfo.fieldData.email}</td></tr>
- <tr>
- <th>New Email Address:</th>
- <td {if $newEmailError != ''}class="glm-form-bad-input"{/if}>
- <input type="text" name="new_email" value="{$new_email}" class="glm-form-text-input-short" placeholder="(ex: name@domain.com)">
- {if $newEmailError == 'BAD_CHARACTERS'}
- <br><span style="color: white;">
- The E-Mail address you submitted contained invalid characters. {$new_email}
- Please check the address and submit again.
- </span>
- {/if}
- {if $newEmailError == 'BAD_FORMAT'}
- <br><span style="color: white;">
- 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.
- </span>
- {/if}
- {if $newEmailError == 'IN_USE'}
- <br><span style="color: white;">
- 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.
- </span>
- {/if}
- <br>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.
- </td>
- </tr>
+ {else}
+ <input type="hidden" name="option" value="submit">
+ <input type="hidden" name="contact" value="{$contactInfo.fieldData.id}">
+ <input type="hidden" name="id" value="{$contactInfo.fieldData.id}">
+ <input type="hidden" name="modify_time" value="now">
+ {/if}
+ <h2 class="nav-tab-wrapper" style="margin-bottom: 1em;">
+ <!-- <a id="glm-contact-info-profile" data-show-table="glm-table-profile" class="glm-contact-info-tab nav-tab nav-tab-active">Profile Data</a> -->
+ <!--{*apply_filters('glm-member-db-custom-fields-nav', '', 'contact-info')*}-->
+
+ <!--{if $contactUpdateError}<span class="glm-error glm-flash-updated glm-right">{$terms.term_contact_cap} Profile Update Error</span>{/if}-->
+ <!--{if $errorMessage}<span class="glm-error glm-flash-updated glm-right">{$errorMessage}</span>{/if}-->
+ </h2>
+
+
+ <div id="glm-contact-fullprofile-toggle" class="">Expand All</div>
+ <div id="glm-table-profile" class="glm-admin-table-outer glm-contact-info-table glm-admin-table">
+
+ <div id="glm-contact-account-profile-toggle" class="glm-contact-content-toggle selected">Account Profile</div>
+ <div id="glm-contact-account-profile-container" class="glm-admin-form-section glm-contact-content-data">
+ <div id="glm-contact-account-profile"></div>
+
+ <table class="glm-admin-table glm-admin-table-inner">
+ <!-- <table class="glm-admin-table glm-shrink">-->
+ <tr>
+ {if $haveMember}
+ <th>
+ Contact For
+ </th>
+
+ <td>
+ {$memberData.name}
+ {else}
+ <th class="glm-required">Contact For</th>
+ <td {if $contactInfo.fieldFail.ref_dest}class="glm-form-bad-input"{/if}>
+ <select name="ref_dest">
+ <option value="">( Select a {$terms.term_member_cap} )</option>
+ {foreach $membersList as $m}
+ <option value="{$m.id}"{if isset($m.selected)} selected="selected"{/if}>{$m.name}</option>
+ {/foreach}
+ </select>
+ {/if}
+ {if $contactInfo.fieldFail.ref_dest}<p>A {$terms.term_member_cap} was not selected.</p>{/if}
+ </td>
+ </tr>
+
+ <tr>
+ <th>Active</th>
+ <td>
+ <input type="checkbox" name="active" {if $contactInfo.fieldData.active.value} checked{/if}>
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.contact_role}class="glm-required"{/if}>
+ Permissions
+ <a href="#" onclick="return false;" onkeypress="return false;" class="gf_tooltip tooltip">
+ <p>
+ {foreach from=$contactInfo.fieldData.contact_role.list item=v}
+ <span>{$v.name}</span></br>
+ {/foreach}
+ </p>
+ <i class="fa fa-question-circle">
+
+ </i>
+ </a>
+ </th>
+ <td {if $contactInfo.fieldFail.contact_role}class="glm-form-bad-input"{/if}>
+ <select id="contactRoleSelect" name="contact_role">
+ {foreach from=$contactInfo.fieldData.contact_role_short.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+ {$v.name}
+ </option>
+ {/foreach}
+ </select>
+ {if $contactInfo.fieldFail.contact_role}<p>{$contactInfo.fieldFail.contact_role}</p>{/if}
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $contactInfo.fieldRequired.access}class="glm-required"{/if}>Display/Moderate/Archive:</th>
+ <td {if $contactInfo.fieldFail.access}class="glm-form-bad-input"{/if}>
+ <select name="access">
+ {foreach from=$contactInfo.fieldData.access.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>{$v.name}</option>
+ {/foreach}
+ </select>
+ {if $contactInfo.fieldFail.access}<p>{$contactInfo.fieldFail.access}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Primary Contact
+ <a href="#" onclick="return false;" onkeypress="return false;" class="gf_tooltip tooltip">
+ <p>(Only one contact at a time may be the primary contact. If there is another primary contact, it will be deselected.)</p>
+ <i class="fa fa-question-circle">
+
+ </i>
+ </a>
+ </th>
+ <td>
+ {if apply_filters('glm_members_permit_admin_member_contacts_set_as_primary', true)}
+ <input type="checkbox" name="primary_contact" {if $contactInfo.fieldData.primary_contact.value} checked{/if}>
+ {else}
+ {$contactInfo.fieldData.primary_contact.name}
+ {/if}
+ </td>
+ </tr>
+ {if $option != 'create'}
+ <tr>
+ <th>Created</th>
+ <td>{$contactInfo.fieldData.create_time.datetime}</td>
+ </tr>
+ <tr>
+ <th>Last Updated</th>
+ <td>{$contactInfo.fieldData.modify_time.datetime}</td>
+ </tr>
+ {/if}
+ <tr>
+ <td colspan="2">
+ <div class="glm-table-spacer"><hr></div>
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.fname}class="glm-required"{/if}>First Name:</th>
+ <td {if $contactInfo.fieldFail.fname}class="glm-form-bad-input"{/if}>
+ <input type="text" name="fname" value="{$contactInfo.fieldData.fname}" class="glm-form-text-input-short">
+ {if $contactInfo.fieldFail.fname}<p>{$contactInfo.fieldFail.fname}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.lname}class="glm-required"{/if}>Last Name:</th>
+ <td {if $contactInfo.fieldFail.lname}class="glm-form-bad-input"{/if}>
+ <input type="text" name="lname" value="{$contactInfo.fieldData.lname}" class="glm-form-text-input-short">
+ {if $contactInfo.fieldFail.lname}<p>{$contactInfo.fieldFail.lname}</p>{/if}
+ </td>
+ </tr>
+ {if $option == 'create'}
+ <th {if $contactInfo.fieldRequired.username}class="glm-required"{/if}>Login Username:</th>
+ <td {if $contactInfo.fieldFail.username}class="glm-form-bad-input"{/if}>
+ <input type="text" name="username" value="{$contactInfo.fieldData.username}" class="glm-form-text-input-medium" placeholder="(no spaces permitted)">
+ <br><span class="glm-notice">NOTE:</span> The username cannot be changed once the contact is created.
+ {if $contactInfo.fieldFail.username}<p>{$contactInfo.fieldFail.username}</p>{/if}
+ </td>
+ {else}
+ <th>Login Username:</th>
+ <td>{$contactInfo.fieldData.username}</td>
+ {/if}
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.password}class="glm-required"{/if}>
+ Login password:
+ <a href="#" onclick="return false;" onkeypress="return false;" class="gf_tooltip tooltip">
+ <p>The password must be at least 8 characters and include at least one number, one letter, and at least one special character. (# . - _ , $ % & !)</p>
+ <i class="fa fa-question-circle">
+
+ </i>
+ </a>
+ </th>
+ <td {if $contactInfo.fieldFail.password}class="glm-form-bad-input"{/if}>
+ <input type="text" name="password" value="{$contactInfo.fieldData.password}" class="glm-form-text-input-medium" placeholder="{if $option=='create'}(no spaces permitted){else}(Password does not show, only enter to change password.){/if}">
+ {if $option == 'create'}
+ <span class="glm-notice">Save this password.</span>
+ <br>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}
+ <br><span class="sub-field-note">Enter a password here <b><i>only</i></b> if you need to change it.</span>
+ {/if}
+ {if $contactInfo.fieldFail.password}<p>{$contactInfo.fieldFail.password}</p>{/if}
+ </td>
+ </tr>
+
+ {if $option == 'create'}
+ <tr>
+ <th id="emailRequiredForLoginContacts" class="glm-required">Email Address:</th>
+ <td {if $contactInfo.fieldFail.email}class="glm-form-bad-input"{/if}>
+ <input type="text" name="email" value="{$contactInfo.fieldData.email}" class="glm-form-text-input-medium" placeholder="(ex: name@domain.com)">
+ <br><span class="glm-notice">NOTE:</span> This field is only required for users who will have login privileges.
+ {if $contactInfo.fieldFail.email}<p>{$contactInfo.fieldFail.email}</p>{/if}
+ </td>
+ </tr>
+ {else}
+ <tr><th>Email Address:</th><td>{$contactInfo.fieldData.email}</td></tr>
+ <tr>
+ <th>
+ New Email Address:
+ <a href="#" onclick="return false;" onkeypress="return false;" class="gf_tooltip tooltip">
+ <p>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.</p>
+ <i class="fa fa-question-circle">
+
+ </i>
+ </a>
+ </th>
+ <td {if $newEmailError != ''}class="glm-form-bad-input"{/if}>
+ <input type="text" name="new_email" value="{$new_email}" class="glm-form-text-input-short" placeholder="(ex: name@domain.com)">
+ {if $newEmailError == 'BAD_CHARACTERS'}
+ <br><span style="color: white;">
+ The E-Mail address you submitted contained invalid characters. {$new_email}
+ Please check the address and submit again.
+ </span>
{/if}
- <tr>
-
- {if $option == 'create'}
- <th {if $contactInfo.fieldRequired.username}class="glm-required"{/if}>Login Username:</th>
- <td {if $contactInfo.fieldFail.username}class="glm-form-bad-input"{/if}>
- <input type="text" name="username" value="{$contactInfo.fieldData.username}" class="glm-form-text-input-medium" placeholder="(no spaces permitted)">
- <br><span class="glm-notice">NOTE:</span> The username cannot be changed once the contact is created.
- {if $contactInfo.fieldFail.username}<p>{$contactInfo.fieldFail.username}</p>{/if}
- </td>
- {else}
- <th>Login Username:</th>
- <td>{$contactInfo.fieldData.username}</td>
+ {if $newEmailError == 'BAD_FORMAT'}
+ <br><span style="color: white;">
+ 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.
+ </span>
{/if}
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.password}class="glm-required"{/if}>Login password:</th>
- <td {if $contactInfo.fieldFail.password}class="glm-form-bad-input"{/if}>
- <input type="text" name="password" value="{$contactInfo.fieldData.password}" class="glm-form-text-input-medium" placeholder="{if $option=='create'}(no spaces permitted){else}(Password does not show, only enter to change password.){/if}">
- {if $option == 'create'}
- <span class="glm-notice">Save this password.</span>
- <br>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}
- <br>NOTE: Enter a password here <b><i>only</i></b> if you need to change it.
- {/if}
- <br>The password must be at least 8 characters and include at least one number, one letter, and at least one
- special character. (# . - _ , $ % & !)</b>
- {if $contactInfo.fieldFail.password}<p>{$contactInfo.fieldFail.password}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.alt_email}class="glm-required"{/if}>Alternate Email Address:</th>
- <td {if $contactInfo.fieldFail.alt_email}class="glm-form-bad-input"{/if}>
- <input type="text" name="alt_email" value="{$contactInfo.fieldData.alt_email}" class="glm-form-text-input-short" placeholder="ex: name@domain.com">
- {if $contactInfo.fieldFail.alt_email}<p>{$contactInfo.fieldFail.alt_email}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.org}class="glm-required"{/if}>Organization:</th>
- <td {if $contactInfo.fieldFail.org}class="glm-form-bad-input"{/if}>
- <input type="text" name="org" value="{$contactInfo.fieldData.org}" class="glm-form-text-input-medium">
- {if $contactInfo.fieldFail.org}<p>{$contactInfo.fieldFail.org}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.title}class="glm-required"{/if}>Title/Position:</th>
- <td {if $contactInfo.fieldFail.title}class="glm-form-bad-input"{/if}>
- <input type="text" name="title" value="{$contactInfo.fieldData.title}" class="glm-form-text-input-medium">
- {if $contactInfo.fieldFail.title}<p>{$contactInfo.fieldFail.title}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.descr}class="glm-required"{/if}>Position/Responsibilities:</th>
- <td {if $contactInfo.fieldFail.descr}class="glm-form-bad-input"{/if}>
- {php}
- wp_editor('{$contactInfo.fieldData.descr|escape:quotes}', 'glm_descr', array(
- 'quicktags' => false,
- 'media_buttons' => false,
- 'wpautop' => false,
- 'textarea_name' => 'descr',
- 'editor_height' => 100, // Height in px, overrides editor_rows
- // 'textarea_rows' => 4,
- ));
- {/php}
- {if $contactInfo.fieldFail.descr}<p>{$contactInfo.fieldFail.descr}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.image}class="glm-required"{/if}>Profile Image:</th>
- <td {if $contactInfo.fieldFail.image}class="glm-form-bad-input"{/if}>
- {if $contactInfo.fieldData.image}
- <div id="largeImageDialog" class="glm-dialog-box" title="Large sized image">
- <img src="{$glmPluginMediaUrl}/images/large/{$contactInfo.fieldData.image}">
- <a id="largeImageCancel" class="button button-primary glm-right">Close</a><br>
- </div>
- <table class="glm-admin-image-edit-table">
- <tr>
- <td><img src="{$glmPluginMediaUrl}/images/thumb/{$contactInfo.fieldData.image}"></td>
- <td>
- <input type="checkbox" name="image_delete"> Delete Image<br>
- {$contactInfo.fieldData.image}<br>
- <p><div id="largeImageButton" class="button button-primary">Show Large Image</div></p>
- </td>
-
- </tr>
- </table>
+ {if $newEmailError == 'IN_USE'}
+ <br><span style="color: white;">
+ 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.
+ </span>
{/if}
- <input type="file" name="image_new">
- {if $contactInfo.fieldFail.image}<p>{$contactInfo.fieldFail.image}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.addr1}class="glm-required"{/if}>Address Line 1:</th>
- <td {if $contactInfo.fieldFail.addr1}class="glm-form-bad-input"{/if}>
- <input type="text" id="addr1" name="addr1" value="{$contactInfo.fieldData.addr1}" class="glm-form-text-input glm-geocodeAction">
- {if $contactInfo.fieldFail.addr1}<p>{$contactInfo.fieldFail.addr1}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.addr2}class="glm-required"{/if}>Address Line 2:</th>
- <td {if $contactInfo.fieldFail.addr2}class="glm-form-bad-input"{/if}>
- <input id="addr2" type="text" name="addr2" value="{$contactInfo.fieldData.addr2}" class="glm-form-text-input glm-geocodeAction">
- {if $contactInfo.fieldFail.addr2}<p>{$contactInfo.fieldFail.addr2}</p>{/if}
- </td>
- </tr>
- <tr>
- <th>City</th>
- <td class="glm-item-container">
- <!-- Add new city dialog -->
- <div id="newCityButton" class="button button-secondary glm-right">Add a new City</div>
- <div id="newCityDialog" class="glm-dialog-box" title="Enter a New City">
- <table class="glm-admin-table">
+ </td>
+ </tr>
+
+ {/if}
+
+ <tr>
+ <th {if $contactInfo.fieldRequired.image}class="glm-required"{/if}>Profile Image:</th>
+ <td {if $contactInfo.fieldFail.image}class="glm-form-bad-input"{/if}>
+ {if $contactInfo.fieldData.image}
+ <div id="largeImageDialog" class="glm-dialog-box" title="Large sized image">
+ <img src="{$glmPluginMediaUrl}/images/large/{$contactInfo.fieldData.image}">
+ <a id="largeImageCancel" class="button button-primary glm-right">Close</a><br>
+ </div>
+ <table class="glm-admin-image-edit-table">
<tr>
- <th class="glm-required">City Name:</th>
- <td id="newCityNameTD">
- <input id="newCityName" type="text" name="newCityName" class="glm-form-text-input">
- <div id="newCityNameRequired"></div>
+ <td><img src="{$glmPluginMediaUrl}/images/thumb/{$contactInfo.fieldData.image}"></td>
+ <td>
+ <input type="checkbox" name="image_delete"> Delete Image<br>
+ {$contactInfo.fieldData.image}<br>
+ <p><div id="largeImageButton" class="button button-primary">Show Large Image</div></p>
</td>
+
</tr>
</table>
- <p><span class="glm-required">*</span> Required</p>
- <a id="newCityCancel" class="button button-primary glm-right">Cancel</a>
- <input id="newCitySubmit" type="submit" value="Add new City">
- </div>
- <!-- City Selection -->
- <input id="cityName" type="hidden" name="newCityName" value=""><!-- this field is only used if adding a new city to pass the new name -->
- <select name="city" id="city" class="glm-geocodeAction">
- <option value="0"><option>
- {foreach from=$contactInfo.fieldData.city.list item=v}
- <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
- {$v.name}
- </option>
- {/foreach}
- </select>
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.county}class="glm-required"{/if}>County:</th>
- <td {if $contactInfo.fieldFail.county}class="glm-form-bad-input"{/if}>
- <input id="county" type="text" name="county" value="{$contactInfo.fieldData.county}" class="glm-form-text-input-short">
- {if $contactInfo.fieldFail.county}<p>{$contactInfo.fieldFail.county}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.state}class="glm-required"{/if}>State:</th>
- <td {if $contactInfo.fieldFail.state}class="glm-form-bad-input"{/if}>
- <select id="state" name="state" class="glm-geocodeAction">
- {foreach from=$contactInfo.fieldData.state.list item=v}
- <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
- {$v.name}
- </option>
- {/foreach}
- </select>
- {if $contactInfo.fieldFail.state}<p>{$contactInfo.fieldFail.state}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.zip}class="glm-required"{/if}>ZIP / Postal Code:</th>
- <td {if $contactInfo.fieldFail.zip}class="glm-form-bad-input"{/if}>
- <input id="zip" type="text" name="zip" value="{$contactInfo.fieldData.zip}" class="glm-form-text-input-short glm-geocodeAction">
- {if $contactInfo.fieldFail.zip}<p>{$contactInfo.fieldFail.zip}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.country}class="glm-required"{/if}>Country:</th>
- <td {if $contactInfo.fieldFail.country}class="glm-form-bad-input"{/if}>
- <select id="country" name="country" class="glm-geocodeAction">
- {foreach from=$contactInfo.fieldData.country.list item=v}
- <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
- {$v.name} {$v.value}
- </option>
- {/foreach}
- </select>
- {if $contactInfo.fieldFail.country}<p>{$contactInfo.fieldFail.country}</p>{/if}
- </td>
- </tr>
- <!-- NOT DOING LAT/LON FOR NOW -->
- <tr>
- <th {if $contactInfo.fieldRequired.url}class="glm-required"{/if}>Web Address (URL):</th>
- <td {if $contactInfo.fieldFail.url}class="glm-form-bad-input"{/if}>
- {if $contactInfo.fieldData.url}
- <a class="button button-secondary glm-right" href="http://{$contactInfo.fieldData.url}" target="urlTarget">Test Link</a>
- {/if}
- http://<input type="text" name="url" value="{$contactInfo.fieldData.url}" class="glm-form-text-input-medium" placeholder="ex: www.gaslightmedia.com">
- {if $contactInfo.fieldFail.url}<p>{$contactInfo.fieldFail.url}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.office_phone}class="glm-required"{/if}>Office Phone #:</th>
- <td {if $contactInfo.fieldFail.office_phone}class="glm-form-bad-input"{/if}>
- <input type="text" name="office_phone" value="{$contactInfo.fieldData.office_phone}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 123-456-7890 ext 123">
- {if $contactInfo.fieldFail.office_phone}<p>{$contactInfo.fieldFail.office_phone}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.home_phone}class="glm-required"{/if}>Home Phone #:</th>
- <td {if $contactInfo.fieldFail.home_phone}class="glm-form-bad-input"{/if}>
- <input type="text" name="home_phone" value="{$contactInfo.fieldData.home_phone}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 123-456-7890 ext 123">
- {if $contactInfo.fieldFail.home_phone}<p>{$contactInfo.fieldFail.home_phone}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.mobile_phone}class="glm-required"{/if}>Mobile Phone #:</th>
- <td {if $contactInfo.fieldFail.mobile_phone}class="glm-form-bad-input"{/if}>
- <input type="text" name="mobile_phone" value="{$contactInfo.fieldData.mobile_phone}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 123-456-7890 ext 123">
- {if $contactInfo.fieldFail.mobile_phone}<p>{$contactInfo.fieldFail.mobile_phone}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.alt_phone}class="glm-required"{/if}>Alternate Phone #:</th>
- <td {if $contactInfo.fieldFail.alt_phone}class="glm-form-bad-input"{/if}>
- <input type="text" name="alt_phone" value="{$contactInfo.fieldData.alt_phone}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 123-456-7890 ext 123">
- {if $contactInfo.fieldFail.alt_phone}<p>{$contactInfo.fieldFail.alt_phone}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.fax}class="glm-required"{/if}>FAX #:</th>
- <td {if $contactInfo.fieldFail.fax}class="glm-form-bad-input"{/if}>
- <input type="text" name="fax" value="{$contactInfo.fieldData.fax}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 123-456-7890 ext 123">
- {if $contactInfo.fieldFail.fax}<p>{$contactInfo.fieldFail.fax}</p>{/if}
- </td>
- </tr>
- <tr>
- <th>Access to Members</th>
- <td id="accessToMemberSelection" class="glm-item-container">
- {if $membersList && apply_filters('glm_members_menu_members',true)}
- <!-- Other Member Selection -->
- <select name="memberSelect" id="memberSelect">
- <option id="memberName" value=""></option>
- {foreach $membersList as $m}
- {if $m.id != $memberID}
- <option value="{$m.id}">
- {$m.name}
- </option>
- {/if}
- {/foreach}
- </select> Select a member to add.<br>
- <div id="selectedMembers" class="glm-dynSelect-box">
- {if $contactMembers}
- {foreach $contactMembers as $m}
- <div data-id="{$m.id}" class="glm-dynSelect-item glm-members-members">
- {$m.name}
+ {/if}
+ <input type="file" name="image_new">
+ {if $contactInfo.fieldFail.image}<p>{$contactInfo.fieldFail.image}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th>Access to Members</th>
+ <td id="accessToMemberSelection" class="glm-item-container">
+ {if $membersList && apply_filters('glm_members_menu_members',true)}
+ <!-- Other Member Selection -->
+ <select name="memberSelect" id="memberSelect">
+ <option id="memberName" value=""></option>
+ {foreach $membersList as $m}
{if $m.id != $memberID}
- <span data-id="{$m.id}" class="glm-dynSelect-delete membDelete">X</span>
- <input type="hidden" name="contactMembers[{$m.id}]" value="{$m.id}">
- {else}
- (Primary {$terms.term_member_cap})
+ <option value="{$m.id}">
+ {$m.name}
+ </option>
+ {/if}
+ {/foreach}
+ </select> Select a member to add.<br>
+ <div id="selectedMembers" class="glm-dynSelect-box">
+ {if $contactMembers}
+ {foreach $contactMembers as $m}
+ <div data-id="{$m.id}" class="glm-dynSelect-item glm-members-members">
+ {$m.name}
+ {if $m.id != $memberID}
+ <span data-id="{$m.id}" class="glm-dynSelect-delete membDelete">X</span>
+ <input type="hidden" name="contactMembers[{$m.id}]" value="{$m.id}">
+ {else}
+ (Primary {$terms.term_member_cap})
+ {/if}
+ </div>
+ {/foreach}
{/if}
</div>
- {/foreach}
+ {else}
+ {if $contactMembers}
+ <input type="hidden" name="contactMembers[0]" value="0"> <!-- flag to not update contact members list -->
+ {foreach $contactMembers as $m}
+ <div data-id="{$m.id}" class="glm-dynSelect-item">
+ {$m.name}
+ </div>
+ {/foreach}
+ {/if}
{/if}
- </div>
- {else}
- {if $contactMembers}
- <input type="hidden" name="contactMembers[0]" value="0"> <!-- flag to not update contact members list -->
- {foreach $contactMembers as $m}
- <div data-id="{$m.id}" class="glm-dynSelect-item">
- {$m.name}
- </div>
- {/foreach}
+ </td>
+ <td id="accessToAllMembers" class="glm-hidden">
+ This contact has no access or can manage all members, so no selection is needed here.
+ </td>
+ </tr>
+
+ </table>
+
+ <div class="glm-contact-sub-data-links glmgrid-row">
+ <a class="glm-contact-content-toggle glmgrid-columns glmgrid-small-6">Collapse</a>
+ <a class="glm-contact-link-to-top glmgrid-columns glmgrid-small-6">Back to top</a>
+ </div>
+ </div>
+ <div id="glm-contact-account-contact-toggle" class="glm-contact-content-toggle">
+ <h3>Account Contact Info (section title)</h3>
+ </div>
+ <div id="glm-contact-account-contact-container" class="glm-admin-form-section glm-contact-content-data">
+ <div id="glm-contact-account-contact">
+
+ <table class="glm-admin-table glm-admin-table-inner">
+ <tr>
+ <th>Publish on Front End</th>
+ <td>
+ <input type="checkbox" name="active" {if $contactInfo.fieldData.contact_publish.value} checked{/if}>
+ </td>
+ </tr>
+ <tr>
+ <th>Use for Billing Information</th>
+ <td>
+ <input type="checkbox" name="active" {if $contactInfo.fieldData.contact_use_billing.value} checked{/if}>
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.addr1}class="glm-required"{/if}>Address Line 1</th>
+ <td {if $contactInfo.fieldFail.addr1}class="glm-form-bad-input"{/if}>
+ <input type="text" id="addr1" name="addr1" value="{$contactInfo.fieldData.addr1}" class="glm-form-text-input glm-geocodeAction">
+ {if $contactInfo.fieldFail.addr1}<p>{$contactInfo.fieldFail.addr1}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.addr2}class="glm-required"{/if}>Address Line 2</th>
+ <td {if $contactInfo.fieldFail.addr2}class="glm-form-bad-input"{/if}>
+ <input id="addr2" type="text" name="addr2" value="{$contactInfo.fieldData.addr2}" class="glm-form-text-input glm-geocodeAction">
+ {if $contactInfo.fieldFail.addr2}<p>{$contactInfo.fieldFail.addr2}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th>City</th>
+ <td class="glm-item-container glm-contact-citybox">
+ <!-- Add new city dialog -->
+ <div id="newCityButton" class="newCityButton button button-secondary glm-right">Add a new City</div>
+ <div id="newCityDialog" class="newCityDialog glm-dialog-box" title="Enter a New City">
+ <table class="glm-admin-table">
+ <tr>
+ <th class="glm-required">City Name</th>
+ <td id="newCityNameTD" class="newCityNameTD">
+ <input id="newCityName" type="text" name="newCityName" class="newCityName glm-form-text-input">
+ <div id="newCityNameRequired" class="newCitynameRequired"></div>
+ </td>
+ </tr>
+ </table>
+ <p><span class="glm-required">*</span> Required</p>
+ <a id="newCityCancel" class="newCityCancel button button-primary glm-right">Cancel</a>
+ <input id="newCitySubmit" class="newCitySubmit" type="submit" value="Add new City">
+ </div>
+ <!-- City Selection -->
+ <input id="cityName" type="hidden" name="newCityName" value=""><!-- this field is only used if adding a new city to pass the new name -->
+ <select name="city" id="city" class="glm-geocodeAction">
+ <option value="0"><option>
+ {foreach from=$contactInfo.fieldData.city.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+ {$v.name}
+ </option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.state}class="glm-required"{/if}>State</th>
+ <td {if $contactInfo.fieldFail.state}class="glm-form-bad-input"{/if}>
+ <select id="state" name="state" class="glm-geocodeAction">
+ {foreach from=$contactInfo.fieldData.state.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+ {$v.name}
+ </option>
+ {/foreach}
+ </select>
+ {if $contactInfo.fieldFail.state}<p>{$contactInfo.fieldFail.state}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.zip}class="glm-required"{/if}>ZIP / Postal Code</th>
+ <td {if $contactInfo.fieldFail.zip}class="glm-form-bad-input"{/if}>
+ <input id="zip" type="text" name="zip" value="{$contactInfo.fieldData.zip}" class="glm-form-text-input-short glm-geocodeAction">
+ {if $contactInfo.fieldFail.zip}<p>{$contactInfo.fieldFail.zip}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.country}class="glm-required"{/if}>Country</th>
+ <td {if $contactInfo.fieldFail.country}class="glm-form-bad-input"{/if}>
+ <select id="country" name="country" class="glm-geocodeAction">
+ {foreach from=$contactInfo.fieldData.country.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+ {$v.name} {$v.value}
+ </option>
+ {/foreach}
+ </select>
+ {if $contactInfo.fieldFail.country}<p>{$contactInfo.fieldFail.country}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.home_phone}class="glm-required"{/if}>Home Phone #</th>
+ <td {if $contactInfo.fieldFail.home_phone}class="glm-form-bad-input"{/if}>
+ <input type="text" name="home_phone" value="{$contactInfo.fieldData.home_phone}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 123-456-7890 ext 123">
+ {if $contactInfo.fieldFail.home_phone}<p>{$contactInfo.fieldFail.home_phone}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.mobile_phone}class="glm-required"{/if}>Mobile Phone #</th>
+ <td {if $contactInfo.fieldFail.mobile_phone}class="glm-form-bad-input"{/if}>
+ <input type="text" name="mobile_phone" value="{$contactInfo.fieldData.mobile_phone}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 123-456-7890 ext 123">
+ {if $contactInfo.fieldFail.mobile_phone}<p>{$contactInfo.fieldFail.mobile_phone}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.alt_email}class="glm-required"{/if}>Email Address:</th>
+ <td {if $contactInfo.fieldFail.alt_email}class="glm-form-bad-input"{/if}>
+ <input type="text" name="alt_email" value="{$contactInfo.fieldData.alt_email}" class="glm-form-text-input-short" placeholder="ex: name@domain.com">
+ {if $contactInfo.fieldFail.alt_email}<p>{$contactInfo.fieldFail.alt_email}</p>{/if}
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div id="glm-contact-company-info-toggle" class="glm-contact-content-toggle">
+ <h3>Organization/Company Information</h3>
+ </div>
+ <div id="glm-contact-company-info-container" class="glm-admin-form-section glm-contact-content-data">
+ <div id="glm-contact-company-info">
+ <table class="glm-admin-table glm-admin-table-inner">
+ <tr>
+ <th>Publish on Front End</th>
+ <td>
+ <input type="checkbox" name="active" {if $contactInfo.fieldData.business_publish.value} checked{/if}>
+ </td>
+ </tr>
+ <tr>
+ <th>Use for Billing Information</th>
+ <td>
+ <input type="checkbox" name="active" {if $contactInfo.fieldData.business_use_billing.value} checked{/if}>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <h4 class="glm-table-section-title">Organization/Company Information</h4>
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.org}class="glm-required"{/if}>Organization</th>
+ <td {if $contactInfo.fieldFail.org}class="glm-form-bad-input"{/if}>
+ <input type="text" name="org" value="{$contactInfo.fieldData.org}" class="glm-form-text-input-medium">
+ {if $contactInfo.fieldFail.org}<p>{$contactInfo.fieldFail.org}</p>{/if}
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $contactInfo.fieldRequired.business_fname}class="glm-required"{/if}>First Name</th>
+ <td {if $contactInfo.fieldFail.business_fname}class="glm-form-bad-input"{/if}>
+ <input type="text" name="business_fname" value="{$contactInfo.fieldData.business_fname}" class="glm-form-text-input-medium">
+ {if $contactInfo.fieldFail.business_fname}<p>{$contactInfo.fieldFail.business_fname}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.business_lname}class="glm-required"{/if}>Last Name</th>
+ <td {if $contactInfo.fieldFail.business_lname}class="glm-form-bad-input"{/if}>
+ <input type="text" name="business_lname" value="{$contactInfo.fieldData.business_lname}" class="glm-form-text-input-medium">
+ {if $contactInfo.fieldFail.business_lname}<p>{$contactInfo.fieldFail.business_lname}</p>{/if}
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $contactInfo.fieldRequired.title}class="glm-required"{/if}>Title/Position</th>
+ <td {if $contactInfo.fieldFail.title}class="glm-form-bad-input"{/if}>
+ <input type="text" name="title" value="{$contactInfo.fieldData.title}" class="glm-form-text-input-medium">
+ {if $contactInfo.fieldFail.title}<p>{$contactInfo.fieldFail.title}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.business_addr1}class="glm-required"{/if}>Address Line 1</th>
+ <td {if $contactInfo.fieldFail.business_addr1}class="glm-form-bad-input"{/if}>
+ <input type="text" id="business_addr1" name="business_addr1" value="{$contactInfo.fieldData.business_addr1}" class="glm-form-text-input glm-geocodeAction">
+ {if $contactInfo.fieldFail.business_addr1}<p>{$contactInfo.fieldFail.business_addr1}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.business_addr2}class="glm-required"{/if}>Address Line 2</th>
+ <td {if $contactInfo.fieldFail.business_addr2}class="glm-form-bad-input"{/if}>
+ <input id="business_addr2" type="text" name="business_addr2" value="{$contactInfo.fieldData.business_addr2}" class="glm-form-text-input glm-geocodeAction">
+ {if $contactInfo.fieldFail.business_addr2}<p>{$contactInfo.fieldFail.business_addr2}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th>City</th>
+ <td class="glm-item-container glm-contact-citybox">
+ <!-- Add new city dialog -->
+ <div id="newBusinessCityButton" class="newCityButton button button-secondary glm-right">Add a new City</div>
+ <div id="newBusinessCityDialog" class="glm-dialog-box" title="Enter a New City">
+ <table class="glm-admin-table">
+ <tr>
+ <th class="glm-required">City Name</th>
+ <td id="newBusinessCityNameTD" class="newCityNameTD">
+ <input id="newBusinessCityName" type="text" name="newBusinessCityName" class="newCityName glm-form-text-input">
+ <div id="newBusinessCityNameRequired" class="newCityNameRequired"></div>
+ </td>
+ </tr>
+ </table>
+ <p><span class="glm-required">*</span> Required</p>
+ <a id="newBusinessCityCancel" class="newCityCancel button button-primary glm-right">Cancel</a>
+ <input id="newBusinessCitySubmit" type="submit" value="Add new City" class="newCitySubmit">
+ </div>
+ <!-- City Selection -->
+ <input id="businessCityName" type="hidden" name="newBusinessCityName" value=""><!-- this field is only used if adding a new city to pass the new name -->
+ <select name="businessCity" id="businessCcity" class="glm-geocodeAction">
+ <option value="0"><option>
+ {foreach from=$contactInfo.fieldData.city.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+ {$v.name}
+ </option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.business_state}class="glm-required"{/if}>State</th>
+ <td {if $contactInfo.fieldFail.business_state}class="glm-form-bad-input"{/if}>
+ <select id="business_state" name="business_state" class="glm-geocodeAction">
+ {foreach from=$contactInfo.fieldData.business_state.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+ {$v.name}
+ </option>
+ {/foreach}
+ </select>
+ {if $contactInfo.fieldFail.business_state}<p>{$contactInfo.fieldFail.business_state}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.business_zip}class="glm-required"{/if}>ZIP / Postal Code</th>
+ <td {if $contactInfo.fieldFail.business_zip}class="glm-form-bad-input"{/if}>
+ <input id="business_zip" type="text" name="business_zip" value="{$contactInfo.fieldData.business_zip}" class="glm-form-text-input-short glm-geocodeAction">
+ {if $contactInfo.fieldFail.business_zip}<p>{$contactInfo.fieldFail.business_zip}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.business_country}class="glm-required"{/if}>Country</th>
+ <td {if $contactInfo.fieldFail.business_country}class="glm-form-bad-input"{/if}>
+ <select id="business_country" name="business_country" class="glm-geocodeAction">
+ {foreach from=$contactInfo.fieldData.business_country.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+ {$v.name} {$v.value}
+ </option>
+ {/foreach}
+ </select>
+ {if $contactInfo.fieldFail.business_country}<p>{$contactInfo.fieldFail.business_country}</p>{/if}
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $contactInfo.fieldRequired.business_email}class="glm-required"{/if}>Email Address:</th>
+ <td {if $contactInfo.fieldFail.business_email}class="glm-form-bad-input"{/if}>
+ <input type="text" name="business_email" value="{$contactInfo.fieldData.business_email}" class="glm-form-text-input-short" placeholder="ex: name@domain.com">
+ {if $contactInfo.fieldFail.business_email}<p>{$contactInfo.fieldFail.business_email}</p>{/if}
+ </td>
+ </tr>
+
+ <!-- NOT DOING LAT/LON FOR NOW -->
+ <tr>
+ <th {if $contactInfo.fieldRequired.url}class="glm-required"{/if}>Web Address (URL):</th>
+ <td {if $contactInfo.fieldFail.url}class="glm-form-bad-input"{/if}>
+ {if $contactInfo.fieldData.url}
+ <a class="button button-secondary glm-right" href="http//{$contactInfo.fieldData.url}" target="urlTarget">Test Link</a>
{/if}
- {/if}
- </td>
- <td id="accessToAllMembers" class="glm-hidden">
- This contact has no access or can manage all members, so no selection is needed here.
- </td>
- </tr>
- <tr>
- <th {if $contactInfo.fieldRequired.notes}class="glm-required"{/if}>Notes:</th>
- <td {if $contactInfo.fieldFail.notes}class="glm-form-bad-input"{/if}>
- {php}
- wp_editor('{$contactInfo.fieldData.notes|escape:quotes}', 'glm_notes', array(
- 'quicktags' => false,
- 'media_buttons' => false,
- 'wpautop' => false,
- 'textarea_name' => 'notes',
- 'editor_height' => 100, // Height in px, overrides editor_rows
- // 'textarea_rows' => 4,
- ));
- {/php}
- {if $contactInfo.fieldFail.notes}<p>{$contactInfo.fieldFail.notes}</p>{/if}
- </td>
- </tr>
- </table>
- <p><span class="glm-required">*</span> Required</p>
- <input id="updateContact" type="submit" value="{if $contactID && $contactInfo}Update contact{else}Add new contact{/if}">
- </form>
+ http://<input type="text" name="url" value="{$contactInfo.fieldData.url}" class="glm-form-text-input-medium" placeholder="ex: www.gaslightmedia.com">
+ {if $contactInfo.fieldFail.url}<p>{$contactInfo.fieldFail.url}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.office_phone}class="glm-required"{/if}>Office Phone #</th>
+ <td {if $contactInfo.fieldFail.office_phone}class="glm-form-bad-input"{/if}>
+ <input type="text" name="office_phone" value="{$contactInfo.fieldData.office_phone}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 123-456-7890 ext 123">
+ {if $contactInfo.fieldFail.office_phone}<p>{$contactInfo.fieldFail.office_phone}</p>{/if}
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $contactInfo.fieldRequired.business_mobile}class="glm-required"{/if}>Mobile Phone #</th>
+ <td {if $contactInfo.fieldFail.business_mobile}class="glm-form-bad-input"{/if}>
+ <input type="text" name="business_mobile" value="{$contactInfo.fieldData.business_mobile}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 123-456-7890 ext 123">
+ {if $contactInfo.fieldFail.business_mobile}<p>{$contactInfo.fieldFail.business_mobile}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.fax}class="glm-required"{/if}>FAX #</th>
+ <td {if $contactInfo.fieldFail.fax}class="glm-form-bad-input"{/if}>
+ <input type="text" name="fax" value="{$contactInfo.fieldData.fax}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 123-456-7890 ext 123">
+ {if $contactInfo.fieldFail.fax}<p>{$contactInfo.fieldFail.fax}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.notes}class="glm-required"{/if}>Notes</th>
+ <td {if $contactInfo.fieldFail.notes}class="glm-form-bad-input"{/if}>
+ {php}
+ wp_editor('{$contactInfo.fieldData.notes|escape:quotes}', 'glm_notes', array(
+ 'quicktags' => false,
+ 'media_buttons' => false,
+ 'wpautop' => false,
+ 'textarea_name' => 'notes',
+ 'editor_height' => 100, // Height in px, overrides editor_rows
+ // 'textarea_rows' => 4,
+ ));
+ {/php}
+ {if $contactInfo.fieldFail.notes}<p>{$contactInfo.fieldFail.notes}</p>{/if}
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
- {/if}
+ <div id="glm-contact-custom-fields-toggle" class="glm-contact-content-toggle">
+ <h3>Custom Fields</h3>
+ </div>
+ <div id="glm-contact-custom-fields-container" class="glm-admin-form-section glm-contact-content-data">
+ <div id="glm-table-custom-fields" class="glm-admin-table glm-table glm-contact-info-table">
+ {if $option == 'create'}
+ {apply_filters('glm-members-custom-fields-form', '', $slug,'','')}
+ {else}
+ {$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,'')}
+ {/if}
+ </div>
+ </div>
- {else} <!-- may edit contact -->
-
- <table class="glm-admin-table glm-shrink">
- <tr><th>Contact For:</th><td>{$contactInfo.fieldData.ref_type.name} - {$memberData.name}</td></tr>
- <tr><th>Active:</th><td>{$contactInfo.fieldData.active.name}</td></tr>
- <tr><th>Created:</th><td>{$contactInfo.fieldData.create_time.datetime}</td></tr>
- <tr><th>Last Updated:</th><td>{$contactInfo.fieldData.modify_time.datetime}</td></tr>
- <tr><th>First Name:</th><td>{$contactInfo.fieldData.fname}</td></tr>
- <tr><th>Last Name:</th><td>{$contactInfo.fieldData.lname}</td></tr>
- <tr><th>Contact Type:</th><td>{$contactInfo.fieldData.contact_type.name}</td></tr>
- <tr><th>Email Address::</th><td>{$contactInfo.fieldData.email}</td></tr>
- <tr><th>Alternate Email Address:</th><td>{$contactInfo.fieldData.alt_email}</td></tr>
- <tr><th>Organization:</th><td>{$contactInfo.fieldData.org}</td></tr>
- <tr><th>Title/Position:</th><td>{$contactInfo.fieldData.title}</td></tr>
- <tr><th>Position/Responsibilities:</th><td>{$contactInfo.fieldData.descr}</td></tr>
- <tr>
- <th>Image:</th>
- <td>
- {if $contactInfo.fieldData.image}
- <img src="{$glmPluginMediaUrl}/images/thumb/{$contactInfo.fieldData.image}">
- {/if}
- </td>
- </tr>
- <tr><th>Address Line 1:</th><td>{$contactInfo.fieldData.addr1}</td></tr>
- <tr><th>Address Line 2:</th><td>{$contactInfo.fieldData.addr2}</td></tr>
- <tr><th>City</th><td>{$contactInfo.fieldData.city.name}</td></tr>
- <tr><th>County</th><td>{$contactInfo.fieldData.county}</td></tr>
- <tr><th>State:</th><td>{$contactInfo.fieldData.state.name}</td></tr>
- <tr><th>ZIP / Postal Code:</th><td>{$contactInfo.fieldData.zip}</td></tr>
- <tr><th>Country:</th><td>{$contactInfo.fieldData.country.name}</td></tr>
- <tr>
- <th>Web Address (URL):</th>
- <td>
- {if $contactInfo.fieldData.url}
- <a href="http://{$contactInfo.fieldData.url}" target="urlTarget">{$contactInfo.fieldData.url}</a>
- {/if}
- </td>
- </tr>
- <tr><th>Office Phone #:</th><td>{$contactInfo.fieldData.office_phone}</td></tr>
- <tr><th>Home Phone #:</th><td>{$contactInfo.fieldData.home_phone}</td></tr>
- <tr><th>Mobile Phone #:</th><td>{$contactInfo.fieldData.mobile_phone}</td></tr>
- <tr><th>Alternate Phone #:</th><td>{$contactInfo.fieldData.alt_phone}</td></tr>
- <tr><th>FAX #:</th><td>{$contactInfo.fieldData.fax}</td></tr>
- <tr><th>Notes:</th><td>{$contactInfo.fieldData.notes}</td></tr>
- </table>
- {/if} <!-- mey edit contact -->
-
- {/if} <!-- /if option -->
-
- <script type="text/javascript">
- jQuery(document).ready(function($) {
-
- /*
- * Edit area tabs
- */
- $('.glm-contact-info-tab').click( function() {
- glmSetupAreaTab($(this));
+
+ <div id="glm-contact-removed-items-toggle" class="glm-contact-content-toggle">
+ <h3>Removed Items</h3>
+ <span><input type="checkbox" name="active" {if true} checked{/if}> Publish on front end</span>
+ <span><input type="checkbox" name="active" {if false} checked{/if}> Use for Billing</span>
+ </div>
+ <div id="glm-contact-removed-items-container" class="glm-admin-form-section glm-contact-content-data">
+ <div id="glm-contact-removed-items">
+ <table class="glm-admin-table glm-admin-table-inner">
+ <tr>
+ <th {if $contactInfo.fieldRequired.contact_type}class="glm-required"{/if}>Contact Type</th>
+ <td {if $contactInfo.fieldFail.contact_type}class="glm-form-bad-input"{/if}>
+ <select name="contact_type">
+ {foreach from=$contactInfo.fieldData.contact_type.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+ {$v.name}
+ </option>
+ {/foreach}
+ </select>
+ {if $contactInfo.fieldFail.contact_type}<p>{$contactInfo.fieldFail.contact_type}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.county}class="glm-required"{/if}>County</th>
+ <td {if $contactInfo.fieldFail.county}class="glm-form-bad-input"{/if}>
+ <input id="county" type="text" name="county" value="{$contactInfo.fieldData.county}" class="glm-form-text-input-short">
+ {if $contactInfo.fieldFail.county}<p>{$contactInfo.fieldFail.county}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th {if $contactInfo.fieldRequired.descr}class="glm-required"{/if}>Position/Responsibilities</th>
+ <td {if $contactInfo.fieldFail.descr}class="glm-form-bad-input"{/if}>
+ {php}
+ wp_editor('{$contactInfo.fieldData.descr|escape:quotes}', 'glm_descr', array(
+ 'quicktags' => false,
+ 'media_buttons' => false,
+ 'wpautop' => false,
+ 'textarea_name' => 'descr',
+ 'editor_height' => 100, // Height in px, overrides editor_rows
+ // 'textarea_rows' => 4,
+ ));
+ {/php}
+ {if $contactInfo.fieldFail.descr}<p>{$contactInfo.fieldFail.descr}</p>{/if}
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </div>
+ <p><span class="glm-required">*</span> Required</p>
+ <input id="updateContact" type="submit" value="{if $contactID && $contactInfo}Update contact{else}Add new contact{/if}">
+ </form>
+
+{/if}
+
+{else} <!-- may edit contact -->
+
+ <table class="glm-admin-table glm-shrink">
+ <tr><th>Contact For:</th><td>{$contactInfo.fieldData.ref_type.name} - {$memberData.name}</td></tr>
+ <tr><th>Active:</th><td>{$contactInfo.fieldData.active.name}</td></tr>
+ <tr><th>Created:</th><td>{$contactInfo.fieldData.create_time.datetime}</td></tr>
+ <tr><th>Last Updated:</th><td>{$contactInfo.fieldData.modify_time.datetime}</td></tr>
+ <tr><th>First Name:</th><td>{$contactInfo.fieldData.fname}</td></tr>
+ <tr><th>Last Name:</th><td>{$contactInfo.fieldData.lname}</td></tr>
+ <tr><th>Contact Type:</th><td>{$contactInfo.fieldData.contact_type.name}</td></tr>
+ <tr><th>Email Address::</th><td>{$contactInfo.fieldData.email}</td></tr>
+ <tr><th>Alternate Email Address:</th><td>{$contactInfo.fieldData.alt_email}</td></tr>
+ <tr><th>Organization:</th><td>{$contactInfo.fieldData.org}</td></tr>
+ <tr><th>Title/Position:</th><td>{$contactInfo.fieldData.title}</td></tr>
+ <tr><th>Position/Responsibilities:</th><td>{$contactInfo.fieldData.descr}</td></tr>
+ <tr>
+ <th>Image:</th>
+ <td>
+ {if $contactInfo.fieldData.image}
+ <img src="{$glmPluginMediaUrl}/images/thumb/{$contactInfo.fieldData.image}">
+ {/if}
+ </td>
+ </tr>
+ <tr><th>Address Line 1:</th><td>{$contactInfo.fieldData.addr1}</td></tr>
+ <tr><th>Address Line 2:</th><td>{$contactInfo.fieldData.addr2}</td></tr>
+ <tr><th>City</th><td>{$contactInfo.fieldData.city.name}</td></tr>
+ <tr><th>County</th><td>{$contactInfo.fieldData.county}</td></tr>
+ <tr><th>State:</th><td>{$contactInfo.fieldData.state.name}</td></tr>
+ <tr><th>ZIP / Postal Code:</th><td>{$contactInfo.fieldData.zip}</td></tr>
+ <tr><th>Country:</th><td>{$contactInfo.fieldData.country.name}</td></tr>
+ <tr>
+ <th>Web Address (URL):</th>
+ <td>
+ {if $contactInfo.fieldData.url}
+ <a href="http://{$contactInfo.fieldData.url}" target="urlTarget">{$contactInfo.fieldData.url}</a>
+ {/if}
+ </td>
+ </tr>
+ <tr><th>Office Phone #:</th><td>{$contactInfo.fieldData.office_phone}</td></tr>
+ <tr><th>Home Phone #:</th><td>{$contactInfo.fieldData.home_phone}</td></tr>
+ <tr><th>Mobile Phone #:</th><td>{$contactInfo.fieldData.mobile_phone}</td></tr>
+ <tr><th>Alternate Phone #:</th><td>{$contactInfo.fieldData.alt_phone}</td></tr>
+ <tr><th>FAX #:</th><td>{$contactInfo.fieldData.fax}</td></tr>
+ <tr><th>Notes:</th><td>{$contactInfo.fieldData.notes}</td></tr>
+ </table>
+{/if} <!-- mey edit contact -->
+
+{/if} <!-- /if option -->
+
+<script type="text/javascript">
+ jQuery(document).ready(function($) {
+
+ /*
+ * Edit area tabs
+ */
+ $('.glm-contact-info-tab').click( function() {
+ // glmSetupAreaTab($(this));
+ });
+
+ // Do inital setup on load for first tab
+ // glmSetupAreaTab($('#glm-contact-info-profile'));
+
+ // Setup edit area selected
+ function glmSetupAreaTab(t) {
+
+ // Clear table highlights and hide all tables
+ $('.glm-contact-info-tab').removeClass('nav-tab-active');
+ $('.glm-contact-info-table').addClass('glm-hidden');
+
+ // Highlight selected tab
+ t.addClass('nav-tab-active');
+
+ // Show selected table
+ var table = t.attr('data-show-table');
+ $('#' + table).removeClass('glm-hidden');
+
+ // Count remaining characters in field
+ $('.glm-char-count').keyup( function() {
+ glmCharsRemaining($(this));
+ });
+
+ $('.glm-char-count').each( function() {
+ glmCharsRemaining($(this));
});
- // Do inital setup on load for first tab
- glmSetupAreaTab($('#glm-contact-info-profile'));
+ }
- // Setup edit area selected
- function glmSetupAreaTab(t) {
+ // Filter triggers
+ $(".listFilter" ).change( function() {
- // Clear table highlights and hide all tables
- $('.glm-contact-info-tab').removeClass('nav-tab-active');
- $('.glm-contact-info-table').addClass('glm-hidden');
+ var filter = '';
- // Highlight selected tab
- t.addClass('nav-tab-active');
+ // Check for archived filter
+ if ($("#filterArchived").attr('checked')) {
+ filter += '&filterArchived=true';
+ }
- // Show selected table
- var table = t.attr('data-show-table');
- $('#' + table).removeClass('glm-hidden');
+ // Check for name filter
+ var filterText = $("#filterText").val();
+ if (filterText != '') {
+ filter += '&filterText=' + encodeURIComponent(filterText).replace(/%20/g,'+');
+ }
- // Count remaining characters in field
- $('.glm-char-count').keyup( function() {
- glmCharsRemaining($(this));
- });
+ window.location.href = "{$thisUrl}?page={$thisPage}&glm_action=contacts&member={$memberID}" + filter;
- $('.glm-char-count').each( function() {
- glmCharsRemaining($(this));
- });
+ return false;
+ });
+ // Open the appropriate section if a link is clicked
+ $('.link-open-detail-content-data').click(function(e) {
+ var target = $(this).attr("id").slice(0, -5);
+ // e.g.: #glm-contact-packages-link
+ $("#"+target+"-container").show("fast", "swing", function() {});
+ $("#"+target+"-toggle").addClass("selected");
+ fullProfileCheck(target);
+ $('html, body').animate({
+ scrollTop: $("#"+target+"-toggle").offset().top-{$settings.detail_top_offset_autoscroll}
+ }, 500);
+ });
+
+
+ // 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);
+ } else {
+ var target = $(this).attr("id").slice(0, -7);
}
+ $("#"+target+"-container").slideToggle("fast", "swing", function() {});
+ $("#"+target+"-toggle").toggleClass("selected");
+ fullProfileCheck(target);
+ });
- // Filter triggers
- $(".listFilter" ).change( function() {
+ // Change the toggle button based on whether all the content sections are expanded
+ function fullProfileCheck(target) {
+ if ($("#glm-contact-info-profile > .glm-contact-content-toggle.selected").length == $("#glm-contact-info-profile > .glm-contact-content-toggle").length) {
+ $("#glm-contact-fullprofile-toggle").addClass("selected");
+ } else {
+ $("#glm-contact-fullprofile-toggle").removeClass("selected");
+ }
+ }
+
+ // Open or close every data container if the fullprofile toggle is clicked
+ $("#glm-contact-fullprofile-toggle").click(function() {
+ if ($(this).hasClass("selected")) {
+ $(".glm-contact-content-data").slideUp(175, "swing", function() {});
+ $(".glm-contact-content-toggle").removeClass("selected");
+ $(this).toggleClass("selected");
+ } else {
+ $(".glm-contact-content-data").not($(this)).slideDown(350, "swing", function() {});
+ $(".glm-contact-content-toggle").addClass("selected");
+ $(this).toggleClass("selected");
+ }
+ });
- var filter = '';
+ /*
+ * New City Dialog
+ */
- // Check for archived filter
- if ($("#filterArchived").attr('checked')) {
- filter += '&filterArchived=true';
- }
+ // Setup dialog box for adding a new city
+ $("#newCityDialog").dialog({
+ autoOpen: false,
+ minWidth: 400,
+ dialogClass: "glm-dialog-no-close"
+ });
+ $('#newCityCancel').click( function() {
+ $("#newCityDialog").dialog("close");
+ });
- // Check for name filter
- var filterText = $("#filterText").val();
- if (filterText != '') {
- filter += '&filterText=' + encodeURIComponent(filterText).replace(/%20/g,'+');
- }
+ // Ad a new city button action - pop-up dialog
+ $('#newCityButton').click( function() {
+ $("#newCityDialog").dialog("open");
+ });
- window.location.href = "{$thisUrl}?page={$thisPage}&glm_action=contacts&member={$memberID}" + filter;
+ // Submit new city
+ var newCityAdded = false;
+ $('#newCitySubmit').click( function() {
+ // Get new city name
+ var newCityName = $('#newCityName').val();
+
+ // If no name is supplied, notify used it's required
+ if (newCityName == '') {
+ $('#newCityNameTD').addClass('glm-form-bad-input');
+ $('#newCityNameRequired').text('A city name is required!');
return false;
- });
+ }
- /*
- * New City Dialog
- */
+ // Add new city name to the hidden field that will pass the new name to PHP.
+ $('#cityName').val(newCityName);
- // Setup dialog box for adding a new city
- $("#newCityDialog").dialog({
- autoOpen: false,
- minWidth: 400,
- dialogClass: "glm-dialog-no-close"
- });
- $('#newCityCancel').click( function() {
- $("#newCityDialog").dialog("close");
- });
+ // Add new city name to picklist and for storing - Only one permitted per submission
+ if (newCityAdded) {
- // Ad a new city button action - pop-up dialog
- $('#newCityButton').click( function() {
- $("#newCityDialog").dialog("open");
- });
+ // New city already added, so just update the name and select that one
+ $('#city').val(-1);
+ $('#city option:selected').text(newCityName);
- // Submit new city
- var newCityAdded = false;
- $('#newCitySubmit').click( function() {
+ } else {
- // Get new city name
- var newCityName = $('#newCityName').val();
+ // Add the new city name to the city picklist
+ $('#city').append('<option value="-1">' + newCityName + '</option>');
+ $('#city').val(-1);
+ $('#newCityNameTD').append('<input type="hidden" name="newCity" value="' + newCityName + '">');
+ newCityAdded = true;
- // If no name is supplied, notify used it's required
- if (newCityName == '') {
- $('#newCityNameTD').addClass('glm-form-bad-input');
- $('#newCityNameRequired').text('A city name is required!');
- return false;
- }
+ }
- // Add new city name to the hidden field that will pass the new name to PHP.
- $('#cityName').val(newCityName);
+ // Clear new city name from form
+ $('#newCityName').val('');
- // Add new city name to picklist and for storing - Only one permitted per submission
- if (newCityAdded) {
+ $("#newCityDialog").dialog("close");
- // New city already added, so just update the name and select that one
- $('#city').val(-1);
- $('#city option:selected').text(newCityName);
+ });
- } else {
+ /*
+ * New Business City Dialog
+ */
- // Add the new city name to the city picklist
- $('#city').append('<option value="-1">' + newCityName + '</option>');
- $('#city').val(-1);
- $('#newCityNameTD').append('<input type="hidden" name="newCity" value="' + newCityName + '">');
- newCityAdded = true;
+ // Setup dialog box for adding a new city
+ $("#newBusinessCityDialog").dialog({
+ autoOpen: false,
+ minWidth: 400,
+ dialogClass: "glm-dialog-no-close"
+ });
+ $('#newBusinessCityCancel').click( function() {
+ $("#newBusinessCityDialog").dialog("close");
+ });
- }
+ // Ad a new city button action - pop-up dialog
+ $('#newBusinessCityButton').click( function() {
+ $("#newBusinessCityDialog").dialog("open");
+ });
- // Clear new city name from form
- $('#newCityName').val('');
+ // Submit new city
+ var newBusinessCityAdded = false;
+ $('#newBusinessCitySubmit').click( function() {
- $("#newCityDialog").dialog("close");
+ // Get new city name
+ var newBusinessCityName = $('#newBusinessCityName').val();
- });
+ // If no name is supplied, notify used it's required
+ if (newBusinessCityName == '') {
+ $('#newBusinessCityNameTD').addClass('glm-form-bad-input');
+ $('#newBusinessCityNameRequired').text('A city name is required!');
+ return false;
+ }
- /*
- * Large Image Dialog
- */
+ // Add new city name to the hidden field that will pass the new name to PHP.
+ $('#businessCityName').val(newBusinessCityName);
- // Setup dialog box for showing enlarged image image
- x = $('#largeImageDialog').dialog({
- autoOpen: false,
- resizable: false,
- dialogClass: "glm-dialog-no-close"
- });
- $('#largeImageCancel').click( function() {
- $('#largeImageDialog').dialog("close");
- });
+ // Add new city name to picklist and for storing - Only one permitted per submission
+ if (newBusinessCityAdded) {
- // Show large image - pop-up dialog - resize at time of pop-up
- $('#largeImageButton').click( function() {
- $("#largeImageDialog").dialog("open");
- $( "#largesImageDialog" ).dialog( "option", "position", { my: "center", at: "center", of: window } );
- var newWidth = $(window).width() * .8;
- $( "#largeImageDialog" ).dialog( "option", "width", newWidth );
- });
+ // New city already added, so just update the name and select that one
+ $('#businessCity').val(-1);
+ $('#businessCity option:selected').text(newBusinessCityName);
- // Resize whenever window size changes
- $(window).resize(function(){
- $( "#largeImageDialog" ).dialog( "option", "position", { my: "center", at: "center", of: window } );
- var newWidth = $(window).width() * .8;
- $( "#largeImageDialog" ).dialog( "option", "width", newWidth );
- });
+ } else {
- // Delete Contact dialog
- $("#deleteContactDialog").dialog({
- autoOpen: false,
- minWidth: 400,
- dialogClass: "glm-dialog-no-close"
- });
- $('#deleteContactButton').click( function() {
- $('#deleteContactDialog').dialog('open');
- });
- $('#deleteContactCancel').click( function() {
- $("#deleteContactDialog").dialog("close");
- });
- $('#deleteContactSubmit').click( function() {
+ // Add the new city name to the city picklist
+ $('#businessCity').append('<option value="-1">' + newBusinessCityName + '</option>');
+ $('#businessCity').val(-1);
+ $('#newBusinessCityNameTD').append('<input type="hidden" name="newBusinessCity" value="' + newBusinessCityName + '">');
+ newBusinessCityAdded = true;
+
+ }
+
+ // Clear new city name from form
+ $('#newBusinessCityName').val('');
+
+ $("#newBusinessCityDialog").dialog("close");
+
+ });
+
+ /*
+ * Large Image Dialog
+ */
+
+ // Setup dialog box for showing enlarged image image
+ x = $('#largeImageDialog').dialog({
+ autoOpen: false,
+ resizable: false,
+ dialogClass: "glm-dialog-no-close"
+ });
+ $('#largeImageCancel').click( function() {
+ $('#largeImageDialog').dialog("close");
+ });
+
+ // Show large image - pop-up dialog - resize at time of pop-up
+ $('#largeImageButton').click( function() {
+ $("#largeImageDialog").dialog("open");
+ $( "#largesImageDialog" ).dialog( "option", "position", { my: "center", at: "center", of: window } );
+ var newWidth = $(window).width() * .8;
+ $( "#largeImageDialog" ).dialog( "option", "width", newWidth );
+ });
+
+ // Resize whenever window size changes
+ $(window).resize(function(){
+ $( "#largeImageDialog" ).dialog( "option", "position", { my: "center", at: "center", of: window } );
+ var newWidth = $(window).width() * .8;
+ $( "#largeImageDialog" ).dialog( "option", "width", newWidth );
+ });
+
+ // Delete Contact dialog
+ $("#deleteContactDialog").dialog({
+ autoOpen: false,
+ minWidth: 400,
+ dialogClass: "glm-dialog-no-close"
+ });
+ $('#deleteContactButton').click( function() {
+ $('#deleteContactDialog').dialog('open');
+ });
+ $('#deleteContactCancel').click( function() {
+ $("#deleteContactDialog").dialog("close");
+ });
+ $('#deleteContactSubmit').click( function() {
{if $fromMemberMenu}
- window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=contacts&member={$memberID}&option=delete&contact={$contactID}");
+ window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=contacts&member={$memberID}&option=delete&contact={$contactID}");
{else}
- window.location.replace("{$thisUrl}?page=glm-members-admin-menu-contacts&glm_action=index&option=delete&contact={$contactID}");
+ window.location.replace("{$thisUrl}?page=glm-members-admin-menu-contacts&glm_action=index&option=delete&contact={$contactID}");
{/if}
- });
+ });
- // Set required status for E-Mail field based on permission settings
- $('#contactRoleSelect').on('change', function() {
- checkContactRoleSelect();
- });
- function checkContactRoleSelect() {
- var role = $('#contactRoleSelect').val();
- if (role < 40) {
- $('#emailRequiredForLoginContacts').addClass('glm-required');
- } else {
- $('#emailRequiredForLoginContacts').removeClass('glm-required');
- }
- }
+ // Set required status for E-Mail field based on permission settings
+ $('#contactRoleSelect').on('change', function() {
checkContactRoleSelect();
+ });
+ function checkContactRoleSelect() {
+ var role = $('#contactRoleSelect').val();
+ if (role < 40) {
+ $('#emailRequiredForLoginContacts').addClass('glm-required');
+ } else {
+ $('#emailRequiredForLoginContacts').removeClass('glm-required');
+ }
+ }
+ checkContactRoleSelect();
- // Set masking for phone number fields - see http://digitalbush.com/projects/masked-input-plugin/
- $.mask.definitions['e'] = "[A-Za-z0-9: ]";
- $(".glm-phone-input").mask("(999) 999-9999? eeeeeeeeeee");
+ // Set masking for phone number fields - see http://digitalbush.com/projects/masked-input-plugin/
+ $.mask.definitions['e'] = "[A-Za-z0-9: ]";
+ $(".glm-phone-input").mask("(999) 999-9999? eeeeeeeeeee");
- // Flash certain elements for a short time after display
- $(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);
+ // Flash certain elements for a short time after display
+ $(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);
{if $membersList && apply_filters('glm_members_menu_members',true)}
- // Action to select a member for the Other Members field
- $('#memberSelect').change( function() {
-
- // Get the ID and name of the member
- var membValue = $('#memberSelect').val();
- var membName = $('#memberSelect').find(':selected').text();
-
- // Check if the member has already been added
- var found = false;
- $(".glm-members-members").each( function() {
- var id = $(this).attr('data-id');
- if (id == membValue) {
- found = true;
- }
- });
-
- // If not found, Add the category
- if (!found) {
- $('#selectedMembers').append('<div data-id="' + membValue
- + '" class="glm-dynSelect-item glm-members-members">'
- + membName.trim() + ' <span class="glm-dynSelect-delete membDelete">X</span>'
- + '<input type="hidden" name="contactMembers[' + membValue + ']" value="' + membValue + '"></div>');
+ // Action to select a member for the Other Members field
+ $('#memberSelect').change( function() {
+
+ // Get the ID and name of the member
+ var membValue = $('#memberSelect').val();
+ var membName = $('#memberSelect').find(':selected').text();
+
+ // Check if the member has already been added
+ var found = false;
+ $(".glm-members-members").each( function() {
+ var id = $(this).attr('data-id');
+ if (id == membValue) {
+ found = true;
}
+ });
- // Reset picklist
- $('#memberSelect').val('');
+ // If not found, Add the category
+ if (!found) {
+ $('#selectedMembers').append('<div data-id="' + membValue
+ + '" class="glm-dynSelect-item glm-members-members">'
+ + membName.trim() + ' <span class="glm-dynSelect-delete membDelete">X</span>'
+ + '<input type="hidden" name="contactMembers[' + membValue + ']" value="' + membValue + '"></div>');
+ }
- });
+ // Reset picklist
+ $('#memberSelect').val('');
+
+ });
{/if}
- // Action to de-select a member from the Other Members filed
- $('.membDelete').live('click', function() {
- $(this).parent().remove();
- });
+ // Action to de-select a member from the Other Members filed
+ $('.membDelete').live('click', function() {
+ $(this).parent().remove();
+ });
- // Check whether contact can manage all members
- function checkContactMembersEdit() {
- var permissionType = $('#contactRoleSelect').val();
- if (permissionType == {$EntityManagerRole}) {
- $('#accessToAllMembers').addClass('glm-hidden');
- $('#accessToMemberSelection').removeClass('glm-hidden');
- } else {
- $('#accessToAllMembers').removeClass('glm-hidden');
- $('#accessToMemberSelection').addClass('glm-hidden');
- }
+ // Check whether contact can manage all members
+ function checkContactMembersEdit() {
+ var permissionType = $('#contactRoleSelect').val();
+ if (permissionType == {$EntityManagerRole}) {
+ $('#accessToAllMembers').addClass('glm-hidden');
+ $('#accessToMemberSelection').removeClass('glm-hidden');
+ } else {
+ $('#accessToAllMembers').removeClass('glm-hidden');
+ $('#accessToMemberSelection').addClass('glm-hidden');
}
+ }
- checkContactMembersEdit();
- $('#contactRoleSelect').on('change', checkContactMembersEdit);
+ checkContactMembersEdit();
+ $('#contactRoleSelect').on('change', checkContactMembersEdit);
- });
- </script>
+ });
+</script>
{include file='admin/footer.html'}