This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

View File

@@ -0,0 +1,227 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('include/SugarObjects/templates/person/Person.php');
// EcmEmployee is used to store customer information.
class EcmEmployee extends Person {
// Stored fields
var $name = '';
var $id;
var $is_admin;
var $first_name;
var $last_name;
var $full_name;
var $user_name;
var $title;
var $description;
var $department;
var $reports_to_id;
var $reports_to_name;
var $phone_home;
var $phone_mobile;
var $phone_work;
var $phone_other;
var $phone_fax;
var $email1;
var $email2;
var $address_street;
var $address_city;
var $address_state;
var $address_postalcode;
var $address_country;
var $date_entered;
var $date_modified;
var $modified_user_id;
var $created_by;
var $created_by_name;
var $modified_by_name;
var $status;
var $messenger_id;
var $messenger_type;
var $ecmemployee_status;
var $error_string;
var $module_dir = "EcmEmployees";
var $table_name = "proces";
var $object_name = "EcmEmployee";
var $user_preferences;
var $encodeFields = Array("first_name", "last_name", "description");
// This is used to retrieve related fields from form posts.
var $additional_column_fields = Array('reports_to_name');
var $new_schema = true;
function EcmEmployee() {
parent::Person();
//$this->setupCustomFields('EcmEmployees');
$this->emailAddress = new SugarEmailAddress();
}
function get_summary_text() {
$this->_create_proper_name_field();
return $this->name;
}
function fill_in_additional_list_fields() {
$this->fill_in_additional_detail_fields();
}
function fill_in_additional_detail_fields()
{
global $locale;
$query = "SELECT u1.first_name, u1.last_name from users u1, proces u2 where u1.id = u2.reports_to_id AND u2.id = '$this->id' and u1.deleted=0";
$result =$this->db->query($query, true, "Error filling in additional detail fields") ;
$row = $this->db->fetchByAssoc($result);
$GLOBALS['log']->debug("additional detail query results: $row");
if($row != null)
{
$this->reports_to_name = stripslashes($locale->getLocaleFormattedName($row['first_name'], $row['last_name']));
}
else
{
$this->reports_to_name = '';
}
}
function retrieve_ecmemployee_id($ecmemployee_name)
{
$query = "SELECT id from proces where user_name='$user_name' AND deleted=0";
$result = $this->db->query($query, false,"Error retrieving ecmemployee ID: ");
$row = $this->db->fetchByAssoc($result);
return $row['id'];
}
/**
* @return -- returns a list of all ecmemployees in the system.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc..
* All Rights Reserved..
* Contributor(s): ______________________________________..
*/
function verify_data()
{
//none of the checks from the users module are valid here since the user_name and
//is_admin_on fields are not editable.
return TRUE;
}
function get_list_view_data(){
global $current_user;
$this->_create_proper_name_field(); // create proper NAME (by combining first + last)
$user_fields = $this->get_list_view_array();
// Copy over the reports_to_name
if ( isset($GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type]) )
$user_fields['MESSENGER_TYPE'] = $GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type];
if ( isset($GLOBALS['app_list_strings']['ecmemployee_status_dom'][$this->ecmemployee_status]) )
$user_fields['EMPLOYEE_STATUS'] = $GLOBALS['app_list_strings']['ecmemployee_status_dom'][$this->ecmemployee_status];
$user_fields['REPORTS_TO_NAME'] = $this->reports_to_name;
//$user_fields['NAME'] = empty($this->name) ? '' : $this->name;
$user_fields['NAME'] = $this->last_name.' '.$this->first_name;
$user_fields['EMAIL1'] = $this->emailAddress->getPrimaryAddress($this,$this->id,'Users');
$this->email1 = $user_fields['EMAIL1'];
$user_fields['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView');
return $user_fields;
}
function list_view_parse_additional_sections(&$list_form, $xTemplateSection){
return $list_form;
}
function create_export_query($order_by, $where) {
include('modules/EcmEmployees/field_arrays.php');
$cols = '';
foreach($fields_array['EcmEmployee']['export_fields'] as $field) {
$cols .= (empty($cols)) ? '' : ', ';
$cols .= $field;
}
$query = "SELECT {$cols} FROM users ";
$where_auto = " users.deleted = 0";
if($where != "")
$query .= " WHERE $where AND " . $where_auto;
else
$query .= " WHERE " . $where_auto;
if($order_by != "")
$query .= " ORDER BY $order_by";
else
$query .= " ORDER BY users.user_name";
return $query;
}
/**
* Generate the name field from the first_name and last_name fields.
*/
function _create_proper_name_field() {
global $locale;
$full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name);
$this->name = $full_name;
$this->full_name = $full_name;
}
function preprocess_fields_on_save(){
parent::preprocess_fields_on_save();
}
}
?>

View File

@@ -0,0 +1,88 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
/**
* EcmEmployeeStatus.php
* This is a helper file used by the meta-data framework
* @see modules/Users/vardefs.php (ecmemployee_status)
* @author Collin Lee
*/
function getEcmEmployeeStatusOptions($focus, $name = 'ecmemployee_status', $value, $view = 'DetailView') {
global $current_user, $app_list_strings;
if($view == 'EditView' || $view == 'MassUpdate') {
if (is_admin($current_user)) {
$ecmemployee_status = "<select name='$name'";
if(!empty($sugar_config['default_user_name'])
&& $sugar_config['default_user_name'] == $focus->user_name
&& isset($sugar_config['lock_default_user_name'])
&& $sugar_config['lock_default_user_name'])
{
$ecmemployee_status .= " disabled ";
}
$ecmemployee_status .= ">";
$ecmemployee_status .= get_select_options_with_id($app_list_strings['ecmemployee_status_dom'], $focus->ecmemployee_status);
$ecmemployee_status .= "</select>\n";
} else {
$ecmemployee_status = '';
}
return $ecmemployee_status;
} //if($view == 'EditView')
if ( isset($app_list_strings['ecmemployee_status_dom'][$focus->ecmemployee_status]) )
return $app_list_strings['ecmemployee_status_dom'][$focus->ecmemployee_status];
return $focus->ecmemployee_status;
}
function getMessengerTypeOptions($focus, $name = 'messenger_type', $value, $view = 'DetailView') {
global $current_user, $app_list_strings;
if($view == 'EditView' || $view == 'MassUpdate') {
$messenger_type = "<select name=\"$name\">";
$messenger_type .= get_select_options_with_id($app_list_strings['messenger_type_dom'], $focus->messenger_type);
$messenger_type .= '</select>';
return $messenger_type;
}
return $app_list_strings['messenger_type_dom'][$focus->messenger_type];
}
?>

