diff --git a/app/controllers/templates_controller.rb b/app/controllers/templates_controller.rb index 1a8a3ba..448b9e2 100644 --- a/app/controllers/templates_controller.rb +++ b/app/controllers/templates_controller.rb @@ -329,7 +329,6 @@ @template = Template.find(params[:id]) authorize @template - # Unpublish the live version new_copy = Template.deep_copy(@template) new_copy.title = "Copy of " + @template.title new_copy.version = 0 @@ -343,7 +342,7 @@ flash[:notice] = 'Template was successfully copied.' redirect_to admin_template_template_path(id: new_copy.id, edit: true), notice: _('Information was successfully created.') else - flash[:notice] = failed_create_error(new_copy, _('template')) + flash[:alert] = failed_create_error(new_copy, _('template')) end end