Commit b30c3e79 authored by Carsten  Rose's avatar Carsten Rose
Browse files

#4495 (New): Upload: Problem if mode is 'required' - part 1: do not set HTML...

#4495 (New): Upload: Problem if mode is 'required' - part 1: do not set HTML required if a file is already uploaded.
parent 8a69cf68
......@@ -2821,11 +2821,16 @@ abstract class AbstractBuildForm {
} else {
$textDeleteClass = '';
$uploadClass = 'hidden';
if ($formElement[FE_MODE] == FE_MODE_REQUIRED) {
$formElement[FE_MODE] = FE_MODE_SHOW; // #4495 - Upload, which already has been uploaded should not marked as requires
$attribute .= Support::doAttribute(DATA_REQUIRED, FE_MODE_REQUIRED);
}
// $formElement[FE_MODE] = FE_MODE_HIDDEN; // #3876, CR did not understand why we need this here. Comment. If active, this element will be hide on each dynamic update.
}
$attribute .= $this->getAttributeFeMode($formElement[FE_MODE]);
$attribute .= Support::doAttribute('class', $uploadClass, true);
$htmlInputFile = '<input ' . $attribute . '>' . $this->getHelpBlock();
$deleteButton = Support::wrapTag("<button type='button' class='delete-file' data-sip='$sipUpload' name='delete-$htmlFormElementName'>", $this->symbol[SYMBOL_DELETE]);
......
Supports Markdown
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