@@ -115,7 +115,7 @@ $this->addButton(['label' => 'Nouveau bon de livraison <span class="glyphicon gl | |||
'contentOptions' => ['class' => 'column-actions'], | |||
'buttons' => [ | |||
'send' => function($url, $model) { | |||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
'title' => 'Envoyer', 'class' => 'btn btn-default' | |||
]) : ''); | |||
}, |
@@ -111,7 +111,7 @@ $this->addButton(['label' => 'Nouvelle facture <span class="glyphicon glyphicon- | |||
]) : ''); | |||
}, | |||
'send' => function($url, $model) { | |||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
'title' => 'Envoyer', 'class' => 'btn btn-default' | |||
]) : ''); | |||
}, |
@@ -108,7 +108,7 @@ $this->addButton(['label' => 'Nouveau devis <span class="glyphicon glyphicon-plu | |||
]) : ''); | |||
}, | |||
'send' => function($url, $model) { | |||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
'title' => 'Envoyer', 'class' => 'btn btn-default' | |||
]) : ''); | |||
}, |