Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/compare/_form.html.haml')
-rw-r--r--app/views/projects/compare/_form.html.haml8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/views/projects/compare/_form.html.haml b/app/views/projects/compare/_form.html.haml
index a0e904cfd8b..3019893d12c 100644
--- a/app/views/projects/compare/_form.html.haml
+++ b/app/views/projects/compare/_form.html.haml
@@ -1,16 +1,16 @@
-= form_tag namespace_project_compare_index_path(@project.namespace, @project), method: :post, class: 'form-inline' do
+= form_tag namespace_project_compare_index_path(@project.namespace, @project), method: :post, class: 'form-inline js-requires-input' do
.clearfix.append-bottom-20
- if params[:to] && params[:from]
= link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
.form-group
.input-group.inline-input-group
%span.input-group-addon from
- = text_field_tag :from, params[:from], class: "form-control"
+ = text_field_tag :from, params[:from], class: "form-control", required: true
= "..."
.form-group
.input-group.inline-input-group
%span.input-group-addon to
- = text_field_tag :to, params[:to], class: "form-control"
+ = text_field_tag :to, params[:to], class: "form-control", required: true
 
= button_tag "Compare", class: "btn btn-create commits-compare-btn"
- if create_mr_button?
@@ -26,5 +26,3 @@
source: availableTags,
minLength: 1
});
-
- disableButtonIfEmptyField('#to', '.commits-compare-btn');