Skip to content

Commit

Permalink
hide categories for draft registrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Uditi Mehta authored and Uditi Mehta committed Oct 21, 2024
1 parent e7aa290 commit 337a530
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions lib/registries/addon/drafts/draft/metadata/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default class RegistriesDraftMetadata extends Controller {
categoryOptions = Object.values(NodeCategory);
showAddContributorWidget = false;

hideCategories = true;

@not('media.isDesktop') showMobileView!: boolean;
osfUrl = config.OSF.url;

Expand Down
14 changes: 8 additions & 6 deletions lib/registries/addon/drafts/draft/metadata/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,14 @@
/>
{{/if}}
{{/let}}
<form.select data-test-metadata-category local-class='SchemaBlockDropdown' id='category'
@label={{t 'registries.registration_metadata.category'}} @valuePath='category'
@options={{this.categoryOptions}} @onchange={{perform this.draftManager.onMetadataInput}} as
|option|>
<NodeCategory @category={{option}} />
</form.select>
{{#unless this.hideCategories}}
<form.select data-test-metadata-category local-class='SchemaBlockDropdown' id='category'
@label={{t 'registries.registration_metadata.category'}} @valuePath='category'
@options={{this.categoryOptions}} @onchange={{perform this.draftManager.onMetadataInput}} as
|option|>
<NodeCategory @category={{option}} />
</form.select>
{{/unless}}
<fieldset id='affiliated_institutions'>
<legend>
{{t 'registries.registration_metadata.affiliated_institutions'}}
Expand Down

0 comments on commit 337a530

Please sign in to comment.