Skip to content

Commit 41ef648

Browse files
authored
Add "one URL per line" desc to relatedLink / softwareRequirements fields (#65)
When user put multiple URLs in one line for Related Links, the generator will warn: > Bug detected! The data you wrote is correct; but for some reason, it seems we generated an invalid codemeta.json. Put a field description to guide the user. Note that relatedLink and softwareRequirements have different behaviour: - relatedLink will still put invalid URL (a string with multiple URLs) in the JSON - softwareRequirements on the other hand will be an empty list instead
1 parent 57dfec6 commit 41ef648

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

index.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,10 @@ <h1>CodeMeta generator v3.0</h1>
174174
<label for="relatedLink">Related links</label>
175175
<br />
176176
<textarea rows="4" cols="50"
177-
name="relatedLink" id="relatedLink"></textarea>
177+
name="relatedLink" id="relatedLink"
178+
placeholder="https://www.example.com"></textarea>
179+
<span class="field-description" id="relatedLink_descr">URL(s), one URL per line</span>
180+
</p>
178181
</fieldset>
179182

180183
<fieldset id="fieldsetRuntime" class="leafFieldset">
@@ -206,6 +209,8 @@ <h1>CodeMeta generator v3.0</h1>
206209
placeholder=
207210
"https://www.python.org/downloads/release/python-3130/
208211
https://github.com/psf/requests"></textarea>
212+
<span class="field-description" id="softwareRequirements_descr">URL(s), one URL per line</span>
213+
</p>
209214
</fieldset>
210215

211216
<fieldset id="fieldsetCurrentVersion" class="leafFieldset">
@@ -333,9 +338,9 @@ <h1>CodeMeta generator v3.0</h1>
333338

334339
</form>
335340
<form>
336-
<input type="button" id="generateCodemetaV3" value="Generate codemeta.json v3.0" disabled
337-
title="Creates a codemeta.json v3.0 file below, from the information provided above." />
338-
<input type="button" id="generateCodemetaV2" value="Generate codemeta.json v2.0" disabled
341+
<input type="button" id="generateCodemetaV3" value="Generate codemeta.json v3.0" disabled
342+
title="Creates a codemeta.json v3.0 file below, from the information provided above." />
343+
<input type="button" id="generateCodemetaV2" value="Generate codemeta.json v2.0" disabled
339344
title="Creates a codemeta.json v2.0 file below, from the information provided above." />
340345
<input type="button" id="resetForm" value="Reset form"
341346
title="Erases all fields." />

0 commit comments

Comments
 (0)