2026-03-20 19:28:54 +01:00
|
|
|
= form_with model: day_log do |f|
|
|
|
|
|
- @day_log.errors.full_messages.each do |msg|
|
2026-03-22 22:14:40 +01:00
|
|
|
.notification.is-danger= msg
|
2026-03-20 19:28:54 +01:00
|
|
|
|
|
|
|
|
.field
|
2026-03-22 22:14:40 +01:00
|
|
|
= f.label :info, "Journal", class: "label"
|
|
|
|
|
.control
|
|
|
|
|
= f.text_area :info, class: "textarea", rows: 5
|
2026-03-20 19:28:54 +01:00
|
|
|
|
|
|
|
|
.field
|
2026-03-22 22:14:40 +01:00
|
|
|
= label_tag :mode_id, "Mode", class: "label"
|
|
|
|
|
.control
|
|
|
|
|
.select.is-fullwidth
|
|
|
|
|
= select_tag "day_log[mode_id]",
|
|
|
|
|
options_from_collection_for_select(Current.user.modes, :id, :label, @mood&.mode_id),
|
|
|
|
|
include_blank: true
|
2026-03-20 19:28:54 +01:00
|
|
|
|
2026-03-22 22:14:40 +01:00
|
|
|
.field.is-hidden
|
|
|
|
|
= f.date_field :day
|
2026-03-20 19:28:54 +01:00
|
|
|
|
2026-03-22 22:14:40 +01:00
|
|
|
.field.is-grouped
|
|
|
|
|
.control
|
|
|
|
|
= f.submit "Enregistrer", class: "button is-primary"
|
|
|
|
|
.control
|
|
|
|
|
= link_to "Annuler", dashboard_path(day: @day_log.day), class: "button is-light"
|