Skip to content

Commit

Permalink
lmb-181: always show is required toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVanHoof committed Jan 23, 2025
1 parent a4b40c2 commit 6043bb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
16 changes: 7 additions & 9 deletions app/components/rdf-input-fields/crud-custom-field-modal.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,13 @@
{{selected.label}}
</PowerSelect>
</AuFormRow>
{{#if this.canShowRequiredToggle}}
<AuFormRow>
<AuToggleSwitch
@disabled={{@show}}
@checked={{this.isFieldRequired}}
@onChange={{this.toggleIsRequired}}
>Maak veld verplicht</AuToggleSwitch>
</AuFormRow>
{{/if}}
<AuFormRow>
<AuToggleSwitch
@disabled={{@show}}
@checked={{this.isFieldRequired}}
@onChange={{this.toggleIsRequired}}
>Maak veld verplicht</AuToggleSwitch>
</AuFormRow>
</form>
</:body>
<:footer>
Expand Down
5 changes: 0 additions & 5 deletions app/components/rdf-input-fields/crud-custom-field-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { JSON_API_TYPE, SOURCE_GRAPH } from 'frontend-lmb/utils/constants';
import { PROV } from 'frontend-lmb/rdf/namespaces';
import { showErrorToast } from 'frontend-lmb/utils/toasts';
import {
ADRES_CUSTOM_DISPLAY_TYPE,
LIBRARY_ENTREES,
TEXT_CUSTOM_DISPLAY_TYPE,
} from 'frontend-lmb/utils/well-known-uris';
Expand Down Expand Up @@ -256,8 +255,4 @@ export default class RdfInputFieldCrudCustomFieldModalComponent extends Componen

return 'Pas een veld aan';
}

get canShowRequiredToggle() {
return this.displayType.uri !== ADRES_CUSTOM_DISPLAY_TYPE;
}
}

0 comments on commit 6043bb7

Please sign in to comment.