diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-22 10:05:02 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-22 10:05:02 +0300 |
commit | 7f1633e2949acb53c25b92dd54a0f0a3ba2a9e6c (patch) | |
tree | 812fb5224aa6b2407f9dd80ac401e96d7e0c0fb1 /app/views | |
parent | 7d1e6f154678af5bb1dd74e84a4e8ae393a9633b (diff) | |
parent | b34e83d261f30549062ee7c8b9e25f632bbcf163 (diff) |
Merge pull request #7615 from yglukhov/new-branch-submit-button-validation
Validation of 'Create branch' and 'Create tag' buttons
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/branches/new.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/tags/new.html.haml | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml index a6623240da1..2719bcc33bc 100644 --- a/app/views/projects/branches/new.html.haml +++ b/app/views/projects/branches/new.html.haml @@ -5,7 +5,7 @@ %h3.page-title %i.fa.fa-code-fork New branch -= form_tag project_branches_path, method: :post, class: "form-horizontal" do += form_tag project_branches_path, method: :post, id: "new-branch-form", class: "form-horizontal" do .form-group = label_tag :branch_name, 'Name for new branch', class: 'control-label' .col-sm-10 @@ -19,6 +19,7 @@ = link_to 'Cancel', project_branches_path(@project), class: 'btn btn-cancel' :javascript + disableButtonIfAnyEmptyField($("#new-branch-form"), ".form-control", ".btn-create"); var availableTags = #{@project.repository.ref_names.to_json}; $("#ref").autocomplete({ diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index ad7ff8d3db8..289c52a2e3f 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -5,7 +5,7 @@ %h3.page-title %i.fa.fa-code-fork New tag -= form_tag project_tags_path, method: :post, class: "form-horizontal" do += form_tag project_tags_path, method: :post, id: "new-tag-form", class: "form-horizontal" do .form-group = label_tag :tag_name, 'Name for new tag', class: 'control-label' .col-sm-10 @@ -25,6 +25,7 @@ = link_to 'Cancel', project_tags_path(@project), class: 'btn btn-cancel' :javascript + disableButtonIfAnyEmptyField($("#new-tag-form"), ".form-control", ".btn-create"); var availableTags = #{@project.repository.ref_names.to_json}; $("#ref").autocomplete({ |