329 lines
17 KiB
HTML
329 lines
17 KiB
HTML
<!--
|
|
/*****************************************************************************
|
|
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
|
* Version 1.1 ("License"); You may not use this file except in compliance
|
|
* with the License. You may obtain a copy of the License at
|
|
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
|
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
|
* either express or implied.
|
|
*
|
|
* You may:
|
|
* a) Use and distribute this code exactly as you received without payment or
|
|
* a royalty or other fee.
|
|
* b) Create extensions for this code, provided that you make the extensions
|
|
* publicly available and document your modifications clearly.
|
|
* c) Charge for a fee for warranty or support or for accepting liability
|
|
* obligations for your customers.
|
|
*
|
|
* You may NOT:
|
|
* a) Charge for the use of the original code or extensions, including in
|
|
* electronic distribution models, such as ASP (Application Service
|
|
* Provider).
|
|
* b) Charge for the original source code or your extensions other than a
|
|
* nominal fee to cover distribution costs where such distribution
|
|
* involves PHYSICAL media.
|
|
* c) Modify or delete any pre-existing copyright notices, change notices,
|
|
* or License text in the Licensed Software
|
|
* d) Assert any patent claims against the Licensor or Contributors, or
|
|
* which would in any way restrict the ability of any third party to use the
|
|
* Licensed Software.
|
|
*
|
|
* You must:
|
|
* a) Document any modifications you make to this code including the nature of
|
|
* the change, the authors of the change, and the date of the change.
|
|
* b) Make the source code for any extensions you deploy available via an
|
|
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
|
* c) Notify the licensor of the availability of source code to your extensions
|
|
* and include instructions on how to acquire the source code and updates.
|
|
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
|
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
|
*
|
|
* The Original Code is: CommuniCore
|
|
* Olavo Farias
|
|
* 2006-04-7 olavo.farias@gmail.com
|
|
*
|
|
* The Initial Developer of the Original Code is CommuniCore.
|
|
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
|
* All Rights Reserved.
|
|
********************************************************************************/
|
|
-->
|
|
<!-- BEGIN: main -->
|
|
<style type="text/css">
|
|
.przezroczysty {
|
|
filter: alpha(opacity=40);
|
|
-moz-opacity: 0.4;
|
|
opacity:0.4;
|
|
}
|
|
.nieprzezroczysty {
|
|
filter: none;
|
|
-moz-opacity: none;
|
|
opacity: none;
|
|
}
|
|
</style>
|
|
<script language="javascript" src="modules/EcmDocs/formloader.js"></script>
|
|
<script language="javascript" src="modules/EcmDocs/mintajax.js"></script>
|
|
<script language="javascript" src="modules/EcmDocs/helper.js"></script>
|
|
<script language="javascript">
|
|
function showuploadingafile()
|
|
{
|
|
if(document.getElementById('name').value!="")
|
|
{
|
|
document.getElementById('opacity').className="przezroczysty";
|
|
document.getElementById('uploading').style.display="block";
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div id="uploading" style="display:none;position:absolute;right:0;top:0;width:1000px;height:1000px;"><div style="position:absolute;top:300;right:400;">{MOD.LBL_UPLOADING_FILE}</div></div>
|
|
<div id="opacity">
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
|
<tr>
|
|
<form name="EditView" method="POST" onSubmit="return showuploadingafile();" enctype="multipart/form-data" action="index.php">
|
|
<input type="hidden" name="module" value="EcmDocs">
|
|
<input type="hidden" name="record" value="{ID}">
|
|
<input type="hidden" name="action">
|
|
<input type="hidden" name="return_module" value="{RETURN_MODULE}">
|
|
<input type="hidden" name="return_id" value="{RETURN_ID}">
|
|
<input type="hidden" name="return_action" value="{RETURN_ACTION}">
|
|
<input type="hidden" name="email_id" value="{EMAIL_ID}">
|
|
<input type="hidden" name="case_id" value="{CASE_ID}">
|
|
<input type="hidden" name="samba_file" value="{SAMBA_FILE}">
|
|
<input type="hidden" name="db_id" value="{DB_ID}">
|
|
<!--// InboundEmail support //-->
|
|
<input type="hidden" name="inbound_email_id" value="{INBOUND_EMAIL_ID}">
|
|
<input type="hidden" name="start" value="{START}">
|
|
<input type="hidden" name="type" value="{TYPE}">
|
|
<input type="hidden" name="uid" value="{UID}">
|
|
<input type="hidden" name="ieId" value="{IEID}">
|
|
<td style="padding-bottom: 2px;">
|
|
<input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button"
|
|
onclick="this.form.action.value='Save';return check_form('EditView');"
|
|
type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " >
|
|
<input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button"
|
|
onclick="history.back();"
|
|
type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} ">
|
|
</td>
|
|
<td align="right" nowrap><span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> {APP.NTC_REQUIRED}</td>
|
|
<td align='right'>{ADMIN_EDIT}</td>
|
|
</tr>
|
|
</table>
|
|
<p>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabForm">
|
|
<tr>
|
|
<td>
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
<tr>
|
|
<td width="15%" class="dataLabel"><span sugar='slot1'>{MOD.LBL_NAME} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'></td>
|
|
<td width="35%" class="dataField"><span sugar='slot1b'><input id='name' name='name' type="text" tabindex='1' size='35' maxlength='50' value="{NAME}"></span sugar='slot'></td>
|
|
<td class="dataLabel" ><span sugar='slot2'>{APP.LBL_ASSIGNED_TO}</span sugar='slot'></td>
|
|
<td class="dataField">
|
|
<span sugar='slot2b'>
|
|
<input class="sqsEnabled" tabindex="7" autocomplete="off" id="assigned_user_name" name='assigned_user_name' type="text" value="{ASSIGNED_USER_NAME}">
|
|
<input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{ASSIGNED_USER_ID}" />
|
|
<input title="{APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{APP.LBL_SELECT_BUTTON_KEY}" type="button" class="button" value='{APP.LBL_SELECT_BUTTON_LABEL}' name="btn_assigned_user_name"
|
|
onclick='open_popup("Users", 600, 400, "", true, false, {encoded_users_popup_request_data});' /></span sugar='slot'> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="dataLabel">{MOD.LBL_ACCOUNT_TO}</td>
|
|
<td class="dataField"><span sugar='slot4b'>
|
|
<input class="sqsEnabled" tabindex="2" autocomplete="off" id="account_name" name='account_name' type="text" value="{ACCOUNT_NAME}" />
|
|
<input id='account_id' name='account_id' type="hidden" value="{ACCOUNT_ID}" />
|
|
<input title="{APP.LBL_SELECT_BUTTON_TITLE}" accesskey="{APP.LBL_SELECT_BUTTON_KEY}" type="button" class="button" value='{APP.LBL_SELECT_BUTTON_LABEL}' name="btn1"
|
|
onclick='open_popup("Accounts", 600, 400, "", true, false, {"call_back_function":"set_return","form_name":"EditView","field_to_name_array":{"id":"account_id","name":"account_name"}}, "single", true);' />
|
|
<input name="account_create_button" type="button" class="button" id="account_create_button" value="{MOD.LBL_CREATE_BUTTON_LABEL}" />
|
|
</span sugar='slot'></td>
|
|
<td valign="top" class="dataLabel">{MOD.LBL_CONTACT_TO}</td>
|
|
<td valign="top" class="dataField"><input class="sqsEnabled" tabindex="2" autocomplete="off" id="contact_name" name='contact_name' type="text" value="{CONTACT_NAME}" />
|
|
<input id='contact_id' name='contact_id' type="hidden" value="{CONTACT_ID}" />
|
|
<input title="{APP.LBL_SELECT_BUTTON_TITLE}" accesskey="{APP.LBL_SELECT_BUTTON_KEY}" type="button" class="button" value='{APP.LBL_SELECT_BUTTON_LABEL}' name="btn"
|
|
onclick='open_popup("Contacts", 600, 400, "", true, false, {"call_back_function":"set_return","form_name":"EditView","field_to_name_array":{"id":"contact_id","name":"contact_name"}}, "single", true);' />
|
|
<input name="{MOD.LBL_CREATE_BUTTON_LABEL}" type="button" class="button" name="contact_create_button" id="contact_create_button" value="{MOD.LBL_CREATE_BUTTON_LABEL}" /> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dataLabel"> </td>
|
|
<td class="dataField"> </td>
|
|
<td valign="top" class="dataLabel"><span sugar='slot4'>{MOD.LBL_GROUP_NAME}</span sugar='slot'></td>
|
|
<td valign="top" class="dataField">
|
|
<span sugar='slot4b'>
|
|
{GROUP} </span sugar='slot'> </td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" valign="top" class="dataLabel"><span sugar='slot3'>{MOD.LBL_DESCRIPTION}</span sugar='slot'></td>
|
|
<td width="35%" rowspan="2" class="dataField"><span sugar='slot3b'>
|
|
<textarea name='description' title="Description" tabindex='3' cols="30" rows="8">{DESCRIPTION}</textarea>
|
|
</span sugar='slot'></td>
|
|
<td valign="top" class="dataLabel"><span sugar='slot4'>{DFILEINPUT}</span sugar='slot'></td>
|
|
<td valign="top" class="dataField"><span sugar='slot4b'> {FILEINPUT} </span sugar='slot'> </td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" valign="top" class="dataLabel"> </td>
|
|
<td valign="top" class="dataLabel"> </td>
|
|
<td valign="top" class="dataField"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" class="dataLabel">{MOD.LBL_WORTH}</td>
|
|
<td valign="top" class="dataField"><input tabindex="4" id="value" name='value' type="text" value="{WORTH}" /></td>
|
|
<td valign="top" class="dataLabel">{MOD.LBL_DATE}</td>
|
|
<td valign="top" class="dataField"><input name='date'
|
|
onblur="parseDate(this, '{CALENDAR_DATEFORMAT}');"
|
|
id='jscal_fielddate'
|
|
type="text"
|
|
title="Date"
|
|
tabindex='10'
|
|
size='11'
|
|
maxlength='10'
|
|
value="{DATE}" />
|
|
<img src="themes/default/images/jscalendar.gif" alt="{APP.LBL_ENTER_DATE}" id="jscal_triggerdate" align="absmiddle" /> <span class="dateFormat">{USER_DATEFORMAT}</span>
|
|
<script>
|
|
Calendar.setup ({inputField : 'jscal_fielddate', ifFormat : '{CALENDAR_DATEFORMAT}', showsTime : false, button : 'jscal_triggerdate', singleClick : true, step : 1});
|
|
</script></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dataLabel" valign="top">{DEMAILCHECK}</td>
|
|
<td class="dataField">{EMAILCHECK}</td>
|
|
<td valign="top" class="dataLabel">{MOD.LBL_REMINDER_DATE} </td>
|
|
<td valign="top" class="dataField"><input name='should_remind' type='hidden' value='0' />
|
|
<input name='should_remind' tabindex='12' size='2' maxlength='2' onclick='toggleDisplay("should_remind_list");' type="checkbox" class="checkbox" value='1' {REMINDER_CHECKED} /><div id='should_remind_list' style='display:{REMINDER_TIME_DISPLAY}'>
|
|
<input name='reminder_date'
|
|
onblur="parseDate(this, '{CALENDAR_DATEFORMAT}');"
|
|
id='jscal_fieldreminder_date'
|
|
type="text"
|
|
title="Date"
|
|
tabindex='13'
|
|
size='11'
|
|
maxlength='10'
|
|
value="{REMINDER_DATE}" />
|
|
<img src="themes/default/images/jscalendar.gif" alt="{APP.LBL_ENTER_DATE}" id="jscal_triggerreminder_date" align="absmiddle" /> <span class="dateFormat">{USER_DATEFORMAT}</span>
|
|
<input tabindex="14" name="hour" type="text" value="{HOUR}" size="1" />:<input tabindex="15" name="minutes" type="text" value="{MINUTES}" size="1" />
|
|
<script>
|
|
Calendar.setup ({inputField : 'jscal_fieldreminder_date', ifFormat : '{CALENDAR_DATEFORMAT}', showsTime : false, button : 'jscal_triggerreminder_date', singleClick : true, step : 1});
|
|
</script></div></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dataLabel" valign="top">{BACKTOEMAILS}</td>
|
|
<td class="dataField">{BACKTOEMAILSCHECK}</td>
|
|
<td valign="top" class="dataLabel">{MOD.LBL_STATUS}</td>
|
|
<td valign="top" class="dataField"><select name="status">{STATUS}</select></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dataLabel" valign="top">{DMSEL}</td>
|
|
<td class="dataField">{MSEL} </td>
|
|
<td valign="top" class="dataLabel"> </td>
|
|
<td valign="top" class="dataField"> </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</p>
|
|
<div style="padding-top: 2px">
|
|
<input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save';return check_form('EditView');" type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " >
|
|
<input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'" type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} ">
|
|
</div></div>
|
|
</form>
|
|
<script language="javascript">
|
|
|
|
//create Contact
|
|
var contactFL;
|
|
contactFL = new FormLoader();
|
|
contactFL.load('EcmDocs','Contacts','contactFL');
|
|
contactFL.onResponseData = function(data) {
|
|
//hideSmartInputFloater(true);
|
|
document.forms.EditView.contact_id.value = data['id'];
|
|
document.forms.EditView.contact_name.value = data['name'];
|
|
};
|
|
contactFL.setEditDblClick(document.forms.EditView.contact_name);
|
|
contactFL.onEditDblClick = function() {
|
|
var ret = "&fl_record="+document.forms.EditView.contact_id.value;
|
|
var ccc = document.forms.EditView.contact_name.value;
|
|
var cc_pos = ccc.indexOf(" ");
|
|
if(cc_pos != -1) {
|
|
var cc_ = '&fl_first_name='+ccc.substr(0,cc_pos)+'&fl_last_name='+ccc.substr(cc_pos+1,ccc.length);
|
|
ret += cc_;
|
|
}
|
|
return ret;
|
|
}
|
|
contactFL.onButtonClick = function() {
|
|
var ret = "&fl_record="+document.forms.EditView.contact_id.value;
|
|
var ccc = document.forms.EditView.contact_name.value;
|
|
var cc_pos = ccc.indexOf(" ");
|
|
if(cc_pos != -1) {
|
|
var cc_ = '&fl_first_name='+ccc.substr(0,cc_pos)+'&fl_last_name='+ccc.substr(cc_pos+1,ccc.length);
|
|
ret += cc_;
|
|
}
|
|
return ret;
|
|
}
|
|
document.forms.EditView.contact_create_button.FL = contactFL;
|
|
document.forms.EditView.contact_create_button.onclick = function() {
|
|
if(this.FL.createModule == '') return;
|
|
if(this.FL.onButtonClick) var data = this.FL.onButtonClick();
|
|
window.open("index.php?module="+this.FL.module+"&action=formloader&to_pdf=1&loaderAction=ViewForm&loaderFieldName="+this.FL.fieldName+"&createModule="+this.FL.createModule+(data?data:''),"Create10"+this.FL.module,"resizable=yes,scrollbars=no,status=no,height=540,width=700").focus();
|
|
}
|
|
|
|
|
|
//create Account
|
|
var accountFL;
|
|
accountFL = new FormLoader();
|
|
accountFL.load('EcmDocs','Accounts','accountFL');
|
|
accountFL.onResponseData = function(data) {
|
|
//hideSmartInputFloater(true);
|
|
document.forms.EditView.account_id.value = data['id'];
|
|
document.forms.EditView.account_name.value = data['name'];
|
|
};
|
|
accountFL.setEditDblClick(document.forms.EditView.account_name);
|
|
accountFL.onEditDblClick = function() {
|
|
var ret = "&fl_record="+document.forms.EditView.account_id.value+"&fl_name="+document.forms.EditView.account_name.value;
|
|
return ret;
|
|
}
|
|
accountFL.onButtonClick = function() {
|
|
var ret = "&fl_name="+document.forms.EditView.account_name.value;
|
|
return ret;
|
|
}
|
|
document.forms.EditView.account_create_button.FL = accountFL;
|
|
document.forms.EditView.account_create_button.onclick = function() {
|
|
if(this.FL.createModule == '') return;
|
|
if(this.FL.onButtonClick) var data = this.FL.onButtonClick();
|
|
window.open("index.php?module="+this.FL.module+"&action=formloader&to_pdf=1&loaderAction=ViewForm&loaderFieldName="+this.FL.fieldName+"&createModule="+this.FL.createModule+(data?data:''),"Create10"+this.FL.module,"resizable=yes,scrollbars=no,status=no,height=540,width=700").focus();
|
|
}
|
|
|
|
|
|
set_return = function(popup_reply_data, filter) {
|
|
var form_name = popup_reply_data.form_name;
|
|
var name_to_value_array = popup_reply_data.name_to_value_array;
|
|
for (var the_key in name_to_value_array) {
|
|
if (the_key == "toJSON") {
|
|
} else if (the_key) {
|
|
var displayValue = name_to_value_array[the_key].replace(/&/gi, "&").replace(/</gi, "<").replace(/>/gi, ">").replace(/'/gi, "'").replace(/"/gi, "\"");
|
|
document.getElementById(the_key).value = displayValue;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
</script>
|
|
{JAVASCRIPT}
|
|
<script type="text/javascript" language="JavaScript">
|
|
if(!set_return) var set_return = null;
|
|
set_return = function(popup_reply_data, filter) {
|
|
var form_name = popup_reply_data.form_name;
|
|
var name_to_value_array = popup_reply_data.name_to_value_array;
|
|
for (var the_key in name_to_value_array) {
|
|
if (the_key == "toJSON") {
|
|
} else if (the_key) {
|
|
var displayValue = name_to_value_array[the_key].replace(/&/gi, "&").replace(/</gi, "<").replace(/>/gi, ">").replace(/'/gi, "'").replace(/"/gi, "\"");
|
|
document.getElementById(the_key).value = displayValue;
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<!-- END: main -->
|