diff options
author | Unknwon <u@gogs.io> | 2015-08-19 02:49:44 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-19 02:49:44 +0800 |
commit | 249345458737e4db5a06250593787b483726dff0 (patch) | |
tree | cf0c0b2a26341cbddfce59219d3cf447622563e3 /templates | |
parent | 81b8427438d4d37d38a46d0fec4c22aee60f91fa (diff) | |
download | gitea-249345458737e4db5a06250593787b483726dff0.tar.gz gitea-249345458737e4db5a06250593787b483726dff0.zip |
new delete account UI and password confirmation
Diffstat (limited to 'templates')
-rw-r--r-- | templates/.VERSION | 2 | ||||
-rw-r--r-- | templates/base/head.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/migrate.tmpl | 2 | ||||
-rw-r--r-- | templates/user/settings/delete.tmpl | 78 | ||||
-rw-r--r-- | templates/user/settings/navbar.tmpl | 28 |
5 files changed, 79 insertions, 35 deletions
diff --git a/templates/.VERSION b/templates/.VERSION index 2823b257e5..bd3cf2cb27 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.6.5.0818 Beta
\ No newline at end of file +0.6.5.0819 Beta
\ No newline at end of file diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index e8e84ce510..0470ac0bed 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -110,7 +110,7 @@ <i class="octicon icon octicon-person"></i> {{.i18n.Tr "your_profile"}}<!-- Your profile --> </a> - <a class="item" href="{{AppSubUrl}}/user/settings"> + <a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings"> <i class="octicon icon octicon-settings"></i> {{.i18n.Tr "your_settings"}}<!-- Your settings --> </a> @@ -121,7 +121,7 @@ {{if .IsAdmin}} <div class="divider"></div> - <a class="item" href="{{AppSubUrl}}/admin"> + <a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin"> <i class="icon settings"></i> {{.i18n.Tr "admin_panel"}}<!-- Admin Panel --> </a> diff --git a/templates/repo/migrate.tmpl b/templates/repo/migrate.tmpl index 789530bee1..6e9dc9c1a4 100644 --- a/templates/repo/migrate.tmpl +++ b/templates/repo/migrate.tmpl @@ -24,7 +24,7 @@ <label for="auth_username">{{.i18n.Tr "username"}}</label> <input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}> </div> - <input class="fake"> + <input class="fake" type="password"> <div class="inline field {{if .Err_Auth}}error{{end}}"> <label for="auth_password">{{.i18n.Tr "password"}}</label> <input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}"> diff --git a/templates/user/settings/delete.tmpl b/templates/user/settings/delete.tmpl index a6d3663dbe..d9a0837b5e 100644 --- a/templates/user/settings/delete.tmpl +++ b/templates/user/settings/delete.tmpl @@ -1,35 +1,51 @@ -{{template "ng/base/head" .}} -{{template "ng/base/header" .}} -<div id="setting-wrapper" class="main-wrapper"> - <div id="user-profile-setting" class="container clear"> - {{template "user/settings/nav" .}} - <div class="grid-4-5 left"> - <div class="setting-content"> - {{template "ng/base/alert" .}} - <div id="setting-content"> - <div id="user-profile-setting-content" class="panel panel-warning panel-radius"> - <p class="panel-header"><strong>{{.i18n.Tr "settings.delete_account"}}</strong></p> - <div class="panel-body panel-content"> - <span class="alert alert-red alert-radius block"><i class="octicon octicon-alert"></i>{{.i18n.Tr "settings.delete_prompt" | Str2html}}</span> - <form id="delete-account-form" action="{{AppSubUrl}}/user/settings/delete" method="post"> - {{.CsrfTokenHtml}} - <p class="field"> - <span class="form-label"></span> - <button class="btn btn-red btn-large btn-radius" id="delete-account-btn" href="#delete-account-modal">{{.i18n.Tr "settings.confirm_delete_account"}}</button> - </p> - </form> - <div class="white-popup-block mfp-hide" id="delete-account-modal"> - <h1 class="text-red">{{.i18n.Tr "settings.delete_account_title"}}</h1> - <p>{{.i18n.Tr "settings.delete_account_desc"}}</p> - <br> - <button class="btn btn-red btn-large btn-radius" id="delete-account-submit">{{.i18n.Tr "settings.continue"}}</button> - <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button> - </div> - </div> - </div> - </div> +{{template "base/head" .}} +<div class="user settings"> + <div class="ui container"> + <div class="ui grid"> + {{template "user/settings/navbar" .}} + <div class="twelve wide column content"> + {{template "base/alert" .}} + <h4 class="ui top attached warning header"> + {{.i18n.Tr "settings.delete_account"}} + </h4> + <div class="ui attached warning segment"> + <div class="ui red message"> + <p>{{.i18n.Tr "settings.delete_prompt" | Str2html}}</p> + </div> + <form class="ui form" id="delete-form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <input class="fake" type="password"> + <div class="inline required field {{if .Err_Password}}error{{end}}"> + <label for="password">{{.i18n.Tr "password"}}</label> + <input id="password" name="password" type="password" autofocus required> </div> + <div class="ui red button delete-button" data-type="form" data-form="#delete-form"> + {{.i18n.Tr "settings.confirm_delete_account"}} + </div> + </form> </div> + </div> + </div> + </div> +</div> + +<div class="ui small basic delete modal"> + <div class="ui icon header"> + <i class="trash icon"></i> + {{.i18n.Tr "settings.delete_account_title"}} + </div> + <div class="content"> + <p>{{.i18n.Tr "settings.delete_account_desc"}}</p> + </div> + <div class="actions"> + <div class="ui red basic inverted cancel button"> + <i class="remove icon"></i> + {{.i18n.Tr "modal.no"}} + </div> + <div class="ui green basic inverted ok button"> + <i class="checkmark icon"></i> + {{.i18n.Tr "modal.yes"}} </div> + </div> </div> -{{template "ng/base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}}
\ No newline at end of file diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl new file mode 100644 index 0000000000..3b8973b8e0 --- /dev/null +++ b/templates/user/settings/navbar.tmpl @@ -0,0 +1,28 @@ +<div class="four wide column"> + <div class="ui vertical menu"> + <div class="header item">{{.i18n.Tr "settings"}}</div> + <a class="{{if .PageIsSettingsProfile}}active{{end}} item" href="{{AppSubUrl}}/user/settings"> + {{.i18n.Tr "settings.profile"}} + </a> + <a class="{{if .PageIsSettingsPassword}}active{{end}} item" href="{{AppSubUrl}}/user/settings/password"> + {{.i18n.Tr "settings.password"}} + </a> + <a class="{{if .PageIsSettingsEmails}}active{{end}} item" href="{{AppSubUrl}}/user/settings/email"> + {{.i18n.Tr "settings.emails"}} + </a> + <a class="{{if .PageIsSettingsSSHKeys}}active{{end}} item" href="{{AppSubUrl}}/user/settings/ssh"> + {{.i18n.Tr "settings.ssh_keys"}} + </a> + {{if .HasOAuthService}} + <a class="{{if .PageIsSettingsSocial}}active{{end}} item" href="{{AppSubUrl}}/user/settings/social"> + {{.i18n.Tr "settings.social"}} + </a> + {{end}} + <a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications"> + {{.i18n.Tr "settings.applications"}} + </a> + <a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{AppSubUrl}}/user/settings/delete"> + {{.i18n.Tr "settings.delete"}} + </a> + </div> +</div> |