Пример #1
0
 public function testMailActionsArray()
 {
     $config = $this->app['config']->get('expendable.mail.actions');
     $result = \Distilleries\Expendable\Helpers\StaticLabel::mailActions();
     $this->assertTrue(is_array($result));
     foreach ($config as $value) {
         $this->assertArrayHasKey($value, $result);
     }
 }
Пример #2
0
 public function build()
 {
     $this->add('id');
     $this->add('libelle', null, trans('expendable::datatable.subject'));
     $this->add('body_type', function ($model) {
         return StaticLabel::bodyType($model->body_type);
     }, trans('expendable::datatable.type'));
     $this->add('action', function ($model) {
         return StaticLabel::mailActions($model->action);
     });
     $this->add('cc');
     $this->add('bcc');
     $this->addTranslationAction();
     $this->addDefaultAction();
 }
Пример #3
0
 public function buildForm()
 {
     $this->add($this->model->getKeyName(), 'hidden')->add('libelle', 'text', ['validation' => 'required', 'label' => trans('expendable::form.subject')])->add('body_type', 'choice', ['choices' => StaticLabel::bodyType(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.body_type')])->add('action', 'choice', ['choices' => StaticLabel::mailActions(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.action')])->add('cc', 'tag', ['label' => trans('expendable::form.cc')])->add('bcc', 'tag', ['label' => trans('expendable::form.bcc')])->add('content', 'tinymce', ['validation' => 'required', 'label' => trans('expendable::form.content')])->add('status', 'choice', ['choices' => StaticLabel::status(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.status')])->addDefaultActions();
 }