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
b9f6edb3
Commit
b9f6edb3
authored
Sep 26, 2017
by
Carsten Rose
Browse files
Feature: Upload Button - wrapped with Bootstrap Button - enabled again to merge with button-upload
parent
9eb45f4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/AbstractBuildForm.php
View file @
b9f6edb3
...
...
@@ -2825,16 +2825,16 @@ abstract class AbstractBuildForm {
$attribute
.
=
$this
->
getAttributeFeMode
(
$formElement
[
FE_MODE
]);
$attribute
.
=
Support
::
doAttribute
(
'class'
,
$uploadClass
,
true
);
$htmlInputFile
=
'<input '
.
$attribute
.
'>'
.
$this
->
getHelpBlock
();
//
$htmlInputFile = '<input ' . $attribute . '>' . $this->getHelpBlock();
// <input type="file"> with BS3: https://stackoverflow.com/questions/11235206/twitter-bootstrap-form-file-element-upload-button/25053973#25053973
//
$attribute .= Support::doAttribute('style', "display:none;");
//
$htmlInputFile = '<input ' . $attribute . '>';
//
$attributeFileLabel = Support::doAttribute('for', $formElement[FE_HTML_ID]);
//
$attributeFileLabel .= Support::doAttribute('class', 'btn btn-default
'
);
//
//
Support::setIfNotSet($formElement, FE_FILE_BUTTON_TEXT, FE_FILE_BUTTON_TEXT_DEFAULT);
//
$htmlInputFile = Support::wrapTag("<label $attributeFileLabel>", $htmlInputFile . $formElement[FE_FILE_BUTTON_TEXT]);
$attribute
.
=
Support
::
doAttribute
(
'style'
,
"display:none;"
);
$htmlInputFile
=
'<input '
.
$attribute
.
'>'
;
$attributeFileLabel
=
Support
::
doAttribute
(
'for'
,
$formElement
[
FE_HTML_ID
]);
$attributeFileLabel
.
=
Support
::
doAttribute
(
'class'
,
'btn btn-default
'
.
$uploadClass
);
Support
::
setIfNotSet
(
$formElement
,
FE_FILE_BUTTON_TEXT
,
FE_FILE_BUTTON_TEXT_DEFAULT
);
$htmlInputFile
=
Support
::
wrapTag
(
"<label
$attributeFileLabel
>"
,
$htmlInputFile
.
$formElement
[
FE_FILE_BUTTON_TEXT
]);
$deleteButton
=
Support
::
wrapTag
(
"<button type='button' class='delete-file' data-sip='
$sipUpload
' name='delete-
$htmlFormElementName
'>"
,
$this
->
symbol
[
SYMBOL_DELETE
]);
...
...
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