mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	Rework delete org and rename org UI (#34762)
# What's the problem of the original implementation Renaming organization will mix with organization's information change make the operation difficult to keep consistent. This PR created a danger zone like what's repository setting. It also moved organization's `rename` and `delete` operations to this zone. The original updating repository will not change the name any more. This is also a step to extract the `updaterepository` function completely. Before:   After:     --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		| @@ -36,7 +36,6 @@ func (f *CreateOrgForm) Validate(req *http.Request, errs binding.Errors) binding | ||||
|  | ||||
| // UpdateOrgSettingForm form for updating organization settings | ||||
| type UpdateOrgSettingForm struct { | ||||
| 	Name                      string `binding:"Required;Username;MaxSize(40)" locale:"org.org_name_holder"` | ||||
| 	FullName                  string `binding:"MaxSize(100)"` | ||||
| 	Email                     string `binding:"MaxSize(255)"` | ||||
| 	Description               string `binding:"MaxSize(255)"` | ||||
| @@ -53,6 +52,11 @@ func (f *UpdateOrgSettingForm) Validate(req *http.Request, errs binding.Errors) | ||||
| 	return middleware.Validate(errs, ctx.Data, f, ctx.Locale) | ||||
| } | ||||
|  | ||||
| type RenameOrgForm struct { | ||||
| 	OrgName    string `binding:"Required"` | ||||
| 	NewOrgName string `binding:"Required;Username;MaxSize(40)" locale:"org.org_name_holder"` | ||||
| } | ||||
|  | ||||
| // ___________ | ||||
| // \__    ___/___ _____    _____ | ||||
| //   |    |_/ __ \\__  \  /     \ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user