Commit 417aaa5c authored by thomas craipeau's avatar thomas craipeau
Browse files

Merge branch 'anatole' into 'master'

deal

See merge request !28
parents f55bee5b 7cf8ce6b
<?php
$isFinanceur=false;
$isOperator = false;
if(Authorisation::isInterfaceAdmin())
$isFinanceur=true;
if(isset($this->costum[$this->costum["slug"]]["financorOf"])){
$isFinanceur=true;
}
if ($isFinanceur) {
if(isset($this->costum["hasRoles"]) && in_array("Opérateur", $this->costum["hasRoles"])){
$isOperator=true;
}
if ($isFinanceur || $isOperator) {
if($mode != "pdf" && ( !isset($inputsObj["canAccess"]) || Form::canAccess($inputsObj["canAccess"]) ) ) {
......
......@@ -43,7 +43,7 @@ if($mode == "r" || $mode == "pdf"){ ?>
<?php if($mode != "pdf"){ ?>
<script type="text/javascript">
var users = [];
var folderId = [];
jQuery(document).ready(function() {
......@@ -52,15 +52,18 @@ if($mode == "r" || $mode == "pdf"){ ?>
if($("#<?php echo $key ?>").val() == "" ){
var folderyear = new Date().getFullYear();
users = <?php echo json_encode($allId); ?>;
folderId = <?php echo json_encode($allId); ?>;
var max = 0 ;
for (var i = 0; i <= users.length - 1; i++) {
if( users[i].length == 11 && users[i].indexOf('-') > -1 ){
users[i] = users[i].split('-');
if(parseInt(users[i][1]) > max){
max = parseInt(users[i][1]) ;
var slittedId = [];
for (var i = 0; i <= folderId.length - 1; i++) {
slittedId = [];
if( folderId[i].length == 11 && folderId[i].indexOf('-') > -1 ){
slittedId = folderId[i].split('-');
if(parseInt(slittedId[1]) > max){
max = parseInt(slittedId[1]) ;
}
}
}
......
......@@ -32,7 +32,7 @@ if($mode == "r" || $mode == "pdf"){ ?>
$inpClass = "form-control";
?>
<div class="form-group" id="<?php echo $kunik ?>">
<div class="form-group" id="<?php echo $kunik ?>" data-inputtype="address" data-mapobj="cplxAddObj<?php echo $kunik ?>">
<label for="<?php echo $kunik ?>"><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn ?></h4></label>
<div id="addressForm<?php echo $kunik ?>"></div>
......
......@@ -273,6 +273,8 @@ foreach ($mustSendMail as $persk => $persid) {
}
}
$mailList = array_unique($mailList);
?>
......@@ -302,6 +304,26 @@ foreach ($mustSendMail as $persk => $persid) {
});
});
$('div[data-inputtype="address"]').each(function(){
if (typeof window[$(this).data("mapobj")] !== "undefined" && typeof window[$(this).data("mapobj")].map !== "undefined" && typeof window[$(this).data("mapobj")].map.map !== "undefined") {
window[$(this).data("mapobj")].map.map.on("viewreset" , function (e) {
$('div[data-inputtype="address"]').each(function(){
$(this).mouseleave(function(event){
reloadInput("<?php echo $key ?>", "<?php echo (string)$form["_id"] ?>");
$(this).off('mouseleave');
event.stopImmediatePropagation();
})
});
});
}
});
sectionDyf.<?php echo $kunik ?>Params = {
"jsonSchema" : {
"title" : "<?php echo $kunik ?> config",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment