diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-02 14:39:39 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-02 14:41:56 +0100 |
commit | 72ab3b17d338c15f27e3bb1fbd0e7cefaa10b94d (patch) | |
tree | e24547fb39a86e0cdf4a786fdc180211c11ce89f /app/views/profiles | |
parent | 2aeb26bd8823fa681413bd0f64b7b068f41ec4e3 (diff) | |
download | gitlab-ce-72ab3b17d338c15f27e3bb1fbd0e7cefaa10b94d.tar.gz |
Use js-requires-input where appropriate
Diffstat (limited to 'app/views/profiles')
-rw-r--r-- | app/views/profiles/keys/_form.html.haml | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/views/profiles/keys/_form.html.haml b/app/views/profiles/keys/_form.html.haml index b76a5b636ac..2a8800de60e 100644 --- a/app/views/profiles/keys/_form.html.haml +++ b/app/views/profiles/keys/_form.html.haml @@ -1,5 +1,5 @@ %div - = form_for [:profile, @key], html: { class: 'form-horizontal' } do |f| + = form_for [:profile, @key], html: { class: 'form-horizontal js-requires-input' } do |f| - if @key.errors.any? .alert.alert-danger %ul @@ -9,12 +9,11 @@ .form-group = f.label :key, class: 'control-label' .col-sm-10 - = f.text_area :key, class: "form-control", rows: 8 + = f.text_area :key, class: "form-control", rows: 8, autofocus: true, required: true .form-group = f.label :title, class: 'control-label' - .col-sm-10= f.text_field :title, class: "form-control" + .col-sm-10= f.text_field :title, class: "form-control", required: true .form-actions = f.submit 'Add key', class: "btn btn-create" = link_to "Cancel", profile_keys_path, class: "btn btn-cancel" - |