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

Add checkbox for anonymous attribution #341

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 10 additions & 4 deletions isic/ingest/templates/ingest/cohort_create.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,20 @@ <h2 class="leading-6 text-gray-900">
</div>
</div>


<div class="grid grid-cols-3 gap-4 items-start border-t border-gray-200 pt-5">
<div class="grid grid-cols-3 gap-4 items-start border-t border-gray-200 pt-5" x-data="{ attribution: '{{ form.attribution.value|default:"" }}' }">
<label for="{{ form.attribution.html_name }}" class="block text-sm font-medium text-gray-700 mt-px pt-2">
{{ form.attribution.label }}
</label>
<div class="mt-1 mt-0 col-span-2">
<textarea id="{{ form.attribution.html_name }}" name="{{ form.attribution.html_name }}" rows="3" class="border max-w-lg outline-none shadow-sm block p-4 w-full focus:ring-2 focus:ring-prinary-500 focus:border-primary-500 text-sm border-gray-400 rounded-md">{{ form.attribution.value|default:'' }}</textarea>
<p class="mt-2 text-sm text-gray-500">Text which must be reproduced by users of your images, to comply with Creative Commons Attribution requirements.</p>
<div class="max-w-xl flex rounded-md shadow-sm">
<input type="text" x-bind:disabled="attribution == 'Anonymous'" x-model="attribution" id="{{ form.attribution.html_name }}" name="{{ form.attribution.html_name }}" class="flex-1 block w-full focus:ring-primary-500 focus:border-primary-500 min-w-0 rounded-none rounded-r-md text-sm border-gray-300"/>
<div class="ml-2">
<input type="checkbox" name="" value="" @click="if (attribution === 'Anonymous') { attribution = ''; } else { attribution = 'Anonymous' }" /><span class="ml-2 text-sm text-gray-500">Make anonymous</span>
</div>
</div>
<p class="mt-2 text-sm text-gray-500">
Text which must be reproduced by users of your images, to comply with Creative Commons Attribution requirements.
</p>
{{ form.attribution.errors }}
</div>
</div>
Expand Down