Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"hidelabel" Klasse führt zu Problemen #97

Closed
Total-Reality opened this issue Jan 15, 2021 · 4 comments
Closed

"hidelabel" Klasse führt zu Problemen #97

Total-Reality opened this issue Jan 15, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Total-Reality
Copy link

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 zonky2 added the enhancement New feature or request label Jan 16, 2021
@zonky2 zonky2 added this to the 3.4.10 milestone Jan 16, 2021
@zonky2
Copy link
Contributor

zonky2 commented Jan 16, 2021

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:

  • Breite des MCW komplett (w50 oder "w100")
  • Breite der Spalte (das gibt es noch nicht)
  • Breite des Widgets in der Spalte

@Total-Reality
Copy link
Author

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
Copy link
Contributor

zonky2 commented Jan 16, 2021

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...

@zonky2 zonky2 modified the milestones: 3.4.10, 3.4.11 Feb 24, 2021
@stefanheimes
Copy link
Member

Fix on Master and Version 3.4.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants