From fc6f5445a276387b2eb1ca1509fa5ae2345a46df Mon Sep 17 00:00:00 2001 From: Wieland Lindenthal Date: Thu, 24 May 2018 14:17:47 +0200 Subject: [PATCH] Fix: Re-add forms for uploading favicon and touch icon. --- app/views/custom_styles/show.html.erb | 68 +++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/app/views/custom_styles/show.html.erb b/app/views/custom_styles/show.html.erb index f8bfa2a93b..b85d1a6779 100644 --- a/app/views/custom_styles/show.html.erb +++ b/app/views/custom_styles/show.html.erb @@ -68,6 +68,74 @@ See docs/COPYRIGHT.rdoc for more details. <% end %> +<%= form_for @custom_style, url: custom_style_path, html: { multipart: true, class: "form -vertical" } do |f| %> +
+
+ <%= I18n.t(:label_custom_favicon) %> + + <% if @custom_style.id && @custom_style.favicon.present? %> +
+ <%= tag('img', src: custom_style_favicon_path(digest: @custom_style.digest, filename: @custom_style.favicon_identifier), class: 'custom-favicon-preview') %> + <%= link_to t(:button_delete), + custom_style_favicon_delete_path, + method: :delete, + class: 'icon icon-delete confirm-form-submit' %> +
+ <% end %> + +
+
+
+
+ <%= f.file_field :favicon, required: true, class: "attachment_choose_file", size: "15" %> +
+
+
+ <%= t('text_custom_favicon_instructions') %> +
+
+
+ + <%= styled_button_tag t(@custom_style.favicon.present? ? :button_replace : :button_upload), class: "button #{@custom_style.favicon.blank? ? '-with-icon icon-add' : ''}" %> + +
+
+<% end %> + +<%= form_for @custom_style, url: custom_style_path, html: { multipart: true, class: "form -vertical" } do |f| %> +
+
+ <%= I18n.t(:label_custom_touch_icon) %> + + <% if @custom_style.id && @custom_style.touch_icon.present? %> +
+ <%= tag('img', src: custom_style_touch_icon_path(digest: @custom_style.digest, filename: @custom_style.touch_icon_identifier), class: 'custom-touch-icon-preview') %> + <%= link_to t(:button_delete), + custom_style_touch_icon_delete_path, + method: :delete, + class: 'icon icon-delete confirm-form-submit' %> +
+ <% end %> + +
+
+
+
+ <%= f.file_field :touch_icon, required: true, class: "attachment_choose_file", size: "15" %> +
+
+
+ <%= t('text_custom_touch_icon_instructions') %> +
+
+
+ + <%= styled_button_tag t(@custom_style.touch_icon.present? ? :button_replace : :button_upload), class: "button #{@custom_style.touch_icon.blank? ? '-with-icon icon-add' : ''}" %> + +
+
+<% end %> + <%= form_tag update_design_colors_path, method: :post, class: "form" do %>