Commit 6c5c5331 authored by Simon Knox's avatar Simon Knox

Merge branch '229326-migrate-update-username-button' into 'master'

Migrate to GlButton in the "Change username" section in Account Settings

Closes #229326

See merge request gitlab-org/gitlab!42009
parents e9783f2e 8facc048
<script>
/* eslint-disable vue/no-v-html */
import { escape } from 'lodash';
import { GlButton } from '@gitlab/ui';
import axios from '~/lib/utils/axios_utils';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
import { s__, sprintf } from '~/locale';
......@@ -9,6 +10,7 @@ import { deprecatedCreateFlash as Flash } from '~/flash';
export default {
components: {
GlModal: DeprecatedModal2,
GlButton,
},
props: {
actionUrl: {
......@@ -100,15 +102,15 @@ Please update your Git repository remotes as soon as possible.`),
</div>
<p class="form-text text-muted">{{ path }}</p>
</div>
<button
<gl-button
:data-target="`#${$options.modalId}`"
:disabled="isRequestPending || newUsername === username"
class="btn btn-warning"
type="button"
category="primary"
variant="warning"
data-toggle="modal"
>
{{ $options.buttonText }}
</button>
</gl-button>
<gl-modal
:id="$options.modalId"
:header-title-text="s__('Profiles|Change username') + '?'"
......
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