Skip to content

Commit

Permalink
Merge pull request #1085 from metourneau/geofit/hide_details_fields
Browse files Browse the repository at this point in the history
Geofit/hide details fields
  • Loading branch information
joelclems authored Oct 26, 2020
2 parents 6e65123 + f96e684 commit d13b19f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
[sizeMax]="appConfig.MEDIAS.MEDIAS_SIZE_MAX"
[default]="formDefComp.default || {}"
[details]="formDefComp.details"
[hideDetailsFields]="formDefComp.hide_details_fields"
>
</pnx-medias>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const mediaFormDefinitionsDict = {
attribut_label: 'Avancé',
definition: "Afficher plus d'options pour le formulaire",
value: true,
hidden: ({ meta }) => !(meta.details && meta.details.length)
hidden: ({ meta }) => !(meta.details && meta.details.length) || meta.hideDetailsFields
},
id_nomenclature_media_type: {
attribut_label: 'Type de média',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export class MediaComponent implements OnInit {

@Input() details = [];

/* fix #1083 Cacher les champs présents dans details */
@Input() hideDetailsFields : boolean = false;

constructor(
private _formBuilder: FormBuilder,
public ms: MediaService,
Expand All @@ -54,7 +57,8 @@ export class MediaComponent implements OnInit {
mediaFormDefinitionsDict,
{
nomenclatures: this.ms.metaNomenclatures(),
details: this.details
details: this.details,
hideDetailsFields: this.hideDetailsFields
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
[sizeMax]="sizeMax"
[default]="default"
[details]="details"
[hideDetailsFields]="hideDetailsFields"
>
</pnx-media>
</mat-expansion-panel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export class MediasComponent implements OnInit {
@Input() disabled = false;
@Input() disabledTxt: string;

/* fix #1083 Cacher les champs présents dans details */
@Input() hideDetailsFields : boolean = false;

public bInitialized: boolean;

constructor(public ms: MediaService) {}
Expand Down

0 comments on commit d13b19f

Please sign in to comment.