Commit 50bd3312 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Refs #7849. Missed filename after the file chooser selected an file. fixed.

parent 26517504
Pipeline #2330 passed with stages
in 2 minutes and 39 seconds
......@@ -3134,7 +3134,6 @@ abstract class AbstractBuildForm {
if (!empty($formElement[FE_FILE_TRASH_TEXT])) {
$trashText = ' ' . $formElement[FE_FILE_TRASH_TEXT];
}
$deleteButton = Support::wrapTag("<button type='button' class='btn btn-default delete-file $disabled' $disabled data-sip='$sipUpload' name='delete-$htmlFormElementName'>", $this->symbol[SYMBOL_DELETE] . $trashText);
if (!empty($value) && Support::isEnabled($formElement, FE_FILE_DOWNLOAD_BUTTON)) {
if (is_readable($value)) {
......@@ -3151,12 +3150,14 @@ abstract class AbstractBuildForm {
}
}
$deleteButton = '';
$htmlFilename = Support::wrapTag("<span class='uploaded-file-name'>", $value, false);
if (($formElement[FE_FILE_TRASH] ?? '1') == '1') {
$htmlTextDelete = Support::wrapTag("<div class='uploaded-file $textDeleteClass'>", $htmlFilename . ' ' . $deleteButton);
} else {
$htmlTextDelete = $htmlFilename;
$deleteButton = Support::wrapTag("<button type='button' class='btn btn-default delete-file $disabled' $disabled data-sip='$sipUpload' name='delete-$htmlFormElementName'>", $this->symbol[SYMBOL_DELETE] . $trashText);
}
$htmlTextDelete = Support::wrapTag("<div class='uploaded-file $textDeleteClass'>", $htmlFilename . ' ' . $deleteButton);
// <button type="button" class="file-delete" data-sip="571d1fc9e6974"><span class="glyphicon glyphicon-trash"></span></button>
$formElement = HelperFormElement::prepareExtraButton($formElement, false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment