Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Hide license field in dandiset registration, populate with dummy value #124

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 45 additions & 45 deletions web/src/views/CreateDandisetView/CreateDandisetView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,49 +73,49 @@
dense
class="my-4"
/>
<div v-if="!embargoed">
<div class="text-h4">
License
</div>
<div>
Select a license under which to share the contents of this Dataset.
You can learn more about <a
href="https://www.dandiarchive.org/handbook/35_data_licenses/"
target="_blank"
rel="noopener"
>
licenses for datasets
</a>.
</div>
<v-select
v-model="license"
:items="dandiLicenses"
label="License"
class="my-4"
outlined
dense
/>
</div>
<div v-else>
<div class="text-h4">
NIH Award Number
</div>
<div>
Provide an NIH award number for this embargoed Dataset. Note: this
can be changed at any time and additional award numbers can be added
later.
</div>
<v-text-field
v-model="awardNumber"
label="Award number"
:counter="120"
:required="embargoed"
outlined
dense
class="my-4"
:rules="awardNumberRules"
/>
</div>
<!-- <div v-if="!embargoed">-->
<!-- <div class="text-h4">-->
<!-- License-->
<!-- </div>-->
<!-- <div>-->
<!-- Select a license under which to share the contents of this Dataset.-->
<!-- You can learn more about <a-->
<!-- href="https://www.dandiarchive.org/handbook/35_data_licenses/"-->
<!-- target="_blank"-->
<!-- rel="noopener"-->
<!-- >-->
<!-- licenses for datasets-->
<!-- </a>.-->
<!-- </div>-->
<!-- <v-select-->
<!-- v-model="license"-->
<!-- :items="dandiLicenses"-->
<!-- label="License"-->
<!-- class="my-4"-->
<!-- outlined-->
<!-- dense-->
<!-- />-->
<!-- </div>-->
<!-- <div v-else>-->
<!-- <div class="text-h4">-->
<!-- NIH Award Number-->
<!-- </div>-->
<!-- <div>-->
<!-- Provide an NIH award number for this embargoed Dataset. Note: this-->
<!-- can be changed at any time and additional award numbers can be added-->
<!-- later.-->
<!-- </div>-->
<!-- <v-text-field-->
<!-- v-model="awardNumber"-->
<!-- label="Award number"-->
<!-- :counter="120"-->
<!-- :required="embargoed"-->
<!-- outlined-->
<!-- dense-->
<!-- class="my-4"-->
<!-- :rules="awardNumberRules"-->
<!-- />-->
<!-- </div>-->
<small class="float-right font-weight-bold">All fields are required</small>
</v-form>
</v-card-text>
Expand Down Expand Up @@ -162,7 +162,7 @@

const name = ref('');
const description = ref('');
const license = ref<LicenseType>();
const license = ref<LicenseType>('spdx:CC0-1.0');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for Slack comment for Kabi

const embargoed = ref(false);
const awardNumber = ref('');
const saveDisabled = computed(
Expand All @@ -172,7 +172,7 @@
|| (!embargoed.value && !license.value),
);

const awardNumberRules = computed(

Check warning on line 175 in web/src/views/CreateDandisetView/CreateDandisetView.vue

View workflow job for this annotation

GitHub Actions / lint-type-check

'awardNumberRules' is assigned a value but never used
() => [(v: string) => awardNumberValidator(v) || VALIDATION_FAIL_MESSAGE],
);

Expand All @@ -180,7 +180,7 @@
const descriptionMaxLength: ComputedRef<number> = computed(
() => store.schema.properties.description.maxLength,
);
const dandiLicenses: ComputedRef<LicenseType[]> = computed(

Check warning on line 183 in web/src/views/CreateDandisetView/CreateDandisetView.vue

View workflow job for this annotation

GitHub Actions / lint-type-check

'dandiLicenses' is assigned a value but never used
() => store.schema.$defs.LicenseType.enum,
);

Expand All @@ -193,7 +193,7 @@
name: name.value,
description: description.value,
};

if (license.value) {
metadata.license = [license.value];
}
Expand Down
Loading