View File

@@ -0,0 +1,51 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
global $app_strings;
?>
<br><br>
<span class='error'><?php if (isset($_REQUEST['error_string'])) echo $_REQUEST['error_string']; ?>
<br><br>
<?php echo $app_strings['NTC_CLICK_BACK']; ?>
</span>

View File

@@ -0,0 +1,152 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: Contains a variety of utility functions used to display UI
* components such as form headers and footers. Intended to be modified on a per
* theme basis.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
/**
* Create javascript to validate the data entered into a record.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
*/
function get_validate_record_js () {
global $mod_strings;
global $app_strings;
$lbl_last_name = $mod_strings['LBL_LIST_LAST_NAME'];
$lbl_ecmemployee_name = $mod_strings['LBL_LIST_EMPLOYEE_NAME'];
$err_missing_required_fields = $app_strings['ERR_MISSING_REQUIRED_FIELDS'];
$err_invalid_email_address = $app_strings['ERR_INVALID_EMAIL_ADDRESS'];
$err_self_reporting = $app_strings['ERR_SELF_REPORTING'];
$sqs_no_match = $app_strings['ERR_SQS_NO_MATCH'] . ' : ' . $mod_strings['LBL_LIST_REPORTS_TO_NAME'];
$the_script = <<<EOQ
<script type="text/javascript" language="Javascript">
<!-- to hide script contents from old browsers
function trim(s) {
while (s.substring(0,1) == " ") {
s = s.substring(1, s.length);
}
while (s.substring(s.length-1, s.length) == ' ') {
s = s.substring(0,s.length-1);
}
return s;
}
function verify_data(form) {
var isError = false;
var errorMessage = "";
if (trim(form.last_name.value) == "") {
isError = true;
errorMessage += "\\n$lbl_last_name";
}
if (isError == true) {
alert("$err_missing_required_fields" + errorMessage);
return false;
}
if (trim(form.email1.value) != "" && !/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(form.email1.value)) {
alert('"' + form.email1.value + '" $err_invalid_email_address');
return false;
}
if (trim(form.email2.value) != "" && !/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(form.email2.value)) {
alert('"' + form.email2.value + '" $err_invalid_email_address');
return false;
}
if ((trim(form.reports_to_name.value) == "" && trim(form.reports_to_id.value) != "") ||
(trim(form.reports_to_name.value) != "" && trim(form.reports_to_id.value) == "")) {
alert('$sqs_no_match');
return false;
}
if (document.EditView.return_id.value != '' && document.EditView.return_id.value == form.reports_to_id.value) {
alert('$err_self_reporting');
return false;
}
return true;
}
// end hiding contents from old browsers -->
</script>
EOQ;
return $the_script;
}
function get_chooser_js()
{
$the_script = <<<EOQ
<script type="text/javascript" language="Javascript">
<!-- to hide script contents from old browsers
function set_chooser()
{
var display_tabs_def = '';
for(i=0; i < object_refs['display_tabs'].options.length ;i++)
{
display_tabs_def += "display_tabs[]="+object_refs['display_tabs'].options[i].value+"&";
}
document.EditView.display_tabs_def.value = display_tabs_def;
}
// end hiding contents from old browsers -->
</script>
EOQ;
return $the_script;
}
?>

View File

@@ -0,0 +1,60 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: TODO To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
global $mod_strings;
global $current_user;
$module_menu=Array();
if( empty($_REQUEST['record']) ) { $ecmemployee_id = ''; }
else { $ecmemployee_id = $_REQUEST['record']; }
if( is_admin($current_user) )
{
$module_menu[] = Array("index.php?module=EcmEmployees&action=EditView&return_module=EcmEmployees&return_action=DetailView", $mod_strings['LNK_NEW_EMPLOYEE'],"CreateEcmEmployees");
}
$module_menu[] = Array("index.php?module=EcmEmployees&action=index&return_module=EcmEmployees&return_action=DetailView", $mod_strings['LNK_EMPLOYEE_LIST'],"EcmEmployees");
?>

View File

