Commit eb9601d9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ui/form-consistency' into 'master'

UI: Improve form consistency

Depends on !1953

See the commits for more details, the messages mostly speak for themselves.

# Highlights

## Tag form

Before:

![tag_before](/uploads/ee5ba6ef405749013f9e5717ebcf72f3/tag_before.png)

After:

![tag_after](/uploads/71bb543553190d91c03fd706cce35923/tag_after.png)


See merge request !1955
parents de3a1754 0cbb7717
...@@ -173,10 +173,6 @@ ...@@ -173,10 +173,6 @@
line-height: 1.1; line-height: 1.1;
} }
.merge-request-form-info {
padding-top: 15px;
}
// hide mr close link for inline diff comment form // hide mr close link for inline diff comment form
.diff-file .close-mr-link, .diff-file .close-mr-link,
.diff-file .reopen-mr-link { .diff-file .reopen-mr-link {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
.col-sm-10 .col-sm-10
= f.text_field :title, class: "form-control", required: true = f.text_field :title, class: "form-control", required: true
.form-group .form-group
= f.label :color, "Background Color", class: 'control-label' = f.label :color, "Background color", class: 'control-label'
.col-sm-10 .col-sm-10
.input-group .input-group
.input-group-addon.label-color-preview   .input-group-addon.label-color-preview  
......
- page_title "Edit", @label.name, "Labels" - page_title "Edit", @label.name, "Labels"
%h3 %h3.page-title
Edit label Edit Label
%span.light #{@label.name}
.back-link
= link_to admin_labels_path do
← To labels list
%hr %hr
= render 'form' = render 'form'
- page_title "New Label" - page_title "New Label"
%h3 New label %h3.page-title
.back-link New Label
= link_to admin_labels_path do
← To labels list
%hr %hr
= render 'form' = render 'form'
- page_title "Edit", @user.name, "Users" - page_title "Edit", @user.name, "Users"
%h3.page-title %h3.page-title
Edit user: #{@user.name} Edit user: #{@user.name}
.back-link
= link_to admin_user_path(@user) do
← Back to user page
%hr %hr
= render 'form' = render 'form'
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%strong= @group.name Group settings
group settings:
.panel-body .panel-body
= form_for @group, html: { multipart: true, class: "form-horizontal" }, authenticity_token: true do |f| = form_for @group, html: { multipart: true, class: "form-horizontal" }, authenticity_token: true do |f|
- if @group.errors.any? - if @group.errors.any?
...@@ -45,4 +44,5 @@ ...@@ -45,4 +44,5 @@
%br %br
%strong Removed group can not be restored! %strong Removed group can not be restored!
= link_to 'Remove Group', @group, data: {confirm: 'Removed group can not be restored! Are you sure?'}, method: :delete, class: "btn btn-remove" .form-actions
= link_to 'Remove Group', @group, data: {confirm: 'Removed group can not be restored! Are you sure?'}, method: :delete, class: "btn btn-remove"
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
.form-group .form-group
= f.label :title, "Title", class: "control-label" = f.label :title, "Title", class: "control-label"
.col-sm-10 .col-sm-10
= f.text_field :title, maxlength: 255, class: "form-control js-quick-submit", required: true = f.text_field :title, maxlength: 255, class: "form-control js-quick-submit", required: true, autofocus: true
%p.hint Required
.form-group.milestone-description .form-group.milestone-description
= f.label :description, "Description", class: "control-label" = f.label :description, "Description", class: "control-label"
.col-sm-10 .col-sm-10
......
- page_title 'New Group' - page_title 'New Group'
- header_title 'New Group' - header_title "Groups", dashboard_groups_path
%h3.page-title
New Group
%hr
= form_for @group, html: { class: 'group-form form-horizontal' } do |f| = form_for @group, html: { class: 'group-form form-horizontal' } do |f|
- if @group.errors.any? - if @group.errors.any?
.alert.alert-danger .alert.alert-danger
...@@ -18,3 +23,4 @@ ...@@ -18,3 +23,4 @@
.form-actions .form-actions
= f.submit 'Create group', class: "btn btn-create", tabindex: 3 = f.submit 'Create group', class: "btn btn-create", tabindex: 3
= link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel'
...@@ -23,10 +23,13 @@ ...@@ -23,10 +23,13 @@
%p.cgray %p.cgray
- if current_user.private_token - if current_user.private_token
= text_field_tag "token", current_user.private_token, class: "form-control" = text_field_tag "token", current_user.private_token, class: "form-control"
%div
= f.submit 'Reset private token', data: { confirm: "Are you sure?" }, class: "btn btn-default btn-build-token"
- else - else
%span You don`t have one yet. Click generate to fix it. %span You don`t have one yet. Click generate to fix it.
.form-actions
- if current_user.private_token
= f.submit 'Reset private token', data: { confirm: "Are you sure?" }, class: "btn btn-default btn-build-token"
- else
= f.submit 'Generate', class: "btn btn-default btn-build-token" = f.submit 'Generate', class: "btn btn-default btn-build-token"
- unless current_user.ldap_user? - unless current_user.ldap_user?
...@@ -54,7 +57,8 @@ ...@@ -54,7 +57,8 @@
%p %p
Each time you log in you’ll be required to provide your username and Each time you log in you’ll be required to provide your username and
password as usual, plus a randomly-generated code from your phone. password as usual, plus a randomly-generated code from your phone.
%div
.form-actions
= link_to 'Enable Two-factor Authentication', new_profile_two_factor_auth_path, class: 'btn btn-success' = link_to 'Enable Two-factor Authentication', new_profile_two_factor_auth_path, class: 'btn btn-success'
- if button_based_providers.any? - if button_based_providers.any?
...@@ -81,15 +85,16 @@ ...@@ -81,15 +85,16 @@
%p %p
Changing your username will change path to all personal projects! Changing your username will change path to all personal projects!
%div %div
= f.text_field :username, required: true, class: 'form-control' .input-group
.input-group-addon
= "#{root_url}u/"
= f.text_field :username, required: true, class: 'form-control'
   
.loading-gif.hide .loading-gif.hide
%p %p
= icon('spinner spin') = icon('spinner spin')
Saving new username Saving new username
%p.light .form-actions
= user_url(@user)
%div
= f.submit 'Save username', class: "btn btn-warning" = f.submit 'Save username', class: "btn btn-warning"
- if signup_enabled? - if signup_enabled?
...@@ -104,7 +109,8 @@ ...@@ -104,7 +109,8 @@
- rp = current_user.personal_projects.count - rp = current_user.personal_projects.count
- unless rp.zero? - unless rp.zero?
%li #{pluralize rp, 'personal project'} will be removed and cannot be restored %li #{pluralize rp, 'personal project'} will be removed and cannot be restored
= link_to 'Delete account', user_registration_path, data: { confirm: "REMOVE #{current_user.name}? Are you sure?" }, method: :delete, class: "btn btn-remove" .form-actions
= link_to 'Delete account', user_registration_path, data: { confirm: "REMOVE #{current_user.name}? Are you sure?" }, method: :delete, class: "btn btn-remove"
- else - else
- if @user.solo_owned_groups.present? - if @user.solo_owned_groups.present?
%p %p
......
%div %div
= form_for [:profile, @key], html: { class: 'form-horizontal' } do |f| = form_for [:profile, @key], html: { class: 'form-horizontal js-requires-input' } do |f|
- if @key.errors.any? - if @key.errors.any?
.alert.alert-danger .alert.alert-danger
%ul %ul
...@@ -9,12 +9,11 @@ ...@@ -9,12 +9,11 @@
.form-group .form-group
= f.label :key, class: 'control-label' = f.label :key, class: 'control-label'
.col-sm-10 .col-sm-10
= f.text_area :key, class: "form-control", rows: 8 = f.text_area :key, class: "form-control", rows: 8, autofocus: true, required: true
.form-group .form-group
= f.label :title, class: 'control-label' = f.label :title, class: 'control-label'
.col-sm-10= f.text_field :title, class: "form-control" .col-sm-10= f.text_field :title, class: "form-control", required: true
.form-actions .form-actions
= f.submit 'Add key', class: "btn btn-create" = f.submit 'Add key', class: "btn btn-create"
= link_to "Cancel", profile_keys_path, class: "btn btn-cancel" = link_to "Cancel", profile_keys_path, class: "btn btn-cancel"
...@@ -54,4 +54,4 @@ ...@@ -54,4 +54,4 @@
.help-block .help-block
Choose what content you want to see on a project's home page. Choose what content you want to see on a project's home page.
.panel-footer .panel-footer
= f.submit 'Save', class: 'btn btn-save' = f.submit 'Save changes', class: 'btn btn-save'
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
.form-group .form-group
= f.label :public_email, class: "control-label" = f.label :public_email, class: "control-label"
.col-sm-10 .col-sm-10
= f.select :public_email, options_for_select(@user.all_emails, selected: @user.public_email), {include_blank: 'Do not show in profile'}, class: "form-control" = f.select :public_email, options_for_select(@user.all_emails, selected: @user.public_email), {include_blank: 'Do not show on profile'}, class: "select2"
%span.help-block This email will be displayed on your public profile. %span.help-block This email will be displayed on your public profile.
.form-group .form-group
= f.label :skype, class: "control-label" = f.label :skype, class: "control-label"
...@@ -96,8 +96,6 @@ ...@@ -96,8 +96,6 @@
= link_to 'Remove avatar', profile_avatar_path, data: { confirm: "Avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar" = link_to 'Remove avatar', profile_avatar_path, data: { confirm: "Avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar"
.row .form-actions
.col-md-7 = f.submit 'Save changes', class: "btn btn-success"
.form-group = link_to "Cancel", user_path(current_user), class: "btn btn-cancel"
.col-sm-offset-2.col-sm-10
= f.submit 'Save changes', class: "btn btn-success"
.form-actions .form-actions
.commit-button-annotation = button_tag 'Commit Changes', class: 'btn commit-btn js-commit-button btn-create'
= button_tag 'Commit Changes',
class: 'btn commit-btn js-commit-button btn-create'
= link_to 'Cancel', cancel_path, = link_to 'Cancel', cancel_path,
class: 'btn btn-cancel', data: {confirm: leave_edit_message} class: 'btn btn-cancel', data: {confirm: leave_edit_message}
...@@ -5,19 +5,17 @@ ...@@ -5,19 +5,17 @@
%a.close{href: "#", "data-dismiss" => "modal"} × %a.close{href: "#", "data-dismiss" => "modal"} ×
%h3.page-title Create New Directory %h3.page-title Create New Directory
.modal-body .modal-body
= form_tag namespace_project_create_dir_path(@project.namespace, @project, @id), method: :post, remote: false, class: 'form-horizontal js-create-dir-form' do = form_tag namespace_project_create_dir_path(@project.namespace, @project, @id), method: :post, remote: false, class: 'form-horizontal js-create-dir-form js-requires-input' do
.form-group .form-group
= label_tag :dir_name, 'Directory Name', class: 'control-label' = label_tag :dir_name, 'Directory name', class: 'control-label'
.col-sm-10 .col-sm-10
= text_field_tag :dir_name, params[:dir_name], placeholder: "Directory name", required: true, class: 'form-control' = text_field_tag :dir_name, params[:dir_name], required: true, class: 'form-control'
= render 'shared/new_commit_form', placeholder: "Add new directory" = render 'shared/new_commit_form', placeholder: "Add new directory"
.form-group .form-actions
.col-sm-offset-2.col-sm-10 = submit_tag "Create directory", class: 'btn btn-create'
= submit_tag "Create directory", class: 'btn btn-primary btn-create' = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
= link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
:javascript :javascript
disableButtonIfAnyEmptyField($(".js-create-dir-form"), ".form-control", ".btn-create");
new NewCommitForm($('.js-create-dir-form')) new NewCommitForm($('.js-create-dir-form'))
...@@ -16,10 +16,9 @@ ...@@ -16,10 +16,9 @@
= render 'shared/new_commit_form', placeholder: placeholder = render 'shared/new_commit_form', placeholder: placeholder
.form-group .form-actions
.col-sm-offset-2.col-sm-10 = button_tag button_title, class: 'btn btn-small btn-create btn-upload-file', id: 'submit-all'
= button_tag button_title, class: 'btn btn-small btn-primary btn-upload-file', id: 'submit-all' = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
= link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
:javascript :javascript
disableButtonIfEmptyField($('.js-upload-blob-form').find('.js-commit-message'), '.btn-upload-file'); disableButtonIfEmptyField($('.js-upload-blob-form').find('.js-commit-message'), '.btn-upload-file');
......
- page_title "New File", @path.presence, @ref - page_title "New File", @path.presence, @ref
= render "header_title" = render "header_title"
.gray-content-block.top-block %h3.page-title
%h3.page-title New File
Create New File
.file-editor .file-editor
= form_tag(namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post, class: 'form-horizontal js-new-blob-form js-requires-input') do = form_tag(namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post, class: 'form-horizontal js-new-blob-form js-requires-input') do
......
...@@ -6,25 +6,27 @@ ...@@ -6,25 +6,27 @@
%button{ type: "button", class: "close", "data-dismiss" => "alert"} × %button{ type: "button", class: "close", "data-dismiss" => "alert"} ×
= @error = @error
%h3.page-title %h3.page-title
%i.fa.fa-code-fork New Branch
New branch %hr
= form_tag namespace_project_branches_path, method: :post, id: "new-branch-form", class: "form-horizontal js-requires-input" do = form_tag namespace_project_branches_path, method: :post, id: "new-branch-form", class: "form-horizontal js-requires-input" do
.form-group .form-group
= label_tag :branch_name, 'Name for new branch', class: 'control-label' = label_tag :branch_name, nil, class: 'control-label'
.col-sm-10 .col-sm-10
= text_field_tag :branch_name, params[:branch_name], placeholder: 'enter new branch name', required: true, tabindex: 1, class: 'form-control' = text_field_tag :branch_name, params[:branch_name], required: true, tabindex: 1, autofocus: true, class: 'form-control'
.form-group .form-group
= label_tag :ref, 'Create from', class: 'control-label' = label_tag :ref, 'Create from', class: 'control-label'
.col-sm-10 .col-sm-10
= text_field_tag :ref, params[:ref], placeholder: 'existing branch name, tag or commit SHA', required: true, tabindex: 2, class: 'form-control' = text_field_tag :ref, params[:ref] || @project.default_branch, required: true, tabindex: 2, class: 'form-control'
.help-block Existing branch name, tag, or commit SHA
.form-actions .form-actions
= button_tag 'Create branch', class: 'btn btn-create', tabindex: 3 = button_tag 'Create branch', class: 'btn btn-create', tabindex: 3
= link_to 'Cancel', namespace_project_branches_path(@project.namespace, @project), class: 'btn btn-cancel' = link_to 'Cancel', namespace_project_branches_path(@project.namespace, @project), class: 'btn btn-cancel'
:javascript :javascript
var availableTags = #{@project.repository.ref_names.to_json}; var availableRefs = #{@project.repository.ref_names.to_json};
$("#ref").autocomplete({ $("#ref").autocomplete({
source: availableTags, source: availableRefs,
minLength: 1 minLength: 1
}); });
%div %div
= form_for [@project.namespace.becomes(Namespace), @project, @key], url: namespace_project_deploy_keys_path, html: { class: 'deploy-key-form form-horizontal' } do |f| = form_for [@project.namespace.becomes(Namespace), @project, @key], url: namespace_project_deploy_keys_path, html: { class: 'deploy-key-form form-horizontal js-requires-input' } do |f|
-if @key.errors.any? -if @key.errors.any?
.alert.alert-danger .alert.alert-danger
%ul %ul
...@@ -8,16 +8,15 @@ ...@@ -8,16 +8,15 @@
.form-group .form-group
= f.label :title, class: "control-label" = f.label :title, class: "control-label"
.col-sm-10= f.text_field :title, class: 'form-control' .col-sm-10= f.text_field :title, class: 'form-control', autofocus: true, required: true
.form-group .form-group
= f.label :key, class: "control-label" = f.label :key, class: "control-label"
.col-sm-10 .col-sm-10
%p.light %p.light
Paste a machine public key here. Read more about how to generate it Paste a machine public key here. Read more about how to generate it
= link_to "here", help_page_path("ssh", "README") = link_to "here", help_page_path("ssh", "README")
= f.text_area :key, class: "form-control thin_area", rows: 5 = f.text_area :key, class: "form-control thin_area", rows: 5, required: true
.form-actions .form-actions
= f.submit 'Create', class: "btn-create btn" = f.submit 'Create Deploy Key', class: "btn-create btn"
= link_to "Cancel", namespace_project_deploy_keys_path(@project.namespace, @project), class: "btn btn-cancel" = link_to "Cancel", namespace_project_deploy_keys_path(@project.namespace, @project), class: "btn btn-cancel"
- page_title "New Deploy Key" - page_title "New Deploy Key"
%h3.page-title New Deploy key %h3.page-title New Deploy Key
%hr %hr
= render 'form' = render 'form'
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
= f.label :name, class: 'control-label' do = f.label :name, class: 'control-label' do
Project name Project name
.col-sm-10 .col-sm-10
= f.text_field :name, placeholder: "Example Project", class: "form-control", id: "project_name_edit" = f.text_field :name, class: "form-control", id: "project_name_edit"
.form-group .form-group
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
Project description Project description
%span.light (optional) %span.light (optional)
.col-sm-10 .col-sm-10
= f.text_area :description, placeholder: "Awesome project", class: "form-control", rows: 3, maxlength: 250 = f.text_area :description, class: "form-control", rows: 3, maxlength: 250
- if @project.repository.exists? && @project.repository.branch_names.any? - if @project.repository.exists? && @project.repository.branch_names.any?
.form-group .form-group
...@@ -130,9 +130,11 @@ ...@@ -130,9 +130,11 @@
The project can be committed to. The project can be committed to.
%br %br
%strong Once active this project shows up in the search and on the dashboard. %strong Once active this project shows up in the search and on the dashboard.
= link_to 'Unarchive', unarchive_namespace_project_path(@project.namespace, @project),
data: { confirm: "Are you sure that you want to unarchive this project?\nWhen this project is unarchived it is active and can be committed to again." }, .form-actions
method: :post, class: "btn btn-success" = link_to 'Unarchive project', unarchive_namespace_project_path(@project.namespace, @project),
data: { confirm: "Are you sure that you want to unarchive this project?\nWhen this project is unarchived it is active and can be committed to again." },
method: :post, class: "btn btn-success"
- else - else
.panel.panel-warning .panel.panel-warning
.panel-heading .panel-heading
...@@ -144,9 +146,11 @@ ...@@ -144,9 +146,11 @@
It is hidden from the dashboard and doesn't show up in searches. It is hidden from the dashboard and doesn't show up in searches.
%br %br
%strong Archived projects cannot be committed to! %strong Archived projects cannot be committed to!
= link_to 'Archive', archive_namespace_project_path(@project.namespace, @project),
data: { confirm: "Are you sure that you want to archive this project?\nAn archived project cannot be committed to." }, .form-actions
method: :post, class: "btn btn-warning" = link_to 'Archive project', archive_namespace_project_path(@project.namespace, @project),
data: { confirm: "Are you sure that you want to archive this project?\nAn archived project cannot be committed to." },
method: :post, class: "btn btn-warning"
- else - else
.nothing-here-block Only the project owner can archive a project .nothing-here-block Only the project owner can archive a project
...@@ -160,7 +164,7 @@ ...@@ -160,7 +164,7 @@
Project name Project name
.col-sm-9 .col-sm-9
.form-group .form-group
= f.text_field :name, placeholder: "Example Project", class: "form-control" = f.text_field :name, class: "form-control"
.form-group .form-group
= f.label :path, class: 'control-label' do = f.label :path, class: 'control-label' do
%span Path %span Path
...@@ -170,12 +174,11 @@ ...@@ -170,12 +174,11 @@
.input-group-addon .input-group-addon
#{URI.join(root_url, @project.namespace.path)}/ #{URI.join(root_url, @project.namespace.path)}/
= f.text_field :path, class: 'form-control' = f.text_field :path, class: 'form-control'
%span.input-group-addon .git
%ul %ul
%li Be careful. Renaming a project's repository can have unintended side effects. %li Be careful. Renaming a project's repository can have unintended side effects.
%li You will need to update your local repositories to point to the new location. %li You will need to update your local repositories to point to the new location.
.form-actions .form-actions
= f.submit 'Rename', class: "btn btn-warning" = f.submit 'Rename project', class: "btn btn-warning"
- if can?(current_user, :change_namespace, @project) - if can?(current_user, :change_namespace, @project)
.panel.panel-default.panel.panel-danger .panel.panel-default.panel.panel-danger
...@@ -194,7 +197,7 @@ ...@@ -194,7 +197,7 @@
%li You can only transfer the project to namespaces you manage. %li You can only transfer the project to namespaces you manage.
%li You will need to update your local repositories to point to the new location. %li You will need to update your local repositories to point to the new location.
.form-actions .form-actions
= f.submit 'Transfer', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => transfer_project_message(@project) } = f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => transfer_project_message(@project) }
- else - else
.nothing-here-block Only the project owner can transfer a project .nothing-here-block Only the project owner can transfer a project
...@@ -209,7 +212,8 @@ ...@@ -209,7 +212,8 @@
#{link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)}. #{link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)}.
%br %br
%strong Once removed, the fork relationship cannot be restored and you will no longer be able to send merge requests to the source. %strong Once removed, the fork relationship cannot be restored and you will no longer be able to send merge requests to the source.
= button_to 'Remove fork relationship', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_message(@project) } .form-actions
= button_to 'Remove fork relationship', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_message(@project) }
- else - else
.nothing-here-block Only the project owner can remove the fork relationship. .nothing-here-block Only the project owner can remove the fork relationship.
...@@ -222,8 +226,8 @@ ...@@ -222,8 +226,8 @@
Removing the project will delete its repository and all related resources including issues, merge requests etc. Removing the project will delete its repository and all related resources including issues, merge requests etc.
%br %br
%strong Removed projects cannot be restored! %strong Removed projects cannot be restored!
.form-actions
= button_to 'Remove project', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_project_message(@project) } = button_to 'Remove project', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_project_message(@project) }
- else - else
.nothing-here-block Only the project owner can remove a project. .nothing-here-block Only the project owner can remove a project.
......
%div.issue-form-holder = form_for [@project.namespace.becomes(Namespace), @project, @issue], html: { class: 'form-horizontal issue-form gfm-form js-requires-input' } do |f|
%h3.page-title= @issue.new_record? ? "Create Issue" : "Edit Issue ##{@issue.iid}" = render 'shared/issuable/form', f: f, issuable: @issue
%hr
= form_for [@project.namespace.becomes(Namespace), @project, @issue], html: { class: 'form-horizontal issue-form gfm-form' } do |f|
= render 'shared/issuable/form', f: f, issuable: @issue
:javascript :javascript
$('.assign-to-me-link').on('click', function(e){ $('.assign-to-me-link').on('click', function(e){
......
- page_title "Edit", "#{@issue.title} (##{@issue.iid})", "Issues" - page_title "Edit", "#{@issue.title} (##{@issue.iid})", "Issues"
= render "header_title"
%h3.page-title
Edit Issue ##{@issue.iid}
%hr
= render "form" = render "form"
- page_title "New Issue" - page_title "New Issue"
= render "header_title" = render "header_title"
%h3.page-title
New Issue
%hr
= render "form" = render "form"
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
.form-group .form-group
= f.label :title, class: 'control-label' = f.label :title, class: 'control-label'
.col-sm-10 .col-sm-10
= f.text_field :title, class: "form-control js-quick-submit", required: true = f.text_field :title, class: "form-control js-quick-submit", required: true, autofocus: true
.form-group .form-group
= f.label :color, "Background Color", class: 'control-label' = f.label :color, "Background color", class: 'control-label'
.col-sm-10 .col-sm-10
.input-group .input-group
.input-group-addon.label-color-preview   .input-group-addon.label-color-preview  
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
   
.form-actions .form-actions
= f.submit 'Save', class: 'btn btn-save js-save-button' - if @label.persisted?
= f.submit 'Save changes', class: 'btn btn-save js-save-button'
- else
= f.submit 'Create Label', class: 'btn btn-create js-save-button'
= link_to "Cancel", namespace_project_labels_path(@project.namespace, @project), class: 'btn btn-cancel' = link_to "Cancel", namespace_project_labels_path(@project.namespace, @project), class: 'btn btn-cancel'
- page_title "Edit", @label.name, "Labels" - page_title "Edit", @label.name, "Labels"
= render "header_title" = render "header_title"
%h3 %h3.page-title
Edit label Edit Label
%span.light #{@label.name}
.back-link
= link_to namespace_project_labels_path(@project.namespace, @project) do
← To labels list
%hr %hr
= render 'form' = render 'form'
- page_title "New Label" - page_title "New Label"
= render "header_title" = render "header_title"
%h3 New label %h3.page-title
.back-link New Label
= link_to namespace_project_labels_path(@project.namespace, @project) do
← To labels list
%hr %hr
= render 'form' = render 'form'
= form_for [@project.namespace.becomes(Namespace), @project, @merge_request], html: { class: 'merge-request-form form-horizontal gfm-form js-requires-input' } do |f| = form_for [@project.namespace.becomes(Namespace), @project, @merge_request], html: { class: 'merge-request-form form-horizontal gfm-form js-requires-input' } do |f|
.merge-request-form-info = render 'shared/issuable/form', f: f, issuable: @merge_request
= render 'shared/issuable/form', f: f, issuable: @merge_request
:javascript :javascript
$('.assign-to-me-link').on('click', function(e){ $('.assign-to-me-link').on('click', function(e){
......
%p.lead Compare branches for new Merge Request %h3.page-title
New Merge Request
= form_for [@project.namespace.becomes(Namespace), @project, @merge_request], url: new_namespace_project_merge_request_path(@project.namespace, @project), method: :get, html: { class: "merge-request-form form-inline js-requires-input" } do |f| = form_for [@project.namespace.becomes(Namespace), @project, @merge_request], url: new_namespace_project_merge_request_path(@project.namespace, @project), method: :get, html: { class: "merge-request-form form-inline js-requires-input" } do |f|
.hide.alert.alert-danger.mr-compare-errors .hide.alert.alert-danger.mr-compare-errors
...@@ -51,8 +52,8 @@ ...@@ -51,8 +52,8 @@
are the same. are the same.
%div .form-actions
= f.submit 'Compare branches', class: "btn btn-new mr-compare-btn" = f.submit 'Compare branches and continue', class: "btn btn-new mr-compare-btn"
:javascript :javascript
var source_branch = $("#merge_request_source_branch") var source_branch = $("#merge_request_source_branch")
......
%h3.page-title %h3.page-title
New merge request New Merge Request
%p.slead %p.slead
- source_title, target_title = format_mr_branch_names(@merge_request) - source_title, target_title = format_mr_branch_names(@merge_request)
From From
...@@ -11,12 +11,11 @@ ...@@ -11,12 +11,11 @@
= link_to 'Change branches', mr_change_branches_path(@merge_request) = link_to 'Change branches', mr_change_branches_path(@merge_request)
%hr %hr
= form_for [@project.namespace.becomes(Namespace), @project, @merge_request], html: { class: 'merge-request-form form-horizontal gfm-form js-requires-input' } do |f| = form_for [@project.namespace.becomes(Namespace), @project, @merge_request], html: { class: 'merge-request-form form-horizontal gfm-form js-requires-input' } do |f|
.merge-request-form-info = render 'shared/issuable/form', f: f, issuable: @merge_request
= render 'shared/issuable/form', f: f, issuable: @merge_request = f.hidden_field :source_project_id
= f.hidden_field :source_project_id = f.hidden_field :source_branch
= f.hidden_field :source_branch = f.hidden_field :target_project_id
= f.hidden_field :target_project_id = f.hidden_field :target_branch
= f.hidden_field :target_branch
.mr-compare.merge-request .mr-compare.merge-request
%ul.merge-request-tabs.center-top-menu.no-top.no-bottom %ul.merge-request-tabs.center-top-menu.no-top.no-bottom
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
= render "header_title" = render "header_title"
%h3.page-title %h3.page-title
= "Edit merge request ##{@merge_request.iid}" Edit Merge Request ##{@merge_request.iid}
%hr %hr
= render 'form' = render 'form'
%h3.page-title= @milestone.new_record? ? "New Milestone" : "Edit Milestone ##{@milestone.iid}"
.back-link
= link_to namespace_project_milestones_path(@project.namespace, @project) do
← To milestones
%hr
= form_for [@project.namespace.becomes(Namespace), @project, @milestone], html: {class: 'form-horizontal milestone-form gfm-form js-requires-input'} do |f| = form_for [@project.namespace.becomes(Namespace), @project, @milestone], html: {class: 'form-horizontal milestone-form gfm-form js-requires-input'} do |f|
-if @milestone.errors.any? -if @milestone.errors.any?
.alert.alert-danger .alert.alert-danger
...@@ -16,8 +9,7 @@ ...@@ -16,8 +9,7 @@
.form-group .form-group
= f.label :title, "Title", class: "control-label" = f.label :title, "Title", class: "control-label"
.col-sm-10 .col-sm-10
= f.text_field :title, maxlength: 255, class: "form-control js-quick-submit", required: true = f.text_field :title, maxlength: 255, class: "form-control js-quick-submit", required: true, autofocus: true
%p.hint Required
.form-group.milestone-description .form-group.milestone-description
= f.label :description, "Description", class: "control-label" = f.label :description, "Description", class: "control-label"
.col-sm-10 .col-sm-10
......
- page_title "Edit", @milestone.title, "Milestones" - page_title "Edit", @milestone.title, "Milestones"
= render "header_title" = render "header_title"
%h3.page-title
Edit Milestone ##{@milestone.iid}
%hr
= render "form" = render "form"
- page_title "New Milestone" - page_title "New Milestone"
= render "header_title" = render "header_title"
%h3.page-title
New Milestone
%hr
= render "form" = render "form"
- page_title 'New Project' - page_title 'New Project'
- header_title 'New Project' - header_title "Projects", root_path
%h3.page-title
New Project
%hr
.project-edit-container .project-edit-container
.project-edit-errors .project-edit-errors
= render 'projects/errors' = render 'projects/errors'
...@@ -95,11 +100,12 @@ ...@@ -95,11 +100,12 @@
Description Description
%span.light (optional) %span.light (optional)
.col-sm-10 .col-sm-10
= f.text_area :description, placeholder: "Awesome project", class: "form-control", rows: 3, maxlength: 250, tabindex: 3 = f.text_area :description, class: "form-control", rows: 3, maxlength: 250, tabindex: 3
= render 'shared/visibility_level', f: f, visibility_level: default_project_visibility, can_change_visibility_level: true, form_model: @project = render 'shared/visibility_level', f: f, visibility_level: default_project_visibility, can_change_visibility_level: true, form_model: @project
.form-actions .form-actions
= f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4 = f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4
= link_to 'Cancel', dashboard_projects_path, class: 'btn btn-cancel'
.save-project-loader.hide .save-project-loader.hide
.center .center
......
...@@ -6,6 +6,5 @@ ...@@ -6,6 +6,5 @@
= render 'projects/notes/hints' = render 'projects/notes/hints'
.note-form-actions .note-form-actions
.buttons = f.submit 'Save Comment', class: 'btn btn-primary btn-save btn-grouped js-comment-button'
= f.submit 'Save Comment', class: 'btn btn-primary btn-save btn-grouped js-comment-button' = link_to 'Cancel', '#', class: 'btn btn-cancel note-edit-cancel'
= link_to 'Cancel', '#', class: 'btn btn-cancel note-edit-cancel'
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
= render 'projects/notes/hints' = render 'projects/notes/hints'
.error-alert .error-alert
.note-form-actions .note-form-actions.clearfix
.buttons.clearfix = f.submit 'Add Comment', class: "btn btn-create comment-btn btn-grouped js-comment-button"
= f.submit 'Add Comment', class: "btn btn-green comment-btn btn-grouped js-comment-button" = yield(:note_actions)
= yield(:note_actions) %a.btn.btn-cancel.js-close-discussion-note-form Cancel
%a.btn.grouped.js-close-discussion-note-form Cancel
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
.form-group .form-group
= f.label :name, "Branch", class: 'control-label' = f.label :name, "Branch", class: 'control-label'
.col-sm-10 .col-sm-10
= f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "select2"}) = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: true}, {class: "select2", data: {placeholder: "Select branch"}})
.form-group .form-group
.col-sm-offset-2.col-sm-10 .col-sm-offset-2.col-sm-10
.checkbox .checkbox
...@@ -33,4 +33,3 @@ ...@@ -33,4 +33,3 @@
.form-actions .form-actions
= f.submit 'Protect', class: "btn-create btn" = f.submit 'Protect', class: "btn-create btn"
= render 'branches_list' = render 'branches_list'
...@@ -26,4 +26,4 @@ ...@@ -26,4 +26,4 @@
= f.text_field :tag_list, value: @runner.tag_list.to_s, class: 'form-control' = f.text_field :tag_list, value: @runner.tag_list.to_s, class: 'form-control'
.help-block You can setup jobs to only use runners with specific tags .help-block You can setup jobs to only use runners with specific tags
.form-actions .form-actions
= f.submit 'Save', class: 'btn btn-save' = f.submit 'Save changes', class: 'btn btn-save'
...@@ -4,18 +4,15 @@ ...@@ -4,18 +4,15 @@
%p= @service.description %p= @service.description
.back-link
= link_to namespace_project_services_path(@project.namespace, @project) do
← to services
%hr %hr
= form_for(@service, as: :service, url: namespace_project_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |form| = form_for(@service, as: :service, url: namespace_project_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |form|
= render 'shared/service_settings', form: form = render 'shared/service_settings', form: form
.form-actions .form-actions
= form.submit 'Save', class: 'btn btn-save' = form.submit 'Save changes', class: 'btn btn-save'
   
- if @service.valid? && @service.activated? - if @service.valid? && @service.activated?
- disabled = @service.can_test? ? '':'disabled' - disabled = @service.can_test? ? '':'disabled'
= link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service.to_param), class: "btn #{disabled}" = link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service.to_param), class: "btn #{disabled}"
= link_to "Cancel", namespace_project_services_path(@project.namespace, @project), class: "btn btn-cancel"
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
= render "header_title" = render "header_title"
%h3.page-title %h3.page-title
Edit snippet Edit Snippet
%hr %hr
= render "shared/snippets/form", url: namespace_project_snippet_path(@project.namespace, @project, @snippet), visibility_level: @snippet.visibility_level = render "shared/snippets/form", url: namespace_project_snippet_path(@project.namespace, @project, @snippet), visibility_level: @snippet.visibility_level
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
= render "header_title" = render "header_title"
%h3.page-title %h3.page-title
New snippet New Snippet
%hr %hr
= render "shared/snippets/form", url: namespace_project_snippets_path(@project.namespace, @project, @snippet), visibility_level: default_snippet_visibility = render "shared/snippets/form", url: namespace_project_snippets_path(@project.namespace, @project, @snippet), visibility_level: default_snippet_visibility
...@@ -7,24 +7,24 @@ ...@@ -7,24 +7,24 @@
= @error = @error
%h3.page-title %h3.page-title
New git tag New Tag
%hr %hr
= form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "form-horizontal gfm-form tag-form" do = form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "form-horizontal gfm-form tag-form js-requires-input" do
.form-group .form-group
= label_tag :tag_name, 'Name for new tag', class: 'control-label' = label_tag :tag_name, nil, class: 'control-label'
.col-sm-10 .col-sm-10
= text_field_tag :tag_name, params[:tag_name], placeholder: 'v3.0.1', required: true, tabindex: 1, class: 'form-control' = text_field_tag :tag_name, params[:tag_name], required: true, tabindex: 1, autofocus: true, class: 'form-control'
.form-group .form-group
= label_tag :ref, 'Create from', class: 'control-label' = label_tag :ref, 'Create from', class: 'control-label'
.col-sm-10 .col-sm-10
= text_field_tag :ref, params[:ref], placeholder: 'master', required: true, tabindex: 2, class: 'form-control' = text_field_tag :ref, params[:ref] || @project.default_branch, required: true, tabindex: 2, class: 'form-control'
.help-block Branch name or commit SHA .help-block Branch name or commit SHA
.form-group .form-group
= label_tag :message, 'Message', class: 'control-label' = label_tag :message, nil, class: 'control-label'
.col-sm-10 .col-sm-10
= text_field_tag :message, nil, placeholder: 'Enter message.', required: false, tabindex: 3, class: 'form-control' = text_field_tag :message, nil, required: false, tabindex: 3, class: 'form-control'
.help-block (Optional) Entering a message will create an annotated tag. .help-block Optionally, enter a message to create an annotated tag.
%hr %hr
.form-group .form-group
= label_tag :release_description, 'Release notes', class: 'control-label' = label_tag :release_description, 'Release notes', class: 'control-label'
...@@ -32,16 +32,15 @@ ...@@ -32,16 +32,15 @@
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do = render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do
= render 'projects/zen', attr: :release_description, classes: 'description js-quick-submit form-control' = render 'projects/zen', attr: :release_description, classes: 'description js-quick-submit form-control'
= render 'projects/notes/hints' = render 'projects/notes/hints'
.help-block (Optional) You can add release notes to your tag. It will be stored in the GitLab database and shown on the tags page .help-block Optionally, add release notes to the tag. They will be stored in the GitLab database and displayed on the tags page.
.form-actions .form-actions
= button_tag 'Create tag', class: 'btn btn-create', tabindex: 3 = button_tag 'Create tag', class: 'btn btn-create', tabindex: 3
= link_to 'Cancel', namespace_project_tags_path(@project.namespace, @project), class: 'btn btn-cancel' = link_to 'Cancel', namespace_project_tags_path(@project.namespace, @project), class: 'btn btn-cancel'
:javascript :javascript
disableButtonIfAnyEmptyField($("#new-tag-form"), ".form-control", ".btn-create"); var availableRefs = #{@project.repository.ref_names.to_json};
var availableTags = #{@project.repository.ref_names.to_json};
$("#ref").autocomplete({ $("#ref").autocomplete({
source: availableTags, source: availableRefs,
minLength: 1 minLength: 1
}); });
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
.modal-content .modal-content
.modal-header .modal-header
%a.close{href: "#", "data-dismiss" => "modal"} × %a.close{href: "#", "data-dismiss" => "modal"} ×
%h4 Confirmation required %h3.page-title
Confirmation required
.modal-body .modal-body
%p.cred.lead.js-confirm-text %p.cred.lead.js-confirm-text
...@@ -18,5 +19,5 @@ ...@@ -18,5 +19,5 @@
.form-group .form-group
= text_field_tag 'confirm_name_input', '', class: 'form-control js-confirm-danger-input' = text_field_tag 'confirm_name_input', '', class: 'form-control js-confirm-danger-input'
.form-group .form-actions
= submit_tag 'Confirm', class: "btn btn-danger js-confirm-danger-submit" = submit_tag 'Confirm', class: "btn btn-danger js-confirm-danger-submit"
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
%li It will change the git path to repositories under this group. %li It will change the git path to repositories under this group.
.form-group.group-description-holder .form-group.group-description-holder
= f.label :description, 'Details', class: 'control-label' = f.label :description, class: 'control-label'
.col-sm-10 .col-sm-10
= f.text_area :description, maxlength: 250, = f.text_area :description, maxlength: 250,
class: 'form-control js-gfm-input', rows: 4 class: 'form-control js-gfm-input', rows: 4
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
- unless @project.empty_repo? - unless @project.empty_repo?
.form-group.branch .form-group.branch
= label_tag 'branch', class: 'control-label' do = label_tag 'new_branch', 'Target branch', class: 'control-label'
Branch
.col-sm-10 .col-sm-10
= text_field_tag 'new_branch', @new_branch || @ref, class: "form-control js-new-branch" = text_field_tag 'new_branch', @new_branch || @ref, required: true, class: "form-control js-new-branch"
.form-group.js-create-merge-request-form-group .form-group.js-create-merge-request-form-group
.col-sm-offset-2.col-sm-10 .col-sm-offset-2.col-sm-10
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
%span= msg %span= msg
%br %br
.form-group .form-group
= f.label :title, class: 'control-label' do = f.label :title, class: 'control-label'
%strong= 'Title *'
.col-sm-10 .col-sm-10
= f.text_field :title, maxlength: 255, autofocus: true, autocomplete: 'off', = f.text_field :title, maxlength: 255, autofocus: true, autocomplete: 'off',
class: 'form-control pad js-gfm-input js-quick-submit', required: true class: 'form-control pad js-gfm-input js-quick-submit', required: true
...@@ -30,13 +29,11 @@ ...@@ -30,13 +29,11 @@
= render 'projects/notes/hints' = render 'projects/notes/hints'
.clearfix .clearfix
.error-alert .error-alert
%hr
- if can?(current_user, :"admin_#{issuable.to_ability_name}", issuable.project) - if can?(current_user, :"admin_#{issuable.to_ability_name}", issuable.project)
%hr
.form-group .form-group
.issue-assignee .issue-assignee
= f.label :assignee_id, class: 'control-label' do = f.label :assignee_id, "Assignee", class: 'control-label'
%i.fa.fa-user
Assign to
.col-sm-10 .col-sm-10
= users_select_tag("#{issuable.class.model_name.param_key}[assignee_id]", = users_select_tag("#{issuable.class.model_name.param_key}[assignee_id]",
placeholder: 'Select a user', class: 'custom-form-control', null_user: true, placeholder: 'Select a user', class: 'custom-form-control', null_user: true,
...@@ -46,9 +43,7 @@ ...@@ -46,9 +43,7 @@
= link_to 'Assign to me', '#', class: 'btn assign-to-me-link' = link_to 'Assign to me', '#', class: 'btn assign-to-me-link'
.form-group .form-group
.issue-milestone .issue-milestone
= f.label :milestone_id, class: 'control-label' do = f.label :milestone_id, "Milestone", class: 'control-label'
%i.fa.fa-clock-o
Milestone
.col-sm-10 .col-sm-10
- if milestone_options(issuable).present? - if milestone_options(issuable).present?
= f.select(:milestone_id, milestone_options(issuable), = f.select(:milestone_id, milestone_options(issuable),
...@@ -60,9 +55,7 @@ ...@@ -60,9 +55,7 @@
- if can? current_user, :admin_milestone, issuable.project - if can? current_user, :admin_milestone, issuable.project
= link_to 'Create new milestone', new_namespace_project_milestone_path(issuable.project.namespace, issuable.project), target: :blank = link_to 'Create new milestone', new_namespace_project_milestone_path(issuable.project.namespace, issuable.project), target: :blank
.form-group .form-group
= f.label :label_ids, class: 'control-label' do = f.label :label_ids, "Labels", class: 'control-label'
%i.fa.fa-tag
Labels
.col-sm-10 .col-sm-10
- if issuable.project.labels.any? - if issuable.project.labels.any?
= f.collection_select :label_ids, issuable.project.labels.all, :id, :name, = f.collection_select :label_ids, issuable.project.labels.all, :id, :name,
...@@ -78,15 +71,11 @@ ...@@ -78,15 +71,11 @@
%hr %hr
- if @merge_request.new_record? - if @merge_request.new_record?
.form-group .form-group
= f.label :source_branch, class: 'control-label' do = f.label :source_branch, class: 'control-label'
%i.fa.fa-code-fork
Source Branch
.col-sm-10 .col-sm-10
= f.select(:source_branch, [@merge_request.source_branch], { }, { class: 'source_branch select2 span2', disabled: true }) = f.select(:source_branch, [@merge_request.source_branch], { }, { class: 'source_branch select2 span2', disabled: true })
.form-group .form-group
= f.label :target_branch, class: 'control-label' do = f.label :target_branch, class: 'control-label'
%i.fa.fa-code-fork
Target Branch
.col-sm-10 .col-sm-10
= f.select(:target_branch, @merge_request.target_branches, { include_blank: "Select branch" }, { class: 'target_branch select2 span2', disabled: @merge_request.new_record? }) = f.select(:target_branch, @merge_request.target_branches, { include_blank: "Select branch" }, { class: 'target_branch select2 span2', disabled: @merge_request.new_record? })
- if @merge_request.new_record? - if @merge_request.new_record?
...@@ -101,7 +90,7 @@ ...@@ -101,7 +90,7 @@
%strong #{link_to 'guidelines for contribution', guide_url} %strong #{link_to 'guidelines for contribution', guide_url}
to this repository. to this repository.
- if issuable.new_record? - if issuable.new_record?
= f.submit "Submit new #{issuable.class.model_name.human.downcase}", class: 'btn btn-create' = f.submit "Submit #{issuable.class.model_name.human.downcase}", class: 'btn btn-create'
- else - else
= f.submit 'Save changes', class: 'btn btn-save' = f.submit 'Save changes', class: 'btn btn-save'
- if issuable.new_record? - if issuable.new_record?
......
.snippet-form-holder .snippet-form-holder
= form_for @snippet, url: url, html: { class: "form-horizontal snippet-form" } do |f| = form_for @snippet, url: url, html: { class: "form-horizontal snippet-form js-requires-input" } do |f|
- if @snippet.errors.any? - if @snippet.errors.any?
.alert.alert-danger .alert.alert-danger
%ul %ul
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
.form-group .form-group
= f.label :title, class: 'control-label' = f.label :title, class: 'control-label'
.col-sm-10= f.text_field :title, placeholder: "Example Snippet", class: 'form-control', required: true .col-sm-10
= f.text_field :title, class: 'form-control', required: true, autofocus: true
= render 'shared/visibility_level', f: f, visibility_level: visibility_level, can_change_visibility_level: true, form_model: @snippet = render 'shared/visibility_level', f: f, visibility_level: visibility_level, can_change_visibility_level: true, form_model: @snippet
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
- if @snippet.new_record? - if @snippet.new_record?
= f.submit 'Create snippet', class: "btn-create btn" = f.submit 'Create snippet', class: "btn-create btn"
- else - else
= f.submit 'Save', class: "btn-save btn" = f.submit 'Save changes', class: "btn-save btn"
- if @snippet.project_id - if @snippet.project_id
= link_to "Cancel", namespace_project_snippets_path(@project.namespace, @project), class: "btn btn-cancel" = link_to "Cancel", namespace_project_snippets_path(@project.namespace, @project), class: "btn btn-cancel"
......
- page_title "Edit", @snippet.title, "Snippets" - page_title "Edit", @snippet.title, "Snippets"
%h3.page-title %h3.page-title
Edit snippet Edit Snippet
%hr %hr
= render 'shared/snippets/form', url: snippet_path(@snippet), visibility_level: @snippet.visibility_level = render 'shared/snippets/form', url: snippet_path(@snippet), visibility_level: @snippet.visibility_level
- page_title "New Snippet" - page_title "New Snippet"
%h3.page-title %h3.page-title
New snippet New Snippet
%hr %hr
= render "shared/snippets/form", url: snippets_path(@snippet), visibility_level: default_snippet_visibility = render "shared/snippets/form", url: snippets_path(@snippet), visibility_level: default_snippet_visibility
...@@ -45,21 +45,21 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps ...@@ -45,21 +45,21 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps
step 'I submit new label \'support\'' do step 'I submit new label \'support\'' do
visit new_admin_label_path visit new_admin_label_path
fill_in 'Title', with: 'support' fill_in 'Title', with: 'support'
fill_in 'Background Color', with: '#F95610' fill_in 'Background color', with: '#F95610'
click_button 'Save' click_button 'Save'
end end
step 'I submit new label \'bug\'' do step 'I submit new label \'bug\'' do
visit new_admin_label_path visit new_admin_label_path
fill_in 'Title', with: 'bug' fill_in 'Title', with: 'bug'
fill_in 'Background Color', with: '#F95610' fill_in 'Background color', with: '#F95610'
click_button 'Save' click_button 'Save'
end end
step 'I submit new label with invalid color' do step 'I submit new label with invalid color' do
visit new_admin_label_path visit new_admin_label_path
fill_in 'Title', with: 'support' fill_in 'Title', with: 'support'
fill_in 'Background Color', with: '#12' fill_in 'Background color', with: '#12'
click_button 'Save' click_button 'Save'
end end
...@@ -101,7 +101,7 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps ...@@ -101,7 +101,7 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps
step 'I change label \'bug\' to \'fix\'' do step 'I change label \'bug\' to \'fix\'' do
fill_in 'Title', with: 'fix' fill_in 'Title', with: 'fix'
fill_in 'Background Color', with: '#F15610' fill_in 'Background color', with: '#F15610'
click_button 'Save' click_button 'Save'
end end
......
...@@ -39,14 +39,14 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps ...@@ -39,14 +39,14 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
select "fix", from: "merge_request_source_branch" select "fix", from: "merge_request_source_branch"
select "master", from: "merge_request_target_branch" select "master", from: "merge_request_target_branch"
click_button "Compare branches" click_button "Compare branches and continue"
expect(page).to have_content "New merge request" expect(page).to have_content "New Merge Request"
fill_in "merge_request_title", with: "Merge Request On Forked Project" fill_in "merge_request_title", with: "Merge Request On Forked Project"
end end
step 'I submit the merge request' do step 'I submit the merge request' do
click_button "Submit new merge request" click_button "Submit merge request"
end end
step 'I follow the target commit link' do step 'I follow the target commit link' do
......
...@@ -72,13 +72,13 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps ...@@ -72,13 +72,13 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
step 'I submit new issue "500 error on profile"' do step 'I submit new issue "500 error on profile"' do
fill_in "issue_title", with: "500 error on profile" fill_in "issue_title", with: "500 error on profile"
click_button "Submit new issue" click_button "Submit issue"
end end
step 'I submit new issue "500 error on profile" with label \'bug\'' do step 'I submit new issue "500 error on profile" with label \'bug\'' do
fill_in "issue_title", with: "500 error on profile" fill_in "issue_title", with: "500 error on profile"
select 'bug', from: "Labels" select 'bug', from: "Labels"
click_button "Submit new issue" click_button "Submit issue"
end end
step 'I click link "500 error on profile"' do step 'I click link "500 error on profile"' do
......
...@@ -31,20 +31,20 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps ...@@ -31,20 +31,20 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
step 'I submit new label \'support\'' do step 'I submit new label \'support\'' do
fill_in 'Title', with: 'support' fill_in 'Title', with: 'support'
fill_in 'Background Color', with: '#F95610' fill_in 'Background color', with: '#F95610'
click_button 'Save' click_button 'Create Label'
end end
step 'I submit new label \'bug\'' do step 'I submit new label \'bug\'' do
fill_in 'Title', with: 'bug' fill_in 'Title', with: 'bug'
fill_in 'Background Color', with: '#F95610' fill_in 'Background color', with: '#F95610'
click_button 'Save' click_button 'Create Label'
end end
step 'I submit new label with invalid color' do step 'I submit new label with invalid color' do
fill_in 'Title', with: 'support' fill_in 'Title', with: 'support'
fill_in 'Background Color', with: '#12' fill_in 'Background color', with: '#12'
click_button 'Save' click_button 'Create Label'
end end
step 'I should see label label exist error message' do step 'I should see label label exist error message' do
...@@ -85,8 +85,8 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps ...@@ -85,8 +85,8 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
step 'I change label \'bug\' to \'fix\'' do step 'I change label \'bug\' to \'fix\'' do
fill_in 'Title', with: 'fix' fill_in 'Title', with: 'fix'
fill_in 'Background Color', with: '#F15610' fill_in 'Background color', with: '#F15610'
click_button 'Save' click_button 'Save changes'
end end
step 'I should see label \'fix\'' do step 'I should see label \'fix\'' do
......
...@@ -86,7 +86,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -86,7 +86,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
select "feature", from: "merge_request_target_branch" select "feature", from: "merge_request_target_branch"
click_button "Compare branches" click_button "Compare branches"
fill_in "merge_request_title", with: "Wiki Feature" fill_in "merge_request_title", with: "Wiki Feature"
click_button "Submit new merge request" click_button "Submit merge request"
end end
step 'project "Shop" have "Bug NS-04" open merge request' do step 'project "Shop" have "Bug NS-04" open merge request' do
......
...@@ -142,7 +142,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -142,7 +142,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end end
step 'I can see new file page' do step 'I can see new file page' do
expect(page).to have_content "Create New File" expect(page).to have_content "New File"
expect(page).to have_content "Commit message" expect(page).to have_content "Commit message"
end end
......
...@@ -61,7 +61,7 @@ describe 'Issues', feature: true do ...@@ -61,7 +61,7 @@ describe 'Issues', feature: true do
it 'allows user to select unasigned', js: true do it 'allows user to select unasigned', js: true do
visit edit_namespace_project_issue_path(project.namespace, project, issue) visit edit_namespace_project_issue_path(project.namespace, project, issue)
expect(page).to have_content "Assign to #{@user.name}" expect(page).to have_content "Assignee #{@user.name}"
first('#s2id_issue_assignee_id').click first('#s2id_issue_assignee_id').click
sleep 2 # wait for ajax stuff to complete sleep 2 # wait for ajax stuff to complete
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment