fix some form bugs
This commit is contained in:
@@ -60,20 +60,18 @@
|
|||||||
{{if eq .BackLink ""}}
|
{{if eq .BackLink ""}}
|
||||||
<td colspan="2" style="text-align: right;">
|
<td colspan="2" style="text-align: right;">
|
||||||
{{if eq .SubmitRed true}}
|
{{if eq .SubmitRed true}}
|
||||||
<input type="submit" value="{{.SubmitLabel}}" class="button_red"/>
|
<input type="submit" value="{{.SubmitLabel}}" class="button_red" style="float: right;"/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<input type="submit" value="{{.SubmitLabel}}" class="button_highlight"/>
|
<input type="submit" value="{{.SubmitLabel}}" class="button_highlight" style="float: right;"/>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
{{else}}
|
{{else}}
|
||||||
<td style="text-align: left;">
|
<td colspan="2" style="text-align: left;">
|
||||||
<a href="{{.BackLink}}" class="button button_red"/>Back</a>
|
<a href="{{.BackLink}}" class="button button_red" style="float: left;"/>Back</a>
|
||||||
</td>
|
|
||||||
<td style="text-align: right;">
|
|
||||||
{{if eq .SubmitRed true}}
|
{{if eq .SubmitRed true}}
|
||||||
<input type="submit" value="{{.SubmitLabel}}" class="button_red"/>
|
<input type="submit" value="{{.SubmitLabel}}" class="button_red" style="float: right;"/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<input type="submit" value="{{.SubmitLabel}}" class="button_highlight"/>
|
<input type="submit" value="{{.SubmitLabel}}" class="button_highlight" style="float: right"/>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@@ -175,7 +175,7 @@ func (wc *WebController) serveForm(
|
|||||||
field.EnteredValue = ""
|
field.EnteredValue = ""
|
||||||
td.Form.Fields[i] = field
|
td.Form.Fields[i] = field
|
||||||
}
|
}
|
||||||
} else {
|
} else if td.Form.Submitted {
|
||||||
w.WriteHeader(http.StatusBadRequest)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user