291 lines
15 KiB
HTML
Executable File
291 lines
15 KiB
HTML
Executable File
<!--
|
|
/*
|
|
* The contents of this file are subject to the SugarCRM Public License Version
|
|
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
|
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
* for the specific language governing rights and limitations under the
|
|
* License.
|
|
*
|
|
* All copies of the Covered Code must include on each user interface screen:
|
|
* (i) the "Powered by SugarCRM" logo and
|
|
* (ii) the SugarCRM copyright notice
|
|
* in the same form as they appear in the distribution. See full license for
|
|
* requirements.
|
|
*
|
|
* The Original Code is: SugarCRM Open Source
|
|
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
|
* Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
|
|
* All Rights Reserved.
|
|
* Contributor(s): ______________________________________.
|
|
*/
|
|
-->
|
|
|
|
<!-- BEGIN: main -->
|
|
<!-- BEGIN: SearchHeader -->
|
|
|
|
|
|
<script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
|
<script type="text/javascript" src="include/javascript/popup_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
|
<script>
|
|
function selectTabCSS(id){
|
|
document.getElementById("basic_form").style.display='none';
|
|
document.getElementById("advanced_form").style.display='none';
|
|
document.getElementById("link_basic").className='';
|
|
document.getElementById("link_advanced").className='';
|
|
document.getElementById("tab_basic").className='';
|
|
document.getElementById("tab_advanced").className='';
|
|
|
|
document.getElementById(id+"_form").style.display='';
|
|
document.getElementById("link_"+id).className='current';
|
|
document.getElementById("tab_"+id).className='active';
|
|
document.getElementById("tab").value=id;
|
|
if(id=="advanced"){
|
|
var bi=document.getElementById("basic_form").getElementsByTagName("input");
|
|
for(var i=0;i<bi.length;i++){
|
|
if(bi[i].type=="text")bi[i].value="";
|
|
if(bi[i].type=="checkbox")bi[i].checked=false;
|
|
}
|
|
var bs=document.getElementById("basic_form").getElementsByTagName("select");
|
|
for(var i=0;i<bs.length;i++){
|
|
bs[i].value="";
|
|
}
|
|
}
|
|
if(id=="basic"){
|
|
var ai=document.getElementById("advanced_form").getElementsByTagName("input");
|
|
for(var i=0;i<ai.length;i++){
|
|
if(ai[i].type=="text")ai[i].value="";
|
|
if(ai[i].type=="checkbox")ai[i].checked=false;
|
|
}
|
|
var as=document.getElementById("basic_form").getElementsByTagName("select");
|
|
for(var i=0;i<as.length;i++){
|
|
as[i].value="";
|
|
}
|
|
}
|
|
}
|
|
//selectTabCSS(document.getElementById("tab").value);
|
|
</script>
|
|
<ul class="tablist">
|
|
<li class="active" id="tab_basic"><a class="current" id="link_basic" href="javascript:selectTabCSS('basic');">Basic Search</a></li>
|
|
<li class="" id="tab_advanced"><a class="" id="link_advanced" href="javascript:selectTabCSS('advanced');">Advanced Search</a></li>
|
|
</ul>
|
|
<form action="index.php" method="post" name="popup_query_form" id="search_form">
|
|
<input type="hidden" name="tab" id="tab" value="{TABB}" />
|
|
<input type="hidden" name="div" id="div" value="{DIV}" />
|
|
<input type="hidden" name="pre" id="pre" value="{PRE}" />
|
|
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
|
<input type="hidden" name="action" value="Popup" />
|
|
<input type="hidden" name="query" value="true" />
|
|
<input type="hidden" name="request_data" value="{request_data}" />
|
|
<input type="hidden" name="record_id" value="" />
|
|
<input type="hidden" name="mode" value="{MULTI_SELECT}" />
|
|
<table cellpaddin="0" cellspacing="0" border="0" width="100%">
|
|
<tr>
|
|
<td>
|
|
|
|
<table cellpaddin="0" cellspacing="0" border="0" width="100%" id="advanced_form" style="display:none;border-top: 0px none; margin-bottom: 4px;" class="tabForm">
|
|
<tr>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">First Name</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap"><input name="first_name_advanced" id="first_name_advanced" size="30" maxlength="100" value="{FIRST_NAME}" title="" tabindex="" type="text"></td>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Any Address</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_street_advanced" id="address_street_advanced" size="30" value="{ADDRESS}" title="" tabindex="" type="text"></td>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Any Phone</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap"><input name="phone_advanced" id="phone_advanced" size="30" value="{PHONE}" title="" tabindex="" type="text"></td>
|
|
</tr><tr>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Last Name</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap"><input name="last_name_advanced" id="last_name_advanced" size="30" maxlength="100" value="{LAST_NAME}" title="" tabindex="" type="text"></td>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">City</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_city_advanced" id="address_city_advanced" size="30" value="{CITY}" title="" tabindex="" type="text"></td>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Any Email</td><td class="dataField" width="30%" nowrap="nowrap"><input name="email_advanced" id="email_advanced" size="30" value="{EMAIL}" title="" tabindex="" type="text"></td>
|
|
</tr><tr>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Account Name</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap"><input name="account_name_advanced" tabindex="" id="account_name_advanced" size="" value="{ACCOUNT_NAME}" title="" type="text">
|
|
<input name="account_id_advanced" id="account_id_advanced" value="{ACCOUNT_ID}" type="hidden"><input name="btn_account_name_advanced" tabindex="" title="Select [Alt+T]" accesskey="T" class="button" value="Select" onclick='open_popup("Accounts", 600, 400, "", true, false, {"call_back_function":"set_return","form_name":"search_form","field_to_name_array":{"id":"account_id_advanced","name":"account_name_advanced"}}, "single", true,"new");' type="button"></td>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">State</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_state_advanced" id="address_state_advanced" size="30" value="{STATE}" title="" tabindex="" type="text"></td>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Do Not Call</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap">
|
|
<select id="do_not_call_advanced" name="do_not_call_advanced" tabindex="">
|
|
{DO_NOT_CALL_LIST}
|
|
</select>
|
|
</td>
|
|
</tr><tr>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Assistant</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap"><input name="assistant_advanced" id="assistant_advanced" size="30" maxlength="75" value="{ASSISTANT}" title="" tabindex="" type="text"></td>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Postal Code</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_postalcode_advanced" id="address_postalcode_advanced" size="30" value="{POSTAL_CODE}" title="" tabindex="" type="text"></td>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Country</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap"><input name="primary_address_country_advanced" id="primary_address_country_advanced" size="30" value="{COUNTRY}" title="" tabindex="" type="text"></td>
|
|
</tr><tr>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Assigned to</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap">
|
|
<select name="assigned_user_id_advanced[]" style="width: 150px;" multiple="true" size="6">
|
|
{ASSIGNED_TO_LIST}
|
|
</select>
|
|
</td>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Foreign pcontact</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap">
|
|
<select name="foreign_pcontact_advanced" style="width: 150px;">
|
|
{FOREIGN_PCONTACT}
|
|
</select>
|
|
</td>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Mailing tag</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap">
|
|
<select name="mailing_tag_advanced" style="width: 150px;">
|
|
{MAILING_TAG}
|
|
</select>
|
|
</td>
|
|
</tr><tr>
|
|
<td colspan="20">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="basic_form" style="border-top: 0px none; margin-bottom: 4px;" class="tabForm">
|
|
<tr>
|
|
<td class="dataLabel" nowrap="nowrap">{MOD.LBL_FIRST_NAME} <input type="text" name="first_name" size="20" class="dataField" value="{FIRST_NAME}" /></td>
|
|
<td class="dataLabel" nowrap="nowrap">{MOD.LBL_LAST_NAME} <input type="text" name="last_name" size="20" class="dataField" value="{LAST_NAME}" /></td>
|
|
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Account Name</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap"><input name="account_name" tabindex="" id="account_name" size="" value="{ACCOUNT_NAME}" title="" type="text">
|
|
<input name="account_id" id="account_id" value="{ACCOUNT_ID}" type="hidden"><input name="btn_account_name" tabindex="" title="Select [Alt+T]" accesskey="T" class="button" value="Select" onclick='open_popup("Accounts", 600, 400, "", true, false, {"call_back_function":"set_return","form_name":"search_form","field_to_name_array":{"id":"account_id","name":"account_name"}}, "single", true,"new");' type="button"></td>
|
|
<td width="20%" align="right"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dataLabel" nowrap="nowrap">Only my items: <input type="checkbox" name="only_my_items" value="1" {OMI_CHECKED} /></td>
|
|
<td class="dataLabel" nowrap="nowrap"> </td>
|
|
<td class="dataLabel" nowrap="nowrap"> </td>
|
|
<td class="dataField" nowrap="nowrap"> </td>
|
|
<td align="right"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<input type="submit" name="button" class="button"
|
|
title="{APP.LBL_SEARCH_BUTTON_TITLE}"
|
|
accessKey="{APP.LBL_SEARCH_BUTTON_KEY}"
|
|
value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
|
|
<input type="button" name="button" class="button"
|
|
title="Clear"
|
|
value="Clear" onclick="selectTabCSS(document.getElementById('tab').value);location.reload();" />
|
|
|
|
</form>
|
|
<script type="text/javascript">
|
|
<!--
|
|
/* initialize the popup request from the parent */
|
|
|
|
if(window.document.forms['popup_query_form'].request_data.value == "")
|
|
{
|
|
window.document.forms['popup_query_form'].request_data.value
|
|
= JSON.stringify(window.opener.get_popup_request_data());
|
|
}
|
|
// cn: bug 8104 - escaped unicode sequence printing out escaped values
|
|
var account_name = document.getElementById('account_name').value;
|
|
document.getElementById('account_name').value = unescape(account_name);
|
|
-->
|
|
|
|
</script>
|
|
|
|
<p>
|
|
<div id='addformlink'>{CREATEBUTTON}
|
|
<div id='addform' style='display:none;position:relative;z-index:2;left:0px;top:0px;'>
|
|
<form name="PContactSave" onsubmit="return check_form('ContactSave');" method="post" action="index.php">
|
|
{ADDFORMHEADER}
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tabForm">
|
|
<tr>
|
|
<td>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr><td>
|
|
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
|
<input type="hidden" name="action" value="Popup" />
|
|
<input type="hidden" name="doAction" value="save" />
|
|
<input type="hidden" name="query" value="true" />
|
|
{ADDFORM}
|
|
</td></tr>
|
|
</table></td></tr></table>
|
|
</form>
|
|
</div>
|
|
</p>
|
|
|
|
<!-- END: SearchHeader -->
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="listView">
|
|
<!-- BEGIN: list_nav_row -->
|
|
{PAGINATION}
|
|
{PAG}
|
|
<!-- END: list_nav_row -->
|
|
<tr height="20">
|
|
<td scope="col" class="listViewThS1" NOWRAP>{CHECKALL}</td>
|
|
<td scope="col" width="40%" class="listViewThS1" nowrap="nowrap"><a href="{ORDER_BY}last_name" class="listViewThLinkS1">{MOD.LBL_LIST_PCONTACT_NAME}{arrow_start}{last_name_arrow}{arrow_end}</a></td>
|
|
<td scope="col" width="20%" class="listViewThS1" nowrap="nowrap"><a href="{ORDER_BY}title" class="listViewThLinkS1">{MOD.LBL_LIST_TITLE}{arrow_start}{title_arrow}{arrow_end}</a></td>
|
|
<td scope="col" width="40%" class="listViewThS1" nowrap="nowrap">{MOD.LBL_LIST_ACCOUNT_NAME}</td>
|
|
</tr>
|
|
<!-- BEGIN: row -->
|
|
<tr height="20"
|
|
onmouseover="setPointer(this, '{PCONTACT.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
|
|
onmouseout="setPointer(this, '{PCONTACT.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
|
|
onmousedown="setPointer(this, '{PCONTACT.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
|
|
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>{PREROW}</td>
|
|
<td scope='row' valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><a href="#" onclick="send_back('PContacts','{PCONTACT.ID}');" class="listViewTdLinkS1">{CONTACT.FULL_NAME}</a></td>
|
|
<td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{PCONTACT.TITLE}</td>
|
|
<td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{PCONTACT.ACCOUNT_NAME}</td>
|
|
</tr>
|
|
<tr><td colspan="20" class="listViewHRS1"></td></tr>
|
|
<!-- END: row -->
|
|
|
|
</table>
|
|
<script type="text/javascript">
|
|
function save_checks(offset,n) {
|
|
checked_ids = Array();
|
|
for (i = 0; i < document.MassUpdate.elements.length; i++){
|
|
if(document.MassUpdate.elements[i].name == 'mass[]' && document.MassUpdate.elements[i].checked) {
|
|
temp_string = '';
|
|
temp_string += '"' + document.MassUpdate.elements[i].value + '": {';
|
|
for(the_key in associated_javascript_data[document.MassUpdate.elements[i].value]) {
|
|
temp_string += '"' + the_key + '":"' + associated_javascript_data[document.MassUpdate.elements[i].value][the_key] + '",';
|
|
}
|
|
temp_string = temp_string.substring(0,temp_string.length - 1);
|
|
temp_string += '}';
|
|
checked_ids.push(temp_string);
|
|
}
|
|
}
|
|
document.MassUpdate.saved_associated_data.value = escape('{' + checked_ids.join(',') + '}');
|
|
|
|
document.MassUpdate.action.value = "Popup";
|
|
document.MassUpdate.PContacts_PCONTACT_offset.value = offset;
|
|
document.MassUpdate.submit();
|
|
}
|
|
// reassigned the saved data from the saved checks
|
|
if(typeof(document.MassUpdate) != 'undefined' && document.MassUpdate.saved_associated_data.value != '') {
|
|
temp_array = [];
|
|
for(the_key in temp_array) {
|
|
associated_javascript_data[the_key] = temp_array[the_key];
|
|
}
|
|
}
|
|
|
|
// save checks across pages for multiselects
|
|
if(typeof(document.MassUpdate) != "undefined") {
|
|
checked_items = Array();
|
|
inputs_array = document.MassUpdate.elements;
|
|
|
|
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
|
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].style.display == "none") {
|
|
checked_items.push(inputs_array[wp].value);
|
|
}
|
|
}
|
|
for(i in checked_items) {
|
|
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
|
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].value == checked_items[i]) {
|
|
inputs_array[wp].checked = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
</script>
|
|
{ASSOCIATED_JAVASCRIPT_DATA}
|
|
|
|
<!-- END: main -->
|