diff --git a/src/main/twirl/gitbucket/core/account/creategroup.scala.html b/src/main/twirl/gitbucket/core/account/creategroup.scala.html index 78058bb..2f0d742 100644 --- a/src/main/twirl/gitbucket/core/account/creategroup.scala.html +++ b/src/main/twirl/gitbucket/core/account/creategroup.scala.html @@ -3,7 +3,7 @@

Create group

- @gitbucket.core.account.html.groupform(None, members) + @gitbucket.core.account.html.groupform(None, members, s"${context.path}/groups/new")
} diff --git a/src/main/twirl/gitbucket/core/account/editgroup.scala.html b/src/main/twirl/gitbucket/core/account/editgroup.scala.html index 0fbf3cf..59fd3c4 100644 --- a/src/main/twirl/gitbucket/core/account/editgroup.scala.html +++ b/src/main/twirl/gitbucket/core/account/editgroup.scala.html @@ -1,8 +1,9 @@ @(account: gitbucket.core.model.Account, members: List[gitbucket.core.model.GroupMember])(implicit context: gitbucket.core.controller.Context) +@import gitbucket.core.view.helpers @gitbucket.core.html.main("Edit group"){ @gitbucket.core.account.html.menu("profile", account.userName, true){

Edit group

- @gitbucket.core.account.html.groupform(Some(account), members) + @gitbucket.core.account.html.groupform(Some(account), members, s"${context.path}/${account.userName}/_editgroup") } } diff --git a/src/main/twirl/gitbucket/core/account/groupform.scala.html b/src/main/twirl/gitbucket/core/account/groupform.scala.html index 95ae9e2..e1e56c8 100644 --- a/src/main/twirl/gitbucket/core/account/groupform.scala.html +++ b/src/main/twirl/gitbucket/core/account/groupform.scala.html @@ -1,6 +1,8 @@ -@(account: Option[gitbucket.core.model.Account], members: List[gitbucket.core.model.GroupMember])(implicit context: gitbucket.core.controller.Context) +@(account: Option[gitbucket.core.model.Account], + members: List[gitbucket.core.model.GroupMember], + formUrl: String)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers -
+
diff --git a/src/main/twirl/gitbucket/core/admin/usergroup.scala.html b/src/main/twirl/gitbucket/core/admin/usergroup.scala.html index e8b03cf..fb814fa 100644 --- a/src/main/twirl/gitbucket/core/admin/usergroup.scala.html +++ b/src/main/twirl/gitbucket/core/admin/usergroup.scala.html @@ -1,134 +1,11 @@ @(account: Option[gitbucket.core.model.Account], members: List[gitbucket.core.model.GroupMember])(implicit context: gitbucket.core.controller.Context) @gitbucket.core.html.main(if(account.isEmpty) "New group" else "Update group"){ @gitbucket.core.admin.html.menu("users"){ - -
-
-
- -
- -
- - @if(account.isDefined){ - - } -
-
- -
- -
- -
-
- - -
-
- - @gitbucket.core.helper.html.uploadavatar(account) -
-
-
-
- -
    -
- @gitbucket.core.helper.html.account("memberName", 200, true, false) - - -
- -
-
-
-
-
- - Cancel -
- + @gitbucket.core.account.html.groupform(account, members, + account match { + case Some(x) => s"${context.path}/admin/users/${x.userName}/_editgroup" + case None => s"${context.path}/admin/users/_newgroup" + } + ) } } -