mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
Merge pull request #10504 from nixocio/ui_issue_7524
Encode/decode question variables Encode/decode question variables See: #7524 Reviewed-by: Alex Corey <Alex.swansboro@gmail.com> Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
This commit is contained in:
@@ -98,7 +98,11 @@ function SurveyListItem({
|
|||||||
dataListCells={[
|
dataListCells={[
|
||||||
<DataListCell key="name">
|
<DataListCell key="name">
|
||||||
<>
|
<>
|
||||||
<Link to={`survey/edit?question_variable=${question.variable}`}>
|
<Link
|
||||||
|
to={`survey/edit?question_variable=${encodeURIComponent(
|
||||||
|
question.variable
|
||||||
|
)}`}
|
||||||
|
>
|
||||||
{question.question_name}
|
{question.question_name}
|
||||||
</Link>
|
</Link>
|
||||||
{question.required && (
|
{question.required && (
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ export default function SurveyQuestionEdit({ survey, updateSurvey }) {
|
|||||||
const match = useRouteMatch();
|
const match = useRouteMatch();
|
||||||
const { search } = useLocation();
|
const { search } = useLocation();
|
||||||
const queryParams = new URLSearchParams(search);
|
const queryParams = new URLSearchParams(search);
|
||||||
const questionVariable = queryParams.get('question_variable');
|
const questionVariable = decodeURIComponent(
|
||||||
|
queryParams.get('question_variable')
|
||||||
|
);
|
||||||
|
|
||||||
if (!survey) {
|
if (!survey) {
|
||||||
return <ContentLoading />;
|
return <ContentLoading />;
|
||||||
|
|||||||
Reference in New Issue
Block a user