PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.2.1
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.2.1
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
weforms / includes / templates / class-template-bug-report.php

class-template-bug-report.php in weForms – Easy Drag & Drop Contact Form Builder For WordPress 1.2.1, at includes/templates/class-template-bug-report.php

191 lines 8.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Blank form template
5 */
6 class WeForms_Template_Bug_Report extends WeForms_Form_Template {
7
8 public function __construct() {
9 parent::__construct();
10
11 $this->enabled = true;
12 $this->title = __( 'Report a bug', 'weforms' );
13 $this->description = __( 'Here\'s a great way to make a form for use with reporting issues, feedback, suggestions, and questions or bugtracking', 'weforms' );
14 $this->image = WEFORMS_ASSET_URI . '/images/form-template/bug_report.png';
15 }
16
17 /**
18 * Get the form fields
19 *
20 * @return array
21 */
22 public function get_form_fields() {
23 $all_fields = $this->get_available_fields();
24
25 $form_fields = array(
26 array_merge( $all_fields['section_break']->get_field_props(), array(
27 'label' => __( 'Report a bug', 'weforms' ),
28 'description' => ' ',
29 ) ),
30
31 array_merge( $all_fields['step_start']->get_field_props(), array(
32 'label' => __( 'First Step', 'weforms' ),
33 'name' => 'report_bug_step',
34 'step_start' => array(
35 'prev_button_text' => __( 'Previous', 'weforms-pro' ),
36 'next_button_text' => __( 'Next', 'weforms-pro' )
37 ),
38 ) ),
39
40 array_merge( $all_fields['text_field']->get_field_props(), array(
41 'required' => 'yes',
42 'label' => __( 'Full Name', 'weforms' ),
43 'name' => 'full_name',
44 ) ),
45
46 array_merge( $all_fields['email_address']->get_field_props(), array(
47 'required' => 'yes',
48 'label' => __( 'Email Address', 'weforms' ),
49 'name' => 'email_address',
50 ) ),
51
52 array_merge( $all_fields['text_field']->get_field_props(), array(
53 'required' => 'yes',
54 'label' => __( 'Problem Title', 'weforms' ),
55 'name' => 'email_address',
56 ) ),
57
58 array_merge( $all_fields['dropdown_field']->get_field_props(), array(
59 'label' => __( 'Problem Status', 'weforms' ),
60 'name' => 'problem_status',
61 'options' => array(
62 'open' => __('Open', 'weforms'),
63 'fixed' => __('Fixed', 'weforms'),
64 'verified' => __('Veried', 'weforms'),
65 'closed' => __('Closed', 'weforms'),
66 'invalid' => __('Invalid', 'weforms'),
67 ),
68 'first' => ' ',
69 ) ),
70
71 array_merge( $all_fields['textarea_field']->get_field_props(), array(
72 'required' => 'yes',
73 'label' => __( 'Summary Information', 'weforms' ),
74 'name' => 'summary_information',
75 ) ),
76
77 array_merge( $all_fields['step_start']->get_field_props(), array(
78 'label' => __( 'Second Step', 'weforms' ),
79 'name' => 'report_bug_step_two',
80 'step_start' => array(
81 'prev_button_text' => __( 'Previous', 'weforms-pro' ),
82 'next_button_text' => __( 'Next', 'weforms-pro' )
83 ),
84 ) ),
85
86 array_merge( $all_fields['textarea_field']->get_field_props(), array(
87 'required' => 'yes',
88 'label' => __( 'Steps to Reproduce', 'weforms' ),
89 'name' => 'report_bug_two',
90 'help_text' => __( 'Include any setup or preparation work and the steps we can take to reproduce the problem', 'weforms' ),
91 ) ),
92
93 array_merge( $all_fields['textarea_field']->get_field_props(), array(
94 'required' => 'yes',
95 'label' => __( 'Results', 'weforms' ),
96 'name' => 'result',
97 'help_text' => __( 'Describe your results and how they differed from what you expected.', 'weforms' ),
98 ) ),
99
100 array_merge( $all_fields['textarea_field']->get_field_props(), array(
101 'label' => __( 'Regression', 'weforms' ),
102 'name' => 'regression',
103 'help_text' => __( 'Provide information on steps taken to isolate the problem. Under what conditions or circumstances does the problem occur or not occur.', 'weforms' ),
104 ) ),
105
106 array_merge( $all_fields['checkbox_field']->get_field_props(), array(
107 'label' => __( 'Is there a Workaround?', 'weforms' ),
108 'name' => 'workaround',
109 'options' => array(
110 'yes' => __('yes', 'weforms'),
111 'no' => __('No', 'weforms'),
112 ),
113 ) ),
114
115 array_merge( $all_fields['textarea_field']->get_field_props(), array(
116 'label' => __( 'Documentation & Notes', 'weforms' ),
117 'name' => 'documentation_notes',
118 'help_text' => __( 'Document any additional information that might be useful in resolving the problem.', 'weforms' ),
119 ) ),
120
121 array_merge( $all_fields['dropdown_field']->get_field_props(), array(
122 'required' => 'yes',
123 'label' => __( 'Reproducibility', 'weforms' ),
124 'name' => 'reproducibility',
125 'options' => array(
126 'try' => __('I didn\'t try', 'weforms'),
127 'rare' => __('Rarely', 'weforms'),
128 'sometimes' => __('Sometimes', 'weforms'),
129 'always' => __('Always', 'weforms'),
130 ),
131
132 'first' => ' ',
133
134 ) ),
135
136 array_merge( $all_fields['dropdown_field']->get_field_props(), array(
137 'required' => 'yes',
138 'label' => __( 'Classification', 'weforms' ),
139 'name' => 'classification',
140 'options' => array(
141 'security' => __('Security', 'weforms'),
142 'crash' => __('Crash/Hang/Data loss', 'weforms'),
143 'performance' => __('Performance/UI-Usability', 'weforms'),
144 'serious_bug' => __('Serious Bug', 'weforms'),
145 'other_bug' => __('Other Bug', 'weforms'),
146 'feature' => __('Feature (New)', 'weforms'),
147 'enhancement' => __('Enhancement', 'weforms'),
148 ),
149
150 'first' => ' ',
151
152 ) ),
153
154 array_merge( $all_fields['dropdown_field']->get_field_props(), array(
155 'required' => 'yes',
156 'label' => __( 'Severity', 'weforms' ),
157 'name' => 'severity',
158 'options' => array(
159 'trivial' => __('Trivial', 'weforms'),
160 'normal' => __('Normal', 'weforms'),
161 'major' => __('Major', 'weforms'),
162 'critical' => __('Critical', 'weforms'),
163 ),
164
165 'first' => ' ',
166
167 ) ),
168 );
169
170 return $form_fields;
171 }
172
173
174 /**
175 * Get the form settings
176 *
177 * @return array
178 */
179 public function get_form_settings() {
180 $defaults = $this->get_default_settings();
181
182 return array_merge( $defaults, array(
183 'submit_text' => __( 'Submit', 'weforms' ),
184 'label_position' => 'above',
185 'enable_multistep' => true,
186 'multistep_progressbar_type' => 'step_by_step',
187 ) );
188 }
189
190 }
191