File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ error404 = The page you are trying to reach either <strong>does not exist</stron
120120error503  = The server was unable to complete your request. Please try again later.
121121go_back  = Go Back
122122invalid_data  = Invalid data: %v
123+ nothing_has_been_changed  = Nothing has been changed.
123124
124125never  = Never
125126unknown  = Unknown
@@ -2844,7 +2845,6 @@ settings.change_visibility = Change Visibility
28442845settings.invalid_visibility  = The new visibility is not valid.
28452846settings.change_visibility_notices_1  = If the organization is converted to private, the repository stars will be removed and cannot be restored.
28462847settings.change_visibility_notices_2  = Non-members will lose access to the organization’s repositories if visibility is changed to private.
2847- settings.change_visibility_no_change  = You did not make any changes to visibility.
28482848settings.change_visibility_success  = The visibility of organization %s has been successfully changed.
28492849settings.visibility_desc  = Change who can view the organization and its repositories.
28502850settings.visibility.public  = Public
Original file line number Diff line number Diff line change @@ -235,12 +235,14 @@ func SettingsRenamePost(ctx *context.Context) {
235235func  SettingsChangeVisibilityPost (ctx  * context.Context ) {
236236	visibility  :=  structs .VisibilityModes [ctx .FormString ("visibility" )]
237237	if  ! visibility .IsValid () {
238- 		ctx .JSONError (ctx .Tr ("org.settings.invalid_visibility" ))
238+ 		ctx .Flash .Error (ctx .Tr ("invalid_data" , visibility ))
239+ 		ctx .JSONRedirect (setting .AppSubURL  +  "/org/"  +  url .PathEscape (ctx .Org .Organization .Name ) +  "/settings" )
239240		return 
240241	}
241242
242243	if  ctx .Org .Organization .Visibility  ==  visibility  {
243- 		ctx .JSONError (ctx .Tr ("org.settings.change_visibility_no_change" ))
244+ 		ctx .Flash .Info (ctx .Tr ("nothing_has_been_changed" ))
245+ 		ctx .JSONRedirect (setting .AppSubURL  +  "/org/"  +  url .PathEscape (ctx .Org .Organization .Name ) +  "/settings" )
244246		return 
245247	}
246248
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments