Commit 6948b56c authored by Constance Okoghenun's avatar Constance Okoghenun

Added modal message and removed traget branch and commit message fields for delete wiki page modal

parent a3b73e26
......@@ -5,7 +5,7 @@ import { s__, sprintf } from '~/locale';
export default {
components: {
GlModal
GlModal,
},
props: {
deleteWikiUrl: {
......@@ -26,29 +26,24 @@ export default {
},
computed: {
message() {
return sprintf(s__('WikiPageConfirmDelete|Delete %{pageTitle}'),
{
pageTitle: _.escape(this.pageTitle),
},
false,
);
return s__('WikiPageConfirmDelete|Are you sure you want to delete this page?');
},
title() {
return sprintf(s__('WikiPageConfirmDelete|Delete Page %{pageTitle}?'),
return sprintf(
s__('WikiPageConfirmDelete|Delete Page %{pageTitle}?'),
{
pageTitle: `'${_.escape(this.pageTitle)}'`,
},
false,
false
);
}
},
},
methods: {
onSubmit() {
this.$refs.form.submit();
}
}
}
},
},
};
</script>
<template>
......@@ -59,6 +54,7 @@ export default {
:footer-primary-button-text="s__('WikiPageConfirmDelete|Delete Page')"
@submit="onSubmit"
>
{{ message }}
<form
ref="form"
:action="deleteWikiUrl"
......@@ -76,32 +72,6 @@ export default {
name="authenticity_token"
:value="csrfToken"
/>
<div class="form-group">
<div class="col-sm-12">
<label for="commit_message" class="control-label-full-width">Commit Message</label>
</div>
<div class="col-sm-12">
<div class="commit-message-container">
<textarea
id="commit_message"
rows="3"
name="commit_message"
:value="message"
class="form-control js-commit-message" required></textarea>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<label for="branch_name" class="control-label-full-width">Target Branch</label>
</div>
<div class="col-sm-12">
<input type="text" name="branch_name" class="form-control js-commit-message ref-name" required />
</div>
</div>
</form>
</gl-modal>
</template>
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