コード例 #1
0
 public function testStatusArray()
 {
     $result = \Distilleries\Expendable\Helpers\StaticLabel::status();
     $this->assertTrue(is_array($result));
     $this->assertArrayHasKey(\Distilleries\Expendable\Helpers\StaticLabel::STATUS_OFFLINE, $result);
     $this->assertArrayHasKey(\Distilleries\Expendable\Helpers\StaticLabel::STATUS_ONLINE, $result);
 }
コード例 #2
0
ファイル: UserForm.php プロジェクト: SchizoDuckie/Expendable
 public function buildForm()
 {
     $this->add($this->model->getKeyName(), 'hidden')->add('email', 'email', ['label' => trans('expendable::form.email'), 'validation' => 'required,custom[email]']);
     $id = $this->model->getKey();
     if (!empty($id)) {
         $this->add('change_password', 'checkbox', ['default_value' => 1, 'label' => trans('expendable::form.change_password_help'), 'checked' => false, 'noInEditView' => true]);
     }
     $this->add('password', 'password', ['label' => trans('expendable::form.password'), 'attr' => ['id' => 'password'], 'validation' => 'required', 'noInEditView' => true])->add('password_match', 'password', ['label' => trans('expendable::form.repeat_password'), 'validation' => 'required,equals[password]', 'noInEditView' => true])->add('status', 'choice', ['choices' => StaticLabel::status(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.status')])->add('role_id', 'choice', ['choices' => Role::getChoice(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.role')])->addDefaultActions();
 }
コード例 #3
0
 public function filters()
 {
     $this->form->add('status', 'choice', ['choices' => StaticLabel::status(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::datatable.status')]);
 }
コード例 #4
0
 public function buildForm()
 {
     $this->add('id', 'hidden')->add('libelle', 'text')->add('iso', 'text')->add('not_visible', 'choice', ['choices' => StaticLabel::yesNo(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.is_visible_for_customer')])->add('is_default', 'choice', ['choices' => StaticLabel::yesNo(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.default_language')])->add('status', 'choice', ['choices' => StaticLabel::status(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.status')]);
     $this->addDefaultActions();
 }
コード例 #5
0
ファイル: EmailForm.php プロジェクト: SchizoDuckie/Expendable
 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();
 }
コード例 #6
0
ファイル: PostForm.php プロジェクト: budiprasetyo/Xyz
 public function buildForm()
 {
     $this->add('id', 'hidden')->add('libelle', 'text')->add('content', 'tinymce')->add('status', 'choice', ['choices' => StaticLabel::status(), 'empty_value' => '-', 'validation' => 'required', 'label' => 'Status']);
     $this->addDefaultActions();
 }