- page_title _("New Branch") - default_ref = params[:ref] || @project.default_branch - if @error = render Pajamas::AlertComponent.new(variant: :danger) do |c| - c.with_body do = @error %h1.page-title.gl-font-size-h-display = _('New Branch') = form_tag namespace_project_branches_path, method: :post, id: "new-branch-form", class: "js-create-branch-form js-requires-input" do .form-group.gl-max-w-80 = label_tag :branch_name, _('Branch name') = text_field_tag :branch_name, params[:branch_name], required: true, autofocus: true, class: 'form-control js-branch-name monospace' .form-text.text-muted.text-danger.js-branch-name-error{ 'aria-live': 'assertive' } .form-group.gl-max-w-80 = label_tag :ref, _('Create from') .js-new-branch-ref-selector{ data: { project_id: @project.id, default_branch_name: default_ref, hidden_input_name: 'ref' } } .form-text.text-muted = _('Existing branch name, tag, or commit SHA') = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { type: 'submit', class: 'gl-mr-3' }) do = _('Create branch') = link_to _('Cancel'), project_branches_path(@project), class: 'gl-button btn btn-default btn-cancel'