]> git.openstreetmap.org Git - rails.git/blob - app/views/shared/_richtext_field.html.erb
168e9efe43cedc242a7900cae7759584385ad72c
[rails.git] / app / views / shared / _richtext_field.html.erb
1 <div class="form-group">
2   <label><%= object.class.human_attribute_name(attribute) %></label>
3   <div id="<%= id %>_container" class="form-row richtext_container">
4     <div id="<%= id %>_content" class="col-sm-8 mb-3 mb-sm-0 richtext_content">
5       <%= builder.text_area(attribute, options.merge(:wrapper => false, "data-preview-url" => preview_url(:type => type))) %>
6       <div id="<%= id %>_preview" class="richtext_preview richtext text-break"></div>
7     </div>
8     <div id="<%= id %>_help" class="col-sm-4 richtext_help">
9       <div class="card bg-light h-100">
10         <div class="card-body">
11           <%= render :partial => "shared/#{type}_help" %>
12           <%= submit_tag t(".edit"), :id => "#{id}_doedit", :class => "richtext_doedit btn btn-primary", :disabled => true %>
13           <%= submit_tag t(".preview"), :id => "#{id}_dopreview", :class => "richtext_dopreview btn btn-primary" %>
14         </div>
15       </div>
16     </div>
17   </div>
18 </div>