diff --git a/views/tpls/forms/sommom/acteurEncadrement.php b/views/tpls/forms/sommom/acteurEncadrement.php index 6d9953390dc107fc2bfeb8f23b348321c0a43b42..6531e354445a4aa6687851665117e5cad94f210f 100644 --- a/views/tpls/forms/sommom/acteurEncadrement.php +++ b/views/tpls/forms/sommom/acteurEncadrement.php @@ -283,8 +283,7 @@ toastr.error('value cannot be empty!'); else { dataHelper.path2Value( tplCtx, function(params) { - $("#ajax-modal").html("
");//$("#ajax-modal").modal('hide'); - location.reload(); + urlCtrl.loadByHash(location.hash); } ); } @@ -347,8 +346,7 @@ toastr.error('value cannot be empty!'); else { dataHelper.path2Value( tplCtx, function(params) { - $("#ajax-modal").html("
"); - location.reload(); + urlCtrl.loadByHash(location.hash); } ); } diff --git a/views/tpls/forms/sommom/airemarineprotege.php b/views/tpls/forms/sommom/airemarineprotege.php index 68df316b363faf0430c73482e235f600625313d3..1b75b74d44e2c82d06dd85f1626702cc0f45e360 100644 --- a/views/tpls/forms/sommom/airemarineprotege.php +++ b/views/tpls/forms/sommom/airemarineprotege.php @@ -378,8 +378,7 @@ toastr.error('value cannot be empty!'); else { dataHelper.path2Value( tplCtx, function(params) { - $("#ajax-modal").html("
"); - location.reload(); + urlCtrl.loadByHash(location.hash); } ); } diff --git a/views/tpls/forms/sommom/organisme.php b/views/tpls/forms/sommom/organisme.php index 568c4a18e1bc62a85deef9867f23c3f93d9f0861..b185c5fad91d15da7467323b547929715d588ab7 100644 --- a/views/tpls/forms/sommom/organisme.php +++ b/views/tpls/forms/sommom/organisme.php @@ -20,16 +20,16 @@ } } - $communityLinks = Element::getCommunityByTypeAndId($this->costum["contextType"],$this->costum["contextId"]); + $communityLinks = Element::getByTypeAndId($this->costum["contextType"],$this->costum["contextId"]); $partenaire = false; - foreach ($communityLinks as $memberId => $memberValue) { + foreach ($communityLinks["links"]["members"] as $memberId => $memberValue) { if(isset(Yii::app()->session["userId"])){ if($memberId != ""){ if($memberId == Yii::app()->session["userId"]){ if(isset($memberValue["roles"])){ foreach ($memberValue["roles"] as $rolesId => $rolesValue) { - if($rolesValue == "partenaire"){ + if($rolesValue == "Partenaire"){ $partenaire = true; } } @@ -156,8 +156,8 @@ foreach ($properties as $i => $inp) { if (isset($inp["label"])){ - if ($imp["label"] == "contact") { - if($adminStatus or $partenaire){ + if ($inp["label"] == "contact") { + if($canEditForm || $partenaire){ echo "".$inp["label"].""; } } else { @@ -178,8 +178,8 @@ echo ""; foreach ($properties as $i => $inp) { if($i == "contact"){ - if($canEdit or $partenaire){ - echo "".$inp["label"].""; + if($canEditForm || $partenaire){ + echo "".$a[$i].""; } } elseif($i != "location" && $i != "file"){