mirror of
https://github.com/go-gitea/gitea
synced 2024-11-01 01:03:39 +01:00
UI: Confirmation box
This commit is contained in:
parent
ad2ab6d214
commit
49193bebd2
@ -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.
|
// checkVersion checks if binary matches the version of templates files.
|
||||||
func checkVersion() {
|
func checkVersion() {
|
||||||
|
// Templates.
|
||||||
data, err := ioutil.ReadFile(path.Join(setting.StaticRootPath, "templates/.VERSION"))
|
data, err := ioutil.ReadFile(path.Join(setting.StaticRootPath, "templates/.VERSION"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(4, "Fail to read 'templates/.VERSION': %v", err)
|
log.Fatal(4, "Fail to read 'templates/.VERSION': %v", err)
|
||||||
@ -57,6 +58,11 @@ func checkVersion() {
|
|||||||
if string(data) != setting.AppVer {
|
if string(data) != setting.AppVer {
|
||||||
log.Fatal(4, "Binary and template file version does not match, did you forget to recompile?")
|
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.
|
// newMacaron initializes Macaron instance.
|
||||||
|
@ -223,6 +223,8 @@ unbind_success = Social account has been unbound.
|
|||||||
delete_account = Delete Your Account
|
delete_account = Delete Your Account
|
||||||
delete_prompt = The operation will delete your account permanently, and <strong>CANNOT</strong> be undone!
|
delete_prompt = The operation will delete your account permanently, and <strong>CANNOT</strong> be undone!
|
||||||
confirm_delete_account = Confirm Deletion
|
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]
|
[repo]
|
||||||
owner = Owner
|
owner = Owner
|
||||||
@ -257,6 +259,7 @@ unstar = Unstar
|
|||||||
star = Star
|
star = Star
|
||||||
fork = Fork
|
fork = Fork
|
||||||
|
|
||||||
|
no_desc = No Description
|
||||||
quick_guide = Quick Guide
|
quick_guide = Quick Guide
|
||||||
clone_this_repo = Clone this repository
|
clone_this_repo = Clone this repository
|
||||||
create_new_repo_command = Create a new repository on the command line
|
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.danger_zone = Danger Zone
|
||||||
settings.site = Official Site
|
settings.site = Official Site
|
||||||
settings.update_settings = Update Settings
|
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 = Transfer Ownership
|
||||||
settings.transfer_desc = Transfer this repo to another user or to an organization where you have admin rights.
|
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.
|
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.website = Website
|
||||||
settings.location = Location
|
settings.location = Location
|
||||||
settings.update_settings = Update Settings
|
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.update_setting_success = Organization setting has been successfully updated.
|
||||||
settings.delete = Delete Organization
|
settings.delete = Delete Organization
|
||||||
settings.delete_account = Delete This Organization
|
settings.delete_account = Delete This Organization
|
||||||
settings.delete_prompt = The operation will delete this organization permanently, and <strong>CANNOT</strong> be undone!
|
settings.delete_prompt = The operation will delete this organization permanently, and <strong>CANNOT</strong> be undone!
|
||||||
settings.confirm_delete_account = Confirm Deletion
|
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.
|
settings.hooks_desc = Add webhooks that will be triggered for <strong>all repositories</strong> under this organization.
|
||||||
|
|
||||||
members.public = Public
|
members.public = Public
|
||||||
@ -383,6 +392,8 @@ teams.members = Team Members
|
|||||||
teams.update_settings = Update Settings
|
teams.update_settings = Update Settings
|
||||||
teams.delete_team = Delete This Team
|
teams.delete_team = Delete This Team
|
||||||
teams.add_team_member = Add Team Member
|
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.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.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.
|
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_success = Authorization setting has been successfully updated.
|
||||||
auths.update = Update Authorization Setting
|
auths.update = Update Authorization Setting
|
||||||
auths.delete = Delete This Authorization
|
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.server_config = Server Configuration
|
||||||
config.app_name = Application Name
|
config.app_name = Application Name
|
||||||
|
@ -223,6 +223,8 @@ unbind_success = 社交帐号解除绑定成功!
|
|||||||
delete_account = 删除当前帐户
|
delete_account = 删除当前帐户
|
||||||
delete_prompt = 删除操作会永久清除您的帐户信息,并且 <strong>不可恢复</strong>!
|
delete_prompt = 删除操作会永久清除您的帐户信息,并且 <strong>不可恢复</strong>!
|
||||||
confirm_delete_account = 确认删除帐户
|
confirm_delete_account = 确认删除帐户
|
||||||
|
delete_account_title = 帐户删除操作
|
||||||
|
delete_account_desc = 该帐户将被永久性删除,您确定要继续操作吗?
|
||||||
|
|
||||||
[repo]
|
[repo]
|
||||||
owner = 拥有者
|
owner = 拥有者
|
||||||
@ -257,6 +259,7 @@ unstar = 取消点赞
|
|||||||
star = 点赞
|
star = 点赞
|
||||||
fork = 派生
|
fork = 派生
|
||||||
|
|
||||||
|
no_desc = 暂无描述
|
||||||
quick_guide = 快速帮助
|
quick_guide = 快速帮助
|
||||||
clone_this_repo = 克隆当前仓库
|
clone_this_repo = 克隆当前仓库
|
||||||
create_new_repo_command = 从命令行创建一个新的仓库
|
create_new_repo_command = 从命令行创建一个新的仓库
|
||||||
@ -289,6 +292,8 @@ settings.basic_settings = 基本设置
|
|||||||
settings.danger_zone = 危险操作区
|
settings.danger_zone = 危险操作区
|
||||||
settings.site = 官方网站
|
settings.site = 官方网站
|
||||||
settings.update_settings = 更新仓库设置
|
settings.update_settings = 更新仓库设置
|
||||||
|
settings.change_reponame = 仓库名称将被修改
|
||||||
|
settings.change_reponame_desc = 仓库名称被修改,您确定要继续操作吗?这将会影响到所有与该仓库有关的链接。
|
||||||
settings.transfer = 转移仓库所有权
|
settings.transfer = 转移仓库所有权
|
||||||
settings.transfer_desc = 您可以将仓库转移至您拥有管理员权限的帐户或组织。
|
settings.transfer_desc = 您可以将仓库转移至您拥有管理员权限的帐户或组织。
|
||||||
settings.new_owner_has_same_repo = 新的仓库拥有者已经存在同名仓库!
|
settings.new_owner_has_same_repo = 新的仓库拥有者已经存在同名仓库!
|
||||||
@ -349,11 +354,16 @@ settings.full_name = 组织全名
|
|||||||
settings.website = 官方网站
|
settings.website = 官方网站
|
||||||
settings.location = 所在地区
|
settings.location = 所在地区
|
||||||
settings.update_settings = 更新组织设置
|
settings.update_settings = 更新组织设置
|
||||||
|
settings.change_orgname = 组织名称将被修改
|
||||||
|
settings.change_orgname_desc = 组织名称被修改,您确定要继续操作吗?这将会影响到所有与该组织有关的链接。
|
||||||
settings.update_setting_success = 组织设置更新成功!
|
settings.update_setting_success = 组织设置更新成功!
|
||||||
settings.delete = 删除组织
|
settings.delete = 删除组织
|
||||||
settings.delete_account = 删除当前组织
|
settings.delete_account = 删除当前组织
|
||||||
settings.delete_prompt = 删除操作会永久清除该组织的信息,并且 <strong>不可恢复</strong>!
|
settings.delete_prompt = 删除操作会永久清除该组织的信息,并且 <strong>不可恢复</strong>!
|
||||||
settings.confirm_delete_account = 确认删除组织
|
settings.confirm_delete_account = 确认删除组织
|
||||||
|
settings.delete_org_title = 组织删除操作
|
||||||
|
settings.delete_org_desc = 该组织将被永久性删除,您确定要继续操作吗?
|
||||||
|
settings.hooks_desc = 在此处添加的 Web 钩子将会应用到该组织下的 <strong>所有仓库</strong>。
|
||||||
|
|
||||||
members.public = 公开成员
|
members.public = 公开成员
|
||||||
members.public_helper = 设为私有
|
members.public_helper = 设为私有
|
||||||
@ -382,6 +392,8 @@ teams.members = 团队成员
|
|||||||
teams.update_settings = 更新团队设置
|
teams.update_settings = 更新团队设置
|
||||||
teams.delete_team = 删除当前团队
|
teams.delete_team = 删除当前团队
|
||||||
teams.add_team_member = 添加团队成员
|
teams.add_team_member = 添加团队成员
|
||||||
|
teams.delete_team_title = 团队删除操作
|
||||||
|
teams.delete_team_desc = 删除操作会永久清除有关该团队的信息,您确定要继续操作吗?团队成员可能会失去对某些仓库的操作权限。
|
||||||
teams.delete_team_success = 指定团队删除成功!
|
teams.delete_team_success = 指定团队删除成功!
|
||||||
teams.read_permission_desc = 该团队拥有对所属仓库的 <strong>读取</strong> 权限,团队成员可以进行查看和克隆等只读操作。
|
teams.read_permission_desc = 该团队拥有对所属仓库的 <strong>读取</strong> 权限,团队成员可以进行查看和克隆等只读操作。
|
||||||
teams.write_permission_desc = 该团队拥有对所属仓库的 <strong>读取</strong> 和 <strong>写入</strong> 的权限。
|
teams.write_permission_desc = 该团队拥有对所属仓库的 <strong>读取</strong> 和 <strong>写入</strong> 的权限。
|
||||||
@ -457,6 +469,7 @@ users.is_activated = 该用户已被激活
|
|||||||
users.is_admin = 该用户具有管理员权限
|
users.is_admin = 该用户具有管理员权限
|
||||||
users.update_profile = 更新用户信息
|
users.update_profile = 更新用户信息
|
||||||
users.delete_account = 删除该用户
|
users.delete_account = 删除该用户
|
||||||
|
users.still_own_repo = 该帐户仍然是某些仓库的拥有者,您必须先转移或删除它们才能执行删除帐户操作!
|
||||||
|
|
||||||
orgs.org_manage_panel = 组织管理面板
|
orgs.org_manage_panel = 组织管理面板
|
||||||
orgs.name = 组织名称
|
orgs.name = 组织名称
|
||||||
@ -497,6 +510,8 @@ auths.activated = 该授权认证已经启用
|
|||||||
auths.update_success = 授权认证设置更新成功!
|
auths.update_success = 授权认证设置更新成功!
|
||||||
auths.update = 更新授权认证信息
|
auths.update = 更新授权认证信息
|
||||||
auths.delete = 删除该授权认证
|
auths.delete = 删除该授权认证
|
||||||
|
auths.delete_auth_title = 授权认证删除操作
|
||||||
|
auths.delete_auth_desc = 该授权认证将被删除,您确定要继续吗?
|
||||||
|
|
||||||
config.server_config = 服务器配置
|
config.server_config = 服务器配置
|
||||||
config.app_name = 应用名称
|
config.app_name = 应用名称
|
||||||
|
3
gogs.go
3
gogs.go
@ -17,7 +17,7 @@ import (
|
|||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.5.4.0926 Beta"
|
const APP_VER = "0.5.4.0927 Beta"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
@ -38,5 +38,6 @@ func main() {
|
|||||||
cmd.CmdCert,
|
cmd.CmdCert,
|
||||||
}
|
}
|
||||||
app.Flags = append(app.Flags, []cli.Flag{}...)
|
app.Flags = append(app.Flags, []cli.Flag{}...)
|
||||||
|
println(runtime.Version())
|
||||||
app.Run(os.Args)
|
app.Run(os.Args)
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
"html/template"
|
"html/template"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"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)))
|
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{}) {
|
func (ctx *Context) ServeContent(name string, r io.ReadSeeker, params ...interface{}) {
|
||||||
modtime := time.Now()
|
modtime := time.Now()
|
||||||
for _, p := range params {
|
for _, p := range params {
|
||||||
|
@ -1472,6 +1472,10 @@ The register and sign-in page style
|
|||||||
font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace;
|
font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
.no-desc {
|
||||||
|
color: #888;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
#admin-wrapper,
|
#admin-wrapper,
|
||||||
#setting-wrapper {
|
#setting-wrapper {
|
||||||
padding-bottom: 100px;
|
padding-bottom: 100px;
|
||||||
|
@ -293,39 +293,38 @@ function initCore() {
|
|||||||
}
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Popup.
|
||||||
|
$(document).on('click', '.popup-modal-dismiss', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$.magnificPopup.close();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function initUserSetting() {
|
function initUserSetting() {
|
||||||
// Confirmation of change username in user profile page.
|
// Confirmation of change username in user profile page.
|
||||||
var $username = $('#username');
|
var $username = $('#username');
|
||||||
var $form = $('#user-profile-form');
|
var $profile_form = $('#user-profile-form');
|
||||||
var confimed = false;
|
$('#change-username-btn').magnificPopup({
|
||||||
$('.popup-modal').magnificPopup({
|
|
||||||
modal: true,
|
modal: true,
|
||||||
callbacks: {
|
callbacks: {
|
||||||
open: function () {
|
open: function () {
|
||||||
if (($username.data('uname') == $username.val())) {
|
if (($username.data('uname') == $username.val())) {
|
||||||
$.magnificPopup.close();
|
$.magnificPopup.close();
|
||||||
$form.submit();
|
$profile_form.submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}).click(function () {
|
||||||
$(document).on('click', '.popup-modal-dismiss', function (e) {
|
if (($username.data('uname') != $username.val())) {
|
||||||
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) {
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$('#change-username-submit').click(function () {
|
||||||
|
$.magnificPopup.close();
|
||||||
|
$profile_form.submit();
|
||||||
|
});
|
||||||
|
|
||||||
// Show add SSH key panel.
|
// Show add SSH key panel.
|
||||||
$('#ssh-add').click(function () {
|
$('#ssh-add').click(function () {
|
||||||
@ -333,11 +332,15 @@ function initUserSetting() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Confirmation of delete account.
|
// Confirmation of delete account.
|
||||||
$('#delete-account-button').click(function (e) {
|
$('#delete-account-btn').magnificPopup({
|
||||||
if (!confirm('This account is going to be deleted, do you want to continue?')) {
|
modal: true
|
||||||
|
}).click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
}
|
});
|
||||||
|
$('#delete-account-submit').click(function () {
|
||||||
|
$.magnificPopup.close();
|
||||||
|
$('#delete-account-form').submit();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -409,13 +412,28 @@ function initHookTypeChange() {
|
|||||||
function initRepoSetting() {
|
function initRepoSetting() {
|
||||||
// Options.
|
// Options.
|
||||||
// Confirmation of changing repository name.
|
// Confirmation of changing repository name.
|
||||||
$('#repo-setting-form').submit(function (e) {
|
|
||||||
var $reponame = $('#repo_name');
|
var $reponame = $('#repo_name');
|
||||||
if (($reponame.data('repo-name') != $reponame.val()) && !confirm('Repository name has been changed, do you want to continue?')) {
|
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();
|
e.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$('#change-reponame-submit').click(function () {
|
||||||
|
$.magnificPopup.close();
|
||||||
|
$setting_form.submit();
|
||||||
|
});
|
||||||
|
|
||||||
initHookTypeChange();
|
initHookTypeChange();
|
||||||
|
|
||||||
@ -451,19 +469,39 @@ function initRepoSetting() {
|
|||||||
function initOrgSetting() {
|
function initOrgSetting() {
|
||||||
// Options.
|
// Options.
|
||||||
// Confirmation of changing organization name.
|
// Confirmation of changing organization name.
|
||||||
$('#org-setting-form').submit(function (e) {
|
|
||||||
var $orgname = $('#orgname');
|
var $orgname = $('#orgname');
|
||||||
if (($orgname.data('orgname') != $orgname.val()) && !confirm('Organization name has been changed, do you want to continue?')) {
|
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();
|
e.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$('#change-orgname-submit').click(function () {
|
||||||
|
$.magnificPopup.close();
|
||||||
|
$setting_form.submit();
|
||||||
|
});
|
||||||
|
|
||||||
// Confirmation of delete organization.
|
// Confirmation of delete organization.
|
||||||
$('#delete-org-button').click(function (e) {
|
$('#delete-org-btn').magnificPopup({
|
||||||
if (!confirm('This organization is going to be deleted, do you want to continue?')) {
|
modal: true
|
||||||
|
}).click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
}
|
});
|
||||||
|
$('#delete-org-submit').click(function () {
|
||||||
|
$.magnificPopup.close();
|
||||||
|
$('#delete-org-form').submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
initHookTypeChange();
|
initHookTypeChange();
|
||||||
@ -493,11 +531,14 @@ function initInvite() {
|
|||||||
|
|
||||||
function initOrgTeamCreate() {
|
function initOrgTeamCreate() {
|
||||||
// Delete team.
|
// Delete team.
|
||||||
$('#org-team-delete').click(function (e) {
|
$('#org-team-delete').magnificPopup({
|
||||||
if (!confirm('This team is going to be deleted, do you want to continue?')) {
|
modal: true
|
||||||
|
}).click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
}
|
});
|
||||||
|
$('#delete-team-submit').click(function () {
|
||||||
|
$.magnificPopup.close();
|
||||||
var $form = $('#team-create-form');
|
var $form = $('#team-create-form');
|
||||||
$form.attr('action', $form.data('delete-url'));
|
$form.attr('action', $form.data('delete-url'));
|
||||||
});
|
});
|
||||||
@ -561,15 +602,20 @@ function initAdmin() {
|
|||||||
$('.auth-name').toggleShow();
|
$('.auth-name').toggleShow();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Delete account.
|
// Delete account.
|
||||||
$('#user-delete').click(function (e) {
|
$('#delete-account-btn').magnificPopup({
|
||||||
if (!confirm('This account is going to be deleted, do you want to continue?')) {
|
modal: true
|
||||||
|
}).click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
}
|
});
|
||||||
|
$('#delete-account-submit').click(function () {
|
||||||
|
$.magnificPopup.close();
|
||||||
var $form = $('#user-profile-form');
|
var $form = $('#user-profile-form');
|
||||||
$form.attr('action', $form.data('delete-url'));
|
$form.attr('action', $form.data('delete-url'));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create authorization.
|
// Create authorization.
|
||||||
$('#auth-type').on("change", function () {
|
$('#auth-type').on("change", function () {
|
||||||
var v = $(this).val();
|
var v = $(this).val();
|
||||||
@ -582,13 +628,17 @@ function initAdmin() {
|
|||||||
$('.ldap').toggleHide();
|
$('.ldap').toggleHide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Delete authorization.
|
// Delete authorization.
|
||||||
$('#auth-delete').click(function (e) {
|
$('#delete-auth-btn').magnificPopup({
|
||||||
if (!confirm('This authorization is going to be deleted, do you want to continue?')) {
|
modal: true
|
||||||
|
}).click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
}
|
});
|
||||||
var $form = $('auth-setting-form');
|
$('#delete-auth-submit').click(function () {
|
||||||
|
$.magnificPopup.close();
|
||||||
|
var $form = $('#auth-setting-form');
|
||||||
$form.attr('action', $form.data('delete-url'));
|
$form.attr('action', $form.data('delete-url'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
10
public/ng/js/min/gogs-min.js
vendored
10
public/ng/js/min/gogs-min.js
vendored
File diff suppressed because one or more lines are too long
@ -516,3 +516,7 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.no-desc {
|
||||||
|
color: #888;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
0.5.4.0926 Beta
|
0.5.4.0927 Beta
|
@ -100,7 +100,14 @@
|
|||||||
<label></label>
|
<label></label>
|
||||||
<button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "admin.auths.update"}}</button>
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>{{.i18n.Tr "username"}}</label>
|
<label>{{.i18n.Tr "username"}}</label>
|
||||||
<label>{{.User.Name}}</label>
|
<label class="text-left">{{.User.Name}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="req" for="email">{{.i18n.Tr "email"}}</label>
|
<label class="req" for="email">{{.i18n.Tr "email"}}</label>
|
||||||
@ -65,7 +65,14 @@
|
|||||||
<label></label>
|
<label></label>
|
||||||
<button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "admin.users.update_profile"}}</button>
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,13 +12,20 @@
|
|||||||
<p class="panel-header"><strong>{{.i18n.Tr "org.settings.delete_account"}}</strong></p>
|
<p class="panel-header"><strong>{{.i18n.Tr "org.settings.delete_account"}}</strong></p>
|
||||||
<div class="panel-body panel-content">
|
<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>
|
<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}}
|
{{.CsrfTokenHtml}}
|
||||||
<p class="field">
|
<p class="field">
|
||||||
<span class="form-label"></span>
|
<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>
|
</p>
|
||||||
</form>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,6 +19,13 @@
|
|||||||
<label class="req" for="orgname">{{.i18n.Tr "username"}}</label>
|
<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 />
|
<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>
|
||||||
|
<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">
|
<div class="field">
|
||||||
<label for="full-name">{{.i18n.Tr "org.settings.full_name"}}</label>
|
<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}}" />
|
<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>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<span class="form-label"></span>
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,7 +53,14 @@
|
|||||||
<button class="btn btn-large btn-green btn-radius">{{.i18n.Tr "org.teams.update_settings"}}</button>
|
<button class="btn btn-large btn-green btn-radius">{{.i18n.Tr "org.teams.update_settings"}}</button>
|
||||||
{{if not (eq .Team.LowerName "owners")}}
|
{{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}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<div id="repo-content" class="clear container">
|
<div id="repo-content" class="clear container">
|
||||||
<div id="repo-main" class="left grid-4-5">
|
<div id="repo-main" class="left grid-4-5">
|
||||||
<p id="repo-desc">
|
<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>
|
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
||||||
</p>
|
</p>
|
||||||
<ul id="repo-file-nav" class="clear menu menu-line">
|
<ul id="repo-file-nav" class="clear menu menu-line">
|
||||||
|
@ -19,6 +19,13 @@
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
<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 />
|
<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>
|
||||||
<div class="field clear">
|
<div class="field clear">
|
||||||
<label class="left" for="desc">{{.i18n.Tr "repo.repo_desc"}}</label>
|
<label class="left" for="desc">{{.i18n.Tr "repo.repo_desc"}}</label>
|
||||||
@ -59,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<span class="form-label"></span>
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,13 +11,20 @@
|
|||||||
<p class="panel-header"><strong>{{.i18n.Tr "settings.delete_account"}}</strong></p>
|
<p class="panel-header"><strong>{{.i18n.Tr "settings.delete_account"}}</strong></p>
|
||||||
<div class="panel-body panel-content">
|
<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>
|
<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}}
|
{{.CsrfTokenHtml}}
|
||||||
<p class="field">
|
<p class="field">
|
||||||
<span class="form-label"></span>
|
<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>
|
</p>
|
||||||
</form>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<h1 class="text-red">{{.i18n.Tr "settings.change_username"}}</h1>
|
<h1 class="text-red">{{.i18n.Tr "settings.change_username"}}</h1>
|
||||||
<p>{{.i18n.Tr "settings.change_username_desc"}}</p>
|
<p>{{.i18n.Tr "settings.change_username_desc"}}</p>
|
||||||
<br>
|
<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>
|
<button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
@ -51,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label></label>
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user