Dear Gitlab users, due to maintenance reasons, Gitlab will not be available on Thursday 30.09.2021 from 5:00 pm to approximately 5:30 pm.

Commit eaeb8180 authored by Andreas Wagner's avatar Andreas Wagner
Browse files

Show passphras form control depending on setup.

parent 1839781b
......@@ -36,9 +36,11 @@ func SetupRoutes(conf tei2zenodo.Config) *gin.Engine {
// Routes - one for the html/webapp, one group per API version...
metadataConf, _ := json.MarshalIndent(conf.Metadata, "", "\t")
secretConf := (conf.Secret != "")
router.GET("/", func(c *gin.Context) {
c.HTML(http.StatusOK, "index.tmpl", gin.H{
"metadataConf": string(metadataConf),
"secretConf": bool(secretConf),
// page := c.DefaultQuery("p", "index")
// c.String(http.StatusOK, "Service homepage with page "+page+".")
......@@ -74,14 +74,16 @@
<div class="form-group">
<div class="form-group"><h4>General section</h4>
{{ if .secretConf }}
<div class="form-group row">
<label class="col-sm-2 col-form-label" for="secret">Passphrase:</label>
<label class="col-sm-2 col-form-label" for="secret">This server requires valid message signatures. Enter a passphrase:</label>
<div class="col-sm-10 form-inline">
<input type="password" class="form-control w-75" id="secret" name="secret" value="" onchange="getFileSignature()"/>&nbsp;
<input type="checkbox" id="showSecret" onclick="togglePassphraseViz()" title="Toggle passphrase visibility">
<label class="small" for="showSecret">&nbsp;(show)</label>
{{ end }}
<div class="form-group row">
<label class="col-sm-2 file-label" for="file">Upload TEI file:</label>
<div class="col-sm-10 form-inline">
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment