Esempio n. 1
0
 public function boot()
 {
     Channels::extendFormFields(function (Form $form, $model) {
         $form->addFields(['method_data[email_destination]' => ['label' => "ebussola.feedback::lang.channel.emailDestination", 'commentAbove' => "ebussola.feedback::lang.backend.settings.channel.emailDestinationComment", 'required' => true, 'trigger' => ['action' => "show", 'field' => "method", 'condition' => "value[email]"]], 'method_data[subject]' => ['label' => "Subject", 'required' => true, 'trigger' => ['action' => "show", 'field' => "method", 'condition' => "value[email]"]], 'method_data[template]' => ['type' => 'codeeditor', 'language' => 'twig', 'label' => "Template", 'commentAbove' => 'The variables available here are these on the form. If you are using the default component template, they are: name, email and message', 'required' => true, 'trigger' => ['action' => "show", 'field' => "method", 'condition' => "value[email]"]]]);
     });
     Channel::extend(function (Channel $model) {
         $model->rules['method_data.email_destination'] = "emails";
         $model->attributeNames['method_data.email_destination'] = 'ebussola.feedback::lang.channel.emailDestination';
     });
 }
 public function boot()
 {
     Channels::extendFormFields(function (Form $form, $model) {
         $form->addFields(['method_data[email_destination]' => ['label' => "ebussola.feedback::lang.channel.emailDestination", 'commentAbove' => "ebussola.feedback::lang.backend.settings.channel.emailDestinationComment", 'required' => true, 'trigger' => ['action' => "show", 'field' => "method", 'condition' => "value[email]"]]]);
     });
     Channel::extend(function (Channel $model) {
         $model->rules['method_data.email_destination'] = "email";
         $model->attributeNames['method_data.email_destination'] = 'ebussola.feedback::lang.channel.emailDestination';
     });
 }
Esempio n. 3
0
 public function boot()
 {
     Channels::extendFormFields(function (Form $form, $model) {
         $form->addFields(['method_data[channels]' => ['label' => "Channels", 'commentAbove' => "Select one or more channels", 'type' => 'checkboxlist', 'options' => Channel::all()->lists('name', 'id'), 'required' => true, 'trigger' => ['action' => "show", 'field' => "method", 'condition' => "value[group]"]]]);
     });
 }