Commit 32b43af3 authored by Austin Regnery's avatar Austin Regnery

Updated flash message

parent 0a43814d
import { s__ } from '~/locale';
export const FAILED_TO_UPDATE_TAG_MESSSAGE = s__('ProjectSettings|Failed to update tag!');
export const FAILED_TO_UPDATE_TAG_MESSAGE = s__('ProjectSettings|Failed to update tag!');
import { s__ } from '~/locale';
import { deprecatedCreateFlash as flash } from '../flash';
import axios from '../lib/utils/axios_utils';
import ProtectedTagAccessDropdown from './protected_tag_access_dropdown';
import { FAILED_TO_UPDATE_TAG_MESSAGE } from './constants';
export default class ProtectedTagEdit {
constructor(options) {
......@@ -49,7 +49,7 @@ export default class ProtectedTagEdit {
this.$allowedToCreateDropdownButton.enable();
window.scrollTo({ top: 0, behavior: 'smooth' });
flash(s__('ProjectSettings|Failed to update tag!'));
flash(FAILED_TO_UPDATE_TAG_MESSAGE);
});
}
}
......@@ -2,7 +2,7 @@ import { find } from 'lodash';
import AccessDropdown from '~/projects/settings/access_dropdown';
import axios from '~/lib/utils/axios_utils';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale';
import { FAILED_TO_UPDATE_TAG_MESSAGE } from '~/protected_tags/constants';
import { ACCESS_LEVELS, LEVEL_TYPES } from './constants';
export default class ProtectedTagEdit {
......@@ -67,7 +67,7 @@ export default class ProtectedTagEdit {
})
.catch(() => {
window.scrollTo({ top: 0, behavior: 'smooth' });
createFlash(s__('ProjectSettings|Failed to update tag!'));
createFlash(FAILED_TO_UPDATE_TAG_MESSAGE);
});
}
......
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