| Conditions | 1 |
| Paths | 1 |
| Total Lines | 44 |
| Code Lines | 35 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | public static function makeForm() |
||
| 8 | { |
||
| 9 | $form = []; |
||
| 10 | $form[] = [ |
||
| 11 | 'label' => 'Template Name', |
||
| 12 | 'name' => 'name', |
||
| 13 | 'type' => 'text', |
||
| 14 | 'required' => true, |
||
| 15 | 'validation' => 'required|min:3|max:255|alpha_spaces', |
||
| 16 | 'placeholder' => 'You can only enter the letter only', |
||
| 17 | ]; |
||
| 18 | $form[] = ['label' => 'Slug', 'type' => 'text', 'name' => 'slug', 'required' => true, 'validation' => 'required|unique:cms_email_templates,slug']; |
||
| 19 | $form[] = ['label' => 'Subject', 'name' => 'subject', 'type' => 'text', 'required' => true, 'validation' => 'required|min:3|max:255']; |
||
| 20 | $form[] = ['label' => 'Content', 'name' => 'content', 'type' => 'wysiwyg', 'required' => true, 'validation' => 'required']; |
||
| 21 | $form[] = ['label' => 'Description', 'name' => 'description', 'type' => 'text', 'required' => true, 'validation' => 'required|min:3|max:255']; |
||
| 22 | |||
| 23 | $form[] = [ |
||
| 24 | 'label' => 'From Name', |
||
| 25 | 'name' => 'from_name', |
||
| 26 | 'type' => 'text', |
||
| 27 | 'required' => false, |
||
| 28 | 'width' => 'col-sm-6', |
||
| 29 | 'placeholder' => 'Optional', |
||
| 30 | ]; |
||
| 31 | $form[] = [ |
||
| 32 | 'label' => 'From Email', |
||
| 33 | 'name' => 'from_email', |
||
| 34 | 'type' => 'email', |
||
| 35 | 'required' => false, |
||
| 36 | 'validation' => 'email', |
||
| 37 | 'width' => 'col-sm-6', |
||
| 38 | 'placeholder' => 'Optional', |
||
| 39 | ]; |
||
| 40 | |||
| 41 | $form[] = [ |
||
| 42 | 'label' => 'Cc Email', |
||
| 43 | 'name' => 'cc_email', |
||
| 44 | 'type' => 'email', |
||
| 45 | 'required' => false, |
||
| 46 | 'validation' => 'email', |
||
| 47 | 'placeholder' => 'Optional', |
||
| 48 | ]; |
||
| 49 | |||
| 50 | return $form; |
||
| 51 | } |
||
| 53 | } |