madeyourday / contao-rocksolid-custom-elements

RockSolid Custom Elements Contao Extension
http://rocksolidthemes.com/de/contao/plugins/custom-content-elements
MIT License
48 stars 12 forks source link

Input type "imageSize" does not work (any more?) #48

Closed cyberlussi closed 9 years ago

cyberlussi commented 9 years ago

Hi, I created some time a ago a template (and it worked as far as I remember great). Now I upgraded to CTO 3.5.0 and madeyourday/contao-rocksolid-custom-elements v1.2.9. It looks like this now: I cannot edit anything in the field, the drop-down is empty, the size fields are inactive.

2015-07-02_23_10_20_-_artikel_startpunkt_inhaltselement_id_129_bearbeiten_-_contao_open_source_cms_3_5

ausi commented 9 years ago

Please post the configuration code of the imageSize field.

cyberlussi commented 9 years ago

Here it is:

<?php

return array(
    'label' => array(
        'de' => array('Boxen (twbs)', 'Eine oder mehrere Boxen mit Titel, Inhalt und Fußzeile mit weiterführendem Link.'),
    ),
    'types' => array('content'),
    'contentCategory' => 'texts',
    'standardFields' => array('headline', 'cssID'),
    'fields' => array(
        'commonBodyClass' => array(
            'label' => array('de' => array('CSS-Klasse der Inhalte für alle Boxen.', '')),
            'inputType' => 'text',
            'eval' => array('tl_class' => 'w50'),
        ),  
        'commonImageSize' => array(
            'label' => array('de' => array('Dimensionen der Bilder für alle Boxen.', '')),
            'inputType' => 'imageSize',
            'eval' => array('tl_class' => 'w50'),
        ),
        'boxes' => array(
            'label' => array('de' => array('Boxen (twbs)', 'Fügen Sie eine beliebige Anzahl an Boxen ein.')),
            'elementLabel' => array('de' => 'Box %s'),
            'inputType' => 'list',
            'minItems' => 1,
            'maxItems' => 4,
            'fields' => array(
                'heading' => array(
                    'label' => array('de' => array('Überschrift', '')),
                    'inputType' => 'text',
                    'eval' => array(
                        'tl_class' => 'w50 m12'
                    ),
                ),
                'icon' => array(
                    'label' => array('de' => array('Icon', '')),
                    'inputType' => 'rocksolid_icon_picker',
                    'eval' => array(
                        'iconFont' => 'assets/components/font-awesome/fonts/fontawesome-webfont.svg',
                        'tl_class' => 'w50'
                    ),
                ),
                'footer' => array(
                    'label' => array('de' => array('Weiterleitung zu', '')),
                    'inputType' => 'pageTree',
                    'eval' => array(
                        'tl_class' => 'w50 clr'
                    ),
                ),
                'image' => array(
                    'label' => array('de' => array('Bild', '')),
                    'inputType' => 'fileTree',
                    'eval' => array(
                        'fieldType' => 'radio',
                        'filesOnly' => true,
                        'extensions' => 'jpg,jpeg,png,gif,svg',
                        'tl_class'  => 'w50'
                    ),
                ),
                'body' => array(
                    'label' => array('de' => array('Inhalt', '')),
                    'inputType' => 'textarea',
                    'eval' => array(
                        'rte' => 'tinyMCE',
                        'tl_class' => 'clr',
                    ),
                ),
            ),
        ),
    ),
);
ausi commented 9 years ago

You forgot to define options and reference, you can find an example in the contao core: system/modules/core/dca/tl_content.php:249-251.

cyberlussi commented 9 years ago

Yes, thanks for the hint. Seems to be mandatory for CTO 3.5 now ...