diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index b0538679..63ea7970 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -144,6 +144,7 @@ class DmsfController < ApplicationController # Folder manipulation def new + @folder = DmsfFolder.new #Bugfix form error @pathfolder = @parent render :action => "edit" end diff --git a/app/controllers/dmsf_folders_copy_controller.rb b/app/controllers/dmsf_folders_copy_controller.rb index c4ef2069..5d1049e9 100644 --- a/app/controllers/dmsf_folders_copy_controller.rb +++ b/app/controllers/dmsf_folders_copy_controller.rb @@ -24,7 +24,7 @@ class DmsfFoldersCopyController < ApplicationController before_filter :find_folder before_filter :authorize - verify :method => :post, :only => [:copy_to], :render => { :nothing => true, :status => :method_not_allowed } +# verify :method => :post, :only => [:copy_to], :render => { :nothing => true, :status => :method_not_allowed } def new @target_project = DmsfFolder.allowed_target_projects_on_copy.detect {|p| p.id.to_s == params[:target_project_id]} if params[:target_project_id] diff --git a/app/views/dmsf/_multi_upload.html.erb b/app/views/dmsf/_multi_upload.html.erb index 0daf2212..699a9855 100644 --- a/app/views/dmsf/_multi_upload.html.erb +++ b/app/views/dmsf/_multi_upload.html.erb @@ -1,5 +1,5 @@
- <%= form_tag({:controller => "dmsf_upload", :action => "upload_files", :id => @project}, + <%= form_tag({:controller => "dmsf_upload", :action => "upload_files", :id => @project, :folder_id => @folder}, :id => "uploadform", :method=>:post, :multipart => true) do %> <% if Setting.attachment_max_size.to_i >= 102400 %>
diff --git a/app/views/dmsf/edit.html.erb b/app/views/dmsf/edit.html.erb index 60695d76..fbc70a9a 100644 --- a/app/views/dmsf/edit.html.erb +++ b/app/views/dmsf/edit.html.erb @@ -1,18 +1,20 @@ <% html_title(l(:dmsf)) %>
- <%= link_to(image_tag("copy.png"), {:controller => :dmsf_folders_copy, :action => "new", :id => @folder }, :title => l(:title_copy)) %> + <%= link_to(image_tag("copy.png"), {:controller => :dmsf_folders_copy, :action => "new", :id => @folder }, :title => l(:title_copy)) unless @folder.id.nil? %>
-<% create = @pathfolder == @parent %> +<% + create = @pathfolder == @parent +%>

<%= render(:partial => "path", :locals => {:path => @pathfolder.nil? ? [] : @pathfolder.dmsf_path}) %> <%= ("/ " + l(:heading_new_folder)) if create %>

-<% form_for(:dmsf_folder, @folder, :url => {:action => create ? "create" : "save", :id => @project, :folder_id => @folder, :parent_id => @parent}, +<%= form_for(@folder, :url => {:action => create ? "create" : "save", :id => @project, :folder_id => @folder, :parent_id => @parent}, :html => {:method=>:post}) do |f| %> - <%= error_messages_for("folder") %> + <%= error_messages_for(@folder) %>
diff --git a/app/views/dmsf/edit_root.html.erb b/app/views/dmsf/edit_root.html.erb index 852593b8..9bfd70b7 100644 --- a/app/views/dmsf/edit_root.html.erb +++ b/app/views/dmsf/edit_root.html.erb @@ -5,7 +5,7 @@

<%= render(:partial => "path", :locals => {:path => []}) %>

-<% form_for(:project, @project, :url => {:action => "save_root", :id => @project}, +<%= form_for(@project, :url => {:action => "save_root", :id => @project}, :html => {:method=>:post}) do |f| %>

diff --git a/app/views/dmsf/show.html.erb b/app/views/dmsf/show.html.erb index a781bcdf..a72931c9 100644 --- a/app/views/dmsf/show.html.erb +++ b/app/views/dmsf/show.html.erb @@ -3,9 +3,8 @@

<% if User.current.allowed_to?(:folder_manipulation, @project) %> <% if @folder.nil? %> - <%= link_to("", :method => :edit_root, :title => l(:link_edit, :title => l(:link_documents)), :class => "icon icon-edit") %>   -   + <%= link_to("", {:action => "edit_root", :id => @project}, + :title => l(:link_edit, :title => l(:link_documents)), :class => "icon icon-edit") %>   <% else @folder.nil? %> <%= link_to("", {:action => "edit", :id => @project, :folder_id => @folder }, :title => l(:link_edit, :title => h(@folder.title)), :class => "icon icon-edit") %>   @@ -26,7 +25,7 @@
<%= render "custom_fields", :object => @folder %>
-<%= form_tag({:method => :entries_operation, :id => @project, :folder_id => @folder}, :method => :post, +<%= form_tag({:action => :entries_operation, :id => @project, :folder_id => @folder}, :method => :post, :class => "dmfs_entries", :id => "entries_form") do %> <%= hidden_field_tag("action") %>
@@ -191,7 +190,7 @@