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
DLCM
UI
DLCM-Portal
Commits
9e9882ef
Commit
9e9882ef
authored
Mar 18, 2020
by
Alicia.DeDiosFuente
Browse files
fix: the file in metadata type form is optional
parent
c1f67c9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/features/admin/metadata-type/components/presentationals/admin-metadata-type-form/admin-metadata-type-form.presentational.html
View file @
9e9882ef
...
...
@@ -125,7 +125,7 @@
color=
"primary"
type=
"submit"
(keydown.enter)=
"onSubmit()"
[disabled]=
"
!
form.valid ||
!
form.
dirty
"
[disabled]=
"form.
in
valid ||
(
form.
pristine && !this.uploadedOrChangedFile)
"
>
{{'admin.metadataType.form.submit' | translate }}
</button>
...
...
src/app/features/admin/metadata-type/components/presentationals/admin-metadata-type-form/admin-metadata-type-form.presentational.ts
View file @
9e9882ef
...
...
@@ -37,6 +37,7 @@ export class AdminMetadataTypeFormPresentational extends SharedAbstractFormPrese
readonly
files
:
string
=
"
files
"
;
readonly
filesAccepted
:
string
[]
=
[
"
.xml
"
,
"
.json
"
,
"
.xsd
"
,
"
.txt
"
];
readonly
maxSizeFile
:
number
=
25000000
;
uploadedOrChangedFile
:
boolean
=
false
;
metadataFormatEnum
:
KeyValue
[]
=
MetadataTypeFormatEnumHelper
.
getListKeyValue
();
...
...
@@ -95,6 +96,7 @@ export class AdminMetadataTypeFormPresentational extends SharedAbstractFormPrese
this
.
_notificationService
.
showInformation
(
TRANSLATE
(
"
admin.metadataType.readUploadedFileSuccessfully
"
));
};
fileReader
.
readAsText
(
file
);
this
.
uploadedOrChangedFile
=
true
;
}
onTestFileUpload
(
event
:
Event
&
any
):
void
{
...
...
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