@@ -0,0 +1,112 @@
<!--
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
-->
<!-- 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>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="edit view">
<tr>
<td>
<form action="index.php" method="post" name="popup_query_form" id="popup_query_form">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td scope="row" nowrap="nowrap">{MOD.LBL_FIRST_NAME}</td>
<td ><input type="text" size="10" tabindex='1' name="first_name" value="{FIRST_NAME}" /></td>
<td scope="row" valign=top nowrap="nowrap">{MOD.LBL_USER_NAME}</td>
<td ><input type="text" size="10" tabindex='2' name="user_name" value="{USER_NAME}" /></td>
<td rowspan='2' valign="top" align="right">
<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="func_name" value="" />
<input type="hidden" name="request_data" value="{request_data}" />
<input type="hidden" name="populate_parent" value="false" />
<input type="hidden" name="record_id" value="" />
<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}" />
</td>
</tr>
<tr>
<td scope="row" nowrap="nowrap">{MOD.LBL_LAST_NAME}</td>
<td ><input type="text" size="10" tabindex='1' name="last_name" value="{LAST_NAME}" /></td>
<td scope="row" nowrap="nowrap">&nbsp;</td>
<td >&nbsp;</td>
<td >&nbsp;</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<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());
}
-->
</script>
<!-- END: SearchHeader -->
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view">
<!-- BEGIN: list_nav_row -->
{PAGINATION}
<!-- END: list_nav_row -->
<tr height="20" >
<td scope="col" width="50%" nowrap="nowrap"><a href="{ORDER_BY}last_name" class="listViewThLinkS1">{MOD.LBL_LIST_NAME}{arrow_start}{first_name_arrow}{arrow_end}</a></td>
<td scope="col" width="50%" nowrap="nowrap"><a href="{ORDER_BY}user_name" class="listViewThLinkS1" >{MOD.LBL_LIST_USER_NAME}{arrow_start}{user_name_arrow}{arrow_end}</a></td>
</tr>
<!-- BEGIN: row -->
<tr height="20" class="{ROW_COLOR}S1">
<td scope='row' valign="top" ><a href="#" onclick="send_back('EcmEmployees','{EMPLOYEE.ID}');" >{EMPLOYEE.FIRST_NAME} {EMPLOYEE.LAST_NAME}</a></td>
<td valign="top">{EMPLOYEE.USER_NAME}</td>
</tr>
<!-- END: row -->
{PAGINATION}
</table>
{ASSOCIATED_JAVASCRIPT_DATA}
<!-- END: main -->

View File

@@ -0,0 +1,162 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
global $theme;
class Popup_Picker
{
/*
*
*/
function Popup_Picker()
{
;
}
/*
*
*/
function _get_where_clause()
{
$where = '';
if(isset($_REQUEST['query']))
{
$where_clauses = array();
append_where_clause($where_clauses, "first_name", "users.first_name");
append_where_clause($where_clauses, "last_name", "users.last_name");
append_where_clause($where_clauses, "user_name", "users.user_name");
$where = generate_where_statement($where_clauses);
}
return $where;
}
/**
*
*/
function process_page()
{
global $theme;
global $mod_strings;
global $app_strings;
global $currentModule;
global $sugar_version, $sugar_config;
$output_html = '';
$where = '';
$where = $this->_get_where_clause();
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
$user_name = empty($_REQUEST['user_name']) ? '' : $_REQUEST['user_name'];
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
if(!$hide_clear_button)
{
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
}
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
$button .= "</form>\n";
$form = new XTemplate('modules/EcmEmployees/Popup_picker.html');
$form->assign('MOD', $mod_strings);
$form->assign('APP', $app_strings);
$form->assign('THEME', $theme);
$form->assign('MODULE_NAME', $currentModule);
$form->assign('FIRST_NAME', $first_name);
$form->assign('LAST_NAME', $last_name);
$form->assign('USER_NAME', $user_name);
$form->assign('request_data', $request_data);
ob_start();
insert_popup_header($theme);
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
$form->parse('main.SearchHeader');
$output_html .= $form->text('main.SearchHeader');
// Reset the sections that are already in the page so that they do not print again later.
$form->reset('main.SearchHeader');
// create the listview
$seed_bean = new EcmEmployee();
$ListView = new ListView();
$ListView->show_export_button = false;
$ListView->process_for_popups = true;
$ListView->setXTemplate($form);
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
$ListView->setHeaderText($button);
$ListView->setQuery($where, '', 'user_name', 'EMPLOYEE');
$ListView->setModStrings($mod_strings);
ob_start();
$ListView->processListView($seed_bean, 'main', 'EMPLOYEE');
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= insert_popup_footer();
return $output_html;
}
} // end of class Popup_Picker
?>

View File

@@ -0,0 +1,91 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('modules/MySettings/TabController.php');
$tabs_def = urldecode(isset($_REQUEST['display_tabs_def']) ? $_REQUEST['display_tabs_def'] : '');
$DISPLAY_ARR = array();
parse_str($tabs_def,$DISPLAY_ARR);
$focus = new EcmEmployee();
$focus->retrieve($_POST['record']);
//rrs bug: 30035 - I am not sure how this ever worked b/c old_reports_to_id was not populated.
$old_reports_to_id = $focus->reports_to_id;
populateFromRow($focus,$_POST);
$focus->save();
$return_id = $focus->id;
if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module'];
else $return_module = "EcmEmployees";
if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action'];
else $return_action = "DetailView";
if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id'];
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
header("Location: index.php?action=$return_action&module=$return_module&record=$return_id");
function populateFromRow(&$focus,$row){
//only ecmemployee specific field values need to be copied.
$e_fields=array('ecmemployee_status', 'first_name','last_name','reports_to_id','description','phone_home','phone_mobile','phone_work','phone_other','phone_fax','address_street','address_city','address_state','address_country','address_country', 'address_postalcode', 'messenger_id','messenger_type');
if ( is_admin($GLOBALS['current_user']) )
$e_fields = array_merge($e_fields,array('title','department'));
$nullvalue='';
foreach($e_fields as $field)
{
$rfield = $field; // fetch returns it in lowercase only
if(isset($row[$rfield]))
{
$focus->$field = $row[$rfield];
}
else
{
$focus->$field = $nullvalue;
}
}
}
?>

View File

