From 11ef2a13d6e802f417c9602484736d7157d98f14 Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Mon, 21 Oct 2013 18:44:51 +0800 Subject: [PATCH] Updated Site preference with Remove Image functionality for orbit bar --- app/views/admin/sites/preference.html.erb | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/app/views/admin/sites/preference.html.erb b/app/views/admin/sites/preference.html.erb index a05c2f50e..0b65d171a 100644 --- a/app/views/admin/sites/preference.html.erb +++ b/app/views/admin/sites/preference.html.erb @@ -186,13 +186,17 @@ <% end %>
- <% if @site.default_image.file.present?%> + <%= f.file_field :default_image, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Change + + <%= f.check_box :remove_default_image %> + Remove Favicon <%else%> + <%= f.file_field :default_image, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Select Image + <%end%> - Cancel @@ -211,13 +215,18 @@ <% end %>
- <% if @site.favicon.file.present?%> + <%= f.file_field :favicon, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Change - <%else%> - <%= f.file_field :favicon, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Select Image - <%end%> + <%= f.check_box :remove_favicon %> + Remove Favicon + <%else%> + + <%= f.file_field :favicon, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Select Image + + <%end%> + Cancel