updated license drop down and comparison

This commit is contained in:
bill bittner 2017-07-28 21:06:33 -07:00
parent 1f63ebd201
commit 1d08a0eec6
2 changed files with 3 additions and 5 deletions

View file

@ -1,11 +1,9 @@
const logger = require('winston');
const licenses = ['Creative Commons', 'Public Domain', 'CC Attribution-NonCommercial 4.0 International'];
module.exports = ({ value }) => {
logger.debug('checking isFreePublicClaim ?');
if (
(Array.asList(licenses).contains(value.stream.metadata.license)) &&
(!value.stream.metadata.fee || value.stream.metadata.fee.amount === 0)
) {
if ((licenses.includes(value.stream.metadata.license)) && (!value.stream.metadata.fee || value.stream.metadata.fee.amount === 0)) {
return true;
} else {
return false;

View file

@ -18,9 +18,9 @@
<p class="stop-float">
<label for="publish-license">License:</label>
<select type="text" id="publish-license" name="license" value="license">
<option value="CC Attribution-NonCommercial 4.0 International"><a href="http://creativecommons.org/licenses/by-nc/4.0/">CC Attribution-NonCommercial 4.0 International</a></option>
<option value="Public Domain">Public Domain</option>
<option value="Creative Commons">Creative Commons</option>
<option value="CC Attribution-NonCommercial 4.0 International">CC Attribution-NonCommercial 4.0 International</option>
</select>
<br />
<input type="checkbox" id="publish-nsfw">