%= f = form_for @changeset, "#",
id: "shift_template-form",
phx_target: @myself,
phx_change: "validate",
phx_submit: "save" %>
<%= label f, :subject, "Subject/Title", class: "form-label" %>
<%= icon_div @socket, "bi-tag", [class: "icon is-left text-muted fs-5"] %>
<%= text_input f, :subject,
value: input_value(f, :subject),
class: input_class(f, :subject, "form-control"),
autofocus: true,
aria_describedby: error_ids(f, :subject)
%>
<%= error_tag f, :subject %>
<%= label f, :time_start, "Start", class: "form-label" %>
<%= time_input f, :time_start,
precision: :minute,
value: input_value(f, :time_start),
class: input_class(f, :time_start, "form-control"),
aria_describedby: error_ids(f, :time_start)
%>
<%= label f, :time_end, "End", class: "form-label" %>
<%= time_input f, :time_end,
precision: :minute,
value: input_value(f, :time_end),
class: input_class(f, :time_end, "form-control"),
aria_describedby: error_ids(f, :time_end)
%>
Shift length: <%= @shift_length |> elem(0) %>h <%= @shift_length |> elem(1) %>m
<%= error_tag f, :time_start %>
<%= error_tag f, :time_end %>
<%= label f, :location, class: "form-label mt-3" %>
<%= icon_div @socket, "bi-geo", [class: "icon is-left text-muted fs-5"] %>
<%= text_input f, :location,
value: input_value(f, :location),
class: input_class(f, :location, "form-control"),
aria_describedby: error_ids(f, :location)
%>
<%= error_tag f, :location %>
<%= label f, :description, class: "form-label" %>
<%= textarea f, :description,
value: input_value(f, :description),
class: input_class(f, :description, "form-control"),
aria_describedby: error_ids(f, :description)
%>
<%= error_tag f, :description %>
<%= label f, :time_zone, class: "form-label" %>
<%= icon_div @socket, "bi-map", [class: "icon is-left text-muted fs-5"] %>
<%= text_input f, :time_zone,
value: input_value(f, :time_zone),
class: "form-control",
list: "tz_list"
%>
<%= for tz_name <- Timex.timezones() do %>
<% end %>
end
Type to search & select from list of known time zones (<%= link "formatted per IANA", to: "https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", target: "_blank" %>)
<%= error_tag f, :time_zone %>