Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pixel Humain
survey
Commits
733134a0
Commit
733134a0
authored
May 06, 2020
by
Anatole Rakotoson
Browse files
sommom
parent
5dde170a
Changes
3
Hide whitespace changes
Inline
Side-by-side
views/tpls/forms/sommom/especeObs.php
View file @
733134a0
...
...
@@ -66,7 +66,7 @@
"month"
=>
[
"Annuelle "
=>
"Annuelle "
,
"Janvier"
=>
"Janvier"
,
"F
é
vrier"
=>
"Février"
,
"F
e
vrier"
=>
"Février"
,
"Mars"
=>
"Mars"
,
"Avril"
=>
"Avril"
,
"Mai"
=>
"Mai"
,
...
...
@@ -76,7 +76,7 @@
"Septembre"
=>
"Septembre"
,
"Octobre"
=>
"Octobre"
,
"Novembre"
=>
"Novembre"
,
"D
é
cembre"
=>
"Décembre"
,
"D
e
cembre"
=>
"Décembre"
,
]
];
...
...
@@ -234,19 +234,21 @@
echo
implode
(
","
,
$a
[
$i
]);
}
}
else
{
else
{
if
(
$a
[
$i
]
==
"true"
){
echo
"oui"
;
}
else
if
(
$a
[
$i
]
==
"false"
){
echo
"non"
;
}
else
if
(
$i
==
"frequenceOb"
){
}
else
if
(
$i
==
"frequenceOb"
&&
isset
(
$paramsData
[
$i
][
$a
[
$i
]])){
echo
$paramsData
[
$i
][
$a
[
$i
]];
}
// else if(){
// }
else
{
echo
$a
[
$i
];
}
}
}
}
}
...
...
views/tpls/forms/sommom/organisme.php
View file @
733134a0
...
...
@@ -87,7 +87,8 @@
"label"
=>
"logo"
,
"placeholder"
=>
"logo"
,
"inputType"
=>
"uploader"
,
"rules"
=>
[
"required"
=>
false
]
"rules"
=>
[
"required"
=>
false
],
"docType"
=>
"file"
]
];
...
...
@@ -143,6 +144,7 @@
foreach
(
$answers
as
$q
=>
$a
)
{
echo
"<tr id='"
.
$kunik
.
$q
.
"' class='"
.
$kunik
.
"Line'>"
;
foreach
(
$properties
as
$i
=>
$inp
)
{
if
(
$i
==
"location"
){
}
else
{
...
...
@@ -156,6 +158,36 @@
//echo implode(",", $a["pointGPS"]);
echo
'<span class="pull-right" style= "margin-right : 5px;"><a id="showActeurLocation" href="javascript:;" onclick=""><i class="fa fa-map-o" aria-hidden="true"></i></a></span>'
;
}
else
if
(
$i
==
"file"
){
$initAnswerFiles
=
Document
::
getListDocumentsWhere
(
array
(
"id"
=>
(
string
)
$answer
[
"_id"
],
"type"
=>
'answers'
,
"subKey"
=>
$answerPath
.
$q
),
"file"
);
//echo $this->renderPartial("co2.views.pod.docsList",array("edit"=>false, "documents"=>$initAnswerFiles,"docType"=>"image") );
if
(
!
empty
(
$initAnswerFiles
)){
$answers
[
$q
][
"files"
]
=
$initAnswerFiles
;
foreach
(
$initAnswerFiles
as
$key
=>
$d
)
{
?>
<div
style=
"width: 100%;"
class=
' padding-5 margin-top-5 margin-bottom-5'
id=
'
<?php
echo
$key
?>
'
>
<img
src=
"
<?php
echo
$d
[
"docPath"
]
?>
"
class=
"img-responsive"
>
<!-- <span class="col-xs-12 elipsis">
<?php
//echo $d["name"] ?></span> -->
<?
php
if
(
$canEdit
)
{
?>
<!-- <a href='javascript:;' class='pull-right text-red btn-remove-document' data-id='
<?php
//echo $key ?>'><i class='fa fa-trash'></i> <?php //echo Yii::t("common","Delete") ?></a> -->
<?
php
}
?>
</div>
<?php
}
}
else
{
?>
<div style="width: 100%;" class='col-xs-12 col-sm-4 padding-5 shadow2 margin-top-5 margin-bottom-5' >
<img src="
<?php
echo
Yii
::
app
()
->
getModule
(
Yii
::
app
()
->
params
[
"module"
][
"parent"
]
)
->
getAssetsUrl
()
.
"/images/thumbnail-default.jpg"
;
?>
" class="img-responsive">
</div>
<?php
}
}
else
if
(
is_array
(
$a
[
$i
])){
echo
implode
(
","
,
$a
[
$i
]);
}
...
...
@@ -207,6 +239,9 @@
"icon" : "fa-globe",
"text" : "Décrire ici les principaux postes de dépenses : à quoi correspondent les coûts ? <br/>Préciser ce qui relève des dépenses de fonctionnement et des dépenses d’investissement.<br/>Les coûts doivent être en <b>hors taxe</b>.",
"properties" :
<?php
echo
json_encode
(
$properties
);
?>
,
beforeBuild : function(){
uploadObj.set("answers",answerObj._id.$id, "file", null, null, "/subKey/"+tplCtx.path);
},
save : function () {
var today = new Date();
tplCtx.value = { date : today.getDate() + '/' + (today.getMonth()+1) + '/' + today.getFullYear() };
...
...
@@ -228,8 +263,16 @@
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$
(
"
#ajax-modal
"
).
html
(
"
<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>
"
);
//$("#ajax-modal").modal('hide');
location
.
reload
();
// $("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");//$("#ajax-modal").modal('hide');
dyFObj.commonAfterSave(null, function(){
alert('yes');
// tplCtx.path = tplCtx.path + ".img";
// tplCtx.value = "answers/"+answerObj._id.$id+ ;
// dataHelper.path2Value( tplCtx, function(params) {
// // location.reload();
// } );
});
} );
}
...
...
views/tpls/forms/sommom/structureop.php
View file @
733134a0
...
...
@@ -191,7 +191,7 @@
echo
"<td>"
;
if
(
isset
(
$a
[
$i
]))
{
if
(
is_array
(
$a
[
$i
])){
echo
implode
(
","
,
$a
[
"portExp"
]);
echo
implode
(
","
,
$a
[
$i
]);
}
else
{
if
(
$a
[
$i
]
==
"true"
){
...
...
Write
Preview
Supports
Markdown
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