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'; ...@@ -5,7 +5,7 @@ import { s__, sprintf } from '~/locale';
export default { export default {
components: { components: {
GlModal GlModal,
}, },
props: { props: {
deleteWikiUrl: { deleteWikiUrl: {
...@@ -26,29 +26,24 @@ export default { ...@@ -26,29 +26,24 @@ export default {
}, },
computed: { computed: {
message() { message() {
return sprintf(s__('WikiPageConfirmDelete|Delete %{pageTitle}'), return s__('WikiPageConfirmDelete|Are you sure you want to delete this page?');
{
pageTitle: _.escape(this.pageTitle),
},
false,
);
}, },
title() { title() {
return sprintf(s__('WikiPageConfirmDelete|Delete Page %{pageTitle}?'), return sprintf(
s__('WikiPageConfirmDelete|Delete Page %{pageTitle}?'),
{ {
pageTitle: `'${_.escape(this.pageTitle)}'`, pageTitle: `'${_.escape(this.pageTitle)}'`,
}, },
false, false
); );
} },
}, },
methods: { methods: {
onSubmit() { onSubmit() {
this.$refs.form.submit(); this.$refs.form.submit();
} },
} },
} };
</script> </script>
<template> <template>
...@@ -59,6 +54,7 @@ export default { ...@@ -59,6 +54,7 @@ export default {
:footer-primary-button-text="s__('WikiPageConfirmDelete|Delete Page')" :footer-primary-button-text="s__('WikiPageConfirmDelete|Delete Page')"
@submit="onSubmit" @submit="onSubmit"
> >
{{ message }}
<form <form
ref="form" ref="form"
:action="deleteWikiUrl" :action="deleteWikiUrl"
...@@ -76,32 +72,6 @@ export default { ...@@ -76,32 +72,6 @@ export default {
name="authenticity_token" name="authenticity_token"
:value="csrfToken" :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> </form>
</gl-modal> </gl-modal>
</template> </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