Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
906208bb
Commit
906208bb
authored
May 28, 2021
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove v-html from delete account modal
parent
22335f30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
32 deletions
+29
-32
app/assets/javascripts/profile/account/components/delete_account_modal.vue
...ripts/profile/account/components/delete_account_modal.vue
+29
-32
No files found.
app/assets/javascripts/profile/account/components/delete_account_modal.vue
View file @
906208bb
<
script
>
/* eslint-disable vue/no-v-html */
import
{
GlModal
}
from
'
@gitlab/ui
'
;
import
{
GlModal
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
csrf
from
'
~/lib/utils/csrf
'
;
import
{
__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
__
,
s__
}
from
'
~/locale
'
;
export
default
{
components
:
{
GlModal
,
GlSprintf
,
},
props
:
{
actionUrl
:
{
...
...
@@ -32,33 +32,8 @@ export default {
csrfToken
()
{
return
csrf
.
token
;
},
inputLabel
()
{
let
confirmationValue
;
if
(
this
.
confirmWithPassword
)
{
confirmationValue
=
__
(
'
password
'
);
}
else
{
confirmationValue
=
__
(
'
username
'
);
}
confirmationValue
=
`<code>
${
confirmationValue
}
</code>`
;
return
sprintf
(
s__
(
'
Profiles|Type your %{confirmationValue} to confirm:
'
),
{
confirmationValue
},
false
,
);
},
text
()
{
return
sprintf
(
s__
(
`Profiles|
You are about to permanently delete %{yourAccount}, and all of the issues, merge requests, and groups linked to your account.
Once you confirm %{deleteAccount}, it cannot be undone or recovered.`
),
{
yourAccount
:
`<strong>
${
s__
(
'
Profiles|your account
'
)}
</strong>`
,
deleteAccount
:
`<strong>
${
s__
(
'
Profiles|Delete account
'
)}
</strong>`
,
},
false
,
);
confirmationValue
()
{
return
this
.
confirmWithPassword
?
__
(
'
password
'
)
:
__
(
'
username
'
);
},
primaryProps
()
{
return
{
...
...
@@ -90,6 +65,12 @@ Once you confirm %{deleteAccount}, it cannot be undone or recovered.`),
this
.
$refs
.
form
.
submit
();
},
},
i18n
:
{
text
:
s__
(
`Profiles|
You are about to permanently delete %{yourAccount}, and all of the issues, merge requests, and groups linked to your account.
Once you confirm %{deleteAccount}, it cannot be undone or recovered.`
),
inputLabel
:
s__
(
'
Profiles|Type your %{confirmationValue} to confirm:
'
),
},
};
</
script
>
...
...
@@ -102,13 +83,29 @@ Once you confirm %{deleteAccount}, it cannot be undone or recovered.`),
:ok-disabled=
"!canSubmit"
@
primary=
"onSubmit"
>
<p
v-html=
"text"
></p>
<p>
<gl-sprintf
:message=
"$options.i18n.text"
>
<template
#yourAccount
>
<strong>
{{
s__
(
'
Profiles|your account
'
)
}}
</strong>
</
template
>
<
template
#deleteAccount
>
<strong>
{{
s__
(
'
Profiles|Delete account
'
)
}}
</strong>
</
template
>
</gl-sprintf>
</p>
<form
ref=
"form"
:action=
"actionUrl"
method=
"post"
>
<input
type=
"hidden"
name=
"_method"
value=
"delete"
/>
<input
:value=
"csrfToken"
type=
"hidden"
name=
"authenticity_token"
/>
<p
id=
"input-label"
v-html=
"inputLabel"
></p>
<p
id=
"input-label"
>
<gl-sprintf
:message=
"$options.i18n.inputLabel"
>
<
template
#confirmationValue
>
<code>
{{
confirmationValue
}}
</code>
</
template
>
</gl-sprintf>
</p>
<input
v-if=
"confirmWithPassword"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment