summaryrefslogtreecommitdiff
path: root/app/views/profiles
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-02 14:39:39 +0100
committerDouwe Maan <douwe@gitlab.com>2015-12-02 14:41:56 +0100
commit72ab3b17d338c15f27e3bb1fbd0e7cefaa10b94d (patch)
treee24547fb39a86e0cdf4a786fdc180211c11ce89f /app/views/profiles
parent2aeb26bd8823fa681413bd0f64b7b068f41ec4e3 (diff)
downloadgitlab-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.haml7
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"
-