Sha256: c9f0b0be3397d567190b0ded9fbf6f17f86f757c9182a48cc1250cb82daa76f3
Contents?: true
Size: 1.26 KB
Versions: 8
Compression:
Stored size: 1.26 KB
Contents
<%= field_wrapper **field_wrapper_args do %> <% if @field.value.present? %> <div class="mb-2"> <%= render Avo::Fields::Common::Files::ViewType::GridItemComponent.new resource: @resource, field: @field %> </div> <% end %> <% if can_upload_file? %> <div data-controller="clear-input"> <div class="mt-2 flex items-center"> <%= @form.file_field @field.id, accept: @field.accept, data: @field.get_html(:data, view: view, element: :input) .merge( action: "change->clear-input#showClearButton", clear_input_target: "input" ), direct_upload: @field.direct_upload, disabled: disabled?, style: @field.get_html(:style, view: view, element: :input), autofocus: @autofocus, class: "w-full" %> </div> <%= content_tag :button, class: "self-center hidden font-semibold text-xs text-red-600 p-1", id: :reset, type: :button, data: { clear_input_target: "clearButton", action: "click->clear-input#clearInput", tippy: :tooltip } do %> <% t("avo.clear_value") %> <% end %> </div> <% else %> — <% end %> <% end %>
Version data entries
8 entries across 8 versions & 1 rubygems