@@ -0,0 +1,136 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
global $mod_strings;
$focus = new User();
// Add in defensive code here.
$focus->user_name = $_REQUEST['user_name'];
$user_password = $_REQUEST['user_password'];
$focus->load_user($user_password);
if($focus->is_authenticated())
{
// save the user information into the session
// go to the home screen
if (!empty($_POST['login_record'])) {
$login_direction = "module={$_POST['login_module']}&action={$_POST['login_action']}&record={$_POST['login_record']}";
}
else {
$login_direction = "action=index&module=Home";
}
header("Location: index.php?{$login_direction}");
unset($_SESSION['login_password']);
unset($_SESSION['login_error']);
unset($_SESSION['login_user_name']);
$_SESSION['authenticated_user_id'] = $focus->id;
// store the user's theme in the session
if (isset($_REQUEST['login_theme'])) {
$authenticated_user_theme = $_REQUEST['login_theme'];
}
elseif (isset($_REQUEST['ck_login_theme_20'])) {
$authenticated_user_theme = $_REQUEST['ck_login_theme_20'];
}
else {
$authenticated_user_theme = $sugar_config['default_theme'];
}
// store the user's language in the session
if (isset($_REQUEST['login_language'])) {
$authenticated_user_language = $_REQUEST['login_language'];
}
elseif (isset($_REQUEST['ck_login_language_20'])) {
$authenticated_user_language = $_REQUEST['ck_login_language_20'];
}
else {
$authenticated_user_language = $sugar_config['default_language'];
}
// If this is the default user and the default user theme is set to reset, reset it to the default theme value on each login
if($reset_theme_on_default_user && $focus->user_name == $sugar_config['default_user_name'])
{
$authenticated_user_theme = $sugar_config['default_theme'];
}
if(isset($reset_language_on_default_user) && $reset_language_on_default_user && $focus->user_name == $sugar_config['default_user_name'])
{
$authenticated_user_language = $sugar_config['default_language'];
}
$_SESSION['authenticated_user_theme'] = $authenticated_user_theme;
$_SESSION['authenticated_user_language'] = $authenticated_user_language;
$GLOBALS['log']->debug("authenticated_user_theme is $authenticated_user_theme");
$GLOBALS['log']->debug("authenticated_user_language is $authenticated_user_language");
// Clear all uploaded import files for this user if it exists
$tmp_file_name = $sugar_config['import_dir']. "IMPORT_".$focus->id;
if (file_exists($tmp_file_name))
{
unlink($tmp_file_name);
}
}
else
{
$_SESSION['login_user_name'] = $focus->user_name;
$_SESSION['login_password'] = $user_password;
$_SESSION['login_error'] = $mod_strings['ERR_INVALID_PASSWORD'];
// go back to the login screen.
// create an error message for the user.
header("Location: index.php");
}
?>

View File

@@ -0,0 +1,55 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: TODO To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
global $mod_strings;
global $current_user;
$module_menu=Array();
if(is_admin($current_user))
{
$module_menu = Array(
);
}
?>

View File

@@ -0,0 +1,50 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
class EcmEmployeesController extends SugarController{
function EcmEmployeesController(){
parent::SugarController();
}
function action_editview(){
if(is_admin($GLOBALS['current_user']) || $_REQUEST['record'] == $GLOBALS['current_user']->id)
$this->view = 'edit';
else
sugar_die("Unauthorized access to ecmemployees.");
return true;
}
}
?>

View File

@@ -0,0 +1,49 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: Contains field arrays that are used for caching
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
if(empty($fields_array['User'])){
include('modules/Users/field_arrays.php');
}
$fields_array['EcmEmployee']=$fields_array['User'];
?>

View File

@@ -0,0 +1,132 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: Defines the English language pack for the base application.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = array (
'LBL_MODULE_NAME' => 'EcmEmployees',
'LBL_MODULE_TITLE' => 'EcmEmployees: Home',
'LBL_SEARCH_FORM_TITLE' => 'EcmEmployee Search',
'LBL_LIST_FORM_TITLE' => 'EcmEmployees',
'LBL_NEW_FORM_TITLE' => 'New EcmEmployee',
'LBL_EMPLOYEE' => 'EcmEmployees:',
'LBL_LOGIN' => 'Login',
'LBL_RESET_PREFERENCES' => 'Reset To Default Preferences',
'LBL_TIME_FORMAT' => 'Time Format:',
'LBL_DATE_FORMAT' => 'Date Format:',
'LBL_TIMEZONE' => 'Current Time:',
'LBL_CURRENCY' => 'Currency:',
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_LAST_NAME' => 'Last Name',
'LBL_LIST_EMPLOYEE_NAME' => 'EcmEmployee Name',
'LBL_LIST_DEPARTMENT' => 'Department',
'LBL_LIST_REPORTS_TO_NAME' => 'Reports To',
'LBL_LIST_EMAIL' => 'Email',
'LBL_LIST_PRIMARY_PHONE' => 'Primary Phone',
'LBL_LIST_USER_NAME' => 'User Name',
'LBL_LIST_ADMIN' => 'Admin',
'LBL_NEW_EMPLOYEE_BUTTON_TITLE' => 'New EcmEmployee [Alt+N]',
'LBL_NEW_EMPLOYEE_BUTTON_LABEL' => 'New EcmEmployee',
'LBL_NEW_EMPLOYEE_BUTTON_KEY' => 'N',
'LBL_ERROR' => 'Error:',
'LBL_PASSWORD' => 'Password:',
'LBL_EMPLOYEE_NAME' => 'EcmEmployee Name:',
'LBL_USER_NAME' => 'User Name:',
'LBL_FIRST_NAME' => 'First Name:',
'LBL_LAST_NAME' => 'Last Name:',
'LBL_EMPLOYEE_SETTINGS' => 'EcmEmployee Settings',
'LBL_THEME' => 'Theme:',
'LBL_LANGUAGE' => 'Language:',
'LBL_ADMIN' => 'Administrator:',
'LBL_EMPLOYEE_INFORMATION' => 'EcmEmployee Information',
'LBL_OFFICE_PHONE' => 'Office Phone:',
'LBL_REPORTS_TO' => 'Reports to Id:',
'LBL_REPORTS_TO_NAME' => 'Reports to',
'LBL_OTHER_PHONE' => 'Other:',
'LBL_OTHER_EMAIL' => 'Other Email:',
'LBL_NOTES' => 'Notes:',
'LBL_DEPARTMENT' => 'Department:',
'LBL_TITLE' => 'Title:',
'LBL_ANY_ADDRESS' => 'Any Address:',
'LBL_ANY_PHONE' => 'Any Phone:',
'LBL_ANY_EMAIL' => 'Any Email:',
'LBL_ADDRESS' => 'Address:',
'LBL_CITY' => 'City:',
'LBL_STATE' => 'State:',
'LBL_POSTAL_CODE' => 'Postal Code:',
'LBL_COUNTRY' => 'Country:',
'LBL_NAME' => 'Name:',
'LBL_MOBILE_PHONE' => 'Mobile:',
'LBL_OTHER' => 'Other:',
'LBL_FAX' => 'Fax:',
'LBL_EMAIL' => 'Email Address:',
'LBL_HOME_PHONE' => 'Home Phone:',
'LBL_WORK_PHONE' => 'Work Phone:',
'LBL_ADDRESS_INFORMATION' => 'Address Information',
'LBL_EMPLOYEE_STATUS' => 'EcmEmployee Status:',
'LBL_PRIMARY_ADDRESS' => 'Primary Address:',
'LBL_SAVED_SEARCH' => 'Layout Options',
'LBL_CREATE_USER_BUTTON_TITLE' => 'Create User [Alt+N]',
'LBL_CREATE_USER_BUTTON_LABEL' => 'Create User',
'LBL_CREATE_USER_BUTTON_KEY' => 'N',
'LBL_FAVORITE_COLOR' => 'Favorite Color:',
'LBL_MESSENGER_ID' => 'IM Name:',
'LBL_MESSENGER_TYPE' => 'IM Type:',
'ERR_EMPLOYEE_NAME_EXISTS_1' => 'The ecmemployee name ',
'ERR_EMPLOYEE_NAME_EXISTS_2' => ' already exists. Duplicate ecmemployee names are not allowed. Change the ecmemployee name to be unique.',
'ERR_LAST_ADMIN_1' => 'The ecmemployee name "',
'ERR_LAST_ADMIN_2' => '" is the last ecmemployee with administrator access. At least one ecmemployee must be an administrator.',
'LNK_NEW_EMPLOYEE' => 'Create EcmEmployee',
'LNK_EMPLOYEE_LIST' => 'View EcmEmployees',
'ERR_DELETE_RECORD' => 'You must specify a record number to delete the account.',
'LBL_LIST_EMPLOYEE_STATUS' => 'EcmEmployee Status',
'LBL_SUGAR_LOGIN' => 'Is Sugar User',
'LBL_RECEIVE_NOTIFICATIONS' => 'Notify on Assignment',
'LBL_IS_ADMIN' => 'Is Administrator',
'LBL_GROUP' => 'Group User',
'LBL_PORTAL_ONLY' => 'Portal Only User',
'LBL_PHOTO' => 'Photo',
);
?>

