init
This commit is contained in:
74
modules/EcmDeliveryConditions/Delete.php
Executable file
74
modules/EcmDeliveryConditions/Delete.php
Executable file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
|
||||
require_once('modules/EcmDeliveryConditions/EcmDeliveryCondition.php');
|
||||
|
||||
$focus = new EcmDeliveryCondition();
|
||||
|
||||
// PERFORM THE DELETE IF GIVEN A RECORD TO DELETE
|
||||
if(!isset($_REQUEST['record']))
|
||||
sugar_die("A record number must be specified to delete the record.");
|
||||
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
if(!$focus->ACLAccess('Delete')) {
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
$focus->mark_deleted($_REQUEST['record']);
|
||||
|
||||
// NOW THAT THE DELETE HAS BEEN PERFORMED, RETURN TO GIVEN LOCATION
|
||||
handleRedirect($return_id,'EcmDeliveryConditions');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
260
modules/EcmDeliveryConditions/EcmDeliveryCondition.php
Executable file
260
modules/EcmDeliveryConditions/EcmDeliveryCondition.php
Executable file
@@ -0,0 +1,260 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
require_once('data/SugarBean.php');
|
||||
require_once('include/utils.php');
|
||||
|
||||
// SHOULD INCLUDE SELECTIVELY
|
||||
|
||||
class EcmDeliveryCondition extends SugarBean {
|
||||
|
||||
var $field_name_map = array();
|
||||
|
||||
// STANDARD FIELDS
|
||||
var $id;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $assigned_user_id;
|
||||
var $name;
|
||||
var $description;
|
||||
|
||||
// TABLE COLUMNS
|
||||
var $translations;
|
||||
|
||||
// OBJECTS
|
||||
|
||||
// RELATED FIELDS
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $modified_by_name;
|
||||
var $assigned_user_name;
|
||||
|
||||
// SUBPANELS RELATED
|
||||
|
||||
// MODULE OBJECT DETAILS
|
||||
var $module_dir = 'EcmDeliveryConditions';
|
||||
var $table_name = "ecmdeliveryconditions";
|
||||
var $object_name = "EcmDeliveryCondition";
|
||||
|
||||
// RELATED TABLE NAMES
|
||||
|
||||
|
||||
// USED TO RETRIEVE RELATED FIELDS FROM FORM POSTS.
|
||||
var $additional_column_fields = Array(
|
||||
'assigned_user_name',
|
||||
'assigned_user_id',
|
||||
'modified_user_id',
|
||||
'created_by',
|
||||
);
|
||||
|
||||
|
||||
|
||||
// RELATIONSHIP FIELDS
|
||||
var $relationship_fields = Array(
|
||||
);
|
||||
|
||||
|
||||
function EcmDeliveryCondition() {
|
||||
parent::SugarBean();
|
||||
$this->setupCustomFields('EcmDeliveryConditions');
|
||||
foreach($this->field_defs as $field) {
|
||||
$this->field_name_map[$field['name']] = $field;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var $new_schema = true;
|
||||
|
||||
function get_summary_text(){
|
||||
return "$this->name";
|
||||
}
|
||||
|
||||
function create_list_query($order_by, $where, $show_deleted = 0) {
|
||||
|
||||
// Fill in the assigned_user_name
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
$query = "SELECT ";
|
||||
$query .= "ecmdeliveryconditions.*
|
||||
,users.user_name as assigned_user_name";
|
||||
if($custom_join) {
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM ecmdeliveryconditions
|
||||
LEFT JOIN users
|
||||
ON ecmdeliveryconditions.assigned_user_id=users.id";
|
||||
$query .= " ";
|
||||
if($custom_join) {
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$where_auto = '1=1';
|
||||
if($show_deleted == 0) {
|
||||
$where_auto = " $this->table_name.deleted=0 ";
|
||||
} else if($show_deleted == 1) {
|
||||
$where_auto = " $this->table_name.deleted=1 ";
|
||||
}
|
||||
|
||||
if($where != "")
|
||||
$query .= "where $where AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
if(substr_count($order_by, '.') > 0) {
|
||||
$query .= " ORDER BY $order_by";
|
||||
}
|
||||
else if($order_by != "")
|
||||
$query .= " ORDER BY $order_by";
|
||||
else
|
||||
$query .= " ORDER BY ecmdeliveryconditions.name";
|
||||
return $query;
|
||||
|
||||
}
|
||||
|
||||
function create_export_query($order_by, $where) {
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
$query = "SELECT
|
||||
ecmdeliveryconditions.*,
|
||||
users.user_name assigned_user_name";
|
||||
if($custom_join) {
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM ecmdeliveryconditions ";
|
||||
$query .= " LEFT JOIN users
|
||||
ON ecmdeliveryconditions.assigned_user_id=users.id";
|
||||
if($custom_join) {
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$query .= "";
|
||||
$where_auto = " ecmdeliveryconditions.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 ecmdeliveryconditions.name";
|
||||
return $query;
|
||||
}
|
||||
|
||||
function fill_in_additional_list_fields() {
|
||||
$this->fill_in_additional_detail_fields();
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields() {
|
||||
// FILL IN THE ASSIGNED_USER_NAME
|
||||
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
|
||||
$this->created_by_name = get_assigned_user_name($this->created_by);
|
||||
$this->modified_by_name = get_assigned_user_name($this->modified_user_id);
|
||||
|
||||
$this->translations = EcmDeliveryCondition::decodeData($this->translations);
|
||||
}
|
||||
|
||||
function get_list_view_data(){
|
||||
global $current_language;
|
||||
$app_list_strings = return_app_list_strings_language($current_language);
|
||||
$mod_strings = return_module_language($current_language, 'EcmDeliveryConditions');
|
||||
$the_array = parent::get_list_view_data();
|
||||
|
||||
// THE NEW LISTVIEW CODE ONLY FETCHES COLUMNS THAT WE'RE DISPLAYING AND NOT ALL
|
||||
// THE COLUMNS SO WE NEED THESE CHECKS.
|
||||
$the_array['NAME'] = (($this->name == "") ? "<em>blank</em>" : $this->name);
|
||||
$the_array['ENCODED_NAME'] = $this->name;
|
||||
return $the_array;
|
||||
}
|
||||
|
||||
/**
|
||||
BUILDS A GENERIC SEARCH BASED ON THE QUERY STRING USING OR.
|
||||
DO NOT INCLUDE ANY $THIS-> BECAUSE THIS IS CALLED ON WITHOUT HAVING THE CLASS INSTANTIATED.
|
||||
*/
|
||||
function build_generic_where_clause ($the_query_string) { var_dump('lala');
|
||||
$where_clauses = Array();
|
||||
$the_query_string = PearDatabase::quote(from_html($the_query_string));
|
||||
array_push($where_clauses, "ecmdeliveryconditions.name like '$the_query_string%'");
|
||||
$the_where = "";
|
||||
foreach($where_clauses as $clause){
|
||||
if($the_where != "") $the_where .= " or ";
|
||||
$the_where .= $clause;
|
||||
}
|
||||
return $the_where;
|
||||
}
|
||||
|
||||
function set_notification_body($xtpl, $simplemodule) {
|
||||
global $mod_strings, $app_list_strings;
|
||||
$xtpl->assign("NAME", $simplemodule->name);
|
||||
$xtpl->assign("ECMDELIVERYCONDITIONS_DESCRIPTION", $ecmdeliveryconditions->description);
|
||||
return $xtpl;
|
||||
}
|
||||
|
||||
function bean_implements($interface) {
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static function encodeData($data) {
|
||||
return base64_encode(serialize($data));
|
||||
}
|
||||
|
||||
static function decodeData($data) {
|
||||
return unserialize(base64_decode($data));
|
||||
}
|
||||
|
||||
function save($check_notify = FALSE) {
|
||||
$this->translations = EcmDeliveryCondition::encodeData($this->translations);
|
||||
return parent::save($check_notify);
|
||||
}
|
||||
|
||||
function ACLAccess($view,$is_owner='not_set') {
|
||||
return parent::ACLAccess($view,$is_owner);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
63
modules/EcmDeliveryConditions/Forms.php
Executable file
63
modules/EcmDeliveryConditions/Forms.php
Executable file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* CREATE JAVASCRIPT TO VALIDATE THE DATA ENTERED INTO A RECORD.
|
||||
*******************************************************************************/
|
||||
function get_validate_record_js () {
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* CREATE FORM FOR MENU RAPID CREATE
|
||||
*******************************************************************************/
|
||||
function get_new_record_form () {
|
||||
}
|
||||
|
||||
?>
|
||||
39
modules/EcmDeliveryConditions/ListView.php
Executable file
39
modules/EcmDeliveryConditions/ListView.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||||
|
||||
require_once('modules/EcmDeliveryConditions/EcmDeliveryCondition.php');
|
||||
require_once('modules/EcmDeliveryConditions/Forms.php');
|
||||
require_once ('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$focus = new EcmDeliveryCondition();
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
else {}
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
|
||||
if(file_exists('modules/EcmDeliveryConditions/views/view.list.php')) {
|
||||
require_once('modules/EcmDeliveryConditions/views/view.list.php');
|
||||
$list = new EcmDeliveryConditionsViewList();
|
||||
}
|
||||
else {
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
$list = new ViewList();
|
||||
}
|
||||
|
||||
$list->bean = $focus;
|
||||
|
||||
// if(!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != "true") require_once('modules/EcmGroupSales/HeaderMenu.php');
|
||||
|
||||
$list->preDisplay();
|
||||
$list->display();
|
||||
|
||||
?>
|
||||
70
modules/EcmDeliveryConditions/Menu.php
Executable file
70
modules/EcmDeliveryConditions/Menu.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
|
||||
//require_once('modules/EcmGroupSales/Menu.php');
|
||||
|
||||
/*
|
||||
global $mod_strings;
|
||||
|
||||
if(ACLController::checkAccess('EcmDeliveryConditions', 'edit', true))
|
||||
$module_menu [] = Array("index.php?module=EcmDeliveryConditions&action=EditView&return_module=EcmDeliveryConditions&return_action=DetailView", $mod_strings['LNK_NEW_ECMDELIVERYCONDITIONS'],"CreateEcmDeliveryConditions", 'EcmDeliveryConditions');
|
||||
if(ACLController::checkAccess('EcmDeliveryConditions', 'list', true))
|
||||
$module_menu [] = Array("index.php?module=EcmDeliveryConditions&action=index&return_module=EcmDeliveryConditions&return_action=DetailView", $mod_strings['LNK_ECMDELIVERYCONDITIONS_LIST'],"EcmDeliveryConditions", 'EcmDeliveryConditions');
|
||||
*/
|
||||
|
||||
global $mod_strings, $current_user;
|
||||
|
||||
if(ACLController::checkAccess('EcmDeliveryConditions', "edit", true))
|
||||
$module_menu [] = Array("index.php?module=EcmDeliveryConditions&action=EditView&return_module=EcmDeliveryConditions&return_action=DetailView", translate('LNK_NEW_ECMDELIVERYCONDITIONS', 'EcmDeliveryConditions'),"CreateEcmDeliveryConditions", 'EcmDeliveryConditions');
|
||||
|
||||
if(ACLController::checkAccess('EcmDeliveryConditions', "list", true)) $module_menu [] = Array("index.php?module=EcmDeliveryConditions&action=index&return_module=EcmDeliveryConditions&return_action=DetailView", translate('LNK_ECMDELIVERYCONDITIONS_LIST','EcmDeliveryConditions'),"EcmDeliveryConditions", 'EcmDeliveryConditions');
|
||||
|
||||
|
||||
?>
|
||||
101
modules/EcmDeliveryConditions/Save.php
Executable file
101
modules/EcmDeliveryConditions/Save.php
Executable file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
require_once("modules/EcmDeliveryConditions/EcmDeliveryCondition.php");
|
||||
require_once('include/formbase.php');
|
||||
|
||||
$focus = new EcmDeliveryCondition();
|
||||
|
||||
if(isset($_POST['record']) && $_POST['record'] != '') {
|
||||
$focus->retrieve($_POST['record']);
|
||||
}
|
||||
|
||||
if(isset($focus->id) && $focus->id != ''){
|
||||
}
|
||||
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
$check_notify = FALSE;
|
||||
|
||||
foreach($focus->column_fields as $field){
|
||||
if(isset($_POST[$field])){
|
||||
$value = $_POST[$field];
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($focus->additional_column_fields as $field){
|
||||
if(isset($_POST[$field])){
|
||||
$value = $_POST[$field];
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
global $app_list_strings;
|
||||
$arr = array();
|
||||
foreach($app_list_strings['ecmlanguages_dom'] as $key => $value) {
|
||||
if(isset($_REQUEST['translation_'.$key])) $arr[$key] = $_REQUEST['translation_'.$key];
|
||||
}
|
||||
$focus->translations = $arr;
|
||||
|
||||
$focus->save($check_notify);
|
||||
$return_id = $focus->id;
|
||||
|
||||
handleRedirect($return_id,'EcmDeliveryConditions');
|
||||
|
||||
?>
|
||||
86
modules/EcmDeliveryConditions/field_arrays.php
Executable file
86
modules/EcmDeliveryConditions/field_arrays.php
Executable file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
$fields_array['EcmDeliveryCondition'] = array (
|
||||
|
||||
'column_fields' => Array(
|
||||
|
||||
'id',
|
||||
'name',
|
||||
'description',
|
||||
'date_entered',
|
||||
'date_modified',
|
||||
'modified_user_id',
|
||||
'assigned_user_id',
|
||||
'created_by',
|
||||
|
||||
//NEW COLUMN FIELDS
|
||||
'translations',
|
||||
|
||||
),
|
||||
|
||||
'list_fields' => Array(
|
||||
|
||||
'id',
|
||||
'name',
|
||||
'description',
|
||||
'assigned_user_name',
|
||||
'assigned_user_id',
|
||||
|
||||
//NEW LIST_FIELDS
|
||||
'translations',
|
||||
|
||||
),
|
||||
|
||||
'required_fields' => array(
|
||||
'name'=>1
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
6
modules/EcmDeliveryConditions/index.php
Executable file
6
modules/EcmDeliveryConditions/index.php
Executable file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
require_once('modules/EcmDeliveryConditions/ListView.php');
|
||||
|
||||
?>
|
||||
129
modules/EcmDeliveryConditions/language/en_us.lang.php
Executable file
129
modules/EcmDeliveryConditions/language/en_us.lang.php
Executable file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
// FOR SYSTEM USE
|
||||
'LBL_MODULE_NAME' => 'Delivery Conditions',
|
||||
'LBL_MODULE_TITLE' => 'Delivery Conditions: Home',
|
||||
'LBL_MODULE_ID' => 'Delivery Conditions',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Delivery Conditions Search',
|
||||
'LBL_LIST_FORM_TITLE' => 'Delivery Conditions List',
|
||||
'LBL_NEW_FORM_TITLE' => 'New Delivery Conditions',
|
||||
'LBL_ECMDELIVERYCONDITIONS' => 'Delivery Conditions:',
|
||||
'LBL_ECMDELIVERYCONDITIONS_SUBJECT' => 'Delivery Conditions Subject:',
|
||||
'LBL_SYSTEM_ID' => 'System ID',
|
||||
|
||||
// FOR LIST VIEW
|
||||
'LBL_LIST_NAME' => 'Name',
|
||||
'LBL_LIST_SUBJECT' => 'Subject',
|
||||
'LBL_LIST_LAST_MODIFIED' => 'Last Modified',
|
||||
'LBL_LIST_MY_ECMDELIVERYCONDITIONS' => 'My Assigned Delivery Conditions',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
|
||||
'LBL_LIST_CODE' => 'code',
|
||||
'LBL_LIST_SELLING_PRICE' => 'Price',
|
||||
'LBL_LIST_DESCRIPTION' => 'Description',
|
||||
|
||||
// FOR NOTIFICATION POPUPS
|
||||
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to remove this delivery condition?',
|
||||
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this contact from the Delivery Condition?',
|
||||
'NTC_REMOVE_ACCOUNT_CONFIRMATION' => 'Are you sure you want to remove this delivery condition from this account?',
|
||||
'ERR_DELETE_RECORD' => 'A record number must be specified to delete the delivery condition.',
|
||||
|
||||
// FOR DEFAULT FIELDS
|
||||
'LBL_NAME' => 'Name:',
|
||||
'LBL_SUBJECT' => 'Name:',
|
||||
'LBL_CREATED_BY' => 'Created by:',
|
||||
'LBL_CREATED' => 'Created by:',
|
||||
'LBL_ASSIGNED_TO' => 'Assigned to:',
|
||||
'LBL_ASSIGNED_USER_ID' => 'Assigned To:',
|
||||
'LBL_DATE_ENTERED' => 'Date Created:',
|
||||
'LBL_DATE_CREATED' => 'Create Date:',
|
||||
'LBL_DATE_MODIFIED' => 'Last Modified',
|
||||
'LBL_MODIFIED_BY' => 'Last Modified by:',
|
||||
'LBL_MODIFIED' => 'Modified by:',
|
||||
'LBL_DATE_LAST_MODIFIED' => 'Modify Date:',
|
||||
|
||||
// FOR NEW FIELDS
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
'LBL_DOCUMENT_TEXTS' => 'Document Texts',
|
||||
'DATA' => 'Data',
|
||||
'DOCUMENT_TEXTS' => 'Document Texts',
|
||||
|
||||
'LBL_FILES' => 'Files:',
|
||||
'LBL_ADD_FILE' => 'Add File',
|
||||
'LBL_ADD_DOCUMENT' => 'Add Document',
|
||||
|
||||
// FOR GROUPS
|
||||
'LBL_GROUP_MASTER' => 'ECMDELIVERYCONDITION INFORMATION',
|
||||
'LBL_GROUP_CODE' => '',
|
||||
'LBL_GROUP_PRICE' => '',
|
||||
'LBL_GROUP_DESCRIPTION' => '',
|
||||
// FOR SUBPANELS
|
||||
'LBL_ECMDELIVERYCONDITIONS_SUBPANEL_TITLE' => 'Delivery Conditions',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'History',
|
||||
'LBL_ECMDELIVERYCONDITIONS' => 'Delivery Conditions List',
|
||||
'LBL_DOCUMENTS_SUBPANEL_TITLE' => 'Documents',
|
||||
|
||||
// FOR MENU LABELS
|
||||
'LNK_NEW_ECMDELIVERYCONDITIONS' => 'Create Delivery Condition',
|
||||
'LNK_LIST_ECMDELIVERYCONDITION' => 'Delivery Conditions List',
|
||||
|
||||
// FOR MENU LINKS
|
||||
'LNK_NEW_ECMDELIVERYCONDITION' => 'New Delivery Condition',
|
||||
'LNK_ECMDELIVERYCONDITIONS_LIST' => 'Delivery Conditions List',
|
||||
'LNK_ECMDELIVERYCONDITIONS_REPORTS' => 'Delivery Conditions Reports',
|
||||
// FOR ADDITIONAL MENUS
|
||||
|
||||
// FOR DASHLETS
|
||||
'LBL_LIST_ECMDELIVERYCONDITIONS' => 'Delivery Conditions',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned To',
|
||||
);
|
||||
?>
|
||||
129
modules/EcmDeliveryConditions/language/pl_pl.lang.php
Executable file
129
modules/EcmDeliveryConditions/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
// FOR SYSTEM USE
|
||||
'LBL_MODULE_NAME' => 'Warunki Przesyłki',
|
||||
'LBL_MODULE_TITLE' => 'Warunki Przesyłki: Strona Główna',
|
||||
'LBL_MODULE_ID' => 'Warunki Przesyłki',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Warunki Przesyłki Wyszukiwanie',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista Warunków Przesyłki',
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowe Warunki Przesyłki',
|
||||
'LBL_ECMDELIVERYCONDITIONS' => 'Warunki Przesyłki:',
|
||||
'LBL_ECMDELIVERYCONDITIONS_SUBJECT' => 'Warunki Przesyłki:',
|
||||
'LBL_SYSTEM_ID' => 'System ID',
|
||||
|
||||
// FOR LIST VIEW
|
||||
'LBL_LIST_NAME' => 'Nazwa',
|
||||
'LBL_LIST_SUBJECT' => 'Tytuł',
|
||||
'LBL_LIST_LAST_MODIFIED' => 'Ostatnio Modyfikowane',
|
||||
'LBL_LIST_MY_ECMDELIVERYCONDITIONS' => 'Moje Przypisane Warunki Przesyłki',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Przypisany Użytkownik',
|
||||
'LBL_LIST_CODE' => 'kod',
|
||||
'LBL_LIST_SELLING_PRICE' => 'Cena',
|
||||
'LBL_LIST_DESCRIPTION' => 'Opis',
|
||||
|
||||
// FOR NOTIFICATION POPUPS
|
||||
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to remove this delivery condition?',
|
||||
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this contact from the Delivery Condition?',
|
||||
'NTC_REMOVE_ACCOUNT_CONFIRMATION' => 'Are you sure you want to remove this delivery condition from this account?',
|
||||
'ERR_DELETE_RECORD' => 'A record number must be specified to delete the delivery condition.',
|
||||
|
||||
// FOR DEFAULT FIELDS
|
||||
'LBL_NAME' => 'Nazwa:',
|
||||
'LBL_SUBJECT' => 'Nazwa:',
|
||||
'LBL_CREATED_BY' => 'Utworzone przez:',
|
||||
'LBL_CREATED' => 'Utworzone przez:',
|
||||
'LBL_ASSIGNED_TO' => 'Przypisane do:',
|
||||
'LBL_ASSIGNED_USER_ID' => 'Przypisane do:',
|
||||
'LBL_DATE_ENTERED' => 'Data Utworzenia:',
|
||||
'LBL_DATE_CREATED' => 'Data Utworzenia:',
|
||||
'LBL_DATE_MODIFIED' => 'Ostatnio Modyfikowane',
|
||||
'LBL_MODIFIED_BY' => 'Ostatnio Modyfikowane przez:',
|
||||
'LBL_MODIFIED' => 'Modifikowane przez:',
|
||||
'LBL_DATE_LAST_MODIFIED' => 'Data Modyfikacji:',
|
||||
|
||||
// FOR NEW FIELDS
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
'LBL_DOCUMENT_TEXTS' => 'Teksty Dokumentu',
|
||||
'DATA' => 'Data',
|
||||
'DOCUMENT_TEXTS' => 'Teksty Dokumentu',
|
||||
|
||||
'LBL_FILES' => 'Pliki:',
|
||||
'LBL_ADD_FILE' => 'Dodaj Plik',
|
||||
'LBL_ADD_DOCUMENT' => 'Dodaj Dokument',
|
||||
|
||||
// FOR GROUPS
|
||||
'LBL_GROUP_MASTER' => 'INFORMACJE O WARUNKACH PRZESYŁKI',
|
||||
'LBL_GROUP_CODE' => '',
|
||||
'LBL_GROUP_PRICE' => '',
|
||||
'LBL_GROUP_DESCRIPTION' => '',
|
||||
// FOR SUBPANELS
|
||||
'LBL_ECMDELIVERYCONDITIONS_SUBPANEL_TITLE' => 'Warunki Przesyłki',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Działania',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'Historia',
|
||||
'LBL_ECMDELIVERYCONDITIONS' => 'Lista Warunków Przesyłki',
|
||||
'LBL_DOCUMENTS_SUBPANEL_TITLE' => 'Documenty',
|
||||
|
||||
// FOR MENU LABELS
|
||||
'LNK_NEW_ECMDELIVERYCONDITIONS' => 'Utwórz Warunki Przesyłki',
|
||||
'LNK_LIST_ECMDELIVERYCONDITION' => 'Lista Warunków Przesyłki',
|
||||
|
||||
// FOR MENU LINKS
|
||||
'LNK_NEW_ECMDELIVERYCONDITION' => 'Nowe Warunki Przesyłki',
|
||||
'LNK_ECMDELIVERYCONDITIONS_LIST' => 'Lista Warunków Przesyłki',
|
||||
'LNK_ECMDELIVERYCONDITIONS_REPORTS' => 'Warunki Przesyłki Raport',
|
||||
// FOR ADDITIONAL MENUS
|
||||
|
||||
// FOR DASHLETS
|
||||
'LBL_LIST_ECMDELIVERYCONDITIONS' => 'Warunki Przesyłki',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Przypisane Do',
|
||||
);
|
||||
?>
|
||||
59
modules/EcmDeliveryConditions/metadata/SearchFields.php
Executable file
59
modules/EcmDeliveryConditions/metadata/SearchFields.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
$searchFields['EcmDeliveryConditions'] =
|
||||
array (
|
||||
'name' => array('query_type' => 'default'),
|
||||
'current_user_only' => array('query_type' => 'default',
|
||||
'db_field' => array('assigned_user_id'),
|
||||
'my_items' => true
|
||||
),
|
||||
'description' => array('query_type' => 'default'),
|
||||
);
|
||||
?>
|
||||
91
modules/EcmDeliveryConditions/metadata/additionalDetails.php
Executable file
91
modules/EcmDeliveryConditions/metadata/additionalDetails.php
Executable file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/utils.php');
|
||||
|
||||
function additionalDetailsEcmDeliveryCondition($fields) {
|
||||
static $mod_strings;
|
||||
global $app_strings;
|
||||
if(empty($mod_strings)) {
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'EcmDeliveryConditions');
|
||||
}
|
||||
|
||||
$overlib_string = '<div style="overflow:auto; height:100px; max-height:100px;">';
|
||||
|
||||
//BUILDER:START overlibstring
|
||||
if(!empty($fields['CODE'])){
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_CODE'] . '</b> ' . $fields['CODE'];
|
||||
// if(strlen($fields['CODE']) > 300) $overlib_string .= '...';
|
||||
$overlib_string .= '<br>';
|
||||
}
|
||||
if(!empty($fields['SELLING_PRICE'])){
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_SELLING_PRICE'] . '</b> ' . $fields['SELLING_PRICE'];
|
||||
// if(strlen($fields['SELLING_PRICE']) > 300) $overlib_string .= '...';
|
||||
$overlib_string .= '<br>';
|
||||
}
|
||||
if(!empty($fields['DESCRIPTION'])){
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . $fields['DESCRIPTION'];
|
||||
// if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
|
||||
$overlib_string .= '<br>';
|
||||
}
|
||||
$overlib_string .= '</div>';
|
||||
|
||||
//BUILDER:END overlibstring
|
||||
|
||||
return array(
|
||||
'fieldToAddTo' => 'NAME',
|
||||
'string' => $overlib_string,
|
||||
'editLink' => "index.php?action=EditView&module=EcmDeliveryConditions&return_module=EcmDeliveryConditions&record={$fields['ID']}",
|
||||
'viewLink' => "index.php?action=DetailView&module=EcmDeliveryConditions&return_module=EcmDeliveryConditions&record={$fields['ID']}");
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
76
modules/EcmDeliveryConditions/metadata/detailviewdefs.php
Executable file
76
modules/EcmDeliveryConditions/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU 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 General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU 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 General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU 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 $app_list_strings;
|
||||
|
||||
$viewdefs['EcmDeliveryConditions']['DetailView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'buttons' => array ('EDIT', 'DUPLICATE', 'DELETE'),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array ('label' => '10', 'field' => '30'),
|
||||
array ('label' => '10', 'field' => '30')
|
||||
),
|
||||
'includes' => array(
|
||||
),
|
||||
),
|
||||
|
||||
'panels' => array (
|
||||
|
||||
array(
|
||||
'name',
|
||||
'assigned_user_name'
|
||||
),
|
||||
array(
|
||||
'',
|
||||
'description'
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'label' => 'LBL_DOCUMENT_TEXTS',
|
||||
'customCode' => '{$translations}',
|
||||
)
|
||||
)
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
87
modules/EcmDeliveryConditions/metadata/editviewdefs.php
Executable file
87
modules/EcmDeliveryConditions/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU 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 General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU 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 General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU 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 $sugar_config;
|
||||
|
||||
$viewdefs['EcmDeliveryConditions']['EditView'] = array (
|
||||
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'buttons'=>array('SAVE', 'CANCEL',),
|
||||
),
|
||||
|
||||
'maxColumns' => '2',
|
||||
|
||||
'widths' => array (
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
|
||||
'includes' => array(
|
||||
array('file'=>'include/JSON.js'),
|
||||
array('file'=>'include/javascript/quicksearch.js'),
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
'panels' => array (
|
||||
'default' => array(
|
||||
array(
|
||||
'name',
|
||||
'assigned_user_name'
|
||||
),
|
||||
array(
|
||||
'',
|
||||
'description'
|
||||
),
|
||||
),
|
||||
'DOCUMENT_TEXTS' => array(
|
||||
array(
|
||||
array(
|
||||
'hideLabel' => true,
|
||||
'customCode' => '{$translations}',
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
83
modules/EcmDeliveryConditions/metadata/listviewdefs.php
Executable file
83
modules/EcmDeliveryConditions/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
|
||||
$listViewDefs['EcmDeliveryConditions'] = array(
|
||||
'NAME' => array(
|
||||
'width' => '20',
|
||||
'label' => 'LBL_NAME',
|
||||
'default' => true,
|
||||
'link' => true),
|
||||
|
||||
'DESCRIPTION' => array(
|
||||
'width' => '50',
|
||||
'label' => 'LBL_DESCRIPTION',
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
'DATE_MODIFIED' => array(
|
||||
'width' => '5',
|
||||
'label' => 'LBL_DATE_MODIFIED'),
|
||||
|
||||
'DATE_ENTERED' => array(
|
||||
'width' => '5',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
|
||||
'CREATED_BY_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_CREATED'),
|
||||
|
||||
'MODIFIED_USER_NAME' => array(
|
||||
'width' => '2',
|
||||
'label' => 'LBL_MODIFIED')
|
||||
|
||||
);
|
||||
?>
|
||||
60
modules/EcmDeliveryConditions/metadata/popupdefs2.php
Executable file
60
modules/EcmDeliveryConditions/metadata/popupdefs2.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
|
||||
$popupMeta = array(
|
||||
'moduleMain' => 'EcmDeliveryCondition',
|
||||
'varName' => 'ECMDELIVERYCONDITION',
|
||||
'orderBy' => 'ecmdeliveryconditions.name',
|
||||
'whereClauses' => array(
|
||||
'name' => 'ecmdeliveryconditions.name',
|
||||
),
|
||||
'searchInputs' => array('name')
|
||||
);
|
||||
?>
|
||||
58
modules/EcmDeliveryConditions/metadata/searchdefs.php
Executable file
58
modules/EcmDeliveryConditions/metadata/searchdefs.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU 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 General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU 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 General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU 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".
|
||||
********************************************************************************/
|
||||
|
||||
$searchdefs['EcmDeliveryConditions'] = array (
|
||||
'templateMeta' => array (
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
),
|
||||
'layout' => array (
|
||||
'basic_search' => array (
|
||||
'name',
|
||||
),
|
||||
'advanced_search' => array (
|
||||
'name',
|
||||
'description'
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
68
modules/EcmDeliveryConditions/metadata/studio.php
Executable file
68
modules/EcmDeliveryConditions/metadata/studio.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
|
||||
$GLOBALS['studioDefs']['EcmDeliveryConditions'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'meta_file' => 'modules/EcmDeliveryConditions/detailviewdefs.php',
|
||||
'type' => 'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'meta_file' => 'modules/EcmDeliveryConditions/editviewdefs.php',
|
||||
'type' => 'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'meta_file' => 'modules/EcmDeliveryConditions/listviewdefs.php',
|
||||
'type' => 'ListView',
|
||||
),
|
||||
|
||||
);
|
||||
56
modules/EcmDeliveryConditions/metadata/subpaneldefs.php
Executable file
56
modules/EcmDeliveryConditions/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Layout definition for Accounts
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU 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 General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU 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 General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU 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".
|
||||
*/
|
||||
|
||||
/*
|
||||
$layout_defs['EcmDeliveryConditions']['subpanel_setup']['documents'] = array(
|
||||
'order' => 15,
|
||||
'module' => 'Documents',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'date_modified',
|
||||
'get_subpanel_data' => 'documents',
|
||||
'add_subpanel_data' => 'document_id',
|
||||
'subpanel_name' => 'ForEcmDeliveryConditions',
|
||||
'title_key' => 'LBL_DOCUMENTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton'),
|
||||
),
|
||||
);
|
||||
*/
|
||||
?>
|
||||
82
modules/EcmDeliveryConditions/metadata/subpanels/default.php
Executable file
82
modules/EcmDeliveryConditions/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmDeliveryConditions'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
'list_fields' => array(
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '50%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'EcmDeliveryConditions',
|
||||
'width' => '4%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'EcmDeliveryConditions',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
234
modules/EcmDeliveryConditions/vardefs.php
Executable file
234
modules/EcmDeliveryConditions/vardefs.php
Executable file
@@ -0,0 +1,234 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* 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 delivery 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.
|
||||
********************************************************************************/
|
||||
$dictionary['EcmDeliveryCondition'] = array(
|
||||
|
||||
'table' => 'ecmdeliveryconditions',
|
||||
'comment' => 'EcmDeliveryConditions',
|
||||
'duplicate_merge' => true,
|
||||
'unified_search' => true,
|
||||
|
||||
'fields' => array (
|
||||
|
||||
//STANDARD FIELDS SECTION
|
||||
'id' => array (
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => true,
|
||||
'reportable' => false,
|
||||
'comment' => 'Unique identifier'
|
||||
),
|
||||
'name' => array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'name',
|
||||
'required' => true,
|
||||
'dbType' => 'varchar',
|
||||
'len' => 255,
|
||||
'unified_search' => true,
|
||||
'comment' => 'The short description of the record contents',
|
||||
'massupdate' => true,
|
||||
'merge_filter' => 'selected',
|
||||
),
|
||||
'description' => array (
|
||||
'type' => 'text',
|
||||
'name' => 'description',
|
||||
'vname' => 'LBL_DESCRIPTION',
|
||||
'comment' => 'Description',
|
||||
),
|
||||
'date_entered' => array (
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'LBL_DATE_ENTERED',
|
||||
'type' => 'datetime',
|
||||
'required' => true,
|
||||
'comment' => 'Date record created'
|
||||
),
|
||||
'date_modified' => array (
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'type' => 'datetime',
|
||||
'required' => true,
|
||||
'comment' => 'Date record last modified'
|
||||
),
|
||||
'modified_user_id' => array (
|
||||
'name' => 'modified_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_MODIFIED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'modified_user_id_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'varchar',
|
||||
'len' => 36,
|
||||
'required' => true,
|
||||
'reportable' => true,
|
||||
'comment' => 'User who last modified record'
|
||||
),
|
||||
'assigned_user_id' => array (
|
||||
'name' => 'assigned_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'vname' => 'LBL_ASSIGNED_TO_ID',
|
||||
'group' => 'assigned_user_name',
|
||||
'type' => 'relate',
|
||||
'table' => 'users',
|
||||
'reportable' => true,
|
||||
'Importable' => false,
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'audited' => true,
|
||||
'comment' => 'User ID assigned to record',
|
||||
'duplicate_merge' => 'disabled',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_ASSIGNED_TO',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'users',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'module' => 'Users',
|
||||
'duplicate_merge' => 'disabled',
|
||||
),
|
||||
'created_by' => array (
|
||||
'name' => 'created_by',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'created_by',
|
||||
'vname' => 'LBL_CREATED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'created_by_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'varchar',
|
||||
'len' => 36,
|
||||
'comment' => 'User that created the record'
|
||||
),
|
||||
'created_by_link' => array (
|
||||
'name' => 'created_by_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmquestions'.'_created_by',
|
||||
'vname' => 'LBL_CREATED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'modified_user_link' => array (
|
||||
'name' => 'modified_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmquestions'.'_modified_user',
|
||||
'vname' => 'LBL_MODIFIED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'assigned_user_link' => array (
|
||||
'name' => 'assigned_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmquestions'.'_assigned_user',
|
||||
'vname' => 'LBL_ASSIGNED_TO_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
'duplicate_merge' => 'enabled',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'table' => 'users',
|
||||
),
|
||||
'deleted' => array (
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_DELETED_BY',
|
||||
'type' => 'bool',
|
||||
'required' => true,
|
||||
'reportable' => false,
|
||||
'comment' => 'Record deletion indicator'
|
||||
),
|
||||
'translations' => array (
|
||||
'name' => 'translations',
|
||||
'vname' => 'LBL_TRANSLATIONS',
|
||||
'type' => 'text',
|
||||
),
|
||||
|
||||
//NEW FIELDS SECTION
|
||||
|
||||
//FOR SUBPANELS
|
||||
|
||||
),
|
||||
|
||||
//INDICES SECTION
|
||||
'indices' => array (
|
||||
array('name' =>'ecmdeliveryconditionsspk', 'type' =>'primary', 'fields'=>array('id')),
|
||||
array('name' =>'idx_ecmdeliveryconditions_name', 'type' =>'index', 'fields'=>array('name'))
|
||||
)
|
||||
|
||||
//RELATIONSHIPS SECTION
|
||||
, 'relationships' => array (
|
||||
'ecmdeliveryconditions_assigned_user' => array(
|
||||
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'EcmDeliveryConditions', 'rhs_table'=> 'ecmdeliveryconditions', 'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
,'ecmdeliveryconditions_modified_user' => array(
|
||||
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'EcmDeliveryConditions', 'rhs_table'=> 'ecmdeliveryconditions', 'rhs_key' => 'modified_user_id',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
,'ecmdeliveryconditions_created_by' => array(
|
||||
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'EcmDeliveryConditions', 'rhs_table'=> 'ecmdeliveryconditions', 'rhs_key' => 'created_by',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
),
|
||||
//THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW
|
||||
'optimistic_locking'=>true,
|
||||
);
|
||||
?>
|
||||
75
modules/EcmDeliveryConditions/views/view.detail.php
Executable file
75
modules/EcmDeliveryConditions/views/view.detail.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2008 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU 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 General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU 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 General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU 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 Apr 13, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
require_once('include/MVC/View/views/view.detail.php');
|
||||
|
||||
class EcmDeliveryConditionsViewDetail extends ViewDetail{
|
||||
|
||||
function ViewDetail(){
|
||||
$this->options['show_subpanels'] = true;
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function preDisplay(){
|
||||
parent::preDisplay();
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(empty($this->bean->id)){
|
||||
global $app_strings;
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
|
||||
global $app_list_strings;
|
||||
$table = '<table style="width:100%;">';
|
||||
$i = 0; $count = count($app_list_strings['ecmlanguages_dom']);
|
||||
foreach($app_list_strings['ecmlanguages_dom'] as $key => $value) {
|
||||
if($count > (++$i)) $border = 'border-bottom:1px dashed #BBBBBB;'; else $border = '';
|
||||
$table .= '<tr><td style="width:150px;vertical-align:top;'.$border.'"><b>'.$value.':</b></td><td style="'.$border.'">'.(isset($this->bean->translations[$key])?str_replace("\n","<br>",$this->bean->translations[$key]):'').'</td></tr>';
|
||||
}
|
||||
$table .= '</table>';
|
||||
$this->dv->ss->assign('translations',$table);
|
||||
|
||||
$this->dv->process();
|
||||
echo $this->dv->display();
|
||||
}
|
||||
|
||||
}
|
||||
89
modules/EcmDeliveryConditions/views/view.edit.php
Executable file
89
modules/EcmDeliveryConditions/views/view.edit.php
Executable file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2008 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU 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 General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU 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 General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU 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 Apr 13, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
require_once('include/MVC/View/views/view.edit.php');
|
||||
class EcmDeliveryConditionsViewEdit extends ViewEdit{
|
||||
|
||||
var $scriptOpt = '';
|
||||
|
||||
function ViewEdit(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function preDisplay(){
|
||||
parent::preDisplay();
|
||||
}
|
||||
|
||||
function display(){
|
||||
|
||||
global $mod_strings;
|
||||
$OPT = array();
|
||||
|
||||
$json = getJSONobj();
|
||||
$this->scriptOpt = '<script language="javascript">
|
||||
var OPT = '.str_replace('"','\"',$json->encode($OPT)).';
|
||||
var MOD = '.str_replace('"','\"',$json->encode($mod_strings)).';
|
||||
</script>';
|
||||
|
||||
global $app_list_strings;
|
||||
$table = '<table style="width:100%;">';
|
||||
foreach($app_list_strings['ecmlanguages_dom'] as $key => $value) {
|
||||
$table .= '<tr><td style="width:150px;vertical-align:top;">'.$value.':</td><td><textarea id="translation_'.$key.'" name="translation_'.$key.'" rows="2" cols="60">'.(isset($this->bean->translations[$key])?$this->bean->translations[$key]:'').'</textarea></td></tr>';
|
||||
}
|
||||
$table .= '</table>';
|
||||
$this->ev->ss->assign('translations',$table);
|
||||
|
||||
echo $this->scriptOpt;
|
||||
|
||||
$this->ev->process();
|
||||
if($this->ev->isDuplicate) {
|
||||
foreach($this->ev->fieldDefs as $name=>$defs) {
|
||||
if(!empty($defs['auto_increment'])) {
|
||||
$this->ev->fieldDefs[$name]['value'] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
echo $this->ev->display($this->showTitle);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
238
modules/EcmDeliveryConditions/views/view.list.php
Executable file
238
modules/EcmDeliveryConditions/views/view.list.php
Executable file
@@ -0,0 +1,238 @@
|
||||
<?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 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU 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 General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU 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 General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU 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 EditView behavior
|
||||
* to provide customization specific to the Calls module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
|
||||
class EcmDeliveryConditionsViewList extends ViewList{
|
||||
|
||||
function EcmDeliveryConditionsViewList(){
|
||||
parent::ViewList();
|
||||
}
|
||||
|
||||
function display(){
|
||||
|
||||
if(!$this->bean->ACLAccess('list')){
|
||||
ACLController::displayNoAccess();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$module = $GLOBALS['module'];
|
||||
$metadataFile = null;
|
||||
$foundViewDefs = false;
|
||||
if(file_exists('custom/modules/' . $module. '/metadata/listviewdefs.php')){
|
||||
$metadataFile = 'custom/modules/' . $module . '/metadata/listviewdefs.php';
|
||||
$foundViewDefs = true;
|
||||
}else{
|
||||
if(file_exists('custom/modules/'.$module.'/metadata/metafiles.php')){
|
||||
require_once('custom/modules/'.$module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$module]['listviewdefs'])){
|
||||
$metadataFile = $metafiles[$module]['listviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}elseif(file_exists('modules/'.$module.'/metadata/metafiles.php')){
|
||||
require_once('modules/'.$module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$module]['listviewdefs'])){
|
||||
$metadataFile = $metafiles[$module]['listviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!$foundViewDefs && file_exists('modules/'.$module.'/metadata/listviewdefs.php')){
|
||||
$metadataFile = 'modules/'.$module.'/metadata/listviewdefs.php';
|
||||
}
|
||||
require_once($metadataFile);
|
||||
|
||||
$storeQuery = new StoreQuery();
|
||||
if(!isset($_REQUEST['query'])){
|
||||
$storeQuery->loadQuery($this->module);
|
||||
$storeQuery->populateRequest();
|
||||
}else{
|
||||
$storeQuery->saveFromRequest($this->module);
|
||||
}
|
||||
|
||||
$seed = $this->bean;
|
||||
$lv = new ListViewSmarty();
|
||||
$displayColumns = array();
|
||||
if(!empty($_REQUEST['displayColumns'])) {
|
||||
foreach(explode('|', $_REQUEST['displayColumns']) as $num => $col) {
|
||||
if(!empty($listViewDefs[$module][$col]))
|
||||
$displayColumns[$col] = $listViewDefs[$module][$col];
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($listViewDefs[$module] as $col => $params) {
|
||||
if(!empty($params['default']) && $params['default'])
|
||||
$displayColumns[$col] = $params;
|
||||
}
|
||||
}
|
||||
$params = array('massupdate' => true);//, 'export'=>false);
|
||||
|
||||
//$lv->quickViewLinks = false;
|
||||
//$lv->export = false;
|
||||
//$lv->mergeduplicates = false;
|
||||
|
||||
if(!empty($_REQUEST['orderBy'])) {
|
||||
$params['orderBy'] = $_REQUEST['orderBy'];
|
||||
$params['overrideOrder'] = true;
|
||||
if(!empty($_REQUEST['sortOrder'])) $params['sortOrder'] = $_REQUEST['sortOrder'];
|
||||
}
|
||||
|
||||
$lv->displayColumns = $displayColumns;
|
||||
|
||||
$this->seed = $seed;
|
||||
$this->module = $module;
|
||||
|
||||
$searchForm = null;
|
||||
|
||||
//search
|
||||
$view = 'basic_search';
|
||||
if(!empty($_REQUEST['search_form_view']))
|
||||
$view = $_REQUEST['search_form_view'];
|
||||
$headers = true;
|
||||
if(!empty($_REQUEST['search_form_only']) && $_REQUEST['search_form_only'])
|
||||
$headers = false;
|
||||
elseif(!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
|
||||
if(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') {
|
||||
$view = 'advanced_search';
|
||||
}else {
|
||||
$view = 'basic_search';
|
||||
}
|
||||
}
|
||||
|
||||
$use_old_search = true;
|
||||
if(file_exists('modules/'.$this->module.'/SearchForm.html')){
|
||||
require_once('include/SearchForm/SearchForm.php');
|
||||
$searchForm = new SearchForm($this->module, $this->seed);
|
||||
}else{
|
||||
$use_old_search = false;
|
||||
require_once('include/SearchForm/SearchForm2.php');
|
||||
|
||||
/* if(!empty($metafiles[$this->module]['searchdefs']))
|
||||
require_once($metafiles[$this->module]['searchdefs']);
|
||||
elseif(file_exists('modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
require_once('modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
*/
|
||||
if (file_exists('custom/modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
{
|
||||
require_once('custom/modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}
|
||||
elseif (!empty($metafiles[$this->module]['searchdefs']))
|
||||
{
|
||||
require_once($metafiles[$this->module]['searchdefs']);
|
||||
}
|
||||
elseif (file_exists('modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
{
|
||||
require_once('modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}
|
||||
|
||||
if(!empty($metafiles[$this->module]['searchfields']))
|
||||
require_once($metafiles[$this->module]['searchfields']);
|
||||
elseif(file_exists('modules/'.$this->module.'/metadata/SearchFields.php'))
|
||||
require_once('modules/'.$this->module.'/metadata/SearchFields.php');
|
||||
|
||||
$searchForm = new SearchForm($this->seed, $this->module, $this->action);
|
||||
$searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl', $view, $listViewDefs);
|
||||
$searchForm->lv = $lv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(isset($this->options['show_title']) && $this->options['show_title'] && (!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != "true")) {
|
||||
$moduleName = isset($this->seed->module_dir) ? $this->seed->module_dir : $GLOBALS['mod_strings']['LBL_MODULE_NAME'];
|
||||
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($moduleName, $GLOBALS['mod_strings']['LBL_MODULE_TITLE'], true);
|
||||
echo "\n</p>\n";
|
||||
|
||||
}
|
||||
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query']))
|
||||
{
|
||||
// we have a query
|
||||
if(!empty($_SERVER['HTTP_REFERER']) && preg_match('/action=EditView/', $_SERVER['HTTP_REFERER'])) { // from EditView cancel
|
||||
$searchForm->populateFromArray($storeQuery->query);
|
||||
}
|
||||
else {
|
||||
$searchForm->populateFromRequest();
|
||||
}
|
||||
$where_clauses = $searchForm->generateSearchWhere(true, $this->seed->module_dir);
|
||||
if (count($where_clauses) > 0 )$where = '('. implode(' ) AND ( ', $where_clauses) . ')';
|
||||
$GLOBALS['log']->info("List View Where Clause: $where");
|
||||
}
|
||||
if($use_old_search){
|
||||
switch($view) {
|
||||
case 'basic_search':
|
||||
$searchForm->setup();
|
||||
$searchForm->displayBasic($headers);
|
||||
break;
|
||||
case 'advanced_search':
|
||||
$searchForm->setup();
|
||||
$searchForm->displayAdvanced($headers);
|
||||
break;
|
||||
case 'saved_views':
|
||||
echo $searchForm->displaySavedViews($listViewDefs, $lv, $headers);
|
||||
break;
|
||||
}
|
||||
|
||||
}else{
|
||||
echo $searchForm->display($headers);
|
||||
}
|
||||
if(!$headers)
|
||||
return;
|
||||
|
||||
if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false){
|
||||
// $this->processQuickSearch();
|
||||
$lv->setup($seed, 'include/ListView/ListViewGeneric.tpl', $where, $params);
|
||||
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
|
||||
echo get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
|
||||
echo $lv->display();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user