2011-10-08 17:36:38 -04:00
|
|
|
%div
|
2015-12-02 08:39:39 -05:00
|
|
|
= form_for [:profile, @key], html: { class: 'form-horizontal js-requires-input' } do |f|
|
2013-06-24 11:24:14 -04:00
|
|
|
- if @key.errors.any?
|
2013-12-31 09:34:14 -05:00
|
|
|
.alert.alert-danger
|
2012-01-29 16:59:12 -05:00
|
|
|
%ul
|
|
|
|
- @key.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
2011-10-08 17:36:38 -04:00
|
|
|
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2013-12-30 19:50:36 -05:00
|
|
|
= f.label :key, class: 'control-label'
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2015-12-02 08:39:39 -05:00
|
|
|
= f.text_area :key, class: "form-control", rows: 8, autofocus: true, required: true
|
2015-07-29 15:59:50 -04:00
|
|
|
.form-group
|
|
|
|
= f.label :title, class: 'control-label'
|
2015-12-02 08:39:39 -05:00
|
|
|
.col-sm-10= f.text_field :title, class: "form-control", required: true
|
2012-08-21 20:56:53 -04:00
|
|
|
|
2013-08-07 16:35:24 -04:00
|
|
|
.form-actions
|
2013-06-24 12:25:10 -04:00
|
|
|
= f.submit 'Add key', class: "btn btn-create"
|
2013-06-24 11:24:14 -04:00
|
|
|
= link_to "Cancel", profile_keys_path, class: "btn btn-cancel"
|