UI: Confirmation box

This commit is contained in:
Unknwon 2014-09-28 01:38:25 -04:00
parent ad2ab6d214
commit 49193bebd2
19 changed files with 210 additions and 86 deletions

View File

@ -50,6 +50,7 @@ and it takes care of all the other things for you`,
// checkVersion checks if binary matches the version of templates files.
func checkVersion() {
// Templates.
data, err := ioutil.ReadFile(path.Join(setting.StaticRootPath, "templates/.VERSION"))
if err != nil {
log.Fatal(4, "Fail to read 'templates/.VERSION': %v", err)
@ -57,6 +58,11 @@ func checkVersion() {
if string(data) != setting.AppVer {
log.Fatal(4, "Binary and template file version does not match, did you forget to recompile?")
}
// Macaron.
if macaron.Version() != "0.1.8.0927" {
log.Fatal(4, "Macaron version does not match, did you forget to update?(github.com/Unknwon/macaron)")
}
}
// newMacaron initializes Macaron instance.

View File

@ -223,6 +223,8 @@ unbind_success = Social account has been unbound.
delete_account = Delete Your Account
delete_prompt = The operation will delete your account permanently, and <strong>CANNOT</strong> be undone!
confirm_delete_account = Confirm Deletion
delete_account_title = Account Deletion
delete_account_desc = This account is going to be deleted permanently, do you want to continue?
[repo]
owner = Owner
@ -257,6 +259,7 @@ unstar = Unstar
star = Star
fork = Fork
no_desc = No Description
quick_guide = Quick Guide
clone_this_repo = Clone this repository
create_new_repo_command = Create a new repository on the command line
@ -289,6 +292,8 @@ settings.basic_settings = Basic Settings
settings.danger_zone = Danger Zone
settings.site = Official Site
settings.update_settings = Update Settings
settings.change_reponame = Repository Name Changed
settings.change_reponame_desc = Repository name has been changed, do you want to continue? This will affect all links relate to this repository.
settings.transfer = Transfer Ownership
settings.transfer_desc = Transfer this repo to another user or to an organization where you have admin rights.
settings.new_owner_has_same_repo = New owner already has a repository with same name.
@ -349,11 +354,15 @@ settings.full_name = Full Name
settings.website = Website
settings.location = Location
settings.update_settings = Update Settings
settings.change_orgname = Organization Name Changed
settings.change_orgname_desc = Organization name has been changed, do you want to continue? This will affect all links relate to this organization.
settings.update_setting_success = Organization setting has been successfully updated.
settings.delete = Delete Organization
settings.delete_account = Delete This Organization
settings.delete_prompt = The operation will delete this organization permanently, and <strong>CANNOT</strong> be undone!
settings.confirm_delete_account = Confirm Deletion
settings.delete_org_title = Organization Deletion
settings.delete_org_desc = This organization is going to be deleted permanently, do you want to continue?
settings.hooks_desc = Add webhooks that will be triggered for <strong>all repositories</strong> under this organization.
members.public = Public
@ -383,6 +392,8 @@ teams.members = Team Members
teams.update_settings = Update Settings
teams.delete_team = Delete This Team
teams.add_team_member = Add Team Member
teams.delete_team_title = Team Deletion
teams.delete_team_desc = This team is going to be deleted, do you want to continue? Members of this team may lose access to some repositories.
teams.delete_team_success = Given team has been successfully deleted.
teams.read_permission_desc = This team grants <strong>Read</strong> access: members can view and clone the team's repositories.
teams.write_permission_desc = This team grants <strong>Write</strong> access: members can read from and push to the team's repositories.
@ -499,6 +510,8 @@ auths.activated = This authentication has activated
auths.update_success = Authorization setting has been successfully updated.
auths.update = Update Authorization Setting
auths.delete = Delete This Authorization
auths.delete_auth_title = Authorization Deletion
auths.delete_auth_desc = This authorization is going to be deleted, do you want to continue?
config.server_config = Server Configuration
config.app_name = Application Name

View File

@ -223,6 +223,8 @@ unbind_success = 社交帐号解除绑定成功!
delete_account = 删除当前帐户
delete_prompt = 删除操作会永久清除您的帐户信息,并且 <strong>不可恢复</strong>
confirm_delete_account = 确认删除帐户
delete_account_title = 帐户删除操作
delete_account_desc = 该帐户将被永久性删除,您确定要继续操作吗?
[repo]
owner = 拥有者
@ -257,6 +259,7 @@ unstar = 取消点赞
star = 点赞
fork = 派生
no_desc = 暂无描述
quick_guide = 快速帮助
clone_this_repo = 克隆当前仓库
create_new_repo_command = 从命令行创建一个新的仓库
@ -289,6 +292,8 @@ settings.basic_settings = 基本设置
settings.danger_zone = 危险操作区
settings.site = 官方网站
settings.update_settings = 更新仓库设置
settings.change_reponame = 仓库名称将被修改
settings.change_reponame_desc = 仓库名称被修改,您确定要继续操作吗?这将会影响到所有与该仓库有关的链接。
settings.transfer = 转移仓库所有权
settings.transfer_desc = 您可以将仓库转移至您拥有管理员权限的帐户或组织。
settings.new_owner_has_same_repo = 新的仓库拥有者已经存在同名仓库!
@ -349,11 +354,16 @@ settings.full_name = 组织全名
settings.website = 官方网站
settings.location = 所在地区
settings.update_settings = 更新组织设置
settings.change_orgname = 组织名称将被修改
settings.change_orgname_desc = 组织名称被修改,您确定要继续操作吗?这将会影响到所有与该组织有关的链接。
settings.update_setting_success = 组织设置更新成功!
settings.delete = 删除组织
settings.delete_account = 删除当前组织
settings.delete_prompt = 删除操作会永久清除该组织的信息,并且 <strong>不可恢复</strong>
settings.confirm_delete_account = 确认删除组织
settings.delete_org_title = 组织删除操作
settings.delete_org_desc = 该组织将被永久性删除,您确定要继续操作吗?
settings.hooks_desc = 在此处添加的 Web 钩子将会应用到该组织下的 <strong>所有仓库</strong>。
members.public = 公开成员
members.public_helper = 设为私有
@ -382,6 +392,8 @@ teams.members = 团队成员
teams.update_settings = 更新团队设置
teams.delete_team = 删除当前团队
teams.add_team_member = 添加团队成员
teams.delete_team_title = 团队删除操作
teams.delete_team_desc = 删除操作会永久清除有关该团队的信息,您确定要继续操作吗?团队成员可能会失去对某些仓库的操作权限。
teams.delete_team_success = 指定团队删除成功!
teams.read_permission_desc = 该团队拥有对所属仓库的 <strong>读取</strong> 权限,团队成员可以进行查看和克隆等只读操作。
teams.write_permission_desc = 该团队拥有对所属仓库的 <strong>读取</strong> 和 <strong>写入</strong> 的权限。
@ -457,6 +469,7 @@ users.is_activated = 该用户已被激活
users.is_admin = 该用户具有管理员权限
users.update_profile = 更新用户信息
users.delete_account = 删除该用户
users.still_own_repo = 该帐户仍然是某些仓库的拥有者,您必须先转移或删除它们才能执行删除帐户操作!
orgs.org_manage_panel = 组织管理面板
orgs.name = 组织名称
@ -497,6 +510,8 @@ auths.activated = 该授权认证已经启用
auths.update_success = 授权认证设置更新成功!
auths.update = 更新授权认证信息
auths.delete = 删除该授权认证
auths.delete_auth_title = 授权认证删除操作
auths.delete_auth_desc = 该授权认证将被删除,您确定要继续吗?
config.server_config = 服务器配置
config.app_name = 应用名称

View File

@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.5.4.0926 Beta"
const APP_VER = "0.5.4.0927 Beta"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
@ -38,5 +38,6 @@ func main() {
cmd.CmdCert,
}
app.Flags = append(app.Flags, []cli.Flag{}...)
println(runtime.Version())
app.Run(os.Args)
}

View File

@ -9,7 +9,6 @@ import (
"html/template"
"io"
"net/http"
"path"
"strings"
"time"
@ -140,23 +139,6 @@ func (ctx *Context) Handle(status int, title string, err error) {
ctx.HTML(status, base.TplName(fmt.Sprintf("status/%d", status)))
}
func (ctx *Context) ServeFile(file string, names ...string) {
var name string
if len(names) > 0 {
name = names[0]
} else {
name = path.Base(file)
}
ctx.Resp.Header().Set("Content-Description", "File Transfer")
ctx.Resp.Header().Set("Content-Type", "application/octet-stream")
ctx.Resp.Header().Set("Content-Disposition", "attachment; filename="+name)
ctx.Resp.Header().Set("Content-Transfer-Encoding", "binary")
ctx.Resp.Header().Set("Expires", "0")
ctx.Resp.Header().Set("Cache-Control", "must-revalidate")
ctx.Resp.Header().Set("Pragma", "public")
http.ServeFile(ctx.Resp, ctx.Req, file)
}
func (ctx *Context) ServeContent(name string, r io.ReadSeeker, params ...interface{}) {
modtime := time.Now()
for _, p := range params {

View File

@ -1472,6 +1472,10 @@ The register and sign-in page style
font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace;
font-size: 14px;
}
.no-desc {
color: #888;
font-style: italic;
}
#admin-wrapper,
#setting-wrapper {
padding-bottom: 100px;

View File

@ -293,39 +293,38 @@ function initCore() {
}
e.preventDefault();
});
// Popup.
$(document).on('click', '.popup-modal-dismiss', function (e) {
e.preventDefault();
$.magnificPopup.close();
});
}
function initUserSetting() {
// Confirmation of change username in user profile page.
var $username = $('#username');
var $form = $('#user-profile-form');
var confimed = false;
$('.popup-modal').magnificPopup({
var $profile_form = $('#user-profile-form');
$('#change-username-btn').magnificPopup({
modal: true,
callbacks: {
open: function () {
if (($username.data('uname') == $username.val())) {
$.magnificPopup.close();
$form.submit();
$profile_form.submit();
}
}
}
});
$(document).on('click', '.popup-modal-dismiss', function (e) {
e.preventDefault();
$.magnificPopup.close();
});
$('#modal-submit').click(function(){
$.magnificPopup.close();
confimed = true;
$form.submit();
});
$form.submit(function (e) {
if (($username.data('uname') != $username.val()) && !confimed) {
}).click(function () {
if (($username.data('uname') != $username.val())) {
e.preventDefault();
return true;
}
});
$('#change-username-submit').click(function () {
$.magnificPopup.close();
$profile_form.submit();
});
// Show add SSH key panel.
$('#ssh-add').click(function () {
@ -333,11 +332,15 @@ function initUserSetting() {
});
// Confirmation of delete account.
$('#delete-account-button').click(function (e) {
if (!confirm('This account is going to be deleted, do you want to continue?')) {
e.preventDefault();
return true;
}
$('#delete-account-btn').magnificPopup({
modal: true
}).click(function (e) {
e.preventDefault();
return true;
});
$('#delete-account-submit').click(function () {
$.magnificPopup.close();
$('#delete-account-form').submit();
});
}
@ -409,13 +412,28 @@ function initHookTypeChange() {
function initRepoSetting() {
// Options.
// Confirmation of changing repository name.
$('#repo-setting-form').submit(function (e) {
var $reponame = $('#repo_name');
if (($reponame.data('repo-name') != $reponame.val()) && !confirm('Repository name has been changed, do you want to continue?')) {
var $reponame = $('#repo_name');
var $setting_form = $('#repo-setting-form');
$('#change-reponame-btn').magnificPopup({
modal: true,
callbacks: {
open: function () {
if (($reponame.data('repo-name') == $reponame.val())) {
$.magnificPopup.close();
$setting_form.submit();
}
}
}
}).click(function () {
if (($reponame.data('repo-name') != $reponame.val())) {
e.preventDefault();
return true;
}
});
$('#change-reponame-submit').click(function () {
$.magnificPopup.close();
$setting_form.submit();
});
initHookTypeChange();
@ -451,19 +469,39 @@ function initRepoSetting() {
function initOrgSetting() {
// Options.
// Confirmation of changing organization name.
$('#org-setting-form').submit(function (e) {
var $orgname = $('#orgname');
if (($orgname.data('orgname') != $orgname.val()) && !confirm('Organization name has been changed, do you want to continue?')) {
var $orgname = $('#orgname');
var $setting_form = $('#org-setting-form');
$('#change-orgname-btn').magnificPopup({
modal: true,
callbacks: {
open: function () {
if (($orgname.data('orgname') == $orgname.val())) {
$.magnificPopup.close();
$setting_form.submit();
}
}
}
}).click(function () {
if (($orgname.data('orgname') != $orgname.val())) {
e.preventDefault();
return true;
}
});
$('#change-orgname-submit').click(function () {
$.magnificPopup.close();
$setting_form.submit();
});
// Confirmation of delete organization.
$('#delete-org-button').click(function (e) {
if (!confirm('This organization is going to be deleted, do you want to continue?')) {
e.preventDefault();
return true;
}
$('#delete-org-btn').magnificPopup({
modal: true
}).click(function (e) {
e.preventDefault();
return true;
});
$('#delete-org-submit').click(function () {
$.magnificPopup.close();
$('#delete-org-form').submit();
});
initHookTypeChange();
@ -493,11 +531,14 @@ function initInvite() {
function initOrgTeamCreate() {
// Delete team.
$('#org-team-delete').click(function (e) {
if (!confirm('This team is going to be deleted, do you want to continue?')) {
e.preventDefault();
return true;
}
$('#org-team-delete').magnificPopup({
modal: true
}).click(function (e) {
e.preventDefault();
return true;
});
$('#delete-team-submit').click(function () {
$.magnificPopup.close();
var $form = $('#team-create-form');
$form.attr('action', $form.data('delete-url'));
});
@ -561,15 +602,20 @@ function initAdmin() {
$('.auth-name').toggleShow();
}
});
// Delete account.
$('#user-delete').click(function (e) {
if (!confirm('This account is going to be deleted, do you want to continue?')) {
e.preventDefault();
return true;
}
$('#delete-account-btn').magnificPopup({
modal: true
}).click(function (e) {
e.preventDefault();
return true;
});
$('#delete-account-submit').click(function () {
$.magnificPopup.close();
var $form = $('#user-profile-form');
$form.attr('action', $form.data('delete-url'));
});
// Create authorization.
$('#auth-type').on("change", function () {
var v = $(this).val();
@ -582,13 +628,17 @@ function initAdmin() {
$('.ldap').toggleHide();
}
});
// Delete authorization.
$('#auth-delete').click(function (e) {
if (!confirm('This authorization is going to be deleted, do you want to continue?')) {
e.preventDefault();
return true;
}
var $form = $('auth-setting-form');
$('#delete-auth-btn').magnificPopup({
modal: true
}).click(function (e) {
e.preventDefault();
return true;
});
$('#delete-auth-submit').click(function () {
$.magnificPopup.close();
var $form = $('#auth-setting-form');
$form.attr('action', $form.data('delete-url'));
});
}

File diff suppressed because one or more lines are too long

View File

@ -516,3 +516,7 @@
font-size: 14px;
}
}
.no-desc {
color: #888;
font-style: italic;
}

View File

@ -1 +1 @@
0.5.4.0926 Beta
0.5.4.0927 Beta

View File

@ -100,7 +100,14 @@
<label></label>
<button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "admin.auths.update"}}</button>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button class="btn btn-large btn-red btn-radius" id="auth-delete">{{.i18n.Tr "admin.auths.delete"}}</button>
<button class="btn btn-large btn-red btn-radius" id="delete-auth-btn" href="#delete-auth-modal">{{.i18n.Tr "admin.auths.delete"}}</button>
</div>
<div class="white-popup-block mfp-hide" id="delete-auth-modal">
<h1 class="text-red">{{.i18n.Tr "admin.auths.delete_auth_title"}}</h1>
<p>{{.i18n.Tr "admin.auths.delete_auth_desc"}}</p>
<br>
<button class="btn btn-red btn-large btn-radius" id="delete-auth-submit">{{.i18n.Tr "settings.continue"}}</button>
<button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
</div>
</form>
</div>

View File

@ -30,7 +30,7 @@
</div>
<div class="field">
<label>{{.i18n.Tr "username"}}</label>
<label>{{.User.Name}}</label>
<label class="text-left">{{.User.Name}}</label>
</div>
<div class="field">
<label class="req" for="email">{{.i18n.Tr "email"}}</label>
@ -65,8 +65,15 @@
<label></label>
<button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "admin.users.update_profile"}}</button>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button class="btn btn-large btn-red btn-radius" id="user-delete">{{.i18n.Tr "admin.users.delete_account"}}</button>
<button class="btn btn-large btn-red btn-radius" id="delete-account-btn" href="#delete-account-modal">{{.i18n.Tr "admin.users.delete_account"}}</button>
</div>
<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>
</form>
</div>
</div>

View File

@ -12,13 +12,20 @@
<p class="panel-header"><strong>{{.i18n.Tr "org.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 "org.settings.delete_prompt" | Str2html}}</span>
<form action="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings/delete" method="post">
<form id="delete-org-form" action="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings/delete" method="post">
{{.CsrfTokenHtml}}
<p class="field">
<span class="form-label"></span>
<button class="btn btn-red btn-large btn-radius" id="delete-org-button">{{.i18n.Tr "org.settings.confirm_delete_account"}}</button>
<button class="btn btn-red btn-large btn-radius" id="delete-org-btn" href="#delete-org-modal">{{.i18n.Tr "org.settings.confirm_delete_account"}}</button>
</p>
</form>
<div class="white-popup-block mfp-hide" id="delete-org-modal">
<h1 class="text-red">{{.i18n.Tr "org.settings.delete_org_title"}}</h1>
<p>{{.i18n.Tr "org.settings.delete_org_desc"}}</p>
<br>
<button class="btn btn-red btn-large btn-radius" id="delete-org-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>

View File

@ -19,6 +19,13 @@
<label class="req" for="orgname">{{.i18n.Tr "username"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="orgname" name="uname" value="{{.Org.Name}}" data-orgname="{{.Org.Name}}" required />
</div>
<div class="white-popup-block mfp-hide" id="change-orgname-modal">
<h1 class="text-red">{{.i18n.Tr "org.settings.change_orgname"}}</h1>
<p>{{.i18n.Tr "org.settings.change_orgname_desc"}}</p>
<br>
<button class="btn btn-red btn-large btn-radius" id="change-orgname-submit">{{.i18n.Tr "settings.continue"}}</button>
<button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
</div>
<div class="field">
<label for="full-name">{{.i18n.Tr "org.settings.full_name"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" value="{{.Org.FullName}}" />
@ -45,7 +52,7 @@
</div>
<div class="field">
<span class="form-label"></span>
<button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "org.settings.update_settings"}}</button>
<button class="btn btn-green btn-large btn-radius" id="change-orgname-btn" href="#change-orgname-modal">{{.i18n.Tr "org.settings.update_settings"}}</button>
</div>
</form>
</div>

View File

@ -53,7 +53,14 @@
<button class="btn btn-large btn-green btn-radius">{{.i18n.Tr "org.teams.update_settings"}}</button>
{{if not (eq .Team.LowerName "owners")}}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button class="btn btn-large btn-red btn-radius" id="org-team-delete">{{.i18n.Tr "org.teams.delete_team"}}</button>
<button class="btn btn-large btn-red btn-radius" id="org-team-delete" href="#delete-team-modal">{{.i18n.Tr "org.teams.delete_team"}}</button>
<div class="white-popup-block mfp-hide" id="delete-team-modal">
<h1 class="text-red">{{.i18n.Tr "org.teams.delete_team_title"}}</h1>
<p>{{.i18n.Tr "org.teams.delete_team_desc"}}</p>
<br>
<button class="btn btn-red btn-large btn-radius" id="delete-team-submit">{{.i18n.Tr "settings.continue"}}</button>
<button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
</div>
{{end}}
{{end}}
</div>

View File

@ -5,7 +5,7 @@
<div id="repo-content" class="clear container">
<div id="repo-main" class="left grid-4-5">
<p id="repo-desc">
<span class="description">{{.Repository.DescriptionHtml}}</span>
{{if .Repository.DescriptionHtml}}<span class="description">{{.Repository.DescriptionHtml}}</span>{{else}}<span class="no-desc">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
</p>
<ul id="repo-file-nav" class="clear menu menu-line">

View File

@ -19,6 +19,13 @@
<div class="field">
<label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_RepoName}}ipt-error{{end}}" id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" required />
</div>
<div class="white-popup-block mfp-hide" id="change-reponame-modal">
<h1 class="text-red">{{.i18n.Tr "repo.settings.change_reponame"}}</h1>
<p>{{.i18n.Tr "repo.settings.change_reponame_desc"}}</p>
<br>
<button class="btn btn-red btn-large btn-radius" id="change-reponame-submit">{{.i18n.Tr "settings.continue"}}</button>
<button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
</div>
<div class="field clear">
<label class="left" for="desc">{{.i18n.Tr "repo.repo_desc"}}</label>
@ -59,7 +66,7 @@
</div>
<div class="field">
<span class="form-label"></span>
<button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "repo.settings.update_settings"}}</button>
<button class="btn btn-green btn-large btn-radius" id="change-reponame-btn" href="#change-reponame-modal">{{.i18n.Tr "repo.settings.update_settings"}}</button>
</div>
</form>
</div>

View File

@ -11,13 +11,20 @@
<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 action="{{AppSubUrl}}/user/settings/delete" method="post">
<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-button">{{.i18n.Tr "settings.confirm_delete_account"}}</button>
<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>

View File

@ -26,7 +26,7 @@
<h1 class="text-red">{{.i18n.Tr "settings.change_username"}}</h1>
<p>{{.i18n.Tr "settings.change_username_desc"}}</p>
<br>
<button class="btn btn-red btn-large btn-radius" id="modal-submit">{{.i18n.Tr "settings.continue"}}</button>
<button class="btn btn-red btn-large btn-radius" id="change-username-submit">{{.i18n.Tr "settings.continue"}}</button>
<button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
</div>
<div class="field">
@ -51,7 +51,7 @@
</div>
<div class="field">
<label></label>
<button class="btn btn-green btn-large btn-radius popup-modal" href="#change-username-modal">{{.i18n.Tr "settings.update_profile"}}</button>
<button class="btn btn-green btn-large btn-radius" id="change-username-btn" href="#change-username-modal">{{.i18n.Tr "settings.update_profile"}}</button>
</div>
</form>
</div>