Commit 49848d08 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch...

Merge branch '222327-ux-pajamas-implementation-move-buttons-in-settings-general-to-the-right' into 'master'

Move buttons in Settings > General to the right

Closes #222327

See merge request gitlab-org/gitlab!38651
parents 99689d2f fb92ffff
......@@ -184,7 +184,7 @@ export default {
@input="debouncedPreview"
/>
<div class="invalid-feedback">{{ s__('Badges|Please fill in a valid URL') }}</div>
<span class="form-text text-muted"> {{ badgeLinkUrlExample }} </span>
<span class="form-text text-muted">{{ badgeLinkUrlExample }}</span>
</div>
<div class="form-group">
......@@ -199,7 +199,7 @@ export default {
@input="debouncedPreview"
/>
<div class="invalid-feedback">{{ s__('Badges|Please fill in a valid URL') }}</div>
<span class="form-text text-muted"> {{ badgeImageUrlExample }} </span>
<span class="form-text text-muted">{{ badgeImageUrlExample }}</span>
</div>
<div class="form-group">
......@@ -210,22 +210,26 @@ export default {
:image-url="renderedImageUrl"
:link-url="renderedLinkUrl"
/>
<p v-show="isRendering"><gl-loading-icon :inline="true" /></p>
<p v-show="isRendering">
<gl-loading-icon :inline="true" />
</p>
<p v-show="!renderedBadge && !isRendering" class="disabled-content">
{{ s__('Badges|No image to preview') }}
</p>
</div>
<div v-if="isEditing" class="row-content-block">
<div v-if="isEditing" class="row-content-block gl-display-flex gl-justify-content-end">
<button class="btn btn-cancel gl-mr-4" type="button" @click="onCancel">
{{ __('Cancel') }}
</button>
<loading-button
:loading="isSaving"
:label="s__('Badges|Save changes')"
type="submit"
container-class="btn btn-success"
/>
<button class="btn btn-cancel" type="button" @click="onCancel">{{ __('Cancel') }}</button>
</div>
<div v-else class="form-group">
<div v-else class="gl-display-flex gl-justify-content-end form-group">
<loading-button
:loading="isSaving"
:label="s__('Badges|Add badge')"
......
......@@ -60,5 +60,5 @@
= render_if_exists 'admin/application_settings/updating_name_disabled_for_users', form: f
= render_if_exists 'admin/application_settings/availability_on_namespace_setting', form: f
.gl-display-flex.gl-justify-content-end
= f.submit _('Save changes'), class: 'btn btn-success qa-save-changes-button'
......@@ -12,5 +12,5 @@
= link_to icon('question-circle'),
help_page_path('user/admin_area/diff_limits',
anchor: 'maximum-diff-patch-size')
.gl-display-flex.gl-justify-content-end
= f.submit _('Save changes'), class: 'btn btn-success'
......@@ -47,5 +47,5 @@
.form-group
= f.label :external_authorization_service_default_label, _('Default classification label'), class: 'label-bold'
= f.text_field :external_authorization_service_default_label, class: 'form-control'
.gl-display-flex.gl-justify-content-end
= f.submit 'Save changes', class: "btn btn-success"
......@@ -57,5 +57,5 @@
= f.label :sign_in_text, class: 'label-bold'
= f.text_area :sign_in_text, class: 'form-control', rows: 4
.form-text.text-muted Markdown enabled
.gl-display-flex.gl-justify-content-end
= f.submit 'Save changes', class: "btn btn-success"
......@@ -67,5 +67,5 @@
= f.label :after_sign_up_text, class: 'label-bold'
= f.text_area :after_sign_up_text, class: 'form-control', rows: 4
.form-text.text-muted Markdown enabled
.gl-display-flex.gl-justify-content-end
= f.submit 'Save changes', class: "btn btn-success"
......@@ -8,5 +8,5 @@
.form-text.text-muted
Maximum time for web terminal websocket connection (in seconds).
0 for unlimited.
.gl-display-flex.gl-justify-content-end
= f.submit 'Save changes', class: "btn btn-success"
......@@ -15,5 +15,5 @@
= f.text_area :terms, class: 'form-control', rows: 8
.form-text.text-muted
= _("Markdown enabled")
.gl-display-flex.gl-justify-content-end
= f.submit _("Save changes"), class: "btn btn-success"
......@@ -66,5 +66,5 @@
.form-group
= f.label field_name, "#{type.upcase} SSH keys", class: 'label-bold'
= f.select field_name, key_restriction_options_for_select(type), {}, class: 'form-control'
.gl-display-flex.gl-justify-content-end
= f.submit _('Save changes'), class: "btn btn-success"
......@@ -101,7 +101,7 @@
= s_('IDE|Live Preview')
%span.form-text.text-muted
= s_('IDE|Allow live previews of JavaScript projects in the Web IDE using CodeSandbox Live Preview.')
.gl-display-flex.gl-justify-content-end
= f.submit _('Save changes'), class: "btn btn-success"
- if Feature.enabled?(:maintenance_mode)
......
......@@ -22,7 +22,7 @@
pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS,
title: s_('GroupSettings|Please choose a group URL with no special characters.'),
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
.gl-display-flex.gl-justify-content-end
= f.submit s_('GroupSettings|Change group URL'), class: 'btn btn-warning'
.sub-section
......@@ -39,6 +39,7 @@
%li= s_('GroupSettings|You can only transfer the group to a group you manage.')
%li= s_('GroupSettings|You will need to update your local repositories to point to the new location.')
%li= s_("GroupSettings|If the parent group's visibility is lower than the group current visibility, visibility levels for subgroups and projects will be changed to match the new parent group's visibility.")
.gl-display-flex.gl-justify-content-end
= f.submit s_('GroupSettings|Transfer group'), class: 'btn btn-warning'
= render 'groups/settings/remove', group: @group
......
......@@ -24,5 +24,6 @@
= link_to _('Download export'), download_export_group_path(group),
rel: 'nofollow', method: :get, class: 'btn btn-default', data: { qa_selector: 'download_export_link' }
- else
.gl-display-flex.gl-justify-content-end
= link_to _('Export group'), export_group_path(group),
method: :post, class: 'btn btn-default', data: { qa_selector: 'export_group_link' }
......@@ -29,5 +29,5 @@
= link_to _('Remove avatar'), group_avatar_path(@group.to_param), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'btn btn-link'
= render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group
.gl-display-flex.gl-justify-content-end
= f.submit _('Save changes'), class: 'btn btn-success mt-4 js-dirty-submit', data: { qa_selector: 'save_name_visibility_settings_button' }
......@@ -5,5 +5,5 @@
= _('Removing this group also removes all child projects, including archived projects, and their resources.')
%br
%strong= _('Removed group can not be restored!')
.gl-display-flex.gl-justify-content-end
= button_to _('Remove group'), '#', class: 'btn btn-remove js-confirm-danger', data: { 'confirm-danger-message' => remove_group_message(group) }
......@@ -41,5 +41,5 @@
= render 'groups/settings/two_factor_auth', f: f
= render_if_exists 'groups/personal_access_token_expiration_policy', f: f, group: @group
= render_if_exists 'groups/member_lock_setting', f: f, group: @group
.gl-display-flex.gl-justify-content-end
= f.submit _('Save changes'), class: 'btn btn-success gl-mt-3 js-dirty-submit', data: { qa_selector: 'save_permissions_changes_button' }
......@@ -26,5 +26,6 @@
= link_to _('Generate new export'), generate_new_export_project_path(project),
method: :post, class: "btn btn-default"
- else
.gl-display-flex.gl-justify-content-end
= link_to _('Export project'), export_project_path(project),
method: :post, class: "btn btn-default", data: { qa_selector: 'export_project_link' }
......@@ -23,8 +23,7 @@
= ("To confirm, type %{phrase_code}").html_safe % { phrase_code: '<code class="js-confirm-danger-match">%{phrase_name}</code>'.html_safe % { phrase_name: @project.full_path } }
.form-group
= text_field_tag 'confirm_path_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input'
.form-actions.clearfix
.float-right
%button.btn.btn-default{ type: "button", "data-dismiss": "modal" }
.form-actions.gl-display-flex.gl-justify-content-end
%button.btn.btn-default.gl-mr-4{ type: "button", "data-dismiss": "modal" }
= _('Cancel')
= submit_tag _('Reduce project visibility'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button", disabled: true
......@@ -21,6 +21,7 @@
%input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' }
%template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data_json(@project)
.js-project-permissions-form
.gl-display-flex.gl-justify-content-end
- if show_visibility_confirm_modal?(@project)
= render "visibility_modal"
= f.submit _('Save changes'), class: "btn btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level }
......@@ -37,7 +38,8 @@
= form_for @project, remote: true, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f|
%input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' }
= render 'projects/merge_request_settings', form: f
= f.submit _('Save changes'), class: "btn btn-success qa-save-merge-request-changes rspec-save-merge-request-changes"
.gl-display-flex.gl-justify-content-end
= f.submit _('Save changes'), class: "btn btn-succes qa-save-merge-request-changes rspec-save-merge-request-changes"
= render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded
......@@ -68,6 +70,7 @@
.sub-section
%h4= _('Housekeeping')
%p= _('Runs a number of housekeeping tasks within the current repository, such as compressing file revisions and removing unreachable objects.')
.gl-display-flex.gl-justify-content-end
= link_to _('Run housekeeping'), housekeeping_project_path(@project),
method: :post, class: "btn btn-default"
......@@ -91,6 +94,7 @@
%li= _('You will need to update your local repositories to point to the new location.')
- if @project.deployment_platform.present?
%li= _('Your deployment services will be broken, you will need to manually fix the services after renaming.')
.gl-display-flex.gl-justify-content-end
= f.submit _('Change path'), class: "btn btn-warning qa-change-path-button"
- if can?(current_user, :change_namespace, @project)
......@@ -107,6 +111,7 @@
%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= _('Project visibility level will be changed to match namespace rules when transferring to a group.')
.gl-display-flex.gl-justify-content-end
= f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) }
- if @project.forked? && can?(current_user, :remove_fork_project, @project)
......
......@@ -13,6 +13,7 @@
method: :post, class: "btn btn-success"
- else
%p= _("Archiving the project will make it entirely read only. It is hidden from the dashboard and doesn't show up in searches. %{strong_start}The repository cannot be committed to, and no issues, comments, or other entities can be created.%{strong_end}").html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe }
.gl-display-flex.gl-justify-content-end
= link_to _('Archive project'), archive_project_path(@project),
data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link' },
method: :post, class: "btn btn-warning"
......@@ -40,5 +40,5 @@
%hr
= link_to _('Remove avatar'), project_avatar_path(@project), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'btn btn-link'
.gl-display-flex.gl-justify-content-end
= f.submit _('Save changes'), class: "btn btn-success mt-4 qa-save-naming-topics-avatar-button"
......@@ -17,5 +17,5 @@
.form-group
= text_field_tag 'confirm_name_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input'
.form-actions
.form-actions.gl-display-flex.gl-justify-content-end
= submit_tag _('Confirm'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button"
......@@ -13,4 +13,5 @@
= form_for @project, remote: true, html: { class: "merge-request-approval-settings-form js-mr-approvals-form" }, authenticity_token: true do |f|
%input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-approval-settings' }
= render 'projects/merge_request_approvals_settings_form', form: f, project: @project
.gl-display-flex.gl-justify-content-end
= f.submit _("Save changes"), class: "btn btn-success qa-save-merge-request-approval-settings-button"
......@@ -20,6 +20,7 @@
%p= permanent_delete_message(project)
%p
%strong= _('Are you ABSOLUTELY SURE you wish to delete this project?')
.gl-display-flex.gl-justify-content-end
#js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: confirm_phrase } }
- else
= render 'projects/settings/restore', project: project
......
......@@ -18,4 +18,5 @@
.text-secondary
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/markdown') }
= _('Description parsed with %{link_start}GitLab Flavored Markdown%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
.gl-display-flex.gl-justify-content-end
= f.submit _('Save changes'), class: "btn btn-success"
......@@ -20,6 +20,7 @@
- if License.current&.expired?
= link_to (!short_form ? s_('Promotions|Buy GitLab Enterprise Edition') : s_('Promotions|Buy EE')), ::EE::SUBSCRIPTIONS_PLANS_URL, class: 'btn btn-primary'
- else
.gl-display-flex.gl-justify-content-end
= link_to s_('Promotions|Start GitLab Ultimate trial'), new_trial_url, class: 'btn btn-primary'
- else
%p= s_('Promotions|Contact your Administrator to upgrade your license.')
......@@ -182,11 +182,11 @@ describe('BadgeForm component', () => {
const buttons = vm.$el.querySelectorAll('.row-content-block button');
expect(buttons.length).toBe(2);
const buttonSaveElement = buttons[0];
const buttonSaveElement = buttons[1];
expect(buttonSaveElement).toBeVisible();
expect(buttonSaveElement).toHaveText('Save changes');
const buttonCancelElement = buttons[1];
const buttonCancelElement = buttons[0];
expect(buttonCancelElement).toBeVisible();
expect(buttonCancelElement).toHaveText('Cancel');
......
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