diff --git a/src/main/scala/gitbucket/core/controller/AccountController.scala b/src/main/scala/gitbucket/core/controller/AccountController.scala index 022acdd..92a5682 100644 --- a/src/main/scala/gitbucket/core/controller/AccountController.scala +++ b/src/main/scala/gitbucket/core/controller/AccountController.scala @@ -456,7 +456,7 @@ get("/:groupName/_editgroup")(managersOnly { defining(params("groupName")){ groupName => // TODO Don't use Option.get - html.editgroup(getAccountByUserName(groupName, true).get, getGroupMembers(groupName)) + html.editgroup(getAccountByUserName(groupName, true).get, getGroupMembers(groupName), flash.get("info")) } }) @@ -499,7 +499,9 @@ // } updateImage(form.groupName, form.fileId, form.clearImage) - redirect(s"/${form.groupName}") + + flash += "info" -> "Account information has been updated." + redirect(s"/${groupName}/_editgroup") } getOrElse NotFound() } diff --git a/src/main/twirl/gitbucket/core/account/editgroup.scala.html b/src/main/twirl/gitbucket/core/account/editgroup.scala.html index 6664afc..ce7c59a 100644 --- a/src/main/twirl/gitbucket/core/account/editgroup.scala.html +++ b/src/main/twirl/gitbucket/core/account/editgroup.scala.html @@ -1,7 +1,9 @@ @(account: gitbucket.core.model.Account, - members: List[gitbucket.core.model.GroupMember])(implicit context: gitbucket.core.controller.Context) + members: List[gitbucket.core.model.GroupMember], + info: Option[Any])(implicit context: gitbucket.core.controller.Context) @gitbucket.core.html.main("Edit group"){ @gitbucket.core.account.html.menu("profile", account.userName, true){ + @gitbucket.core.helper.html.information(info)

Edit group

@gitbucket.core.account.html.groupform(Some(account), members, s"${context.path}/${account.userName}/_editgroup", false) } diff --git a/src/main/twirl/gitbucket/core/account/groupform.scala.html b/src/main/twirl/gitbucket/core/account/groupform.scala.html index e6ab413..6c01eeb 100644 --- a/src/main/twirl/gitbucket/core/account/groupform.scala.html +++ b/src/main/twirl/gitbucket/core/account/groupform.scala.html @@ -52,14 +52,14 @@
- @if(account.isDefined){ + @if(account.isDefined && !admin){
Delete group
} - @if(account.isDefined){ - Cancel + @if(admin){ + Cancel }