MorningPeak/app/views/client_tickets/_form.html.slim

24 lines
905 B
Plaintext

= form_for @ticket, url: @ticket.id ? client_ticket_path(@ticket) : client_tickets_path do |f|
- if @ticket.errors.any?
#error_explanation
h2 = "#{pluralize(@ticket.errors.count, "error")} prohibited this ticket from being saved:"
ul
- @ticket.errors.full_messages.each do |message|
li = message
.form-group
.field
= f.label :title, class: "sr-only"
= f.text_field :title, class: "form-control", placeholder: "#{t('.title')}"
.form-group
.field
= f.label :description, class: "sr-only"
= f.text_area :description, class: "form-control", size: "100x8", placeholder: "#{t('.description')}"
/ display the choice to close only if 'respond to'
- if @head
.form-group
.field
= f.label t('.state')
= f.select :state, ["open", "close"], {}, class: "form-control"
.actions = f.submit class: "btn btn-default"