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