Files
crm.e5.pl/modules/EcmServices/metadata/createviewdefs.php
2024-04-27 09:23:34 +02:00

412 lines
17 KiB
PHP

<?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['EcmServices']['CreateView'] = array(
'templateMeta' => array(
'form' => array(
'enctype' => 'multipart/form-data',
'buttons' => array(
array(
'customCode' =>
'
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="window.onbeforeunload=\'\';return SaveForm();" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">
',
),
array(
'customCode' =>
'
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="removeDocumentReservations(this.form.temp_id.value,\'cancel\');" type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
',
),
array(
'customCode' =>
'
&nbsp;
<input title="{$MOD.LBL_GO_TO_LIST_BUTTON_TITLE}" accessKey="{$MOD.LBL_GO_TO_LIST_BUTTON_KEY}" class="button" onclick="removeDocumentReservations(this.form.temp_id.value,\'list\');" type="button" name="button" value="{$MOD.LBL_GO_TO_LIST_BUTTON_LABEL}" />
',
),
// array(
// 'customCode' =>
// '
// <input title="{$MOD.LBL_PRINT_INCOME_PDF_BUTTON_TITLE}" onclick="removeDocumentReservations(this.form.temp_id.value,\'income_pdf\');" class="button" type="button" name="button" value="{$MOD.LBL_PRINT_INCOME_PDF_BUTTON_LABEL}" />
// ',
// ),
// array(
// 'customCode' =>
// '
// <input title="{$MOD.LBL_PRINT_SERVICE_PDF_BUTTON_TITLE}" onclick="removeDocumentReservations(this.form.temp_id.value,\'income_pdf\');" class="button" type="button" name="button" value="{$MOD.LBL_PRINT_SERVICE_PDF_BUTTON_LABEL}" />
// ',
// ),
// array(
// 'customCode' =>
// '
// <input title="{$MOD.LBL_PRINT_WARRANTY_PDF_BUTTON_TITLE}" onclick="removeDocumentReservations(this.form.temp_id.value,\'income_pdf\');" class="button" type="button" name="button" value="{$MOD.LBL_PRINT_WARRANTY_PDF_BUTTON_LABEL}" />
// ',
// ),
),
'hidden' => array(
'<input type="hidden" name="stock_doc_inside_in" id="stock_doc_inside_in" value=\'1\'>', // temp ?
'<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>',
'<input type="hidden" name="services_list" id="services_list" value=\'{$SERVICES_LIST}\'>',
'<input type="hidden" name="income_list" id="income_list" value=\'{$INCOME_LIST}\'>',
'<input type="hidden" name="email_id" id="email_id" value="">',
'<input type="hidden" name="temp_id" id="temp_id" value="{$TEMP_ID}">',
'<input type="hidden" name="parent_type" id="parent_type" value="Accounts">',
// Fieds used for searching account etc.
'<input type="hidden" name="parent_address_postalcode" id="parent_address_postalcode" value="{$fields.parent_address_postalcode.value}" />',
'<input type="hidden" name="parent_address_city" id="parent_address_city" value="{$fields.parent_address_city.value}" />',
'<input type="hidden" name="parent_address_street" id="parent_address_street" value="{$fields.parent_address_street.value}" />',
'<input type="hidden" name="to_is_vat_free" id="to_is_vat_free" value="{$fields.to_is_vat_free.value}" />',
'<input type="hidden" name="parent_name_copy" id="parent_name_copy" value="{$fields.parent_name.value}" />',
),
),
'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',
),
array(
'file' => 'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js',
),
array(
'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch.js',
),
// array(
// 'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch1.js',
// ),
// array(
// 'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch2.js',
// ),
array(
'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch3.js',
),
array(
'file' => 'modules/EcmServices/formloader.js',
),
array(
'file' => 'modules/EcmServices/MyTable.js',
),
array(
'file' => 'modules/EcmServices/EcmServices.js',
),
array(
'file' => 'modules/EcmServices/EcmServicesCreateView.js',
),
array(
'file' => 'modules/EcmServices/CreateItem.js',
),
array(
'file' => 'modules/EcmProducts/mintajax.js',
),
array(
'file' => 'modules/EcmProducts/helper.js',
),
),
),
'panels' => array(
'LBL_DETAILS_TAB' => array(
array(
array(
'type' => 'tab',
'active' => true,
),
),
array(
array(
'name' => 'document_no',
'tabIndex' => '1',
'customCode' =>
'
<div id="tst" style="display:none;">
</div>
<input readonly="readonly" type="text" name="document_no" id="document_no" value=\'{$fields.document_no.value}\'>
<input type="hidden" name="number" id="number" value=\'{$fields.number.value}\'>
',
),
array(
'name' => 'currency_id',
'label' => 'LBL_CURRENCY',
),
),
array(
array(
'name' => 'parent_name',
'tabIndex' => '1',
),
'ecmpaymentcondition_name',
),
array(
'name',
'ecmdeliverycondition_name',
),
array(
//'status',
//'status',
array(
'label' => 'LBL_STATUS',
'name' => 'status',
'customCode' =>
'
<select name="status" id="status">
{$STATUS}
</select>
',
),
array(
'label' => 'LBL_TEMPLATE_NAME',
'tabIndex' => '1',
'customCode' =>
'
<select tabindex="1" id="template_id" name="template_id" onChange="document.getElementById(\'template_name\').value=this.options[this.selectedIndex].text;">
{$DOCUMENT_TEMPLATES_OPTIONS}
</select>
<input type="hidden" id="template_name" name="template_name" value="{$fields.template_name.value}">
',
),
),
array(
array(
'name' => 'register_date',
'tabIndex' => '1',
'type' => 'datetime',
'displayParams' => array(
'showFormats' => true,
),
),
array(
'label' => 'LBL_STOCK_NAME',
'name' => 'stock_id',
'customCode' =>
'
<select name="stock_id" id="stock_id">
{$STOCK}
</select>
',
),
),
array(
array(
'name' => 'validtill_date',
'tabIndex' => '1',
'type' => 'datetime',
'displayParams' => array(
'showFormats' => true,
),
),
array(
'label' => 'LBL_PW_STOCK_NAME',
'name' => 'pw_stock_id',
'customCode' =>
'
<select name="pw_stock_id" id="pw_stock_id">
{$PW_STOCK}
</select>
',
),
),
// Informations section.
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<div class="tabForm" style="border-top:none;width:100%;height:1px;padding:0px;align:center;">
</div>
<h4>
{$MOD.LBL_TO_INFORMATIONS}
</h4>
',
),
),
array(
array(
'allCols' => true,
'name' => 'parent_comment',
'tabIndex' => '1',
'customCode' =>
'
<textarea name="parent_comment" id="parent_comment" style="width: 90%; resize: vertical;">{$fields.parent_comment.value}</textarea>
',
),
),
array(
array(
'allCols' => true,
'name' => 'service_comment',
'tabIndex' => '1',
'customCode' =>
'
<textarea name="service_comment" id="service_comment" style="width: 90%; resize: vertical;">{$fields.service_comment.value}</textarea>
',
),
),
// array(
// array(
// 'name' => 'parent_name_copy',
// 'tabIndex' => '1',
// 'customCode' =>
// '
// <input type="text" name="parent_name_copy" id="parent_name_copy" value="{$fields.parent_name.value}" readOnly="readonly" size="30" />
// ',
// ),
// 'ecmlanguage',
// ),
array(
'parent_contact_name',
array(
'name' => 'assigned_user_name',
'tabIndex' => '1',
),
),
array(
'parent_contact_phone_fax',
array(
'name' => 'servicer_user_name',
'tabIndex' => '1',
),
),
// array(
// 'parent_contact_title',
// array(
// 'name' => 'to_is_vat_free',
// 'tabIndex' => '1',
// 'customCode' =>
// '
// <input tabindex="1" type="checkbox" id="to_is_vat_free" name="to_is_vat_free" value="{$fields.to_is_vat_free.value}" {if $fields.to_is_vat_free.value == 1}checked{/if}>
// ',
// ),
// ),
// array(
// array(
// 'name' => 'parent_address_street',
// 'tabIndex' => '1',
// 'customCode' =>
// '
// <textarea tabindex="1" id="parent_address_street" name="parent_address_street" rows="2" cols="30" maxlength="150" >
// {$fields.parent_address_street.value}
// </textarea>
// ',
// ),
// 'show_primary_params',
// ),
// array(
// array(
// 'name' => 'parent_address_city',
// 'tabIndex' => '1',
// 'customCode' =>
// '
// <input maxlength="8" type="text" name="parent_address_postalcode" id="parent_address_postalcode" value="{$fields.parent_address_postalcode.value}" style="vertical-align:top;width:80px;" />
// &nbsp;&nbsp;
// <input type="text" name="parent_address_city" id="parent_address_city" value="{$fields.parent_address_city.value}" style="vertical-align:top;width:150px;" />
// ',
// ),
// 'show_advanced_params',
// ),
// array(
// 'parent_address_country',
// '',
// ),
),
'LBL_INCOME_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<link rel="stylesheet" type="text/css" href="modules/EcmServices/MyTable.css" />
<link rel="stylesheet" type="text/css" href="modules/EcmServices/AjaxSearch/AjaxSearch.css" />
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="incomeTableDIV">
<table class="positions" style="width:100%;" id="incomeTable">
<thead id="head">
<tr id="tr">
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="16%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="39%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
',
)
),
),
'LBL_PREVIEW_INCOME_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<span id=\'previewPDF_INCOME\' width="100%" height="100%"></span>
',
),
),
),
),
);