gitlab-org--gitlab-foss/app/views/shared/_new_commit_form.html.haml

19 lines
747 B
Text
Raw Normal View History

= render 'shared/commit_message_container', placeholder: placeholder
- if @project.empty_repo?
2017-04-19 20:37:44 -04:00
= hidden_field_tag 'branch_name', @ref
- else
- if can?(current_user, :push_code, @project)
.form-group.branch
2017-06-09 09:08:39 -04:00
= label_tag 'branch_name', _('Target Branch'), class: 'control-label'
.col-sm-10
= text_field_tag 'branch_name', @branch_name || tree_edit_branch, required: true, class: "form-control js-branch-name ref-name"
.js-create-merge-request-container
= render 'shared/new_merge_request_checkbox'
- else
2017-04-19 20:37:44 -04:00
= hidden_field_tag 'branch_name', @branch_name || tree_edit_branch
= hidden_field_tag 'create_merge_request', 1
= hidden_field_tag 'original_branch', @ref, class: 'js-original-branch'