21 lines
858 B
Plaintext
21 lines
858 B
Plaintext
<% has_error = local_assigns.fetch(:error, false) %>
|
|
|
|
<%= form_tag commands_path,
|
|
id: "commands_form",
|
|
class: [ "flex align-center gap-half", { "has-error" => has_error } ],
|
|
data: { controller: "form", action: "turbo:submit-end->form#reset turbo:submit-end->commands#focus", turbo_permanent: true } do %>
|
|
<label class="terminal__label txt-nowrap" for="fizzy_do">Fizzy do ></label>
|
|
|
|
<%= text_field_tag "command", has_error ? params[:command] : nil,
|
|
autocomplete: "off",
|
|
autocorrect: "off",
|
|
autocapitalize: "off",
|
|
class: "terminal__input input fill-transparent unpad",
|
|
data: {
|
|
commands_target: "input",
|
|
action: "keydown.up->toggle-class#add:prevent keydown.down->toggle-class#remove:prevent"
|
|
},
|
|
placeholder: "Search or type commands…" %>
|
|
<% end %>
|
|
|