Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Pixel Humain
survey
Commits
1865e6b6
Commit
1865e6b6
authored
Jun 23, 2020
by
Raph El
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace : Yii::app()->session["costum"] to $this->costum
parent
cb85be5c
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
87 additions
and
81 deletions
+87
-81
data/alldeal.json
data/alldeal.json
+7
-1
views/tpls/acceptAndAdmin.php
views/tpls/acceptAndAdmin.php
+2
-2
views/tpls/forms/costum/community/emailist.php
views/tpls/forms/costum/community/emailist.php
+3
-3
views/tpls/forms/costum/community/wizard.php
views/tpls/forms/costum/community/wizard.php
+5
-5
views/tpls/forms/costum/deal/stepOperateur.php
views/tpls/forms/costum/deal/stepOperateur.php
+4
-4
views/tpls/forms/cplx/list.php
views/tpls/forms/cplx/list.php
+7
-7
views/tpls/forms/cplx/multiList.php
views/tpls/forms/cplx/multiList.php
+15
-15
views/tpls/forms/cplx/stepValidation.php
views/tpls/forms/cplx/stepValidation.php
+5
-5
views/tpls/forms/cplx/subList.php
views/tpls/forms/cplx/subList.php
+3
-3
views/tpls/forms/cplx/validationFromOffres.php
views/tpls/forms/cplx/validationFromOffres.php
+17
-17
views/tpls/forms/docs/README.md
views/tpls/forms/docs/README.md
+2
-2
views/tpls/forms/docs/openForm.org
views/tpls/forms/docs/openForm.org
+1
-1
views/tpls/forms/sommom/reglementationesp.php
views/tpls/forms/sommom/reglementationesp.php
+7
-7
views/tpls/forms/sommom/wizard.php
views/tpls/forms/sommom/wizard.php
+9
-9
No files found.
data/alldeal.json
View file @
1865e6b6
//parent
form
{
"parent"
:
Ne
pas
oublié
de
rattacher
le
parent
,
"parent"
:
{
"5e3bb97569086421758b465a"
:
{
"type"
:
"projects"
,
"name"
:
"DEAL"
}
},
"hasStepValidations"
:
1
,
"id"
:
"dealForm"
,
"source"
:
{
...
...
views/tpls/acceptAndAdmin.php
View file @
1865e6b6
...
...
@@ -11,8 +11,8 @@
costum
.
col
=
"
<?php
echo
Yii
::
app
()
->
session
[
"costum"
][
"contextType"
]
?>
"
;
costum
.
ctrl
=
"
<?php
echo
Element
::
getControlerByCollection
(
Yii
::
app
()
->
session
[
"costum"
][
"contextType"
])
?>
"
;
var
configDynForm
=
<?php
echo
json_encode
(
Yii
::
app
()
->
session
[
'
costum
'
]
[
'dynForm'
]);
?>
;
var
tplsList
=
<?php
echo
json_encode
((
isset
(
Yii
::
app
()
->
session
[
'
costum
'
]
[
'tpls'
]))
?
Yii
::
app
()
->
session
[
'
costum
'
]
[
'tpls'
]
:
null
);
?>
;
var
configDynForm
=
<?php
echo
json_encode
(
$this
->
costum
[
'dynForm'
]);
?>
;
var
tplsList
=
<?php
echo
json_encode
((
isset
(
$this
->
costum
[
'tpls'
]))
?
$this
->
costum
[
'tpls'
]
:
null
);
?>
;
//contains all dynform definitions for complexe inputs
//it also carries sub dynforms, when an input needs extra parameters to
...
...
views/tpls/forms/costum/community/emailist.php
View file @
1865e6b6
...
...
@@ -14,14 +14,14 @@
$editBtnL
=
(
Yii
::
app
()
->
session
[
"userId"
]
==
$answer
[
"user"
])
?
" <a href='javascript:;' data-id='"
.
$answer
[
"_id"
]
.
"' data-collection='"
.
Form
::
ANSWER_COLLECTION
.
"' data-path='"
.
$answerPath
.
"' class='add"
.
$kunik
.
" btn btn-default'><i class='fa fa-plus'></i> Ajouter une ligne </a>"
:
""
;
$editParamsBtn
=
(
$canEdit
)
?
" <a href='javascript:;' data-id='"
.
$el
[
"_id"
]
.
"' data-collection='"
.
Yii
::
app
()
->
session
[
"
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
)
?
" <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
=
[
"mail_type"
=>
""
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"mail_type"
])
)
$paramsData
[
"mail_type"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"mail_type"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"mail_type"
])
)
$paramsData
[
"mail_type"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"mail_type"
];
$properties
=
[
...
...
views/tpls/forms/costum/community/wizard.php
View file @
1865e6b6
...
...
@@ -12,10 +12,10 @@ $paramsData = [ "title" => "",
"tags"
=>
"structags"
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"tpls"
][
$keyTpl
])
)
{
if
(
isset
(
$this
->
costum
[
"tpls"
][
$keyTpl
])
)
{
foreach
(
$paramsData
as
$i
=>
$v
)
{
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"tpls"
][
$keyTpl
][
$i
])
)
$paramsData
[
$i
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"tpls"
][
$keyTpl
][
$i
];
if
(
isset
(
$this
->
costum
[
"tpls"
][
$keyTpl
][
$i
])
)
$paramsData
[
$i
]
=
$this
->
costum
[
"tpls"
][
$keyTpl
][
$i
];
}
}
...
...
@@ -59,8 +59,8 @@ var formInputsHere = formInputs;
{
echo
'<h1 class="text-center" style="color:'
.
$color1
.
'" >'
.
@
$form
[
"name"
]
.
'</h1>'
;
echo
"<div class='text-center'>"
;
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"cms"
][
$form
[
"id"
]
.
"desc"
]))
echo
htmlentities
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"cms"
][
$form
[
"id"
]
.
"desc"
]);
if
(
isset
(
$this
->
costum
[
"cms"
][
$form
[
"id"
]
.
"desc"
]))
echo
htmlentities
(
$this
->
costum
[
"cms"
][
$form
[
"id"
]
.
"desc"
]);
else
echo
"<span style='color:#aaa'>* section description</span>"
;
if
(
$canEdit
)
...
...
views/tpls/forms/costum/deal/stepOperateur.php
View file @
1865e6b6
...
...
@@ -7,15 +7,15 @@ if( $mode != "pdf" ){
$isFinanceur
=
false
;
if
(
Authorisation
::
isInterfaceAdmin
())
$isFinanceur
=
true
;
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
$this
->
costum
[
"slug"
]][
"financorOf"
])){
if
(
isset
(
$this
->
costum
[
$this
->
costum
[
"slug"
]][
"financorOf"
])){
$isFinanceur
=
true
;
$financorOf
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
$this
->
costum
[
"slug"
]][
"financorOf"
];
$financorOf
=
$this
->
costum
[
$this
->
costum
[
"slug"
]][
"financorOf"
];
$financorOf
[
"thumbImg"
]
=
(
isset
(
$financorOf
[
"profilThumbImageUrl"
]))
?
Yii
::
app
()
->
createUrl
(
$financorOf
[
"profilThumbImageUrl"
])
:
Yii
::
app
()
->
getModule
(
Yii
::
app
()
->
params
[
"module"
][
"parent"
]
)
->
getAssetsUrl
()
.
"/images/thumb/default_organizations.jpg"
;
}
$isOperator
=
false
;
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
$this
->
costum
[
"slug"
]][
"operatorOf"
])){
if
(
isset
(
$this
->
costum
[
$this
->
costum
[
"slug"
]][
"operatorOf"
])){
$isOperator
=
true
;
$operatorOf
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
$this
->
costum
[
"slug"
]][
"operatorOf"
];
$operatorOf
=
$this
->
costum
[
$this
->
costum
[
"slug"
]][
"operatorOf"
];
$operatorOf
[
"thumbImg"
]
=
(
isset
(
$operatorOf
[
"profilThumbImageUrl"
]))
?
Yii
::
app
()
->
createUrl
(
$operatorOf
[
"profilThumbImageUrl"
])
:
Yii
::
app
()
->
getModule
(
Yii
::
app
()
->
params
[
"module"
][
"parent"
]
)
->
getAssetsUrl
()
.
"/images/thumb/default_organizations.jpg"
;
}
...
...
views/tpls/forms/cplx/list.php
View file @
1865e6b6
...
...
@@ -11,7 +11,7 @@
}
}
}
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
'num_row'
])
and
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
'num_row'
]
==
"0"
and
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
and
((
int
)
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
<=
$i
){
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
'num_row'
])
and
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
'num_row'
]
==
"0"
and
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
and
((
int
)
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
<=
$i
){
$show
=
false
;
}
$editBtnL
=
""
;
...
...
@@ -19,16 +19,16 @@
$editBtnL
=
(
Yii
::
app
()
->
session
[
"userId"
]
==
$answer
[
"user"
])
?
" <a href='javascript:;' data-id='"
.
$answer
[
"_id"
]
.
"' data-collection='"
.
Form
::
ANSWER_COLLECTION
.
"' data-path='"
.
$answerPath
.
"' class='add"
.
$kunik
.
" btn btn-default'><i class='fa fa-plus'></i> Ajouter une ligne </a>"
:
""
;
}
$editParamsBtn
=
(
$canEdit
)
?
" <a href='javascript:;' data-id='"
.
$el
[
"_id"
]
.
"' data-collection='"
.
Yii
::
app
()
->
session
[
"
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
)
?
" <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
=
[
"nbmax"
=>
"2"
,
"num_row"
=>
[
"limité"
,
"illimité"
]
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
)
$paramsData
[
"nbmax"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"nbmax"
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"limited"
])
)
$paramsData
[
"num_row"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"num_row"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
)
$paramsData
[
"nbmax"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"nbmax"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"limited"
])
)
$paramsData
[
"num_row"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"num_row"
];
$properties
=
[
...
...
@@ -125,7 +125,7 @@
inputType
:
"
select
"
,
label
:
"
Limitation
"
,
options
:
sectionDyf
.
<?php
echo
$kunik
?>
ParamsData
.
num_row
,
value
:
"
<?php
echo
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
'num_row'
]))
?
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
'num_row'
]
:
''
;
?>
"
value
:
"
<?php
echo
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
'num_row'
]))
?
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
'num_row'
]
:
''
;
?>
"
},
nbmax
:
{
...
...
views/tpls/forms/cplx/multiList.php
View file @
1865e6b6
...
...
@@ -21,30 +21,30 @@
$cnt
++
;
}
}
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
'num_row'
])
and
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
'num_row'
]
==
"0"
and
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
and
((
int
)
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
<=
$i
){
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
'num_row'
])
and
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
'num_row'
]
==
"0"
and
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
and
((
int
)
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
<=
$i
){
$show
=
false
;
}
$editBtnL
=
""
;
$editParamsBtn
=
(
$canEdit
)
?
" <a href='javascript:;' data-id='"
.
$el
[
"_id"
]
.
"' data-collection='"
.
Yii
::
app
()
->
session
[
"
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
)
?
" <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
=
[
"nbmax"
=>
"2"
,
"num_row"
=>
[
"limité"
,
"illimité"
],
"nblist_max"
=>
"2"
,
"num_list"
=>
[
"limité"
,
"illimité"
],
"width"
=>
[
"1"
=>
"1"
,
"2"
=>
"2"
,
"2"
=>
"2"
,
"3"
=>
"3"
]
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
)
$paramsData
[
"nbmax"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"nbmax"
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"limited"
])
)
$paramsData
[
"num_row"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"num_row"
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"nblist_max"
])
)
$paramsData
[
"nblist_max"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"nblist_max"
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"num_list"
])
)
$paramsData
[
"num_list"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"num_list"
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"width"
])
)
$paramsData
[
"width"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"width"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"nbmax"
])
)
$paramsData
[
"nbmax"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"nbmax"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"limited"
])
)
$paramsData
[
"num_row"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"num_row"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"nblist_max"
])
)
$paramsData
[
"nblist_max"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"nblist_max"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"num_list"
])
)
$paramsData
[
"num_list"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"num_list"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"width"
])
)
$paramsData
[
"width"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"width"
];
$cssRow
=
"6"
;
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"width"
])
){
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"width"
])
){
if
(
$paramsData
[
"width"
]
==
"1"
){
$cssRow
=
"12"
;
}
elseif
(
$paramsData
[
"width"
]
==
"2"
){
...
...
@@ -202,7 +202,7 @@
inputType
:
"
select
"
,
label
:
"
Limitation
"
,
options
:
sectionDyf
.
<?php
echo
$kunik
?>
ParamsData
.
num_row
,
value
:
"
<?php
echo
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
'num_row'
]))
?
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
'num_row'
]
:
''
;
?>
"
value
:
"
<?php
echo
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
'num_row'
]))
?
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
'num_row'
]
:
''
;
?>
"
},
nbmax
:
{
...
...
@@ -214,7 +214,7 @@
inputType
:
"
text
"
,
label
:
"
Nombre d'element par ligne
"
,
options
:
sectionDyf
.
<?php
echo
$kunik
?>
ParamsData
.
width
,
value
:
"
<?php
echo
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
'width'
]))
?
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
'width'
]
:
''
;
?>
"
value
:
"
<?php
echo
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
'width'
]))
?
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
'width'
]
:
''
;
?>
"
}
},
save
:
function
()
{
...
...
views/tpls/forms/cplx/stepValidation.php
View file @
1865e6b6
...
...
@@ -93,18 +93,18 @@ if( $mode != "pdf" ){
<tr>
<td
colspan=
'2'
class=
"text-center"
>
<?php
// var_dump(
Yii::app()->session["
costum
"]
[$el['costum']['slug']]["hasRoles"][0]);
// var_dump(
$this->
costum[$el['costum']['slug']]["hasRoles"][0]);
// var_dump($paramsData['canValidRoles']);
if
(
(
!
isset
(
$answer
[
"validation"
][
$form
[
'id'
]])
||
(
isset
(
$answer
[
"validation"
][
$form
[
'id'
]
][
"valid"
]
)
&&
$answer
[
"validation"
][
$form
[
'id'
]
][
"valid"
]
==
"notValid"
))
&&
//isset( $answ) &&
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
$el
[
'costum'
][
'slug'
]][
"hasRoles"
][
0
])
&&
in_array
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
$el
[
'costum'
][
'slug'
]][
"hasRoles"
][
0
],
$paramsData
[
'canRequestRoles'
])
)
isset
(
$this
->
costum
[
$el
[
'costum'
][
'slug'
]][
"hasRoles"
][
0
])
&&
in_array
(
$this
->
costum
[
$el
[
'costum'
][
'slug'
]][
"hasRoles"
][
0
],
$paramsData
[
'canRequestRoles'
])
)
echo
'<a href="javascript:;" data-type="'
.
$form
[
'id'
]
.
'" class="requestValid btn btn-primary">Étape terminé , Demander la Validation</a>'
;
else
if
(
isset
(
$answer
[
"validation"
][
$form
[
'id'
]
][
"valid"
]
)
&&
$answer
[
"validation"
][
$form
[
'id'
]
][
"valid"
]
==
"request"
&&
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
$el
[
'costum'
][
'slug'
]][
"hasRoles"
][
0
]
)
&&
in_array
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
$el
[
'costum'
][
'slug'
]][
"hasRoles"
][
0
],
$paramsData
[
'canValidRoles'
])
)
isset
(
$this
->
costum
[
$el
[
'costum'
][
'slug'
]][
"hasRoles"
][
0
]
)
&&
in_array
(
$this
->
costum
[
$el
[
'costum'
][
'slug'
]][
"hasRoles"
][
0
],
$paramsData
[
'canValidRoles'
])
)
echo
'<a href="javascript:;" data-type="'
.
$form
[
'id'
]
.
'" class="validEdit btn btn-primary">Valider cette Étape</a>'
;
else
{
if
(
isset
(
$answer
[
"validation"
][
$form
[
'id'
]
]
)
&&
...
...
views/tpls/forms/cplx/subList.php
View file @
1865e6b6
...
...
@@ -6,7 +6,7 @@
<?php
$editBtnL
=
(
Yii
::
app
()
->
session
[
"userId"
]
==
$answer
[
"user"
])
?
" <a href='javascript:;' data-id='"
.
$answer
[
"_id"
]
.
"' data-collection='"
.
Form
::
ANSWER_COLLECTION
.
"' data-path='"
.
$answerPath
.
"' class='add"
.
$kunik
.
" btn btn-default'><i class='fa fa-plus'></i> Ajouter une ligne </a>"
:
""
;
$editParamsBtn
=
(
$canEdit
)
?
" <a href='javascript:;' data-id='"
.
$el
[
"_id"
]
.
"' data-collection='"
.
Yii
::
app
()
->
session
[
"
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
)
?
" <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
=
[
"role"
=>
[
...
...
@@ -14,8 +14,8 @@ $paramsData = [
"graphiste"
]
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"role"
])
)
$paramsData
[
"role"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"role"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"role"
])
)
$paramsData
[
"role"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"role"
];
$properties
=
[
"titre_sous_action"
=>
[
...
...
views/tpls/forms/cplx/validationFromOffres.php
View file @
1865e6b6
<?php
if
(
$answer
){
$copy
=
"opalProcess1.depense"
;
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"offresCopy"
])
)
$copy
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"offresCopy"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"offresCopy"
])
)
$copy
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"offresCopy"
];
//var_dump($copy);
$copyT
=
explode
(
"."
,
$copy
);
$copyF
=
$copyT
[
0
];
...
...
@@ -25,7 +25,7 @@
$editBtnL
=
""
;
$editParamsBtn
=
(
$canEdit
)
?
" <a href='javascript:;' data-id='"
.
$el
[
"_id"
]
.
"' data-collection='"
.
Yii
::
app
()
->
session
[
"
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
)
?
" <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
=
[
...
...
@@ -39,22 +39,22 @@ $paramsData = [
]
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
])
)
{
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$offresKey
][
"group"
])
)
$paramsData
[
"group"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$offresKey
][
"group"
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$offresKey
][
"nature"
])
)
$paramsData
[
"nature"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$offresKey
][
"nature"
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$offresKey
][
"amounts"
])
)
$paramsData
[
"amounts"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"amounts"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
])
)
{
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$offresKey
][
"group"
])
)
$paramsData
[
"group"
]
=
$this
->
costum
[
"form"
][
"params"
][
$offresKey
][
"group"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$offresKey
][
"nature"
])
)
$paramsData
[
"nature"
]
=
$this
->
costum
[
"form"
][
"params"
][
$offresKey
][
"nature"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$offresKey
][
"amounts"
])
)
$paramsData
[
"amounts"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"amounts"
];
}
$communityLinks
=
Element
::
getCommunityByTypeAndId
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"contextType"
],
Yii
::
app
()
->
session
[
"
costum
"
]
[
"contextId"
]);
$communityLinks
=
Element
::
getCommunityByTypeAndId
(
$this
->
costum
[
"contextType"
],
$this
->
costum
[
"contextId"
]);
$organizations
=
Link
::
groupFindByType
(
Organization
::
COLLECTION
,
$communityLinks
,[
"name"
,
"links"
]
);
$orgs
=
[];
foreach
(
$organizations
as
$id
=>
$or
)
{
$roles
=
$or
[
"links"
][
"memberOf"
][
Yii
::
app
()
->
session
[
"
costum
"
]
[
"contextId"
]][
"roles"
];
$roles
=
$or
[
"links"
][
"memberOf"
][
$this
->
costum
[
"contextId"
]][
"roles"
];
if
(
$paramsData
[
"limitRoles"
]
&&
!
empty
(
$roles
))
{
foreach
(
$roles
as
$i
=>
$r
)
{
...
...
@@ -98,7 +98,7 @@ $properties["votes"] = [
<tr>
<td
colspan=
'
<?php
echo
count
(
$properties
)
+
2
?>
'
><h4
style=
"color:
<?php
echo
(
$titleColor
)
?
$titleColor
:
"black"
;
?>
"
>
<?php
echo
$label
.
$editQuestionBtn
.
$editParamsBtn
.
$editBtnL
?>
</h4>
<?php
echo
$info
;
if
(
!
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"offresCopy"
])
)
if
(
!
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"offresCopy"
])
)
echo
"<br/><span class='text-red text-center'><i class='fa fa-warning fa-2x'></i> THIS FIELD HAS TO BE CONFIGURED FIRST "
.
$editParamsBtn
.
"</span>"
;
?>
</td>
</tr>
...
...
@@ -274,13 +274,13 @@ echo "<h4 style='color:".(($titleColor) ? $titleColor : "black")."'>Décision Gl
<?php
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
"financement"
][
"tpl"
])){
//if(
Yii::app()->session["
costum
"]
["form"]["params"]["financement"]["tpl"] == "tpls.forms.equioffres" )
$this
->
renderPartial
(
"costum.views."
.
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
"financement"
][
"tpl"
]
,
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
"financement"
][
"tpl"
])){
//if(
$this->
costum["form"]["params"]["financement"]["tpl"] == "tpls.forms.equioffres" )
$this
->
renderPartial
(
"costum.views."
.
$this
->
costum
[
"form"
][
"params"
][
"financement"
][
"tpl"
]
,
[
"totalFin"
=>
$total
,
"totalBudg"
=>
Yii
::
app
()
->
session
[
"totaloffres"
][
"totaloffres"
]
]
);
// else
// $this->renderPartial( "costum.views.".
Yii::app()->session["
costum
"]
["form"]["params"]["financement"]["tpl"]);
// $this->renderPartial( "costum.views.".
$this->
costum["form"]["params"]["financement"]["tpl"]);
}
?>
...
...
views/tpls/forms/docs/README.md
View file @
1865e6b6
...
...
@@ -7,8 +7,8 @@ uses a classic costum engine with a json associated
editable blocks in the
*costumTpl*
are made editable like this
```
<?php
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"cms"
][
"title1"
])){
echo
htmlentities
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"cms"
][
"title1"
]);
if
(
isset
(
$this
->
costum
[
"cms"
][
"title1"
])){
echo
htmlentities
(
$this
->
costum
[
"cms"
][
"title1"
]);
}
else
{
?>
Open Form
<?php
}
if
(
$canEdit
)
echo
"<a class='btn btn-xs btn-danger editBtn' href='javascript:;' data-key='title1' data-path='costum.cms.title1'><i class='fa fa-pencil'></i></a>"
;
...
...
views/tpls/forms/docs/openForm.org
View file @
1865e6b6
...
...
@@ -43,7 +43,7 @@ isMultiForms
initValues : contains any dyfinputs initial data
answerObj : contains answer data for the current form
** to edit costum page pieces
var configDynForm = <?php echo json_encode(
Yii::app()->session['
costum
']
['dynForm']); ?>;
var configDynForm = <?php echo json_encode(
$this->
costum['dynForm']); ?>;
** information and structure of the form in this page
var formInputs = <?php echo json_encode($form['inputs']); ?>;
...
...
views/tpls/forms/sommom/reglementationesp.php
View file @
1865e6b6
...
...
@@ -6,7 +6,7 @@
<?php
$editBtnL
=
(
$canAnswer
)
?
" <a href='javascript:;' data-id='"
.
$answer
[
"_id"
]
.
"' data-collection='"
.
Form
::
ANSWER_COLLECTION
.
"' data-path='"
.
$answerPath
.
"' class='add"
.
$kunik
.
" btn btn-default'><i class='fa fa-plus'></i> Ajouter une ligne </a> <a href='javascript:;' data-id='"
.
Yii
::
app
()
->
request
->
getQuery
(
"answer"
)
.
"' data-collection='answers' data-path='answers.sommomForm1.sommomForm122.' class='addorganismesommomForm122 btn btn-default'><i class='fa fa-plus'></i> Ajouter un organisme </a>"
:
""
;
$editParamsBtn
=
(
$canEdit
)
?
" <a href='javascript:;' data-id='"
.
$el
[
"_id"
]
.
"' data-collection='"
.
Yii
::
app
()
->
session
[
"
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
)
?
" <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
=
[
"type"
=>
[
...
...
@@ -52,8 +52,8 @@
}
}
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"ocean"
])
)
$paramsData
[
"ocean"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"ocean"
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"ocean"
])
)
$paramsData
[
"ocean"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"ocean"
];
$l
=
PHDB
::
findOne
(
Lists
::
COLLECTION
,
array
(
'name'
=>
'cetaces'
));
$i
=
1
;
...
...
@@ -121,14 +121,14 @@
foreach
(
$properties
as
$k
=>
$v
)
{
if
(
isset
(
$v
[
"label"
])){
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"labels"
][
$k
])
)
$properties
[
$k
][
"label"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"labels"
][
$k
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"labels"
][
$k
])
)
$properties
[
$k
][
"label"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"labels"
][
$k
];
$propertiesParams
[
"labels"
][
$k
]
=
$properties
[
$k
][
"label"
];
}
if
(
isset
(
$v
[
"placeholder"
])){
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"placeholders"
][
$k
])
)
$properties
[
$k
][
"placeholder"
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"params"
][
$kunik
][
"placeholders"
][
$k
];
if
(
isset
(
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"placeholders"
][
$k
])
)
$properties
[
$k
][
"placeholder"
]
=
$this
->
costum
[
"form"
][
"params"
][
$kunik
][
"placeholders"
][
$k
];
$propertiesParams
[
"placeholders"
][
$k
]
=
$properties
[
$k
][
"placeholder"
];
}
}
...
...
views/tpls/forms/sommom/wizard.php
View file @
1865e6b6
...
...
@@ -12,10 +12,10 @@ $paramsData = [ "title" => "",
"tags"
=>
"structags"
];
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"tpls"
][
$keyTpl
])
)
{
if
(
isset
(
$this
->
costum
[
"tpls"
][
$keyTpl
])
)
{
foreach
(
$paramsData
as
$i
=>
$v
)
{
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"tpls"
][
$keyTpl
][
$i
])
)
$paramsData
[
$i
]
=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"tpls"
][
$keyTpl
][
$i
];
if
(
isset
(
$this
->
costum
[
"tpls"
][
$keyTpl
][
$i
])
)
$paramsData
[
$i
]
=
$this
->
costum
[
"tpls"
][
$keyTpl
][
$i
];
}
}
...
...
@@ -56,15 +56,15 @@ if( isset(Yii::app()->session["costum"]["tpls"][$keyTpl]) ) {
$d
=
''
;
$lbl
=
"?"
;
// if(isset(
Yii::app()->session["
costum
"]
["form"]["hasStepValidations"]) )
// if(isset(
$this->
costum["form"]["hasStepValidations"]) )
// $lbl = "";
if
(
(
!
isset
(
$answer
[
"step"
])
&&
!
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"hasStepValidations"
]))
||
if
(
(
!
isset
(
$answer
[
"step"
])
&&
!
isset
(
$this
->
costum
[
"form"
][
"hasStepValidations"
]))
||
$k
==
0
||
(
isset
(
$answer
[
"step"
])
&&
$answer
[
"step"
]
==
"all"
)
||
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"hasStepValidations"
])
&&
isset
(
$answer
[
"step"
])
&&
$k
<=
array_search
(
$answer
[
"step"
],
$formList
)
)
||
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"hasStepValidations"
])
&&
!
isset
(
$answer
[
"step"
])
&&
$k
<=
Yii
::
app
()
->
session
[
"
costum
"
]
[
"form"
][
"hasStepValidations"
]
)
)
(
isset
(
$this
->
costum
[
"form"
][
"hasStepValidations"
])
&&
isset
(
$answer
[
"step"
])
&&
$k
<=
array_search
(
$answer
[
"step"
],
$formList
)
)
||
(
isset
(
$this
->
costum
[
"form"
][
"hasStepValidations"
])
&&
!
isset
(
$answer
[
"step"
])
&&
$k
<=
$this
->
costum
[
"form"
][
"hasStepValidations"
]
)
)
{
$d
=
'class="done"'
;
$lbl
=
$k
;
...
...
@@ -101,8 +101,8 @@ var formInputsHere = formInputs;
{
echo
'<h1 class="text-center" style="color:'
.
$color1
.
'" >'
.
@
$form
[
"name"
]
.
'</h1>'
;
echo
"<div class='text-center'>"
;
if
(
isset
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"cms"
][
$form
[
"id"
]
.
"desc"
]))
echo
htmlentities
(
Yii
::
app
()
->
session
[
"
costum
"
]
[
"cms"
][
$form
[
"id"
]
.
"desc"
]);
if
(
isset
(
$this
->
costum
[
"cms"
][
$form
[
"id"
]
.
"desc"
]))
echo
htmlentities
(
$this
->
costum
[
"cms"
][
$form
[
"id"
]
.
"desc"
]);
else
echo
"<span style='color:#aaa'>* section description</span>"
;
if
(
$canEdit
)
...
...
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