forked from forgejo/forgejo
Add flash
This commit is contained in:
parent
459223cf01
commit
45462662e9
17 changed files with 179 additions and 129 deletions
|
@ -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">
|
||||
|
|
|
@ -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/>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue