Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<form id="my_form" action="/pokemons/1/upload_image" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="OXX9vC6NU6A9zhuC6vgYOpAuBa9uPydPUaivN2lhCYNMB29euJuUjix2B-qO5Ngxviu_A9mdv_WC0j2LY-5Qxg" autocomplete="off" />
<input value="my_form" autocomplete="off" type="hidden" name="form_id" id="form_id" />
</form>
<turbo-frame id="pokemon_image_upload">
<div class="lui-input-file-container" id="looposui-inputs-file-single_pokemon_1_image_5793709857" data-controller="input-file" data-input-file-form-value="my_form" data-input-file-delete-path-value="/pokemons/1/delete_image">
<div class="lui-input-file">
<label class="lui-button lui-button--neutral--secondary lui-button--size-tiny w-fit w-fit" data-controller="lui--button" for="looposui-inputs-file-single_pokemon_1_image_5793709857-file-input">
<i class="lui-button__icon lui-button__icon--tiny fa-regular fa-file-arrow-up" data-lui--button-target="leadingIcon"></i>
<span class="lui-button__text" data-lui--button-target="text">
Select file
</span>
</label>
<input name="pokemon[image]" data-input-file-target="file" data-action="change->input-file#upload" id="looposui-inputs-file-single_pokemon_1_image_5793709857-file-input" class="hidden" type="file" form="my_form" accept="text/csv text/comma-separated-values text/plain application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
<div class="flex flex-1 min-w-0 justify-end items-center gap-[2px]">
<span class="lui-input-file__text">
No file chosen
</span>
<span class="lui-input-file__spinner">
<i class="fa-regular fa-spinner"></i>
</span>
</div>
</div>
</div>
</turbo-frame>
1
2
3
4
5
6
7
8
9
10
11
12
<%= form_with id: "my_form", url: upload_image_pokemon_path(Pokemon.first), method: :post do |f| %>
<%= f.hidden_field :form_id, value: f.id %>
<% end %>
<%= turbo_frame_tag "pokemon_image_upload" do %>
<%= render LooposUi::Inputs::File.new(
model: Pokemon.first,
attribute: :image,
delete_path: delete_image_pokemon_path(Pokemon.first),
form_id: "my_form"
) %>
<% end %>