View File

@@ -0,0 +1,130 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* 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-2005 SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1 ->>
* Translator: Krzysztof Morawski
* All Rights Reserved.
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = array (
'LBL_MODULE_NAME' => 'Pracownicy',
'LBL_MODULE_TITLE' => 'Pracownicy: Strona główna',
'LBL_SEARCH_FORM_TITLE' => 'Szukaj pracownika',
'LBL_LIST_FORM_TITLE' => 'Pracownicy',
'LBL_NEW_FORM_TITLE' => 'Nowy pracownik',
'LBL_EMPLOYEE' => 'Pracownicy:',
'LBL_LOGIN' => 'Login',
'LBL_RESET_PREFERENCES' => 'Zastosuj domyślne ustawienia',
'LBL_TIME_FORMAT' => 'Format czasu:',
'LBL_DATE_FORMAT' => 'Format daty:',
'LBL_TIMEZONE' => 'Czas bieżący:',
'LBL_CURRENCY' => 'Waluta:',
'LBL_LIST_NAME' => 'Nazwa',
'LBL_LIST_LAST_NAME' => 'Imię',
'LBL_LIST_EMPLOYEE_NAME' => 'Stanowisko',
'LBL_LIST_DEPARTMENT' => 'Departament',
'LBL_LIST_REPORTS_TO_NAME' => 'Raportuje do',
'LBL_LIST_EMAIL' => 'Email',
'LBL_LIST_PRIMARY_PHONE' => 'Telefon',
'LBL_LIST_USER_NAME' => 'Nazwa użytkownika',
'LBL_LIST_ADMIN' => 'Admin',
'LBL_NEW_EMPLOYEE_BUTTON_TITLE' => 'Nowy pracownik [Alt+N]',
'LBL_NEW_EMPLOYEE_BUTTON_LABEL' => 'Nowy pracownik',
'LBL_NEW_EMPLOYEE_BUTTON_KEY' => 'N',
'LBL_ERROR' => 'Błąd:',
'LBL_PASSWORD' => 'Hasło:',
'LBL_EMPLOYEE_NAME' => 'Stanowisko:',
'LBL_USER_NAME' => 'Nazwa użytkownika:',
'LBL_FIRST_NAME' => 'Imię:',
'LBL_LAST_NAME' => 'Nazwisko:',
'LBL_EMPLOYEE_SETTINGS' => 'Ustawienia pracownika',
'LBL_THEME' => 'Temat:',
'LBL_LANGUAGE' => 'Język:',
'LBL_ADMIN' => 'Administrator:',
'LBL_EMPLOYEE_INFORMATION' => 'Informacje o pracowniku',
'LBL_OFFICE_PHONE' => 'Telefon do biura:',
'LBL_REPORTS_TO' => 'Raportuje do ID:',
'LBL_REPORTS_TO_NAME' => 'Raportuje do:',
'LBL_OTHER_PHONE' => 'Inne:',
'LBL_OTHER_EMAIL' => 'Dodatkowy mail:',
'LBL_NOTES' => 'Notatki:',
'LBL_DEPARTMENT' => 'Departament:',
'LBL_TITLE' => 'Tytuł:',
'LBL_ANY_PHONE' => 'Telefon:',
'LBL_ANY_EMAIL' => 'Mail:',
'LBL_ADDRESS' => 'Adres:',
'LBL_CITY' => 'Miasto:',
'LBL_STATE' => 'Woj.:',
'LBL_POSTAL_CODE' => 'Kod pocztowy:',
'LBL_COUNTRY' => 'Kraj:',
'LBL_NAME' => 'Nazwa:',
'LBL_MOBILE_PHONE' => 'Mobile:',
'LBL_OTHER' => 'Inny:',
'LBL_FAX' => 'Fax:',
'LBL_EMAIL' => 'Email:',
'LBL_HOME_PHONE' => 'Telefon domowy:',
'LBL_WORK_PHONE' => 'Telefon do pracy:',
'LBL_ADDRESS_INFORMATION' => 'Adres korespondencyjny',
'LBL_EMPLOYEE_STATUS' => 'Status zatrudnienia:',
'LBL_PRIMARY_ADDRESS' => 'Podstawowy adres:',
'LBL_SAVED_SEARCH' => 'Opcje szablonu',
'LBL_CREATE_USER_BUTTON_TITLE' => 'Utwórz użytkownika [Alt+N]',
'LBL_CREATE_USER_BUTTON_LABEL' => 'Utwórz użytkownika',
'LBL_CREATE_USER_BUTTON_KEY' => 'N',
'LBL_FAVORITE_COLOR' => 'Ulubiony kolor:',
'LBL_MESSENGER_ID' => 'Identyfikator IM:',
'LBL_MESSENGER_TYPE' => 'Typ IM:',
'ERR_EMPLOYEE_NAME_EXISTS_1' => 'Wybrana nazwa pracownika ',
'ERR_EMPLOYEE_NAME_EXISTS_2' => ' już istnieje. Nie można duplikować nazw pracowników. proszę wybrać inną nazwę. Wybierz unikalną nazwę dla pracownika',
'ERR_LAST_ADMIN_1' => 'Wybrany pracownik',
'ERR_LAST_ADMIN_2' => '" jest ostatnim z prawami administratora. Co najmniej jeden pracownik musi posiadać prawa administratora.',
'LNK_NEW_EMPLOYEE' => 'Utwórz pracownika',
'LNK_EMPLOYEE_LIST' => 'Pracownicy',
'ERR_DELETE_RECORD' => 'Musisz podać numer rekordu, aby usunąć konto.',
'LBL_DEFAULT_TEAM' => 'Domyślny zespół:',
'LBL_DEFAULT_TEAM_TEXT' => 'Wybiera domyślny zespół dla nowych rekordów',
'LBL_MY_TEAMS' => 'Moje zespoły',
'LBL_LIST_DESCRIPTION' => 'Opis',
'LNK_EDIT_TABS'=>'Edytuj zakładki',
'NTC_REMOVE_TEAM_MEMBER_CONFIRMATION' => 'Czy na pewno chcesz usunąć członkostwo tego pracownika?',
'LBL_LIST_EMPLOYEE_STATUS' => 'Status zatrudnienia',
// Poniższych zakładek nie ma:
'LBL_SUGAR_LOGIN' => 'Pozwolić na logowanie?',
'LBL_RECEIVE_NOTIFICATIONS' => 'Wysyłanie powiadomień',
'LBL_IS_ADMIN' => 'Prawa administratora',
'LBL_PORTAL_ONLY' => 'Użytkownik portalu',
'LBL_GROUP' => 'Użytkownik grupowy',
//add 26.09.2011
'LBL_ANY_ADDRESS' => 'Dowolny adres',
);
?>

