debian-mirror-gitlab/app/assets/javascripts/releases/components/tag_field_existing.vue

40 lines
1 KiB
Vue
Raw Normal View History

2020-10-24 23:57:45 +05:30
<script>
2021-01-29 00:20:46 +05:30
import { GlFormGroup, GlFormInput } from '@gitlab/ui';
2021-03-11 19:13:27 +05:30
import { uniqueId } from 'lodash';
import { mapState } from 'vuex';
2020-10-24 23:57:45 +05:30
import FormFieldContainer from './form_field_container.vue';
export default {
name: 'TagFieldExisting',
2021-01-29 00:20:46 +05:30
components: { GlFormGroup, GlFormInput, FormFieldContainer },
2020-10-24 23:57:45 +05:30
computed: {
2021-04-29 21:17:54 +05:30
...mapState('editNew', ['release']),
2020-10-24 23:57:45 +05:30
inputId() {
return uniqueId('tag-name-input-');
},
helpId() {
return uniqueId('tag-name-help-');
},
},
};
</script>
<template>
<gl-form-group :label="__('Tag name')" :label-for="inputId">
<form-field-container>
<gl-form-input
:id="inputId"
:value="release.tagName"
type="text"
class="form-control"
:aria-describedby="helpId"
disabled
/>
</form-field-container>
<template #description>
<div :id="helpId" data-testid="tag-name-help">
2021-01-29 00:20:46 +05:30
{{ __("The tag name can't be changed for an existing release.") }}
2020-10-24 23:57:45 +05:30
</div>
</template>
</gl-form-group>
</template>