From f2ecfdc96a338815ffb2be898b3114031f0da48c Mon Sep 17 00:00:00 2001
From: Unknwon
Date: Thu, 12 Apr 2018 09:55:58 -0400
Subject: auth: support authentication source config file (#3142)
---
templates/admin/auth/edit.tmpl | 4 +++-
templates/admin/auth/list.tmpl | 8 +++++++-
templates/admin/auth/new.tmpl | 8 --------
templates/user/auth/login.tmpl | 18 ++++++++++++++++++
4 files changed, 28 insertions(+), 10 deletions(-)
(limited to 'templates')
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl
index 32de620c..fba6fe48 100644
--- a/templates/admin/auth/edit.tmpl
+++ b/templates/admin/auth/edit.tmpl
@@ -189,7 +189,9 @@
-
{{.i18n.Tr "admin.auths.delete"}}
+ {{if not .Source.LocalFile}}
+
{{.i18n.Tr "admin.auths.delete"}}
+ {{end}}
diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl
index c0b08d2a..d989a77c 100644
--- a/templates/admin/auth/list.tmpl
+++ b/templates/admin/auth/list.tmpl
@@ -29,7 +29,13 @@
{{.TypeName}} |
|
{{DateFmtShort .Updated}} |
- {{DateFmtShort .Created}} |
+
+ {{if .Created.IsZero}}
+ N/A
+ {{else}}
+ {{DateFmtShort .Created}}
+ {{end}}
+ |
|
{{end}}
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl
index e164f531..d6b0c6e8 100644
--- a/templates/admin/auth/new.tmpl
+++ b/templates/admin/auth/new.tmpl
@@ -188,14 +188,6 @@
-
-
-
-
GMail Settings:
-
Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true
-
diff --git a/templates/user/auth/login.tmpl b/templates/user/auth/login.tmpl
index 01306971..3bc8e13f 100644
--- a/templates/user/auth/login.tmpl
+++ b/templates/user/auth/login.tmpl
@@ -17,6 +17,24 @@
+ {{if .LoginSources}}
+
+
+
+
+
+ {{.i18n.Tr "auth.local"}}
+
+
+
+
+
+ {{end}}