View File

@@ -0,0 +1,68 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$searchFields['EcmEmployees'] =
array (
'first_name' => array( 'query_type'=>'default'),
'last_name'=> array('query_type'=>'default'),
'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name')),
'email'=> array(
'query_type' => 'default',
'operator' => 'subquery',
'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 and ea.email_address LIKE',
'db_field' => array(
'id',
)
),
'phone'=> array(
'query_type' => 'default',
'operator' => 'subquery',
'subquery' => array('SELECT id FROM users where phone_home LIKE ',
'SELECT id FROM users where phone_fax LIKE',
'SELECT id FROM users where phone_other LIKE',
'SELECT id FROM users where phone_work LIKE',
'SELECT id FROM users where phone_mobile LIKE',
'OR' =>true
),
'db_field' => array(
'id',
)
),
'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
'ecmemployee_status'=> array('query_type'=>'default', 'options' => 'ecmemployee_status_dom', 'template_var' => 'STATUS_OPTIONS', 'options_add_blank' => true)
);
?>

View File

@@ -0,0 +1,164 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$viewdefs['EcmEmployees']['DetailView'] = array(
'templateMeta' => array('form' => array('buttons'=>array(
array('customCode'=>'{if $DISPLAY_EDIT}<input title="{$APP.LBL_EDIT_BUTTON_TITLE}" accessKey="{$APP.LBL_EDIT_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'{$module}\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$id}\'; this.form.action.value=\'EditView\'" type="submit" name="Edit" id="edit_button" value="{$APP.LBL_EDIT_BUTTON_LABEL}">{/if}'),
array('customCode'=>'{if $DISPLAY_DUPLICATE}<input title="{$APP.LBL_DUPLICATE_BUTTON_TITLE}" accessKey="{$APP.LBL_DUPLICATE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'{$module}\' ; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$id}\'; this.form.isDuplicate.value=true; this.form.action.value=\'EditView\'" type="submit" name="Duplicate" value="{$APP.LBL_DUPLICATE_BUTTON_LABEL}" id="duplicate_button">{/if}'),
)
),
'maxColumns' => '2',
'widths' => array(
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30')
),
),
'panels' =>array (
array (
'ecmemployee_status',
),
array (
array (
'name' => 'first_name',
'customCode' => '{$fields.full_name.value}',
'label' => 'LBL_NAME',
),
),
array (
array (
'name' => 'title',
'label' => 'LBL_TITLE',
),
array (
'name' => 'phone_work',
'label' => 'LBL_OFFICE_PHONE',
),
),
array (
array (
'name' => 'department',
'label' => 'LBL_DEPARTMENT',
),
array (
'name' => 'phone_mobile',
'label' => 'LBL_MOBILE_PHONE',
),
),
array (
array (
'name' => 'reports_to_name',
'customCode' => '<a href="index.php?module=EcmEmployees&action=DetailView&record={$fields.reports_to_id.value}">{$fields.reports_to_name.value}</a>',
'label' => 'LBL_REPORTS_TO_NAME',
),
array (
'name' => 'phone_other',
'label' => 'LBL_OTHER',
),
),
array (
'',
array (
'name' => 'phone_fax',
'label' => 'LBL_FAX',
),
),
array (
'',
array (
'name' => 'phone_home',
'label' => 'LBL_HOME_PHONE',
),
),
array (
array (
'name' => 'messenger_type',
'label' => 'LBL_MESSENGER_TYPE',
),
),
array (
array (
'name' => 'messenger_id',
'label' => 'LBL_MESSENGER_ID',
),
),
array (
array (
'name' => 'address_country',
'customCode' => '{$fields.address_street.value}<br>{$fields.address_city.value} {$fields.address_state.value}&nbsp;&nbsp;{$fields.address_postalcode.value}<br>{$fields.address_country.value}',
'label' => 'LBL_ADDRESS',
),
),
array (
array (
'name' => 'description',
'label' => 'LBL_NOTES',
),
),
array(
array (
'name' => 'email1',
'label' => 'LBL_EMAIL',
),
),
)
);
?>

