Pages

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 class="flex flex-col gap-4" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="UY3ddbhQK3daX30sWy8DdQVSkd2FxqZChG3rP57hlR2pF_fSgKe84FhQebOYB7ytbn8DXZQKOK1kAD_iEwrzLw" autocomplete="off" />
<div>
<label class="font-semibold text-base text-primary" data-testid="label-price" for="price">Price</label>
<div class="relative" data-testid="form-field-input-price">
<input class="form-input min-h-[40px] resize-none block w-full rounded disabled:bg-disabled disabled:border-subdued disabled:text-secondary enabled:border enabled:text-base pl-11" autocomplete="off" data-testid="input-price" inputmode="numeric" type="text" name="price" id="price" />
<!-- Source: Iconoir, added via `bin/add_icon` -->
<svg width="20" height="20" stroke-width="1.5" viewbox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="shrink-0 absolute top-1/2 -translate-y-1/2 text-secondary pointer-events-none left-4" aria-hidden="true">
<path d="M16.1538 7.15382C15.2054 6.20538 13.5351 5.54568 12 5.50437M7.84619 16.1538C8.73855 17.3436 10.3977 18.0222 12 18.0798M12 5.50437C10.1735 5.45522 8.5385 6.2815 8.5385 8.53845C8.5385 12.6923 16.1538 10.6154 16.1538 14.7692C16.1538 17.1383 14.127 18.1562 12 18.0798M12 5.50437V3M12 18.0798V20.9999" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
</div>
</div>
<div>
<label class="font-semibold text-base text-primary" data-testid="label-discount" for="discount">Discount</label>
<div class="relative" data-testid="form-field-input-discount">
<input class="form-input min-h-[40px] resize-none block w-full rounded disabled:bg-disabled disabled:border-subdued disabled:text-secondary enabled:border enabled:text-base pr-11" autocomplete="off" data-testid="input-discount" inputmode="numeric" type="text" name="discount" id="discount" />
<!-- Source: Iconoir, added via `bin/add_icon` -->
<svg width="20" height="20" stroke-width="1.5" viewbox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="shrink-0 absolute top-1/2 -translate-y-1/2 text-secondary pointer-events-none right-4" aria-hidden="true">
<path d="M17 19C15.8954 19 15 18.1046 15 17C15 15.8954 15.8954 15 17 15C18.1046 15 19 15.8954 19 17C19 18.1046 18.1046 19 17 19Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M7 9C5.89543 9 5 8.10457 5 7C5 5.89543 5.89543 5 7 5C8.10457 5 9 5.89543 9 7C9 8.10457 8.10457 9 7 9Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M19 5L5 19" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
</div>
</div>
</form>
1
2
3
4
5
6
7
8
9
10
11
<%= anchor_form_with url: false do |form| %>
<%= tag.div do %>
<%= form.label :price %>
<%= form.text_field :price, inputmode: :numeric, starting_icon: "dollar" %>
<% end %>
<%= tag.div do %>
<%= form.label :discount %>
<%= form.text_field :discount, inputmode: :numeric, ending_icon: "percentage" %>
<% end %>
<% end %>