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
25
<form action="/pokemons/1/upload_image" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="WLfSPlKvaKjiCUnYZgHjwPsgUA22Y0m4UfqATSRhz5Di96WtNql0XzuToV32pFdCTwsXeO5EbqJb6rz_cgmQiw" />
<turbo-frame id="pokemon_image_upload">
<div class="lui-input-file-form" data-controller="form-file">
<input type="file" id="looposui-inputs-file-formfile_pokemon_1_image_5793709857-file-input" name="pokemon[image]" data-form-file-target="input" data-action="change->form-file#updateFileName" class="lui-input-file-form__input sr-only" accept="csv,txt,xlsx">
<label class="lui-button lui-button--neutral--secondary lui-button--size-tiny w-fit w-fit relative" data-controller="lui--button" data-form-file-target="button" data-select-text="Select file" data-replace-text="Replace file" for="looposui-inputs-file-formfile_pokemon_1_image_5793709857-file-input">
<div class="opacity-100 inline-flex" data-lui--button-target="leadingIcon">
<div class="flex items-center justify-center" style="width: 12px; height: 12px;"><i class="lui-button__icon lui-button__icon--tiny fa-regular fa-file-arrow-up" data-lui--button-target="leadingIcon"></i></div>
</div>
<span class="lui-button__text opacity-100 inline-flex" data-lui--button-target="text">
Select file
</span>
<div class="absolute w-full flex items-center justify-center opacity-0" data-lui--button-target="loadingIcon">
<i class="lui-m_icon animate-spin material-symbols-outlined" style="--lui-micon-size: 12px;">
progress_activity
</i>
</div>
</label>
<span
data-form-file-target="fileName"
class="lui-input-file-form__file-name"
>
No file chosen
</span>
</div>
</turbo-frame></form>
1
2
3
4
5
6
7
8
<%= form_with url: upload_image_pokemon_path(Pokemon.first), method: :post do |f| %>
<%= turbo_frame_tag "pokemon_image_upload" do %>
<%= render LooposUi::Inputs::File::FormFile.new(
model: Pokemon.first,
attribute: :image,
) %>
<% end %>
<% end %>