summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base/alert.tmpl1
-rw-r--r--templates/install.tmpl2
2 files changed, 2 insertions, 1 deletions
diff --git a/templates/base/alert.tmpl b/templates/base/alert.tmpl
new file mode 100644
index 0000000000..699314ace7
--- /dev/null
+++ b/templates/base/alert.tmpl
@@ -0,0 +1 @@
+{{if .Flash.ErrorMsg}}<div class="alert alert-danger form-error">{{.Flash.ErrorMsg}}</div>{{end}} \ No newline at end of file
diff --git a/templates/install.tmpl b/templates/install.tmpl
index c70cfa3e6b..3aa64ccd4b 100644
--- a/templates/install.tmpl
+++ b/templates/install.tmpl
@@ -3,7 +3,7 @@
<form action="/install" method="post" class="form-horizontal card" id="install-card">
{{.CsrfTokenHtml}}
<h3>Install Steps For First-time Run</h3>
- <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div>
+ {{template "base/alert" .}}
<p class="help-block text-center">Gogs requires MySQL or PostgreSQL, SQLite3 only available for official binary version</p>
<div class="form-group">
<label class="col-md-3 control-label">Database Type: </label>