<li>Other roles were assigned to the associated system user so that system user has not been removed.</li>
{/if}
</ul>
-{/if}
+{/if}
- {if $newContactEmailExists}
+ {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}
+ {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>
+ <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>
{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
+ <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>
+
{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-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}
<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}
+ {if $usernameChangedToWP || $usingExistingWPContact}
</ul>
{/if}
{if apply_filters('glm_members_permit_admin_member_contacts_edit_contact', true)}
{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 $option == 'create'}
- <h2 class="glm-left">Add New Contact</h2>
+ <h2 class="glm-left">Add New Contact</h2>
{else}
{if $contactUpdated}<h2 class="glm-notice glm-flash-updated">Contact Updated</h2>{/if}
<a id="deleteContactButton" class="button button-primary glm-button glm-right">Delete this Contact</a>
<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
+ <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>
</div>
<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.
+ 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">
<input type="hidden" name="id" value="{$contactInfo.fieldData.id}">
<input type="hidden" name="modify_time" value="now">
{/if}
-
+
<table class="glm-admin-table glm-shrink">
<tr>
{if $haveMember}
<tr>
<th>Primary Contact:</th>
<td>
- {if apply_filters('glm_members_permit_admin_member_contacts_set_as_primary', true)}
+ {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}
<tr>
<th>Created:</th>
<td>{$contactInfo.fieldData.create_time.datetime}</td>
- </tr>
+ </tr>
<tr>
<th>Last Updated:</th>
<td>{$contactInfo.fieldData.modify_time.datetime}</td>
</td>
</tr>
<tr>
- {if $option == 'create'}
+ {if $option == 'create'}
<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)">
{/if}
</tr>
<tr>
-
- {if $option == 'create'}
+
+ {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)">
<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>
+ <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.
+ <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>
</td>
</tr>
<tr>
- <th {if $contactInfo.fieldRequired.image}class="glm-required"{/if}>Image:</th>
+ <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">
</div>
<table class="glm-admin-image-edit-table">
<tr>
- <td><img src="{$glmPluginMediaUrl}/images/thumb/{$contactInfo.fieldData.image}"></td>
+ <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}
<option value="{$m.id}">
{$m.name}
</option>
- {/if}
+ {/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}
+ <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>
+ </div>
{/foreach}
{/if}
</div>
{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>
+ <div data-id="{$m.id}" class="glm-dynSelect-item">
+ {$m.name}
+ </div>
{/foreach}
{/if}
{/if}
</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>
-
+ </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>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>
<td>
{if $contactInfo.fieldData.image}
<img src="{$glmPluginMediaUrl}/images/thumb/{$contactInfo.fieldData.image}">
- {/if}
+ {/if}
</td>
</tr>
<tr><th>Address Line 1:</th><td>{$contactInfo.fieldData.addr1}</td></tr>
<script type="text/javascript">
jQuery(document).ready(function($) {
-
+
// Filter triggers
$(".listFilter" ).change( function() {
-
+
var filter = '';
-
+
// Check for archived filter
if ($("#filterArchived").attr('checked')) {
filter += '&filterArchived=true';
}
-
+
// Check for name filter
var filterText = $("#filterText").val();
if (filterText != '') {
filter += '&filterText=' + encodeURIComponent(filterText).replace(/%20/g,'+');
}
-
+
window.location.href = "{$thisUrl}?page={$thisPage}&glm_action=contacts&member={$memberID}" + filter;
-
+
return false;
});
$('#newCityCancel').click( function() {
$("#newCityDialog").dialog("close");
});
-
+
// Ad a new city button action - pop-up dialog
$('#newCityButton').click( function() {
$("#newCityDialog").dialog("open");
// Submit new city
var newCityAdded = false;
$('#newCitySubmit').click( function() {
-
+
// Get new city name
var newCityName = $('#newCityName').val();
// Add new city name to the hidden field that will pass the new name to PHP.
$('#cityName').val(newCityName);
-
+
// Add new city name to picklist and for storing - Only one permitted per submission
if (newCityAdded) {
-
+
// New city already added, so just update the name and select that one
$('#city').val(-1);
$('#city option:selected').text(newCityName);
-
+
} else {
-
+
// Add the new city name to the city picklist
$('#city').append('<option value="-1">' + newCityName + '</option>');
$('#city').val(-1);
newCityAdded = true;
}
-
+
// Clear new city name from form
$('#newCityName').val('');
-
+
$("#newCityDialog").dialog("close");
});
});
$('#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=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();
}
}
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");
-
- // Flash certain elements for a short time after display
+
+ // 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
+ // 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 membValue = $('#memberSelect').val();
var membName = $('#memberSelect').find(':selected').text();
// Check if the member has already been added
- var found = false;
+ 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">'
+ $('#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}
-
+{/if}
+
// 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();
$('#accessToMemberSelection').addClass('glm-hidden');
}
}
-
+
checkContactMembersEdit();
$('#contactRoleSelect').on('change', checkContactMembersEdit);
-
+
});
</script>
{include file="$glmWordpresBasePluginPath/glm-member-db-contacts/views/admin/profile/header.html"}
-
+
{if apply_filters('glm_members_permit_admin_profile_index_edit_profile', true)}
<p>
<b>Why are there items below that I can't edit?</b><br>
- Some of the information below, such as your Username and Email address, are used by the system to identify your profile and may not be altered after the contact profile has been created.
+ Some of the information below, such as your Username and Email address, are used by the system to identify your profile and may not be altered after the contact profile has been created.
There are also certain items that relate to permissions you have to access and change other data.
</p>
-
+
{if $contactUpdated}<h2 class="glm-notice glm-flash-updated">Contact Updated</h2>{/if}
<form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
<input type="hidden" name="glm_action" value="index">
<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">
-
+
<table class="glm-admin-table glm-shrink">
<tr>
<th>Contact For:</th>
<tr>
<th>Created:</th>
<td>{$contactInfo.fieldData.create_time.datetime}</td>
- </tr>
+ </tr>
<tr>
<th>Last Updated:</th>
<td>{$contactInfo.fieldData.modify_time.datetime}</td>
<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="(password not displayed)">
- <br>Your existing password is not displayed. If you would like to change your password, enter it above.
+ <br>Your existing password is not displayed. If you would like to change your password, enter it above.
{if $contactInfo.fieldFail.password}<p>{$contactInfo.fieldFail.password}</p>{/if}
</td>
</tr>
</td>
</tr>
<tr>
- <th {if $contactInfo.fieldRequired.image}class="glm-required"{/if}>image:</th>
+ <th {if $contactInfo.fieldRequired.image}class="glm-required"{/if}>Profile Image:</th>
<td {if $contactInfo.fieldFail.image}class="glm-form-bad-input"{/if}>
<table class="glm-admin-image-edit-table">
{if $contactInfo.fieldData.image}
<td class="glm-item-container">
{if $contactMembers}
{foreach $contactMembers as $m}
- <div data-id="{$m.id}" class="glm-dynSelect-item glm-members-members">
- {$m.name}
- </div>
+ <div data-id="{$m.id}" class="glm-dynSelect-item glm-members-members">
+ {$m.name}
+ </div>
{/foreach}
{/if}
</td>
</tr>
-
-
+
+
</table>
<p><span class="glm-required">*</span> Required</p>
<input type="submit" name="Add new {$terms.term_member}">
- </form>
+ </form>
{else} <!-- may edit contact -->
-
+
<h3>You do not have permission to edit your profile.</h3>
<table class="glm-admin-table striped glm-shrink">
<tr><th>Contact For:</th><td>{$contactInfo.fieldData.ref_type.name} - {$contactInfo.fieldData.ref_dest_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>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>
<td>
{if $contactInfo.fieldData.image}
<img src="{$glmPluginMediaUrl}/images/thumb/{$contactInfo.fieldData.image}">
- {/if}
+ {/if}
</td>
</tr>
<tr><th>Address Line 1:</th><td>{$contactInfo.fieldData.addr1}</td></tr>
<tr><th>Alternate Phone #:</th><td>{$contactInfo.fieldData.alt_phone}</td></tr>
<tr><th>FAX #:</th><td>{$contactInfo.fieldData.fax}</td></tr>
</table>
-
+
{/if} <!-- mey edit contact -->
<script type="text/javascript">
-
+
jQuery(document).ready(function($) {
-
+
/*
* New City Dialog
*/
-
+
// Setup dialog box for adding a new city
$("#newCityDialog").dialog({
autoOpen: false,
$('#newCityCancel').click( function() {
$("#newCityDialog").dialog("close");
});
-
+
// Ad a new city button action - pop-up dialog
$('#newCityButton').click( function() {
$("#newCityDialog").dialog("open");
});
-
+
// 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;
}
-
+
// Add new city name to the hidden field that will pass the new name to PHP.
$('#cityName').val(newCityName);
-
+
// Add new city name to picklist and for storing - Only one permitted per submission
if (newCityAdded) {
-
+
// New city already added, so just update the name and select that one
$('#city').val(-1);
$('#city option:selected').text(newCityName);
-
+
} else {
-
+
// 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;
-
+
}
-
+
// Clear new city name from form
$('#newCityName').val('');
-
+
$("#newCityDialog").dialog("close");
-
+
});
-
+
/*
* Large Image Dialog
*/
-
+
// Setup dialog box for showing enlarged image image
x = $('#largeImageDialog').dialog({
autoOpen: false,
$('#largeImageCancel').click( function() {
$('#largeImageDialog').dialog("close");
});
-
+
// Show large image - pop-up dialog - resize at time of pop-up
$('#largeImageButton').click( function() {
$("#largeImageDialog").dialog("open");
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 );
});
-
- // Flash certain elements for a short time after display
+
+ // 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);
-
-
+
+
{$contactInfo.fieldData.contact_role.value}
if ({$contactInfo.fieldData.contact_role.value} == {$EntityManagerRole}) {
$('#accessToMembers').removeClass('glm-hidden');
}
-
-
+
+
});
</script>