mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-01-05 07:09:56 +01:00
Small fix of group editing form
This commit is contained in:
@@ -456,7 +456,7 @@ trait AccountControllerBase extends AccountManagementControllerBase {
|
||||
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 @@ trait AccountControllerBase extends AccountManagementControllerBase {
|
||||
// }
|
||||
|
||||
updateImage(form.groupName, form.fileId, form.clearImage)
|
||||
redirect(s"/${form.groupName}")
|
||||
|
||||
flash += "info" -> "Account information has been updated."
|
||||
redirect(s"/${groupName}/_editgroup")
|
||||
|
||||
} getOrElse NotFound()
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
<h2>Edit group</h2>
|
||||
@gitbucket.core.account.html.groupform(Some(account), members, s"${context.path}/${account.userName}/_editgroup", false)
|
||||
}
|
||||
|
||||
@@ -52,14 +52,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="border-top">
|
||||
@if(account.isDefined){
|
||||
@if(account.isDefined && !admin){
|
||||
<div class="pull-right">
|
||||
<a href="@helpers.url(account.get.userName)/_deletegroup" id="delete" class="btn btn-danger">Delete group</a>
|
||||
</div>
|
||||
}
|
||||
<input type="submit" class="btn btn-success" value="@if(account.isEmpty){Create group} else {Update group}"/>
|
||||
@if(account.isDefined){
|
||||
<a href="@helpers.url(account.get.userName)" class="btn btn-default">Cancel</a>
|
||||
@if(admin){
|
||||
<a href="@context.path/admin/users" class="btn btn-default">Cancel</a>
|
||||
}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user