diff --git a/app/views/copy_projects/copy_from_admin.html.erb b/app/views/copy_projects/copy_from_admin.html.erb index 4d3fb4c8d0..a8e7394470 100644 --- a/app/views/copy_projects/copy_from_admin.html.erb +++ b/app/views/copy_projects/copy_from_admin.html.erb @@ -34,7 +34,7 @@ See doc/COPYRIGHT.rdoc for more details. <%= labelled_tabular_form_for @copy_project, url: { action: 'copy', coming_from: 'admin' } do |f| %> <%= hidden_field_tag :coming_from, 'admin' %> - <%= render :partial => 'projects/form', :locals => { :f => f, :project => @copy_project, :renderTypes => true } %> + <%= render :partial => 'projects/form', :locals => { :f => f, :project => @copy_project, :renderTypes => true, :show_all_fields => true } %> <%= render :partial => "copy_projects/copy_settings/copy_associations", :locals => { :project => @project } %> diff --git a/app/views/projects/_edit.html.erb b/app/views/projects/_edit.html.erb index ee019ea8a7..9e747584be 100644 --- a/app/views/projects/_edit.html.erb +++ b/app/views/projects/_edit.html.erb @@ -30,7 +30,8 @@ See doc/COPYRIGHT.rdoc for more details. <%= render partial: 'form', locals: { f: f, project: @altered_project, - renderTypes: false + renderTypes: false, + show_all_fields: true } %> <%= f.button l(:button_update), class: 'button -highlight -with-icon icon-yes' %> diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb index 4f75253a9f..2ed7204145 100644 --- a/app/views/projects/_form.html.erb +++ b/app/views/projects/_form.html.erb @@ -33,7 +33,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= render partial: "projects/form/project_attributes", - locals: { project: project, form: f } %> + locals: { project: project, form: f, show_all_fields: show_all_fields } %> <%= call_hook(:view_projects_form, project: project, form: f) %>
@@ -45,7 +45,7 @@ See doc/COPYRIGHT.rdoc for more details. <% end %> -<% if project.persisted? %> +<% if show_all_fields %>
<%= render partial: "projects/form/modules", locals: { form: f } %>
@@ -53,14 +53,14 @@ See doc/COPYRIGHT.rdoc for more details. <%= javascript_tag 'observeProjectModules();' %> <% end %> -<% if (project.persisted? && project.module_enabled?('work_package_tracking')) && renderTypes %> +<% if ((show_all_fields && project.module_enabled?('work_package_tracking') ) && renderTypes) %>
<%= render partial: 'projects/form/types', locals: { f: f, project: project } %>
<% end %> -<% if project.persisted? %> +<% if show_all_fields %>
<%= render partial: 'projects/form/custom_fields', locals: { diff --git a/app/views/projects/form/_project_attributes.html.erb b/app/views/projects/form/_project_attributes.html.erb index c87931bcde..7c5967e0d2 100644 --- a/app/views/projects/form/_project_attributes.html.erb +++ b/app/views/projects/form/_project_attributes.html.erb @@ -33,13 +33,14 @@ See doc/COPYRIGHT.rdoc for more details. locals: { form: form } %> <%= render partial: "projects/form/attributes/responsible_id", locals: { form: form } %> - +<% unless show_all_fields %> +<% end %> diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb index 590b589e74..b3bd9377fc 100644 --- a/app/views/projects/new.html.erb +++ b/app/views/projects/new.html.erb @@ -29,7 +29,10 @@ See doc/COPYRIGHT.rdoc for more details. <% html_title l("label_project_new") %> <%= toolbar title: l(:label_project_new) %> <%= labelled_tabular_form_for @project do |f| %> - <%= render :partial => 'form', :locals => { :f => f, :project => @project, :renderTypes => true } %> + <%= render :partial => 'form', :locals => { :f => f, + :project => @project, + :renderTypes => true, + :show_all_fields => false } %> <%= styled_button_tag l(:button_create), class: '-highlight -with-icon icon-yes' %> <%= javascript_tag "Form.Element.focus('project_name');" %> <% end %>