|
- <?php
-
- namespace backend\forms;
-
- use yii\base\Model;
- use yii\web\UploadedFile;
-
- class UserImportUploadForm extends Model
- {
- /**
- * @var UploadedFile file attribute
- */
- public $file;
- public $send_mail_welcome;
-
- /**
- * @return array the validation rules.
- */
- public function rules()
- {
- return [
- [['file'], 'file', 'skipOnEmpty' => false, 'mimeTypes' => 'text/csv, text/plain'],
- [['send_mail_welcome'], 'boolean']
- ];
- }
-
- public function attributeLabels()
- {
- return [
- 'file' => "Fichier d'import (CSV)",
- 'send_mail_welcome' => "Envoyer un email de bienvenue aux utilisateurs importés"
- ];
- }
- }
-
- ?>
|