<?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['EcmDocumentTemplates']['DetailView'] = array (
  'templateMeta' => array (
    'form' => array (
      'buttons' => array ('EDIT', 'DUPLICATE', 'DELETE',
        array(
          'customCode' => '<input name="ecmdocumenttemplate_pdf" id="ecmdocumenttemplate_pdf" title="{$MOD.LBL_ECMDOCUMENTTEMPLATE_PDF_BUTTON_TITLE}" accessKey="{$MOD.LBL_ECMDOCUMENTTEMPLATE_PDF_BUTTON_KEY}" class="button" onclick="EcmPreviewPDF(\'index.php?module=EcmDocumentTemplates&action=previewPDF&to_pdf=1&record={$fields.id.value}\',{literal}{{/literal}zoom:75,toolbar:1{literal}}{/literal});" type="button" value="{$MOD.LBL_ECMDOCUMENTTEMPLATE_PDF}">'
        ),
      )
    ),
    'maxColumns' => '2', 
    'widths' => array (
      array ('label' => '10', 'field' => '30'), 
      array ('label' => '10', 'field' => '30')
    ), 
    'includes' => array(
      array('file'=>'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js'),
    ),                                           
  ),
  'panels' => array (
  	'LBL_INFORMATIONS'=> array(
    array('name', 'assigned_user_name'),
    array('document_number_format_id', 'account_name'),
    array('documents_per', 
			array(
				'name' => 'show_header_on_all_pages',	
				'tabIndex' => '1',
				'customCode' => '<input tabindex="1" disabled="disabled" type="checkbox" id="show_header_on_all_pages" name="show_header_on_all_pages" value="{$fields.show_header_on_all_pages.value}" {if $fields.show_header_on_all_pages.value == 1}checked{/if}>'
			),
	),//'document_number_letter'),
    array('documents_per_day_id',
			array(
				'name' => 'show_footer_on_all_pages',	
				'tabIndex' => '1',
				'customCode' => '<input tabindex="1" disabled="disabled" type="checkbox" id="show_footer_on_all_pages" name="show_footer_on_all_pages" value="{$fields.show_footer_on_all_pages.value}" {if $fields.show_footer_on_all_pages.value == 1}checked{/if}>'
			),	
	),//'correct_number_letter'),
    array('', 'account_number'),
    array('footer_account', 'footer_krs'),
    array('footer_address', 'footer_regon'),
    array('footer_phone', 'footer_capital'),
    array('footer_fax', 'footer_management'),
    array('footer_swift', 'footer_nip'),
    array('footer_bankname', 'footer_vatid'),
	array ('place_of_register', 'ecmlanguage'),
	),
	'LBL_LOGO' => array(
    array(array('name'=>'logo_name','customCode'=>'{$fields.logo_name.value}'), array('name'=>'logo_path','label'=>'LBL_LOGO_PREVIEW','customCode'=>'{if $fields.logo_id.value != \'\'}<img src="index.php?module=EcmDocumentTemplates&action=logo&to_pdf=1&logo={$fields.logo_id.value}" />{/if}')),
  ),
  'LBL_TEMPLATE_TEXTS' => array (


/*
	array(
		array(
			'name' => 'show_header_on_all_pages',	
			'tabIndex' => '1',
			'customCode' => '<input tabindex="1" disabled="disabled" type="checkbox" id="show_header_on_all_pages" name="show_header_on_all_pages" value="{$fields.show_header_on_all_pages.value}" {if $fields.show_header_on_all_pages.value == 1}checked{/if}>'
		),
		array(
			'name' => 'show_footer_on_all_pages',	
			'tabIndex' => '1',
			'customCode' => '<input tabindex="1" disabled="disabled" type="checkbox" id="show_footer_on_all_pages" name="show_footer_on_all_pages" value="{$fields.show_footer_on_all_pages.value}" {if $fields.show_footer_on_all_pages.value == 1}checked{/if}>'
		),
	),
*/
    array('header_text'),
    array('footer_text'),
  ),
  'LBL_TEMPLATE_FILES_DEFS' => array(
	
  	array(
		array('label'=>'LBL_TEMPLATE_FILES_DEFS','customCode'=>'{$TEMPLATE_FILES}'),
	),
	),
  ),  
);

?>
