Commit d5d2d7b2 authored by Winnie Hellmann's avatar Winnie Hellmann

Rename recaptcha-dialog to recaptcha-modal

parent bf22eb61
...@@ -9,7 +9,7 @@ import titleComponent from './title.vue'; ...@@ -9,7 +9,7 @@ import titleComponent from './title.vue';
import descriptionComponent from './description.vue'; import descriptionComponent from './description.vue';
import editedComponent from './edited.vue'; import editedComponent from './edited.vue';
import formComponent from './form.vue'; import formComponent from './form.vue';
import RecaptchaDialogImplementor from '../../vue_shared/mixins/recaptcha_dialog_implementor'; import recaptchaModalImplementor from '../../vue_shared/mixins/recaptcha_modal_implementor';
export default { export default {
props: { props: {
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
}, },
mixins: [ mixins: [
RecaptchaDialogImplementor, recaptchaModalImplementor,
], ],
methods: { methods: {
...@@ -197,7 +197,7 @@ export default { ...@@ -197,7 +197,7 @@ export default {
}); });
}, },
closeRecaptchaDialog() { closeRecaptchaModal() {
this.store.setFormState({ this.store.setFormState({
updateLoading: false, updateLoading: false,
}); });
...@@ -273,10 +273,10 @@ export default { ...@@ -273,10 +273,10 @@ export default {
:enable-autocomplete="enableAutocomplete" :enable-autocomplete="enableAutocomplete"
/> />
<recaptcha-dialog <recaptcha-modal
v-show="showRecaptcha" v-show="showRecaptcha"
:html="recaptchaHTML" :html="recaptchaHTML"
@close="closeRecaptchaDialog" @close="closeRecaptchaModal"
/> />
</div> </div>
<div v-else> <div v-else>
......
<script> <script>
import animateMixin from '../mixins/animate'; import animateMixin from '../mixins/animate';
import TaskList from '../../task_list'; import TaskList from '../../task_list';
import RecaptchaDialogImplementor from '../../vue_shared/mixins/recaptcha_dialog_implementor'; import recaptchaModalImplementor from '../../vue_shared/mixins/recaptcha_modal_implementor';
export default { export default {
mixins: [ mixins: [
animateMixin, animateMixin,
RecaptchaDialogImplementor, recaptchaModalImplementor,
], ],
props: { props: {
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
> >
</textarea> </textarea>
<recaptcha-dialog <recaptcha-modal
v-show="showRecaptcha" v-show="showRecaptcha"
:html="recaptchaHTML" :html="recaptchaHTML"
@close="closeRecaptcha" @close="closeRecaptcha"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import modal from './modal.vue'; import modal from './modal.vue';
export default { export default {
name: 'recaptcha-dialog', name: 'recaptcha-modal',
props: { props: {
html: { html: {
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
<template> <template>
<modal <modal
kind="warning" kind="warning"
class="recaptcha-dialog js-recaptcha-dialog" class="recaptcha-modal js-recaptcha-modal"
:hide-footer="true" :hide-footer="true"
:title="__('Please solve the reCAPTCHA')" :title="__('Please solve the reCAPTCHA')"
@toggle="close" @toggle="close"
......
import RecaptchaDialog from '../components/recaptcha_dialog.vue'; import recaptchaModal from '../components/recaptcha_modal.vue';
export default { export default {
data() { data() {
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
}, },
components: { components: {
RecaptchaDialog, recaptchaModal,
}, },
methods: { methods: {
......
...@@ -55,7 +55,7 @@ body.modal-open { ...@@ -55,7 +55,7 @@ body.modal-open {
} }
} }
.recaptcha-dialog .recaptcha-form { .recaptcha-modal .recaptcha-form {
display: inline-block; display: inline-block;
.recaptcha { .recaptcha {
......
...@@ -272,10 +272,10 @@ describe('Issuable output', () => { ...@@ -272,10 +272,10 @@ describe('Issuable output', () => {
}); });
}); });
it('opens recaptcha dialog if update rejected as spam', (done) => { it('opens recaptcha modal if update rejected as spam', (done) => {
function mockScriptSrc() { function mockScriptSrc() {
const recaptchaChild = vm.$children const recaptchaChild = vm.$children
.find(child => child.$options._componentTag === 'recaptcha-dialog'); // eslint-disable-line no-underscore-dangle .find(child => child.$options._componentTag === 'recaptcha-modal'); // eslint-disable-line no-underscore-dangle
recaptchaChild.scriptSrc = '//scriptsrc'; recaptchaChild.scriptSrc = '//scriptsrc';
} }
...@@ -302,7 +302,7 @@ describe('Issuable output', () => { ...@@ -302,7 +302,7 @@ describe('Issuable output', () => {
.then(promise) .then(promise)
.then(() => setTimeoutPromise()) .then(() => setTimeoutPromise())
.then(() => { .then(() => {
modal = vm.$el.querySelector('.js-recaptcha-dialog'); modal = vm.$el.querySelector('.js-recaptcha-modal');
expect(modal.style.display).not.toEqual('none'); expect(modal.style.display).not.toEqual('none');
expect(modal.querySelector('.g-recaptcha').textContent).toEqual('recaptcha_html'); expect(modal.querySelector('.g-recaptcha').textContent).toEqual('recaptcha_html');
......
...@@ -54,7 +54,7 @@ describe('Description component', () => { ...@@ -54,7 +54,7 @@ describe('Description component', () => {
it('opens recaptcha dialog if update rejected as spam', (done) => { it('opens recaptcha dialog if update rejected as spam', (done) => {
let modal; let modal;
const recaptchaChild = vm.$children const recaptchaChild = vm.$children
.find(child => child.$options._componentTag === 'recaptcha-dialog'); // eslint-disable-line no-underscore-dangle .find(child => child.$options._componentTag === 'recaptcha-modal'); // eslint-disable-line no-underscore-dangle
recaptchaChild.scriptSrc = '//scriptsrc'; recaptchaChild.scriptSrc = '//scriptsrc';
...@@ -64,7 +64,7 @@ describe('Description component', () => { ...@@ -64,7 +64,7 @@ describe('Description component', () => {
vm.$nextTick() vm.$nextTick()
.then(() => { .then(() => {
modal = vm.$el.querySelector('.js-recaptcha-dialog'); modal = vm.$el.querySelector('.js-recaptcha-modal');
expect(modal.style.display).not.toEqual('none'); expect(modal.style.display).not.toEqual('none');
expect(modal.querySelector('.g-recaptcha').textContent).toEqual('recaptcha_html'); expect(modal.querySelector('.g-recaptcha').textContent).toEqual('recaptcha_html');
......
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