diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-10 16:36:50 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-10 16:36:50 -0400 |
commit | 45462662e9bdb001f1cf3d4ca0e4d679757c7642 (patch) | |
tree | eb5f3bfe24a423601ad27121c95427719cb16984 /templates/user | |
parent | 459223cf01d19a6956d370fad9ab41d3a32233d0 (diff) | |
download | gitea-45462662e9bdb001f1cf3d4ca0e4d679757c7642.tar.gz gitea-45462662e9bdb001f1cf3d4ca0e4d679757c7642.zip |
Add flash
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/delete.tmpl | 5 | ||||
-rw-r--r-- | templates/user/forgot_passwd.tmpl | 2 | ||||
-rw-r--r-- | templates/user/reset_passwd.tmpl | 2 | ||||
-rw-r--r-- | templates/user/setting.tmpl | 2 | ||||
-rw-r--r-- | templates/user/signin.tmpl | 2 | ||||
-rw-r--r-- | templates/user/signup.tmpl | 2 |
6 files changed, 9 insertions, 6 deletions
diff --git a/templates/user/delete.tmpl b/templates/user/delete.tmpl index 17c9ea8925..39949ee2b6 100644 --- a/templates/user/delete.tmpl +++ b/templates/user/delete.tmpl @@ -12,13 +12,16 @@ <li class="list-group-item list-group-item-success"><a href="/user/delete">Delete Account</a></li> </ul> </div> + <div id="user-setting-container" class="col-md-9"> <h4>Delete Account</h4> - <p class="alert alert-danger">{{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}}</p> + {{template "base/alert" .}} + {{if not .Flash.ErrorMsg}}<p class="alert alert-danger">The operation will delete your account permanently. Sorry to see you go, but we know you'll back soon.</p>{{end}} <div class="form-group"> <button type="submit" class="btn btn-danger btn-lg" href="#delete-account-modal" id="delete-account" data-toggle="modal">Delete Account</button> </div> </div> + <div class="modal fade" id="delete-account-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <form action="/user/delete" method="post" class="modal-content" id="user-delete"> diff --git a/templates/user/forgot_passwd.tmpl b/templates/user/forgot_passwd.tmpl index a099ff2744..7990ab18cd 100644 --- a/templates/user/forgot_passwd.tmpl +++ b/templates/user/forgot_passwd.tmpl @@ -4,7 +4,7 @@ <form action="/user/forget_password" method="post" class="form-horizontal card" id="login-card"> {{.CsrfTokenHtml}} <h3>Reset Your Password</h3> - <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div> + {{template "base/alert" .}} {{if .IsResetSent}} <p>A confirmation e-mail has been sent to <b>{{.Email}}</b>, please check your inbox within {{.Hours}} hours.</p> <hr/> diff --git a/templates/user/reset_passwd.tmpl b/templates/user/reset_passwd.tmpl index 9190c7c13c..966b6cb3b5 100644 --- a/templates/user/reset_passwd.tmpl +++ b/templates/user/reset_passwd.tmpl @@ -4,7 +4,7 @@ <form action="/user/reset_password?code={{.Code}}" method="post" class="form-horizontal card" id="login-card"> {{.CsrfTokenHtml}} <h3>Reset Your Pasword</h3> - <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div> + {{template "base/alert" .}} {{if .IsResetForm}} <div class="form-group"> <label class="col-md-4 control-label">Password: </label> diff --git a/templates/user/setting.tmpl b/templates/user/setting.tmpl index d582833870..762dc33b7f 100644 --- a/templates/user/setting.tmpl +++ b/templates/user/setting.tmpl @@ -7,7 +7,7 @@ <h4>Account Profile</h4> <form class="form-horizontal" id="password-form" method="post" action="/user/setting"> {{.CsrfTokenHtml}} - {{if .IsSuccess}}<p class="alert alert-success">Your profile has been successfully updated.</p>{{else if .HasError}}<p class="alert alert-danger form-error">{{.ErrorMsg}}</p>{{end}} + {{template "base/alert" .}} <p>Your Email will be public and used for Account related notifications and any web based operations made via the web.</p> <div class="form-group"> <label class="col-md-2 control-label" for="user-setting-username">Username<strong class="text-danger">*</strong></label> diff --git a/templates/user/signin.tmpl b/templates/user/signin.tmpl index eb4cb9ccee..294c0d3418 100644 --- a/templates/user/signin.tmpl +++ b/templates/user/signin.tmpl @@ -4,7 +4,7 @@ <form action="/user/login" method="post" class="form-horizontal card" id="login-card"> {{.CsrfTokenHtml}} <h3>Log in</h3> - <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div> + {{template "base/alert" .}} <div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}"> <label class="col-md-4 control-label">Username: </label> <div class="col-md-6"> diff --git a/templates/user/signup.tmpl b/templates/user/signup.tmpl index 6ed595a350..87fa80ccc1 100644 --- a/templates/user/signup.tmpl +++ b/templates/user/signup.tmpl @@ -7,7 +7,7 @@ Sorry, registeration has been disenabled, you can only get account from administrator. {{else}} <h3>Sign Up</h3> - <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div> + {{template "base/alert" .}} <div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}"> <label class="col-md-4 control-label">Username: </label> <div class="col-md-6"> |