Ejemplo n.º 1
0
 /**
  * Form view generator for email configuration.
  *
  * @param  \Orchestra\Contracts\Html\Form\Grid  $form
  * @param  \Illuminate\Support\Fluent  $model
  *
  * @return void
  */
 protected function mailer(FormGrid $form, $model)
 {
     $form->fieldset(trans('orchestra/foundation::label.settings.mail'), function (Fieldset $fieldset) use($model) {
         $fieldset->control('select', 'email_driver')->label(trans('orchestra/foundation::label.email.driver'))->options(['mail' => 'Mail', 'smtp' => 'SMTP', 'sendmail' => 'Sendmail', 'ses' => 'Amazon SES', 'mailgun' => 'Mailgun', 'mandrill' => 'Mandrill']);
         $fieldset->control('input:text', 'email_host')->label(trans('orchestra/foundation::label.email.host'));
         $fieldset->control('input:text', 'email_port')->label(trans('orchestra/foundation::label.email.port'));
         $fieldset->control('input:text', 'email_address')->label(trans('orchestra/foundation::label.email.from'));
         $fieldset->control('input:text', 'email_username')->label(trans('orchestra/foundation::label.email.username'));
         $fieldset->control('input:password', 'email_password')->label(trans('orchestra/foundation::label.email.password'))->help(view('orchestra/foundation::settings._hidden', ['model' => $model, 'action' => 'change_password', 'field' => 'email_password']));
         $fieldset->control('input:text', 'email_encryption')->label(trans('orchestra/foundation::label.email.encryption'));
         $fieldset->control('input:text', 'email_key')->label(trans('orchestra/foundation::label.email.key'));
         $fieldset->control('input:password', 'email_secret')->label(trans('orchestra/foundation::label.email.secret'))->help(view('orchestra/foundation::settings._hidden', ['model' => $model, 'action' => 'change_secret', 'field' => 'email_secret']));
         $fieldset->control('input:text', 'email_domain')->label(trans('orchestra/foundation::label.email.domain'));
         $fieldset->control('select', 'email_region')->label(trans('orchestra/foundation::label.email.region'))->options(['us-east-1' => 'us-east-1', 'us-west-2' => 'us-west-2', 'eu-west-1' => 'eu-west-1']);
         $fieldset->control('input:text', 'email_sendmail')->label(trans('orchestra/foundation::label.email.command'));
         $fieldset->control('select', 'email_queue')->label(trans('orchestra/foundation::label.email.queue'))->attributes(['role' => 'agreement'])->options(['yes' => 'Yes', 'no' => 'No']);
     });
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function setupForm(Grid $form)
 {
     $form->layout('orchestra/foundation::components.form');
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function setupForm(FormGrid $form)
 {
     $form->layout('components.form');
 }