Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
form-creator-ui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simmctic
form-creator
form-creator-ui
Commits
9485f3df
Commit
9485f3df
authored
4 years ago
by
Stephanie Briere Americo
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue/22' into 'development'
Issue
#22
: Fix answer page form description. See merge request
!24
parents
13a1ee63
ced646cf
Branches
Branches containing commit
No related tags found
3 merge requests
!58
Version 1.1
,
!54
Issue #53: Fix password info
,
!24
Issue #22: Fix answer page form description.
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/fieldsAnswerForm/FormFieldTitle.js
+34
-36
34 additions, 36 deletions
src/components/fieldsAnswerForm/FormFieldTitle.js
src/pages/AnswerForm.js
+20
-4
20 additions, 4 deletions
src/pages/AnswerForm.js
with
54 additions
and
40 deletions
src/components/fieldsAnswerForm/FormFieldTitle.js
+
34
−
36
View file @
9485f3df
...
@@ -10,7 +10,7 @@ const useStyles = makeStyles(theme => ({
...
@@ -10,7 +10,7 @@ const useStyles = makeStyles(theme => ({
paper
:
{
paper
:
{
padding
:
theme
.
spacing
(
3
),
padding
:
theme
.
spacing
(
3
),
width
:
theme
.
spacing
(
100
),
width
:
theme
.
spacing
(
100
),
height
:
theme
.
spacing
(
22
)
,
height
:
"
40%
"
,
margin
:
theme
.
spacing
(
2
),
margin
:
theme
.
spacing
(
2
),
color
:
"
#000000
"
,
color
:
"
#000000
"
,
[
"
@media (max-width:827px)
"
]:
{
[
"
@media (max-width:827px)
"
]:
{
...
@@ -38,10 +38,10 @@ const useStyles = makeStyles(theme => ({
...
@@ -38,10 +38,10 @@ const useStyles = makeStyles(theme => ({
}
}
},
},
description
:
{
description
:
{
fontSize
:
"
30
px
"
,
fontSize
:
"
25
px
"
,
color
:
"
#000000
"
,
color
:
"
#000000
"
,
[
"
@media (max-width:827px)
"
]:
{
[
"
@media (max-width:827px)
"
]:
{
fontSize
:
"
2
5
px
"
fontSize
:
"
2
0
px
"
},
},
[
"
@media (max-width:590px)
"
]:
{
[
"
@media (max-width:590px)
"
]:
{
fontSize
:
"
15px
"
fontSize
:
"
15px
"
...
@@ -53,7 +53,6 @@ function FormFieldText(props) {
...
@@ -53,7 +53,6 @@ function FormFieldText(props) {
const
classes
=
useStyles
();
const
classes
=
useStyles
();
return
(
return
(
<
Grid
>
<
Paper
className
=
{
classes
.
paper
}
>
<
Paper
className
=
{
classes
.
paper
}
>
<
Grid
container
>
<
Grid
container
>
<
Grid
item
xs
=
{
12
}
className
=
{
classes
.
questionsGrid
}
>
<
Grid
item
xs
=
{
12
}
className
=
{
classes
.
questionsGrid
}
>
...
@@ -66,11 +65,11 @@ function FormFieldText(props) {
...
@@ -66,11 +65,11 @@ function FormFieldText(props) {
{
props
.
title
}
{
props
.
title
}
<
/Typography
>
<
/Typography
>
<
/Grid
>
<
/Grid
>
<
Grid
item
xs
=
{
9
}
className
=
{
classes
.
questionsGrid
}
>
<
Grid
item
xs
=
{
12
}
className
=
{
classes
.
questionsGrid
}
>
<
Typography
<
Typography
style
=
{{
wordWrap
:
"
break-word
"
}}
style
=
{{
wordWrap
:
"
break-word
"
}}
className
=
{
classes
.
description
}
className
=
{
classes
.
description
}
variant
=
"
h
4
"
variant
=
"
h
6
"
gutterBottom
gutterBottom
>
>
{
props
.
description
}
{
props
.
description
}
...
@@ -86,7 +85,6 @@ function FormFieldText(props) {
...
@@ -86,7 +85,6 @@ function FormFieldText(props) {
><
/Grid
>
><
/Grid
>
<
/Grid
>
<
/Grid
>
<
/Paper
>
<
/Paper
>
<
/Grid
>
);
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/AnswerForm.js
+
20
−
4
View file @
9485f3df
...
@@ -164,6 +164,10 @@ function AnwserForm() {
...
@@ -164,6 +164,10 @@ function AnwserForm() {
.
post
(
`/answer/
${
id
}
`
,
backendTranslation
())
.
post
(
`/answer/
${
id
}
`
,
backendTranslation
())
.
then
(
function
(
res
)
{
.
then
(
function
(
res
)
{
alert
(
"
Formulário respondido!
"
);
alert
(
"
Formulário respondido!
"
);
})
.
catch
(
error
=>
{
alert
(
"
Ocorreu um erro ao responder seu formulário.
"
);
return
;
});
});
}
}
...
@@ -200,9 +204,21 @@ function AnwserForm() {
...
@@ -200,9 +204,21 @@ function AnwserForm() {
* @param id - Form id got from the broswer's URL
* @param id - Form id got from the broswer's URL
*/
*/
async
function
getForm
(
id
)
{
async
function
getForm
(
id
)
{
const
res
=
await
api
.
get
(
`/form/
${
id
}
`
).
then
(
function
(
res
)
{
const
res
=
await
api
.
get
(
`/form/
${
id
}
`
)
.
then
(
function
(
res
)
{
setFormData
(
res
.
data
);
setFormData
(
res
.
data
);
mapInputs
(
res
.
data
);
mapInputs
(
res
.
data
);
})
.
catch
(
error
=>
{
if
(
error
.
response
.
status
===
401
)
{
alert
(
"
Você não está logado.
"
);
return
;
}
if
(
error
.
response
.
status
===
500
)
{
alert
(
"
Ocorreu um erro: formulário não encontrado.
"
);
return
;
}
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment