diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index 70138ea..1a4584c 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -4,7 +4,6 @@ helper PaginableHelper helper SettingsTemplateHelper after_action :verify_authorized, except: [:overview] - before_filter :set_templates, only: :new def index authorize Plan @@ -448,9 +447,4 @@ end plan.delete(src_plan_key) end - - def set_templates - @templates = current_user.org.templates.published.organisationally_visible.where(customization_of: nil) if current_user.org - @templates ||= [] - end end diff --git a/app/views/plans/_form_v2.html.erb b/app/views/plans/_form_v2.html.erb index 11de526..3c8db57 100644 --- a/app/views/plans/_form_v2.html.erb +++ b/app/views/plans/_form_v2.html.erb @@ -77,10 +77,7 @@ <%= _('Multiple templates where found, which one would you like to use?') %>

<%= hidden_field_tag 'template-option-target', org_admin_template_options_path %> - <%= select_tag( - :plan_template_id, options_from_collection_for_select( - @templates, 'id', 'title', @templates.first ? @templates.first.id : nil - )) %> + <%= select_tag(:plan_template_id) %>