diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-02 16:39:39 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-02 16:41:56 +0300 |
commit | 72ab3b17d338c15f27e3bb1fbd0e7cefaa10b94d (patch) | |
tree | e24547fb39a86e0cdf4a786fdc180211c11ce89f /app/views/shared | |
parent | 2aeb26bd8823fa681413bd0f64b7b068f41ec4e3 (diff) |
Use js-requires-input where appropriate
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/_new_commit_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/snippets/_form.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/shared/_new_commit_form.html.haml b/app/views/shared/_new_commit_form.html.haml index ce52614e868..31b02ed93d0 100644 --- a/app/views/shared/_new_commit_form.html.haml +++ b/app/views/shared/_new_commit_form.html.haml @@ -4,7 +4,7 @@ .form-group.branch = label_tag 'new_branch', 'Target branch', class: 'control-label' .col-sm-10 - = text_field_tag 'new_branch', @new_branch || @ref, class: "form-control js-new-branch" + = text_field_tag 'new_branch', @new_branch || @ref, required: true, class: "form-control js-new-branch" .form-group.js-create-merge-request-form-group .col-sm-offset-2.col-sm-10 diff --git a/app/views/shared/snippets/_form.html.haml b/app/views/shared/snippets/_form.html.haml index 99d93659678..1041eccd1df 100644 --- a/app/views/shared/snippets/_form.html.haml +++ b/app/views/shared/snippets/_form.html.haml @@ -1,5 +1,5 @@ .snippet-form-holder - = form_for @snippet, url: url, html: { class: "form-horizontal snippet-form" } do |f| + = form_for @snippet, url: url, html: { class: "form-horizontal snippet-form js-requires-input" } do |f| - if @snippet.errors.any? .alert.alert-danger %ul |