예제 #1
0
파일: tl_module.php 프로젝트: rburch/core-1
 /**
  * Return filter templates as array
  * @param DataContainer
  * @return array
  */
 public function getFilterTemplates(DataContainer $dc)
 {
     $intPid = $dc->activeRecord->pid;
     if ($this->Input->get('act') == 'overrideAll') {
         $intPid = $this->Input->get('id');
     }
     return IsotopeBackend::getTemplates('iso_filter_', $intPid);
 }
예제 #2
0
 /**
  * Return reader templates as array
  * @param DataContainer
  * @return array
  */
 public function getReaderTemplates(DataContainer $dc)
 {
     return IsotopeBackend::getTemplates('iso_reader_');
 }
예제 #3
0
<?php

if (!defined('TL_ROOT')) {
    die('You can not access this file directly!');
}
/**
 * PHP version 5
 * @copyright  Copyright (C) 2013 Kirsten Roschanski
 * @author     Kirsten Roschanski <*****@*****.**>
 * @license    http://opensource.org/licenses/lgpl-3.0.html
 * @package    IsotopeInvoice 
 * @filesource https://github.com/katgirl/isotope_invoice
 */
/**
 * Table tl_iso_config
 */
// Palettes
$GLOBALS['TL_DCA']['tl_iso_config']['palettes']['default'] = str_replace('{config_legend}', '{bank_account_legend:hide},bank_name,bank_id,account_number,iban,bic;{config_legend},invoice_template', $GLOBALS['TL_DCA']['tl_iso_config']['palettes']['default']);
// Palettes
$GLOBALS['TL_DCA']['tl_iso_config']['palettes']['default'] = str_replace('vat_no', 'tax_number,vat_no,register,managing_directors', $GLOBALS['TL_DCA']['tl_iso_config']['palettes']['default']);
// Fields
$GLOBALS['TL_DCA']['tl_iso_config']['fields']['bank_name'] = array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['bank_name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'));
$GLOBALS['TL_DCA']['tl_iso_config']['fields']['bank_id'] = array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['bank_id'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'));
$GLOBALS['TL_DCA']['tl_iso_config']['fields']['account_number'] = array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['account_number'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'));
$GLOBALS['TL_DCA']['tl_iso_config']['fields']['iban'] = array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['iban'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'clr w50'));
$GLOBALS['TL_DCA']['tl_iso_config']['fields']['bic'] = array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['bic'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'));
$GLOBALS['TL_DCA']['tl_iso_config']['fields']['tax_number'] = array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['tax_number'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'clr w50'));
$GLOBALS['TL_DCA']['tl_iso_config']['fields']['register'] = array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['register'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'));
$GLOBALS['TL_DCA']['tl_iso_config']['fields']['managing_directors'] = array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['managing_directors'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'));
$GLOBALS['TL_DCA']['tl_iso_config']['fields']['invoice_template'] = array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['invoice_template'], 'exclude' => true, 'inputType' => 'select', 'default' => 'iso_invoice', 'options' => IsotopeBackend::getTemplates('iso_invoice'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'chosen' => true));
예제 #4
0
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program. If not, please visit the Free
 * Software Foundation website at <http://www.gnu.org/licenses/>.
 *
 * PHP version 5
 * @copyright  Isotope eCommerce Workgroup 2009-2012
 * @author     Andreas Schempp <*****@*****.**>
 * @author     Fred Bliss <*****@*****.**>
 * @license    http://opensource.org/licenses/lgpl-3.0.html
 */
/**
 * Table tl_iso_mail
 */
$GLOBALS['TL_DCA']['tl_iso_mail'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'closed' => true, 'switchToEdit' => true, 'ctable' => array('tl_iso_mail_content'), 'onload_callback' => array(array('IsotopeBackend', 'initializeSetupModule'), array('tl_iso_mail', 'checkPermission'))), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('name'), 'flag' => 1, 'panelLayout' => 'filter;search,limit'), 'label' => array('fields' => array('name', 'sender'), 'format' => '%s <span style="color:#b3b3b3; padding-left:3px;">[%s]</span>'), 'global_operations' => array('back' => array('label' => &$GLOBALS['TL_LANG']['MSC']['backBT'], 'href' => 'mod=&table=', 'class' => 'header_back', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'new' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['new'], 'href' => 'act=create', 'class' => 'header_new', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'importMail' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['importMail'], 'href' => 'key=importMail', 'class' => 'header_import_mail', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['edit'], 'href' => 'table=tl_iso_mail_content', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif', 'button_callback' => array('tl_iso_mail', 'copyMail')), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"', 'button_callback' => array('tl_iso_mail', 'deleteMail')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['show'], 'href' => 'act=show', 'icon' => 'show.gif'), 'exportMail' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['exportMail'], 'href' => 'key=exportMail', 'icon' => 'system/modules/isotope/html/drive-download.png'))), 'palettes' => array('__selector__' => array('attachDocument'), 'default' => '{name_legend},name;{address_legend},senderName,sender,cc,bcc;{document_legend:hide},attachDocument;{expert_legend:hide},template,priority'), 'subpalettes' => array('attachDocument' => 'documentTemplate,documentTitle'), 'fields' => array('name' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'long')), 'senderName' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['senderName'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50')), 'sender' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['sender'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'rgxp' => 'email', 'tl_class' => 'w50')), 'cc' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['cc'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'rgxp' => 'extnd', 'tl_class' => 'w50')), 'bcc' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['bcc'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'rgxp' => 'extnd', 'tl_class' => 'w50')), 'template' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['template'], 'exclude' => true, 'inputType' => 'select', 'default' => 'mail_default', 'options' => IsotopeBackend::getTemplates('mail_'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50')), 'priority' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['priority'], 'exclude' => true, 'inputType' => 'select', 'options' => array(1, 2, 3, 4, 5), 'default' => 3, 'reference' => &$GLOBALS['TL_LANG']['tl_iso_mail']['priority_ref'], 'eval' => array('tl_class' => 'w50')), 'attachDocument' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['attachDocument'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true, 'tl_class' => 'clr')), 'documentTemplate' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['documentTemplate'], 'exclude' => true, 'inputType' => 'select', 'options' => IsotopeBackend::getTemplates('iso_invoice'), 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50')), 'documentTitle' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['documentTitle'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'decodeEntities' => true, 'tl_class' => 'w50')), 'source' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_mail']['source'], 'eval' => array('fieldType' => 'checkbox', 'files' => true, 'filesOnly' => true, 'extensions' => 'imt', 'class' => 'mandatory'))));
/**
 * Class tl_iso_mail
 * Provide miscellaneous methods that are used by the data configuration array.
 */
class tl_iso_mail extends Backend
{
    /**
     * Check permissions to edit table tl_iso_mail
     * @return void
     */
    public function checkPermission()
    {
        // Do not run the permission check on other Isotope modules
        if ($this->Input->get('mod') != 'iso_mail') {
            return;