diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-09-28 01:38:25 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-09-28 01:38:25 -0400 |
commit | 49193bebd283322bb997b7aed09fc7818a881af9 (patch) | |
tree | 36d99aba259628c518d903da8c74d70b34413eeb /templates | |
parent | ad2ab6d21496e60e7589c44bdfcc15bba01ae9dd (diff) | |
download | gitea-49193bebd283322bb997b7aed09fc7818a881af9.tar.gz gitea-49193bebd283322bb997b7aed09fc7818a881af9.zip |
UI: Confirmation box
Diffstat (limited to 'templates')
-rw-r--r-- | templates/.VERSION | 2 | ||||
-rw-r--r-- | templates/admin/auth/edit.tmpl | 9 | ||||
-rw-r--r-- | templates/admin/user/edit.tmpl | 11 | ||||
-rw-r--r-- | templates/org/settings/delete.tmpl | 11 | ||||
-rw-r--r-- | templates/org/settings/options.tmpl | 9 | ||||
-rw-r--r-- | templates/org/team/new.tmpl | 9 | ||||
-rw-r--r-- | templates/repo/home.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/options.tmpl | 9 | ||||
-rw-r--r-- | templates/user/settings/delete.tmpl | 11 | ||||
-rw-r--r-- | templates/user/settings/profile.tmpl | 4 |
10 files changed, 63 insertions, 14 deletions
diff --git a/templates/.VERSION b/templates/.VERSION index 59eee24b76..cea419d7eb 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.4.0926 Beta
\ No newline at end of file +0.5.4.0927 Beta
\ No newline at end of file diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 9697b77369..77d28f6269 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -100,7 +100,14 @@ <label></label> <button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "admin.auths.update"}}</button> - <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> diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index 3924afec4b..1d4cf806f1 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -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> - <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> diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl index 8b698e0d37..a929fabfe2 100644 --- a/templates/org/settings/delete.tmpl +++ b/templates/org/settings/delete.tmpl @@ -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> diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl index 793b9c294c..1ed7acb56e 100644 --- a/templates/org/settings/options.tmpl +++ b/templates/org/settings/options.tmpl @@ -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> diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl index f9632fcfd4..89afd84f9d 100644 --- a/templates/org/team/new.tmpl +++ b/templates/org/team/new.tmpl @@ -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")}} - <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> diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 32fbf58226..aa303aaac4 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -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"> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index fb6cda2aae..9356244ff6 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -20,6 +20,13 @@ <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> <textarea class="ipt ipt-large ipt-radius {{if .Err_Description}}ipt-error{{end}}" id="desc" name="desc">{{.Repository.Description}}</textarea> @@ -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> diff --git a/templates/user/settings/delete.tmpl b/templates/user/settings/delete.tmpl index cc6bf273d7..a6d3663dbe 100644 --- a/templates/user/settings/delete.tmpl +++ b/templates/user/settings/delete.tmpl @@ -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> diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl index 4d2251773f..5338d295f6 100644 --- a/templates/user/settings/profile.tmpl +++ b/templates/user/settings/profile.tmpl @@ -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> |