Class: Maquina::FirstRuns::Form
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- Maquina::FirstRuns::Form
- Includes:
- ApplicationView, Maquina::Form
- Defined in:
- app/views/maquina/first_runs/form.rb
Instance Method Summary collapse
-
#initialize(resource) ⇒ Form
constructor
A new instance of Form.
- #view_template ⇒ Object
Methods included from ApplicationView
#attribute_human_name, #button_to, #image_tag, #link_to, #model_human_name, #svg_icon
Constructor Details
#initialize(resource) ⇒ Form
Returns a new instance of Form.
7 8 9 10 |
# File 'app/views/maquina/first_runs/form.rb', line 7 def initialize(resource) @resource = resource @scope = "first_runs" end |
Instance Method Details
#view_template ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/views/maquina/first_runs/form.rb', line 12 def view_template div(class: "mt-8 sm:mx-auto sm:w-full sm:max-w-md") do div(class: "bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10") do p(class: "text-center text-skin-muted") { t("maquina.application.first_runs_header.description") } form_with(model: @resource, url: first_run_path, method: :post, class: "space-y-6") do |form| text_field(form, field_name: :email, required: true) password_field(form, field_name: :password, required: true) div do form.submit t("helpers.submit.first_runs.create"), class: "flex w-full justify-center button button-accented" end end end end end |