Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
0e997568
Commit
0e997568
authored
Mar 01, 2024
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dont display presta self eval form if not submitted, in public page
parent
d30ccaea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
PrestatairesController.php
src/Controller/PrestatairesController.php
+7
-4
show.html.twig
templates/themes/kohinos/presta/show.html.twig
+1
-1
No files found.
src/Controller/PrestatairesController.php
View file @
0e997568
...
...
@@ -48,11 +48,14 @@ class PrestatairesController extends FrontController
// If feature activated, display self evaluation form
if
(
$this
->
getParameter
(
'presta_self_init_and_eval'
)
==
true
)
{
$quiz
=
$prestataire
->
getSelfEvalPrestaQuiz
();
$formClass
=
Prestataire
::
DISTRIBUTOR
===
$prestataire
->
getMarketChannelFunction
()
?
DistributorSelfEvalPrestaQuizType
::
class
:
ProducerSelfEvalPrestaQuizType
::
class
;
$form
=
$this
->
createForm
(
$formClass
,
$quiz
,
[
"mode"
=>
SelfEvalPrestaQuizType
::
READONLY
]);
$templateData
[
'form'
]
=
$form
->
createView
();
if
(
$quiz
->
isSubmitted
)
{
$formClass
=
Prestataire
::
DISTRIBUTOR
===
$prestataire
->
getMarketChannelFunction
()
?
DistributorSelfEvalPrestaQuizType
::
class
:
ProducerSelfEvalPrestaQuizType
::
class
;
$form
=
$this
->
createForm
(
$formClass
,
$quiz
,
[
"mode"
=>
SelfEvalPrestaQuizType
::
READONLY
]);
$templateData
[
'form'
]
=
$form
->
createView
();
}
}
return
$this
->
render
(
'@kohinos/presta/show.html.twig'
,
$templateData
);
...
...
templates/themes/kohinos/presta/show.html.twig
View file @
0e997568
...
...
@@ -92,7 +92,7 @@
{%
endfor
%}
</ul>
{%
endif
%}
{%
if
app.user
and
presta_self_init_and_eval
and
presta.selfEvalPrestaQuiz
%}
{%
if
app.user
and
presta_self_init_and_eval
and
presta.selfEvalPrestaQuiz
and
presta.selfEvalPrestaQuiz.isSubmitted
%}
{%
set
prestataire
=
presta
%}
<div
class=
"card-header"
><h2>
{{
'Questionnaire'
|
trans
}}
</h2></div>
<div
class=
"card-body"
>
...
...
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