Commit 8f02d5aa authored by Anatole Rakotoson's avatar Anatole Rakotoson

correction contact et partenaire

parent f753e7b2
......@@ -283,8 +283,7 @@
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();
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -347,8 +346,7 @@
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>");
location.reload();
urlCtrl.loadByHash(location.hash);
} );
}
......
......@@ -378,8 +378,7 @@
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>");
location.reload();
urlCtrl.loadByHash(location.hash);
} );
}
......
......@@ -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 "<th>".$inp["label"]."</th>";
}
} else {
......@@ -178,8 +178,8 @@
echo "<tr id='".$kunik.$q."' class='".$kunik."Line'>";
foreach ($properties as $i => $inp) {
if($i == "contact"){
if($canEdit or $partenaire){
echo "<th>".$inp["label"]."</th>";
if($canEditForm || $partenaire){
echo "<th>".$a[$i]."</th>";
}
}
elseif($i != "location" && $i != "file"){
......
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