PHP-Code:
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
$GLOBALS['TL_DCA']['wa_special_offer'] = array
(
// Config
'config' => array
(
'dataContainer' => 'Table',
'closed' => false //implizit
),
// Liste
'list' => array
(
'sorting' => array
(
'mode' => 1,
'fields' => array('wochentag'),
'panelLayout' => 'search,limit',
'flag' => 1
),
'label' => array
(
'fields' => array('wochentag'), // Elemente, die im Panel angezeigt werden
'format' => '%s'
),
'operations' => array
(
'edit' => array
(
'label' => &$GLOBALS['TL_LANG']['wa_special_offer']['edit'],
'href' => 'act=edit',
'icon' => 'edit.gif'
),
'delete' => array
(
'label' => &$GLOBALS['TL_LANG']['wa_special_offer']['delete'],
'href' => 'act=delete',
'icon' => 'delete.gif',
'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"'
),
/*'copy' => array
(
'label' => &$GLOBALS['TL_LANG']['wa_special_offer']['copy'],
'href' => 'act=copy',
'icon' => 'copy.gif',
),*/
'show' => array
(
'label' => &$GLOBALS['TL_LANG']['wa_special_offer']['show'],
'href' => 'act=show',
'icon' => 'show.gif'
)
)
),
// Palettes
'palettes' => array
(
// Auswahlkriterium ist das Feld "wiederholung"
'__selector__' => array('wiederholung'),
// Standardpalette
'default' => '{Aktionsname & Tag},name,wochentag;{Rhytmus, Text & Link},wiederholung;text,link;status',
// wenn "immer" ausgewählt wird, wird das Datum NICHT angezeigt
'immer' => '{Aktionsname & Tag},name,wochentag;{Rhytmus, Text & Link},wiederholung;text,link;status',
// wenn einmalig ausgewählt wird, wird das Datum angezeigt
'einmalig' => '{Aktionsname & Tag},name,wochentag;{Rhytmus, Text & Link},wiederholung,datum;text,link;status'
),
'fields' => array
(
'name' => array
(
'label' => &$GLOBALS['TL_LANG']['wa_special_offer']['name'],
'search' => true,
'inputType' => 'text',
'eval' => array('mandatory'=>true, 'minLength'=>5)
),
'wochentag' => array
(
'label' => &$GLOBALS['TL_LANG']['wa_special_offer']['wochentag'],
'search' => true,
'inputType' => 'radio',
'eval' => array('mandatory'=>true, 'maxLength'=>2),
'options' => array ('Monday'=>'Montag','Tuesday'=>'Dienstag','Wednesday'=>'Mittwoch','Thursday'=>'Donnerstag','Friday'=>'Freitag','Saturday'=>'Samstag','Sunday'=>'Sonntag')
),
'wiederholung' => array
(
'label' => &$GLOBALS['TL_LANG']['wa_special_offer']['wiederholung'],
'search' => true,
'inputType' => 'radio',
// hier habe ich submitOnChange hinzugefügt...
'eval' => array('mandatory'=>true, 'minLength'=>3, 'submitOnChange' => true),
'options' => array ('immer'=>'regelmäßige, wiederholende Aktion an dem oben angegebenen Wochentag','einmalig'=>'nur an diesem aktuellen Wochentag')
),
'datum' => array
(
'label' => &$GLOBALS['TL_LANG']['wa_special_offer']['datum'],
'default' => time(),
'exclude' => true,
'filter' => true,
'sorting' => true,
'flag' => 8,
'inputType' => 'text',
// hier habe ich submitOnChange entfernt...
'eval' => array('rgxp'=>'date', 'datepicker'=>$this->getDatePickerString(), 'tl_class'=>'w50 wizard')
),
'text' => array
(
'label' => &$GLOBALS['TL_LANG']['wa_special_offer']['text'],
'search' => true,
'inputType' => 'textarea',
'eval' => array('rte' => 'tinyMCE', 'cols' => 80,'rows' => 5, 'style' => 'height: 80px')
),
'link' => array
(
'label' => &$GLOBALS['TL_LANG']['wa_special_offer']['link'],
'search' => true,
'inputType' => 'pageTree',
'eval' => array('fieldType'=>'radio', 'files'=>true, 'filesOnly'=>true, 'mandatory'=>true)
),
'status' => array
(
'label' => &$GLOBALS['TL_LANG']['wa_special_offer']['status'],
'search' => true,
'inputType' => 'radio',
'eval' => array('mandatory'=>true),
'options' => array ('1'=>'aktiv','0'=>'inaktiv')
),
),
);
?>
Die geänderten Bereich habe ich kommentiert.
Lesezeichen