diff --git a/rhodecode/templates/files/files_add.html b/rhodecode/templates/files/files_add.html --- a/rhodecode/templates/files/files_add.html +++ b/rhodecode/templates/files/files_add.html @@ -36,7 +36,7 @@
- ${h.form(h.url.current(),method='post',id='eform')} + ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")}

${_('Add new file')}

@@ -50,21 +50,33 @@
-
+
+
-
+
+
-

-				
+			    
+

+				    
+                
${_('commit message')}
- +
@@ -76,9 +88,22 @@ mode: "null", lineNumbers:true }); - YUE.on('reset','click',function(){ + YUE.on('reset','click',function(e){ window.location="${h.url('files_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path)}"; - }) + }); + + YUE.on('file_enable','click',function(){ + YUD.setStyle('editor_container','display',''); + YUD.setStyle('upload_file_container','display','none'); + YUD.setStyle('filename_container','display',''); + }); + + YUE.on('upload_file_enable','click',function(){ + YUD.setStyle('editor_container','display','none'); + YUD.setStyle('upload_file_container','display',''); + YUD.setStyle('filename_container','display','none'); + }); +