<h2 class="glm-left">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>
+ <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}
<br><span style="color: white;">
The E-Mail address you submitted contained invalid characters. {$new_email}
Please check the address and submit again.
- </span>
+ </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".
+ 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>
+ </span>
{/if}
{if $newEmailError == 'IN_USE'}
<br><span style="color: white;">
- The E-Mail address you submitted is already in use for this site.
+ 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>
+ </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.
+ <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>
<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}', 'glm_descr', array(
+ wp_editor('{$contactInfo.fieldData.descr|escape:quotes}', 'glm_descr', array(
'quicktags' => false,
'media_buttons' => false,
'wpautop' => false,
<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}', 'glm_notes', array(
+ wp_editor('{$contactInfo.fieldData.notes|escape:quotes}', 'glm_notes', array(
'quicktags' => false,
'media_buttons' => false,
'wpautop' => false,
<li>Other roles were assigned to the associated system user so that system user has not been removed.</li>
{/if}
</ul>
-{/if}
+{/if}
{if $haveMember}
{if $option == 'list'}
<a href="{$thisUrl}?page={$thisPage}&glm_action=contacts&member={$memberID}&option=create" class="button button-primary glm-button glm-right">Add New {$terms.term_member_cap} Contact</a>
{/if}
<form class="glm-right" onSubmit="return false;">
- <span{if $haveFilter} class="glm-notice"{/if}><b>List Filters:</b> </span>
+ <span{if $haveFilter} class="glm-notice"{/if}><b>List Filters:</b> </span>
<input type="checkbox" id="filterArchived" class="listFilter"{if $filterArchived} checked{/if}>Show Archived
<input type="text" id="filterText" class="listFilter" value="{$filterText}"> Search
<a href="{$thisUrl}?page=glm-members-admin-menu-member&glm_action=contacts&option=edit&member={$c.ref_dest}&contact={$c.id}">{$c.lname}, {$c.fname}</a>
{else}
{$c.lname}, {$c.fname}
- {/if}
+ {/if}
</td>
<td class="glm-shrink">{$c.active.name}</td>
<td>{$c.contact_type.name}</td>
{/if}
</tbody>
</table>
-
+
<!-- Check for invalid contact ID to edit -->
{elseif $option == 'edit' && !$contactID}
<h3><span class="glm-error">ERROR:</span> Specified contact not found!</h3>
-
+
{elseif $newContactExists}
-
- <h4><span class="glm-warning">NOTE:</span> The Email address or username for this contact is already in use. Please check if they already are a contact in this system.</h3>
+
+ <h4><span class="glm-warning">NOTE:</span> The Email address or username for this contact is already in use. Please check if they already are a contact in this system.</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 $option == 'create' || $option == 'edit'}
<a href="{$thisUrl}?page={$thisPage}&glm_action=contacts&member={$memberID}" class="button button-primary glm-button glm-right">Return to Contact List</a>
-
+
{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>
<h2 class="glm-left">Edit Contact</h2>
{/if}
-
-
+
+
<form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
<input type="hidden" name="glm_action" value="contacts">
<input type="hidden" name="member" value="{$memberData.id}">
<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>
<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>
</td>
</tr>
<tr>
- {if $option == 'create'}
+ {if $option == 'create'}
<th {if $contactInfo.fieldRequired.email}class="glm-required"{/if}>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>
<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}', 'glm_descr', array(
+ wp_editor('{$contactInfo.fieldData.descr|escape:quotes}', 'glm_descr', array(
'quicktags' => false,
'media_buttons' => false,
'wpautop' => false,
</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}
</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() {
window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=contacts&member={$memberID}&option=delete&contact={$contactID}");
});
- // 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);
});
</p>
{if $newEmailError != ''}
- <h2 class="glm-required glm-flash-updated">NOTE: Your new E-Mail address was not valid. Please see below.</h2>
+ <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}
-
+
<p> </p>
<form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
<input type="hidden" name="glm_action" value="index">
<br><span style="color: white;">
The E-Mail address you submitted contained invalid characters. {$new_email}
Please check the address and submit again.
- </span>
+ </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".
+ 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>
+ </span>
{/if}
{if $newEmailError == 'IN_USE'}
<br><span style="color: white;">
- The E-Mail address you submitted is already in use for this site.
+ 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>
+ </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.
+ <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>
<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}', 'glm_descr', array(
+ wp_editor('{$contactInfo.fieldData.descr|escape:quotes}', 'glm_descr', array(
'quicktags' => false,
'media_buttons' => false,
'wpautop' => false,