Updated Site preference with Remove Image functionality for orbit bar

This commit is contained in:
saurabhbhatia 2013-10-21 18:44:51 +08:00
parent cf89ed108a
commit 11ef2a13d6
1 changed files with 15 additions and 6 deletions

View File

@ -186,13 +186,17 @@
<% end %>
</div>
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
<span class="btn btn-file">
<% if @site.default_image.file.present?%>
<span class="btn btn-file">
<%= f.file_field :default_image, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Change
<%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%>
</span>
<%= f.check_box :remove_default_image %>
Remove Favicon
<%else%>
<span class="btn btn-file">
<%= f.file_field :default_image, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Select Image
</span>
<%end%>
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Cancel</a>
</div>
@ -211,13 +215,18 @@
<% end %>
</div>
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
<span class="btn btn-file">
<% if @site.favicon.file.present?%>
<span class="btn btn-file">
<%= 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%>
</span>
<%= f.check_box :remove_favicon %>
Remove Favicon
<%else%>
<span class="btn btn-file">
<%= f.file_field :favicon, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Select Image
</span>
<%end%>
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Cancel</a>
</div>