Skip to content

Commit 47af56b

Browse files
committed
Run selected validator in pubvalidate
- Only one validator can be selected (radio button) - Run selected validator on repository
1 parent 8460c09 commit 47af56b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

internal/resources/templates/pubvalidate.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ var PubValidate = `
1818
<div class="ui segment field">
1919
<h4>Validators</h4>
2020
<div class="inline field">
21-
<div class="ui checkbox">
22-
<input name="bids" type="checkbox" tabindex="0">
21+
<div class="ui radio checkbox">
22+
<input name="validator" value="bids" type="radio">
2323
<label><strong>BIDS</strong> Brain Imaging Data Structure: link-to-bids-website</label>
2424
</div>
2525
</div>
2626
<div class="inline field">
27-
<div class="ui checkbox">
28-
<input name="nix" type="checkbox" tabindex="0">
27+
<div class="ui radio checkbox">
28+
<input name="validator" value="nix" type="radio">
2929
<label><strong>NIX</strong> Neuroscience Information Exchange format link-to-nix-website</label>
3030
</div>
3131
</div>
3232
<div class="inline field">
33-
<div class="ui checkbox">
34-
<input name="odml" type="checkbox" tabindex="0">
33+
<div class="ui radio checkbox">
34+
<input name="validator" value="odml" type="radio">
3535
<label><strong>odML</strong> Open Metadata Markup Language link-to-odml-website</label>
3636
</div>
3737
</div>

internal/web/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ func PubValidatePost(w http.ResponseWriter, r *http.Request) {
515515

516516
r.ParseForm()
517517
repopath := r.Form["repopath"][0]
518-
validator := "bids" // vars["validator"] // TODO: add options to root form
518+
validator := r.Form["validator"][0]
519519

520520
log.ShowWrite("[Info] About to validate repository '%s' with %s", repopath, ginuser)
521521
log.ShowWrite("[Info] Logging in to GIN server")

0 commit comments

Comments
 (0)