diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2014-07-27 16:40:00 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2014-09-03 13:08:35 +0200 |
commit | 551145bc98e257280b615e305d531a44d7aa4131 (patch) | |
tree | 20a853ca41d610247f955a9c8824ba50b18d3220 /app/views/projects/branches | |
parent | 7a0e1c7238033b33b7296701bfded56d4ad7f250 (diff) | |
download | gitlab-ce-551145bc98e257280b615e305d531a44d7aa4131.tar.gz |
Validate branch-names and references in WebUI, API
Add specs for GitRefValidator
Diffstat (limited to 'app/views/projects/branches')
-rw-r--r-- | app/views/projects/branches/new.html.haml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml index 5da2ede2937..3f202f7ea6b 100644 --- a/app/views/projects/branches/new.html.haml +++ b/app/views/projects/branches/new.html.haml @@ -1,3 +1,7 @@ +- if @error + .alert.alert-danger + %button{ type: "button", class: "close", "data-dismiss" => "alert"} × + = @error %h3.page-title %i.icon-code-fork New branch @@ -5,11 +9,11 @@ .form-group = label_tag :branch_name, 'Name for new branch', class: 'control-label' .col-sm-10 - = text_field_tag :branch_name, nil, placeholder: 'enter new branch name', required: true, tabindex: 1, class: 'form-control' + = text_field_tag :branch_name, params[:branch_name], placeholder: 'enter new branch name', required: true, tabindex: 1, class: 'form-control' .form-group = label_tag :ref, 'Create from', class: 'control-label' .col-sm-10 - = text_field_tag :ref, nil, placeholder: 'existing branch name, tag or commit SHA', required: true, tabindex: 2, class: 'form-control' + = text_field_tag :ref, params[:ref], placeholder: 'existing branch name, tag or commit SHA', required: true, tabindex: 2, class: 'form-control' .form-actions = submit_tag 'Create branch', class: 'btn btn-create', tabindex: 3 = link_to 'Cancel', project_branches_path(@project), class: 'btn btn-cancel' |