From 45462662e9bdb001f1cf3d4ca0e4d679757c7642 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 10 Apr 2014 16:36:50 -0400 Subject: Add flash --- templates/base/alert.tmpl | 3 ++- templates/status/500.tmpl | 4 ++-- templates/user/delete.tmpl | 5 ++++- templates/user/forgot_passwd.tmpl | 2 +- templates/user/reset_passwd.tmpl | 2 +- templates/user/setting.tmpl | 2 +- templates/user/signin.tmpl | 2 +- templates/user/signup.tmpl | 2 +- 8 files changed, 13 insertions(+), 9 deletions(-) (limited to 'templates') diff --git a/templates/base/alert.tmpl b/templates/base/alert.tmpl index 699314ac..bb1eb6aa 100644 --- a/templates/base/alert.tmpl +++ b/templates/base/alert.tmpl @@ -1 +1,2 @@ -{{if .Flash.ErrorMsg}}
{{.Flash.ErrorMsg}}
{{end}} \ No newline at end of file +{{if .Flash.ErrorMsg}}
{{.Flash.ErrorMsg}}
{{end}} +{{if .Flash.SuccessMsg}}
{{.Flash.SuccessMsg}}
{{end}} \ No newline at end of file diff --git a/templates/status/500.tmpl b/templates/status/500.tmpl index dd735811..07edd362 100644 --- a/templates/status/500.tmpl +++ b/templates/status/500.tmpl @@ -2,8 +2,8 @@ {{template "base/navbar" .}}

404

-
-

An error is occurred : {{.ErrorMsg}}

+ {{if .ErrorMsg}}
+

An error is occurred : {{.ErrorMsg}}

{{end}}

Application Version: {{AppVer}}

diff --git a/templates/user/delete.tmpl b/templates/user/delete.tmpl index 17c9ea89..39949ee2 100644 --- a/templates/user/delete.tmpl +++ b/templates/user/delete.tmpl @@ -12,13 +12,16 @@
  • Delete Account
  • +

    Delete Account

    -

    {{if not .HasError}}The operation will delete your account permanently. Sorry to see you go, but we know you'll back soon.{{else}}{{.ErrorMsg}}{{end}}

    + {{template "base/alert" .}} + {{if not .Flash.ErrorMsg}}

    The operation will delete your account permanently. Sorry to see you go, but we know you'll back soon.

    {{end}}
    +