-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
79 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
"https://creativecommons.org/licenses/by/4.0/": | ||
Creative Commons Attribution | ||
"https://creativecommons.org/licenses/by-sa/4.0/": | ||
Creative Commons Attribution Share-Alike | ||
"https://creativecommons.org/publicdomain/zero/1.0/": | ||
Creative Commons CCZero | ||
"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/": | ||
UK Open Government Licence | ||
"http://www.opendefinition.org/licenses/odc-by": | ||
Open Data Commons Attribution License | ||
"http://www.opendefinition.org/licenses/odc-odbl": | ||
Open Data Commons Open Database License (ODbL) | ||
"http://www.opendefinition.org/licenses/odc-pddl": | ||
Open Data Commons Public Domain Dedication and Licence (PDDL) | ||
"": | ||
Not Applicable | ||
'https://creativecommons.org/licenses/by/4.0/': Creative Commons Attribution | ||
'https://creativecommons.org/licenses/by-sa/4.0/': Creative Commons Attribution Share-Alike | ||
'https://creativecommons.org/publicdomain/zero/1.0/': Creative Commons CCZero | ||
'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/': UK Open Government Licence | ||
'http://www.opendefinition.org/licenses/odc-by': Open Data Commons Attribution License | ||
'http://www.opendefinition.org/licenses/odc-odbl': Open Data Commons Open Database License (ODbL) | ||
'http://www.opendefinition.org/licenses/odc-pddl': Open Data Commons Public Domain Dedication and Licence (PDDL) | ||
'': Not Applicable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="well" data-hook="item"> | ||
<fieldset> | ||
{% assign name = license[1] %} | ||
{% include form/text.html field_label='License Name' field_name='licenses[][license_name]' value=name %} | ||
{% assign url = license[0] %} | ||
{% include form/text.html field_label='License URL' field_name='licenses[][license_url]' value=url %} | ||
</fieldset> | ||
<button type="button" class="btn btn-danger btn-sm" data-hook="remove-item-btn"><i class="fa fa-minus"></i> Remove</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div class="form-group"> | ||
<label for="{{ include.field_name }}">{{ include.field.label }}</label> | ||
<label for="{{ include.field_name }}">{{ include.field.label | default: include.field_label }}</label> | ||
<input type="text" class="form-control" id="{{ include.field_name }}" name="{{ include.field_name }}" placeholder="{{ include.field.placeholder | default include.field.label }}" value="{{ include.value }}"> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import jsyaml from 'js-yaml' | ||
|
||
import Form from './form' | ||
|
||
export default class extends Form { | ||
_formatData (formData) { | ||
var list = {} | ||
for(let license of formData.licenses) { | ||
if (license.license_name != '') { | ||
list[license.license_url] = license.license_name | ||
} | ||
} | ||
return jsyaml.safeDump(list || []) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters