Sha256: 2a95fd667d67074de7a73b7b95c7fd34692e23a64aea23aed170738abaa60451
Contents?: true
Size: 1.96 KB
Versions: 11
Compression:
Stored size: 1.96 KB
Contents
<div style="max-width: 60em; margin: auto"> <div class="mb-2"> <label class="form-label w-100">Route <select class="form-control form-control-sm" id="rawFormRoute"> <% @_rrf_form_routes_raw.each do |route| %> <% path = @route_props[:with_path_args].call(route[:route]) %> <option value="<%= route[:verb] %>:<%= path %>" data-supports-files="<%= !route[:action].in?(["update_all", "destroy", "destroy_all"]) ? "true" : "" %>" ><%= route[:verb] %> <%= route[:relative_path] %></option> <% end %> </select> </label> </div> <div class="mb-2"> <label class="form-label w-100">Media Type <select class="form-control form-control-sm" id="rawFormMediaType"> <% ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"].each do |t| %> <option value="<%= t %>"><%= t %></option> <% end %> </select> </label> </div> <div class="mb-2"> <label class="form-label w-100">Content <textarea class="form-control form-control-sm" style="font-family: monospace" id="rawFormContent" rows="8" cols="60"></textarea> </label> </div> <% if @is_model_controller && model = controller.class.get_model %> <% if attachment_reflections = model.attachment_reflections.presence %> <div class="mb-2" style="display: none" id="rawFilesFormWrapper"> <%= form_with( model: @record, url: "", id: "rawFilesForm", scope: "", ) do |form| %> <% attachment_reflections.each do |field, ref| %> <label class="form-label w-100"><%= controller.class.get_label(field) %> <%= form.file_field field, multiple: ref.macro == :has_many_attached %> </label> <% end %> <% end %> </div> <% end %> <% end %> <button type="button" class="btn btn-primary" style="float: right" onclick="rrfSubmitRawForm(this)">Submit</button> </div>
Version data entries
11 entries across 11 versions & 1 rubygems