View File

@@ -0,0 +1,117 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$viewdefs['EcmEmployees']['EditView'] = array(
'templateMeta' => array('maxColumns' => '2',
'widths' => array(
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30')
),
),
'panels' =>array (
'default'=>array (
array (
'ecmemployee_status',
),
array (
'first_name',
array('name'=>'last_name', 'displayParams'=>array('required'=>true)),
),
array (
array(
'name'=>'title',
'customCode' => '{if $EDIT_REPORTS_TO}<input type="text" name="{$fields.title.name}" id="{$fields.title.name}" size="30" maxlength="50" value="{$fields.title.value}" title="" tabindex="t" >'.
'{else}{$fields.title.value}<input type="hidden" name="{$fields.title.name}" id="{$fields.title.name}" value="{$fields.title.value}">{/if}'),
array('name'=>'phone_work','label'=>'LBL_OFFICE_PHONE'),
),
array (
array(
'name'=>'department',
'customCode' => '{if $EDIT_REPORTS_TO}<input type="text" name="{$fields.department.name}" id="{$fields.department.name}" size="30" maxlength="50" value="{$fields.department.value}" title="" tabindex="t" >'.
'{else}{$fields.department.value}<input type="hidden" name="{$fields.department.name}" id="{$fields.department.name}" value="{$fields.department.value}">{/if}'),
'phone_mobile',
),
array (
array(
'name' => 'reports_to_name',
'label' => 'LBL_REPORTS_TO_NAME',
'customCode' => '{if $EDIT_REPORTS_TO}<input type="text" name="{$fields.reports_to_name.name}" class="sqsEnabled" tabindex="0" id="{$fields.reports_to_name.name}" size="" value="{$fields.reports_to_name.value}" title="" autocomplete="off" >{$REPORTS_TO_JS}'.
'<input type="hidden" name="{$fields.reports_to_id.name}" id="{$fields.reports_to_id.name}" value="{$fields.reports_to_id.value}">'.
' <span class="id-ff multiple"><button type="button" name="btn_{$fields.reports_to_name.name}" tabindex="0" title="{$APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" class="button firstChild" value="{$APP.LBL_SELECT_BUTTON_LABEL}" onclick=\'open_popup("{$fields.reports_to_name.module}", 600, 400, "", true, false, {literal}{"call_back_function":"set_return","form_name":"EditView","field_to_name_array":{"id":"reports_to_id","name":"reports_to_name"}}{/literal}, "single", true);\'><img src="'.SugarThemeRegistry::current()->getImageURL("id-ff-select.png").'"></button>'.
'<button type="button" name="btn_clr_{$fields.reports_to_name.name}" tabindex="0" title="{$APP.LBL_CLEAR_BUTTON_TITLE}" accessKey="{$APP.LBL_CLEAR_BUTTON_KEY}" class="button lastChild" onclick="this.form.{$fields.reports_to_name.name}.value = \'\'; this.form.{$fields.reports_to_id.name}.value = \'\';" value="{$APP.LBL_CLEAR_BUTTON_LABEL}"><img src="'.SugarThemeRegistry::current()->getImageURL("id-ff-clear.png").'"></button></span>'.
'{else}{$fields.reports_to_name.value}<input type="hidden" name="{$fields.reports_to_id.name}" id="{$fields.reports_to_id.name}" value="{$fields.reports_to_id.value}">{/if}',
),
'phone_other',
),
array (
'',
array('name'=>'phone_fax', 'label'=>'LBL_FAX'),
),
array (
'',
'phone_home',
),
array (
'messenger_type',
),
array (
'messenger_id',
),
array (
array('name'=>'description', 'label'=>'LBL_NOTES'),
),
array (
array('name'=>'address_street', 'type'=>'text', 'label'=>'LBL_PRIMARY_ADDRESS', 'displayParams'=>array('rows'=>2, 'cols'=>30)),
array('name'=>'address_city', 'label'=>'LBL_CITY'),
),
array (
array('name'=>'address_state', 'label'=>'LBL_STATE'),
array('name'=>'address_postalcode', 'label'=>'LBL_POSTAL_CODE'),
),
array (
array('name'=>'address_country', 'label'=>'LBL_COUNTRY'),
),
array(
array (
'name' => 'email1',
'label' => 'LBL_EMAIL',
),
),
),
),
);
?>

View File

