contao-community-alliance / contao-multicolumnwizard-bundle

Contao 4 Widget - MultiColumnWizard
GNU Lesser General Public License v3.0
12 stars 12 forks source link

"hidelabel" Klasse führt zu Problemen #97

Closed Total-Reality closed 3 years ago

Total-Reality commented 3 years ago

Die Klasse "hidelabel" führt zu Problemen beim inputType "checkboxWizard" und "radio" u.a.

Die Options werden einfach ausgeblendet. mcw-styling-vorher

Vorschlag - Als Selektor folgendes einstellen: .multicolumnwizard .hidelabel h3, .multicolumnwizard .hidelabel legend

Vorher: .multicolumnwizard .hidelabel h3, .multicolumnwizard .hidelabel label

Zudem bewirken die Angaben für float bei label und input zu sehr merkwürdigen Fehldarstellungen.

Wenn man die floats raus nimmt, dann würde das Ergebnis so aussehen: mcw-styling-aufgeraeumt

Stelle im Code Siehe hier https://github.com/menatwork/contao-multicolumnwizard-bundle/blob/57e31215589f99f46ee97c9eab7bb64b0b16d349/src/Resources/public/css/multicolumnwizard_src.css#L34

Mein Code:

$GLOBALS['TL_DCA'][$strTblName]['fields']['mcwtest2'] = array
(
    'exclude'   => true,
    'inputType' => 'multiColumnWizard',
    'eval'      => array
        (
        //'columnsCallback' => array('tl_mcw_test', 'getTestFields'),
        'columnFields' => array
                (
                    'text' => array
              (
                'label'              => 'text',
                'default'            => 'Bla',
                'inputType'          => 'text',
                'eval'               => array('rgxp'=>'digit', 'maxlength'=>5, 'style'=>'width:50px')
              ),
              'textarea' => array
              (
                'label'              => 'textarea',
                'default'            => 'Bla',
                'inputType'          => 'text',
                'eval'               => array('style'=>'width:50px')
              ),
              'select' => array
              (
                'label'              => 'select',
                'default'            => 'b',
                'inputType'          => 'select',
                'options'            => array('s' => 'Sidney', 'b' => 'Bristol'),
                'eval'               => array('includeBlankOption' => true)
              ),
              'checkbox' => array
              (
                'label'              => 'checkbox',
                'default'            => '1',
                'inputType'          => 'checkbox',
                'eval'               => array('style'=>'width:80px')
              ),
              'checkboxWizard' => array
              (
                'label'              => 'checkboxWizard',
                'default'            => 'b',
                'inputType'          => 'checkboxWizard',
                'options'            => array('s', 'b'),
                'reference'          => array('s' => 'Sidney', 'b' => 'Bristol'),
                'eval'               => array()
              ),
              'radio' => array
              (
                'label'              => 'radio',
                'default'            => 'b',
                'inputType'          => 'radio',
                'options'            => array('s' => 'Sidney', 'b' => 'Bristol'),
                'eval'               => array()
              ),
              'file' => array
              (
                'label'              => 'File',
                'inputType'          => 'fileTree',
                'eval'               => array('fieldType' => 'radio', 'files' => true, 'filesOnly' => true, 'multiple' => false, 'style'=>'width:150px')
              )
            ),
    ),
    'sql'       => "blob NULL"
);
zonky2 commented 3 years ago

Die Generierung des "Grid" sollte instgesammt auf den Prüfstand - @stefanheimes arbeitet an einer Umstellung auf Twig, d.h. da könnte man dann auch von Tabelle auf Div umstellen..

Mit https://github.com/menatwork/contao-multicolumnwizard-bundle/issues/72 war meine Intention, ein neues "eval" einzuführen, da wir drei Breiten haben und diese ansteuern sollten:

Total-Reality commented 3 years ago

Ja, das wäre recht cool. Klingt schon mal vielversprechend.

Jedes Feld-Konstrukt sollte darüber hinaus möglichst auch sein eigenes div bekommen mit mehreren CSS-Klassen, so dass dann jemand wie ich dies ggf. über ein eigenes Backend-Stylesheet noch separat ansprechen kann. z.B. <div class="widget widget-50 widget-feldname">

Nachfolgend mal ein Beispiel was mir einige Zeit und Nerven gekostet hat, vor allem die Platzierung der beiden Felder links nebeneinander. mcw-backend-felder

zonky2 commented 3 years ago

man kann aber auch neben Table (Standard) und Div auch ein eigenes Template verwenden - siehe https://github.com/menatwork/contao-multicolumnwizard-bundle/blob/master/src/Contao/Widgets/MultiColumnWizard.php#L880

Außer Table habe ich die anderen beiden nie wirklich getestet...

stefanheimes commented 3 years ago

Fix on Master and Version 3.4.11