Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
87239ac1
Commit
87239ac1
authored
Sep 12, 2018
by
Elias Villiger
Browse files
Feature #6653 - Add save button class/glyphicon/tooltip for submit button
parent
d42b5711
Pipeline
#869
passed with stage
in 1 minute and 37 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
extension/qfq/qfq/BuildFormBootstrap.php
View file @
87239ac1
...
...
@@ -591,7 +591,9 @@ class BuildFormBootstrap extends AbstractBuildForm {
$buttonText
=
$this
->
formSpec
[
F_SUBMIT_BUTTON_TEXT
];
$htmlElement
=
$this
->
buildButtonCode
(
'save-button'
,
$buttonText
,
$buttonText
,
''
,
''
,
$this
->
formSpec
[
F_BUTTON_ON_CHANGE_CLASS
],
'btn btn-default'
);
$htmlElement
=
$this
->
buildButtonCode
(
'save-button'
,
$buttonText
,
$this
->
formSpec
[
F_SUBMIT_BUTTON_TOOLTIP
],
$this
->
formSpec
[
F_SUBMIT_BUTTON_GLYPH_ICON
],
''
,
$this
->
formSpec
[
F_BUTTON_ON_CHANGE_CLASS
],
$this
->
formSpec
[
F_SUBMIT_BUTTON_CLASS
]);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_LABEL
,
''
);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_INPUT
,
$htmlElement
);
...
...
extension/qfq/qfq/Constants.php
View file @
87239ac1
...
...
@@ -889,6 +889,11 @@ const F_SAVE_BUTTON_TEXT = SYSTEM_SAVE_BUTTON_TEXT;
const
F_SAVE_BUTTON_TOOLTIP
=
SYSTEM_SAVE_BUTTON_TOOLTIP
;
const
F_SAVE_BUTTON_CLASS
=
SYSTEM_SAVE_BUTTON_CLASS
;
const
F_SAVE_BUTTON_GLYPH_ICON
=
SYSTEM_SAVE_BUTTON_GLYPH_ICON
;
// the following submitButton variables are only for internal use;
// externally they are defined by the saveButton variables
const
F_SUBMIT_BUTTON_CLASS
=
'submitButtonClass'
;
const
F_SUBMIT_BUTTON_GLYPH_ICON
=
'submitButtonGlyphIcon'
;
const
F_SUBMIT_BUTTON_TOOLTIP
=
'submitButtonToolTip'
;
const
F_CLOSE_BUTTON_TEXT
=
SYSTEM_CLOSE_BUTTON_TEXT
;
const
F_CLOSE_BUTTON_TOOLTIP
=
SYSTEM_CLOSE_BUTTON_TOOLTIP
;
...
...
extension/qfq/qfq/QuickFormQuery.php
View file @
87239ac1
...
...
@@ -863,6 +863,13 @@ class QuickFormQuery {
$parameterLanguageFieldName
=
$this
->
store
->
getVar
(
SYSTEM_PARAMETER_LANGUAGE_FIELD_NAME
,
STORE_SYSTEM
);
$formSpec
=
HelperFormElement
::
setLanguage
(
$formSpec
,
$parameterLanguageFieldName
);
if
(
!
empty
(
$formSpec
[
F_SUBMIT_BUTTON_TEXT
]))
{
// set defaults for submit button (different from save button defaults)
$formSpec
[
F_SUBMIT_BUTTON_CLASS
]
=
$formSpec
[
F_SAVE_BUTTON_CLASS
]
??
'btn btn-default'
;
$formSpec
[
F_SUBMIT_BUTTON_GLYPH_ICON
]
=
$formSpec
[
F_SAVE_BUTTON_GLYPH_ICON
]
??
''
;
$formSpec
[
F_SUBMIT_BUTTON_TOOLTIP
]
=
$formSpec
[
F_SAVE_BUTTON_TOOLTIP
]
??
$formSpec
[
F_SUBMIT_BUTTON_TEXT
];
}
$formSpec
=
$this
->
syncSystemFormConfig
(
$formSpec
);
$formSpec
=
$this
->
initForm
(
$formSpec
,
$recordId
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment