[英]materialize sass form_for rails file_field
Trying to get Materialise sass to work with a rails partial form (I was originally using simple_form however now I just want to get it working on a new form) 试图使Materialise sass与Rails局部表单一起工作(我最初使用simple_form,但是现在我只想使其在新表单上工作)
I'm using carrierwave & cloudinary - uploading works fine however when I want to theme the upload buttons with the classes from Materialise - it seems to override the button and gives me a choose file labelled button over my materialise theme button (so it does pass the class). 我使用的是carrierwave和cloudinary-上传效果很好,但是当我要使用Materialize类中的上传按钮作为主题的主题时-似乎可以覆盖该按钮,并在我的实现主题按钮上给我一个标有button的选择文件(因此它确实通过班级)。
code below 下面的代码
<%= form_for @post do |f| %>
<%= f.cl_image_upload(:picture, :html => { :class => "btn" } ) %>
<%= f.submit %>
<% end %>
<div class="#">
<div class="file-field input-field gallery_picture">
<div class="btn">
<span>Upload file</span>
<%= f.input_field :picture %>
</div>
<input class="file-path validate" type="text"/>
</div>
</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.