|
|
@@ -49,64 +49,71 @@ $producerManager = $this->getProducerManager(); |
|
|
|
|
|
|
|
<div class="user-form" id="app-user-form"> |
|
|
|
|
|
|
|
<div class="col-md-8"> |
|
|
|
<?php $form = ActiveForm::begin([ |
|
|
|
'enableClientValidation' => false |
|
|
|
]); ?> |
|
|
|
|
|
|
|
<?= $form->field($model, 'type') |
|
|
|
->dropDownList( $userManager->getTypeChoicesArray(), [ |
|
|
|
'v-model' => 'type' |
|
|
|
]) ; ?> |
|
|
|
<?= $form->field($model, 'name_legal_person', ['options' => ['v-show' => "type == 'legal-person'"]])->textInput() ?> |
|
|
|
<?= $form->field($model, 'lastname')->textInput() ?> |
|
|
|
<?= $form->field($model, 'name')->textInput() ?> |
|
|
|
<?= $form->field($model, 'phone')->textInput() ?> |
|
|
|
<?= $form->field($model, 'email')->textInput() ?> |
|
|
|
<?= $form->field($model, 'address')->textarea() ?> |
|
|
|
|
|
|
|
<?php if($producerManager->getConfig('option_export_evoliz')): ?> |
|
|
|
<?= $form->field($model, 'evoliz_code')->textInput() ?> |
|
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
<?= $form->field($model, 'points_sale')->checkboxlist( |
|
|
|
ArrayHelper::map($pointsSaleArray, 'id', function ($pointSale) use ($model) { |
|
|
|
$commentUserPointSale = isset($pointSale->userPointSale[0]) ? $pointSale->userPointSale[0]->comment : ''; |
|
|
|
$html = Html::encode($pointSale->name); |
|
|
|
if ($pointSale->restricted_access) { |
|
|
|
$html .= '<input type="text" placeholder="Commentaire" class="form-control" name="User[comment_point_sale_' . $pointSale->id . ']" value="' . (($model->id) ? Html::encode($commentUserPointSale) : '') . '" />'; |
|
|
|
} |
|
|
|
return $html; |
|
|
|
}), [ |
|
|
|
'encode' => false |
|
|
|
]); |
|
|
|
?> |
|
|
|
|
|
|
|
<?= $form->field($model, 'user_groups')->checkboxlist( |
|
|
|
ArrayHelper::map($userGroupsArray, 'id', function ($userGroup) use ($model) { |
|
|
|
return Html::encode($userGroup->name); |
|
|
|
}), [ |
|
|
|
'encode' => false |
|
|
|
]); |
|
|
|
?> |
|
|
|
|
|
|
|
<?php /* $form->field($model, 'product_price_percent') |
|
|
|
<div class="col-md-8"> |
|
|
|
<?php $form = ActiveForm::begin([ |
|
|
|
'enableClientValidation' => false |
|
|
|
]); ?> |
|
|
|
|
|
|
|
<?= $form->field($model, 'type') |
|
|
|
->dropDownList($userManager->getTypeChoicesArray(), [ |
|
|
|
'v-model' => 'type' |
|
|
|
]); ?> |
|
|
|
<?= $form->field($model, 'name_legal_person', ['options' => ['v-show' => "type == 'legal-person'"]])->textInput() ?> |
|
|
|
<?= $form->field($model, 'lastname')->textInput() ?> |
|
|
|
<?= $form->field($model, 'name')->textInput() ?> |
|
|
|
<?= $form->field($model, 'phone')->textInput() ?> |
|
|
|
<?= $form->field($model, 'email')->textInput() ?> |
|
|
|
<?= $form->field($model, 'address')->textarea() ?> |
|
|
|
|
|
|
|
<?php if ($producerManager->getConfig('option_export_evoliz')): ?> |
|
|
|
<?= $form->field($model, 'evoliz_code')->textInput() ?> |
|
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
<?= $form->field($model, 'points_sale')->checkboxlist( |
|
|
|
ArrayHelper::map($pointsSaleArray, 'id', function ($pointSale) use ($model) { |
|
|
|
$commentUserPointSale = isset($pointSale->userPointSale[0]) ? $pointSale->userPointSale[0]->comment : ''; |
|
|
|
$html = Html::encode($pointSale->name); |
|
|
|
if ($pointSale->restricted_access) { |
|
|
|
$html .= '<input type="text" placeholder="Commentaire" class="form-control" name="User[comment_point_sale_' . $pointSale->id . ']" value="' . (($model->id) ? Html::encode($commentUserPointSale) : '') . '" />'; |
|
|
|
} |
|
|
|
return $html; |
|
|
|
}), [ |
|
|
|
'encode' => false |
|
|
|
]); |
|
|
|
?> |
|
|
|
|
|
|
|
<?= $form->field($model, 'user_groups')->checkboxlist( |
|
|
|
ArrayHelper::map($userGroupsArray, 'id', function ($userGroup) use ($model) { |
|
|
|
return Html::encode($userGroup->name); |
|
|
|
}), [ |
|
|
|
'encode' => false |
|
|
|
]); |
|
|
|
?> |
|
|
|
|
|
|
|
<?php /* $form->field($model, 'product_price_percent') |
|
|
|
->dropDownList( ProductPrice::percentValues(), [])->hint('Pourcentage appliqué aux prix de chaque produit pour cet utilisateur.');*/ ?> |
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
<?= Html::submitButton($model->isNewRecord ? 'Ajouter' : 'Modifier', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> |
|
|
|
</div> |
|
|
|
|
|
|
|
<?php ActiveForm::end(); ?> |
|
|
|
<div class="form-group"> |
|
|
|
<?= Html::submitButton($model->isNewRecord ? 'Ajouter' : 'Modifier', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-4"> |
|
|
|
<h2>Mot de passe</h2> |
|
|
|
<?php $form = ActiveForm::begin(); ?> |
|
|
|
<div class="form-group"> |
|
|
|
<?= Html::submitButton('Envoyer un nouveau mot de passe', ['class' => 'btn btn-primary', 'name' => 'submit_new_password', 'value' => 1]) ?> |
|
|
|
</div> |
|
|
|
<?php ActiveForm::end(); ?> |
|
|
|
</div> |
|
|
|
<?php ActiveForm::end(); ?> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-4"> |
|
|
|
|
|
|
|
<?php if($pointSaleBillingArray && count($pointSaleBillingArray) > 0): ?> |
|
|
|
<h3>Facturation</h3> |
|
|
|
<?php foreach($pointSaleBillingArray as $pointSale): ?> |
|
|
|
<a href="<?= Yii::$app->urlManager->createUrl(['point-sale/update', 'id' => $pointSale->id]) ?>"><?= $pointSale->name ?></a><br /> |
|
|
|
<?php endforeach; ?> |
|
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
<h3>Mot de passe</h3> |
|
|
|
<?php $form = ActiveForm::begin(); ?> |
|
|
|
<div class="form-group"> |
|
|
|
<?= Html::submitButton('Envoyer un nouveau mot de passe', ['class' => 'btn btn-primary', 'name' => 'submit_new_password', 'value' => 1]) ?> |
|
|
|
</div> |
|
|
|
<?php ActiveForm::end(); ?> |
|
|
|
</div> |
|
|
|
</div> |