[TASK] fix btn-group implementation 30/56630/2
authorMarco Pfeiffer <noreply@example.com>
Wed, 11 Apr 2018 14:27:07 +0000 (16:27 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 11 May 2018 12:02:03 +0000 (14:02 +0200)
The current btn-group implementation using spans results in :first-child
and :last-child not working correctly.
There is actually a workaround implemented in bootstrap itself which is
also necessary for using btn-group-justified.
Just add btn-group inside the btn-group.

Releases: master
Resolves: #84693
Change-Id: I5cee00201c00e26bf0a7419ee3584dddf176a205
Reviewed-on: https://review.typo3.org/56630
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Massimiliano Fani <massimiliano.fani@gmail.com>
Reviewed-by: Cristian Buja <cristian.buja@intera.it>
Tested-by: Cristian Buja <cristian.buja@intera.it>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/form/Resources/Private/Frontend/Partials/Form/Navigation.html

index 2df22f9..5c4d33e 100644 (file)
@@ -3,19 +3,19 @@
        <div class="btn-toolbar" role="toolbar">
                <div class="btn-group" role="group">
                        <f:if condition="{form.previousPage}">
-                               <span class="previous">
+                               <span class="btn-group previous">
                                        <f:form.hidden property="__currentPage" value="{form.previousPage.index}" />
                                        <f:form.button type="button" onclick="document.forms['{form.formDefinition.identifier}'].submit();" class="btn btn-cancel" formnovalidate="formnovalidate">{formvh:translateElementProperty(element: form.currentPage, renderingOptionProperty: 'previousButtonLabel')}</f:form.button>
                                </span>
                        </f:if>
                        <f:if condition="{form.nextPage}">
                                <f:then>
-                                       <span class="next">
+                                       <span class="btn-group next">
                                                <f:form.button property="__currentPage" value="{form.nextPage.index}" class="btn btn-primary">{formvh:translateElementProperty(element: form.currentPage, renderingOptionProperty: 'nextButtonLabel')}</f:form.button>
                                        </span>
                                </f:then>
                                <f:else>
-                                       <span class="next submit">
+                                       <span class="btn-group next submit">
                                                <f:form.button property="__currentPage" value="{form.pages -> f:count()}" class="btn btn-primary">
                                                        {formvh:translateElementProperty(element: form, renderingOptionProperty: 'submitButtonLabel')}
                                                </f:form.button>