blob: daa44a4276593cb40f6a202f2df3490030a43247 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<script>
import { createNamespacedHelpers } from 'vuex';
const {
mapState: mapCommitState,
mapActions: mapCommitActions,
mapGetters: mapCommitGetters,
} = createNamespacedHelpers('commit');
export default {
computed: {
...mapCommitState(['shouldCreateMR']),
...mapCommitGetters(['shouldHideNewMrOption']),
},
methods: {
...mapCommitActions(['toggleShouldCreateMR']),
},
};
</script>
<template>
<fieldset v-if="!shouldHideNewMrOption">
<hr class="my-2" />
<label class="mb-0 js-ide-commit-new-mr">
<input
:checked="shouldCreateMR"
type="checkbox"
data-qa-selector="start_new_mr_checkbox"
@change="toggleShouldCreateMR"
/>
<span class="prepend-left-10">
{{ __('Start a new merge request') }}
</span>
</label>
</fieldset>
</template>
|