Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Pixel Humain
survey
Commits
e6d17bcc
Commit
e6d17bcc
authored
Mar 20, 2020
by
Raph El
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TEST pdf + correction PDF + hotfix mode FA
parent
d1c0e3fb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
8 deletions
+12
-8
controllers/answer/IndexAction.php
controllers/answer/IndexAction.php
+1
-1
models/Form.php
models/Form.php
+5
-2
views/tpls/forms/cplx/budget.php
views/tpls/forms/cplx/budget.php
+1
-1
views/tpls/forms/cplx/financementFromBudget.php
views/tpls/forms/cplx/financementFromBudget.php
+2
-2
views/tpls/forms/cplx/suiviFromBudget.php
views/tpls/forms/cplx/suiviFromBudget.php
+2
-2
views/tpls/forms/formbuilder.php
views/tpls/forms/formbuilder.php
+1
-0
No files found.
controllers/answer/IndexAction.php
View file @
e6d17bcc
...
...
@@ -28,7 +28,7 @@ class IndexAction extends CAction
//Rest::json($params); exit;
$params
=
Form
::
getDataForAnswer
(
$params
);
//
var_dump(Yii::app()->session["budgetInputList"]
); exit;
//
Rest::json($params
); exit;
$params
[
"answer"
]
=
$answer
;
// TODO améliorer getdataForAnser pour soit viré la création de lanswers soit charger la bonne answer
...
...
models/Form.php
View file @
e6d17bcc
...
...
@@ -698,8 +698,11 @@ class Form {
//var_dump(Yii::app()->session['costum']);exit;
//WARNING
$costum
=
CacheHelper
::
getCostum
();
if
(
isset
(
$costum
[
"contextType"
])
&&
isset
(
$costum
[
"contextId"
]))
$params
[
"el"
]
=
Element
::
getByTypeAndId
(
$costum
[
"contextType"
],
$costum
[
"contextId"
]
);
if
(
isset
(
$costum
[
"contextType"
])
&&
isset
(
$costum
[
"contextId"
])){
$params
[
"el"
]
=
Element
::
getByTypeAndId
(
$costum
[
"contextType"
],
$costum
[
"contextId"
]
);
$params
[
"el"
][
"id"
]
=
$costum
[
"contextId"
];
}
if
(
isset
(
$costum
[
"hasOpenForm"
])){
...
...
views/tpls/forms/cplx/budget.php
View file @
e6d17bcc
...
...
@@ -200,7 +200,7 @@ $(document).ready(function() {
else
{
dataHelper
.
path2Value
(
tplCtx
,
function
(
params
)
{
$
(
"
#ajax-modal
"
).
html
(
"
<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>
"
);
urlCtrl
.
loadByHash
(
location
.
hash
);
//
urlCtrl.loadByHash(location.hash);
}
);
}
...
...
views/tpls/forms/cplx/financementFromBudget.php
View file @
e6d17bcc
...
...
@@ -19,7 +19,7 @@ if($wizard){
}
else
if
(
isset
(
$answer
[
"answers"
][
$copyF
][
$budgetKey
])
&&
count
(
$answer
[
"answers"
][
$copyF
][
$budgetKey
])
>
0
)
$answers
=
$answer
[
"answers"
][
$copyF
][
$kunik
];
}
else
{
if
(
$budgetKey
)
if
(
!
empty
(
$budgetKey
)
&&
!
empty
(
$answer
[
"answers"
][
$budgetKey
])
)
$answers
=
$answer
[
"answers"
][
$budgetKey
];
else
if
(
isset
(
$answer
[
"answers"
][
$kunik
]))
$answers
=
$answer
[
"answers"
][
$kunik
];
...
...
@@ -27,7 +27,7 @@ if($wizard){
$editBtnL
=
""
;
$editParamsBtn
=
(
$canEdit
)
?
" <a href='javascript:;' data-id='"
.
$el
[
"_id"
]
.
"' data-collection='"
.
$this
->
costum
[
"contextType"
]
.
"' data-path='costum.form.params."
.
$kunik
.
"' class='previewTpl edit"
.
$kunik
.
"Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>"
:
""
;
$editParamsBtn
=
(
$canEdit
Form
)
?
" <a href='javascript:;' data-id='"
.
$el
[
"_id"
]
.
"' data-collection='"
.
$this
->
costum
[
"contextType"
]
.
"' data-path='costum.form.params."
.
$kunik
.
"' class='previewTpl edit"
.
$kunik
.
"Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>"
:
""
;
...
...
views/tpls/forms/cplx/suiviFromBudget.php
View file @
e6d17bcc
...
...
@@ -41,7 +41,7 @@ if($answer){
}
else
if
(
isset
(
$answer
[
"answers"
][
$copyF
][
$budgetKey
])
&&
count
(
$answer
[
"answers"
][
$copyF
][
$budgetKey
])
>
0
)
$answers
=
$answer
[
"answers"
][
$copyF
][
$kunik
];
}
else
{
if
(
$budgetKey
)
if
(
!
empty
(
$budgetKey
)
&&
!
empty
(
$answer
[
"answers"
][
$budgetKey
]))
$answers
=
$answer
[
"answers"
][
$budgetKey
];
else
if
(
isset
(
$answer
[
"answers"
][
$kunik
]))
$answers
=
$answer
[
"answers"
][
$kunik
];
...
...
@@ -49,7 +49,7 @@ if($answer){
$editBtnL
=
""
;
$editParamsBtn
=
(
$canEdit
)
?
" <a href='javascript:;' data-id='"
.
$el
[
"_id"
]
.
"' data-collection='"
.
$this
->
costum
[
"contextType"
]
.
"' data-path='costum.form.params."
.
$kunik
.
"' class='previewTpl edit"
.
$kunik
.
"Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>"
:
""
;
$editParamsBtn
=
(
$canEdit
Form
)
?
" <a href='javascript:;' data-id='"
.
$el
[
"_id"
]
.
"' data-collection='"
.
$this
->
costum
[
"contextType"
]
.
"' data-path='costum.form.params."
.
$kunik
.
"' class='previewTpl edit"
.
$kunik
.
"Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>"
:
""
;
$paramsData
=
[
...
...
views/tpls/forms/formbuilder.php
View file @
e6d17bcc
...
...
@@ -106,6 +106,7 @@ if( isset( $form["inputs"] ) ){ ?>
"kunik"
=>
$kunik
,
"mode"
=>
$mode
,
"canEdit"
=>
$canEdit
,
"canEditForm"
=>
@
$canEditForm
,
"editQuestionBtn"
=>
@
$editQuestionBtn
,
"saveOneByOne"
=>
$saveOneByOne
,
"wizard"
=>
(
isset
(
$wizard
)
&&
$wizard
==
true
)
,
...
...
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