@@ -0,0 +1,84 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$listViewDefs['EcmEmployees'] = array(
'NAME' => array(
'width' => '20',
'label' => 'LBL_LIST_NAME',
'link' => true,
'related_fields' => array('first_name', 'last_name'),
'orderBy' => 'last_name',
'sortable' => true,
'default' => true),
'DEPARTMENT' => array(
'width' => '10',
'label' => 'LBL_DEPARTMENT',
'link' => true,
'default' => true),
'TITLE' => array(
'width' => '20',
'label' => 'LBL_TITLE',
'link' => true,
'default' => true),
'REPORTS_TO_NAME' => array(
'width' => '20',
'label' => 'LBL_LIST_REPORTS_TO_NAME',
'link' => true,
'sortable' => false,
'default' => true),
'EMAIL1' => array(
'width' => '15',
'label' => 'LBL_LIST_EMAIL',
'link' => true,
'customCode' => '{$EMAIL1_LINK}{$EMAIL1}</a>',
'default' => true,
'sortable' => false),
'PHONE_WORK' => array(
'width' => '10',
'label' => 'LBL_LIST_PHONE',
'link' => true,
'default' => true),
'EMPLOYEE_STATUS' => array(
'width' => '10',
'label' => 'LBL_LIST_EMPLOYEE_STATUS',
'link' => false,
'default' => true),
);
?>

View File

@@ -0,0 +1,116 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*
* Created on May 29, 2007
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
$searchdefs['EcmEmployees'] = array(
'templateMeta' => array('maxColumns' => '3',
'widths' => array('label' => '10', 'field' => '30'),
),
'layout' => array(
'basic_search' => array(
array('name'=>'search_name','label' =>'LBL_NAME', 'type' => 'name'),
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
),
'advanced_search' => array(
'first_name',
'last_name',
'ecmemployee_status',
'title',
'phone' =>
array (
'name' => 'phone',
'label' => 'LBL_ANY_PHONE',
'type' => 'name',
'default' => true,
'width' => '10%',
),
'department',
'email' =>
array (
'name' => 'email',
'label' => 'LBL_ANY_EMAIL',
'type' => 'name',
'default' => true,
'width' => '10%',
),
'address_street' =>
array (
'name' => 'address_street',
'label' => 'LBL_ANY_ADDRESS',
'type' => 'name',
'default' => true,
'width' => '10%',
),
'address_city' =>
array (
'name' => 'address_city',
'label' => 'LBL_CITY',
'type' => 'name',
'default' => true,
'width' => '10%',
),
'address_state' =>
array (
'name' => 'address_state',
'label' => 'LBL_STATE',
'type' => 'name',
'default' => true,
'width' => '10%',
),
'address_postalcode' =>
array (
'name' => 'address_postalcode',
'label' => 'LBL_POSTAL_CODE',
'type' => 'name',
'default' => true,
'width' => '10%',
),
'address_country' =>
array (
'name' => 'address_country',
'label' => 'LBL_COUNTRY',
'type' => 'name',
'default' => true,
'width' => '10%',
),
),
),
);

View File

@@ -0,0 +1,48 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
global $dictionary;
if(empty($dictionary['User'])){
include('modules/Users/vardefs.php');
}
$dictionary['EcmEmployee']=$dictionary['User'];
//users of emloyees modules are not allowed to change the ecmemployee/user status.
$dictionary['EcmEmployee']['fields']['status']['massupdate']=false;
$dictionary['EcmEmployee']['fields']['is_admin']['massupdate']=false;
$dictionary['EcmEmployee']['fields']['email1']['required']=false;
$dictionary['EcmEmployee']['fields']['email_addresses']['required']=false;
$dictionary['EcmEmployee']['fields']['email_addresses_primary']['required']=false;
?>

View File

@@ -0,0 +1,65 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: This file is used to override the default Meta-data DetailView behavior
* to provide customization specific to the Bugs module.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('include/MVC/View/views/view.detail.php');
class EcmEmployeesViewDetail extends ViewDetail {
function EcmEmployeesViewDetail(){
parent::ViewDetail();
}
function display() {
if(is_admin($GLOBALS['current_user']) || $_REQUEST['record'] == $GLOBALS['current_user']->id) {
$this->ss->assign('DISPLAY_EDIT', true);
}
if(is_admin($GLOBALS['current_user'])){
$this->ss->assign('DISPLAY_DUPLICATE', true);
}
parent::display();
}
}
?>

View File

@@ -0,0 +1,70 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: This file is used to override the default Meta-data DetailView behavior
* to provide customization specific to the Bugs module.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('include/MVC/View/views/view.edit.php');
class EcmEmployeesViewEdit extends ViewEdit {
function EcmEmployeesViewEdit(){
parent::ViewEdit();
}
function display() {
if(is_admin($GLOBALS['current_user'])) {
$json = getJSONobj();
require_once('include/QuickSearchDefaults.php');
$qsd = new QuickSearchDefaults();
$sqs_objects = array('EditView_reports_to_name' => $qsd->getQSUser());
$sqs_objects['EditView_reports_to_name']['populate_list'] = array('reports_to_name', 'reports_to_id');
$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '; enableQS();</script>';
$this->ss->assign('REPORTS_TO_JS', $quicksearch_js);
$this->ss->assign('EDIT_REPORTS_TO', true);
}
parent::display();
}
}
?>

View File

@@ -0,0 +1,68 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
require_once('include/MVC/View/views/view.list.php');
class EcmEmployeesViewList extends ViewList
{
public function preDisplay()
{
$this->lv = new ListViewSmarty();
$this->lv->delete = false;
}
function listViewProcess(){
$this->processSearchForm();
$this->lv->searchColumns = $this->searchForm->searchColumns;
if(!$this->headers)
return;
if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false){
$this->lv->ss->assign("SEARCH",true);
$tplFile = 'include/ListView/ListViewGeneric.tpl';
if (!is_admin($GLOBALS['current_user'])&& !is_admin_for_module($GLOBALS['current_user'],'Users')){
$tplFile = 'include/ListView/ListViewNoMassUpdate.tpl';
}
$this->lv->setup($this->seed, $tplFile, $this->where, $this->params);
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
echo $this->lv->display();
}
}
}