2014-09-02 18:07:02 +05:30
|
|
|
%div
|
2015-12-23 02:04:40 +05:30
|
|
|
= form_for [:profile, @key], html: { class: 'form-horizontal js-requires-input' } do |f|
|
2014-09-02 18:07:02 +05:30
|
|
|
- if @key.errors.any?
|
|
|
|
.alert.alert-danger
|
|
|
|
%ul
|
|
|
|
- @key.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
|
|
|
|
|
|
|
.form-group
|
|
|
|
= f.label :key, class: 'control-label'
|
|
|
|
.col-sm-10
|
2015-12-23 02:04:40 +05:30
|
|
|
= f.text_area :key, class: "form-control", rows: 8, autofocus: true, required: true
|
2015-09-11 14:41:01 +05:30
|
|
|
.form-group
|
|
|
|
= f.label :title, class: 'control-label'
|
2015-12-23 02:04:40 +05:30
|
|
|
.col-sm-10= f.text_field :title, class: "form-control", required: true
|
2014-09-02 18:07:02 +05:30
|
|
|
|
|
|
|
.form-actions
|
|
|
|
= f.submit 'Add key', class: "btn btn-create"
|
|
|
|
= link_to "Cancel", profile_keys_path, class: "btn btn-cancel"
|