Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 3.0.3 |
Comparing to | |
See all releases |
Code changes from version 3.0.2 to 3.0.3
- CHANGELOG.md +458 -0
- assets/css/codemirror.css +0 -334
- assets/css/codemirror.min.css +0 -1
- assets/css/form-basic.css +3 -0
- assets/css/form-basic.min.css +1 -1
- assets/css/form-themes.css +3 -0
- assets/css/form-themes.min.css +1 -1
- assets/js/admin.js +2 -3
- assets/js/forms-admin.js +39 -44
CHANGELOG.md
ADDED
@@ -0,0 +1,458 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Changelog
|
2 |
+
=========
|
3 |
+
|
4 |
+
#### 3.0.3 - November 30, 2015
|
5 |
+
|
6 |
+
**Fixes**
|
7 |
+
|
8 |
+
- Added backwards compatibility for [Goodbye Captcha](https://wordpress.org/plugins/goodbye-captcha/) integration.
|
9 |
+
|
10 |
+
**Improvements**
|
11 |
+
|
12 |
+
- Prevented notice when saving Form widget settings for the first time.
|
13 |
+
- Add `autofill="off"` to honeypot field.
|
14 |
+
- Remove nonces from forms as they're not really useful for publicly available features.
|
15 |
+
- Errors returned by MailChimp are now logged for Forms as well.
|
16 |
+
- Pre-select MailChimp list if there's just one list in the connected account.
|
17 |
+
- Added missing translation calls for Form Editor.
|
18 |
+
|
19 |
+
#### 3.0.2 - November 25, 2015
|
20 |
+
|
21 |
+
**Fixes**
|
22 |
+
|
23 |
+
- Redirect on success not working.
|
24 |
+
- Forms overview page redirected to main WP Admin page (edge case).
|
25 |
+
- Safari was always showing the leave-page confirmation dialog.
|
26 |
+
|
27 |
+
**Improvements**
|
28 |
+
|
29 |
+
- Add form-specific classes to preview form element. This allows the [Styles Builder](https://mc4wp.com/features/) to work with the Form Preview.
|
30 |
+
- Form events are now triggered _after_ the page has finished loading, so all scripts are loaded & ready to use.
|
31 |
+
- Reset background-color in Form Themes stylesheets.
|
32 |
+
|
33 |
+
#### 3.0.0 & 3.0.1 - November 23, 2015
|
34 |
+
|
35 |
+
Version 3.0 is a total revamp of the plugin. For a quick overview of the changes, please [read this post on our blog](https://mc4wp.com/blog/whats-new-in-mailchimp-for-wordpress-the-big-three-o/).
|
36 |
+
|
37 |
+
Before upgrading, please go through the [upgrade guide](https://mc4wp.com/kb/upgrading-to-3-0/) as some things have changed.
|
38 |
+
|
39 |
+
**Breaking Changes**
|
40 |
+
|
41 |
+
- Captcha fields: `{captcha}` field is now handled by the [Captcha add-on plugin](https://wordpress.org/plugins/mc4wp-captcha/).
|
42 |
+
- New dynamic content tags syntax: `{data_NAME}` is now `{data key="NAME"}`
|
43 |
+
- Event binding: `jQuery(document).on('subscribe.mc4wp','.mc4wp-form', function(){ ... })` is now `mc4wp.forms.on('subscribed', function(form) { ... })`
|
44 |
+
- Removed integrations: MultiSite & bbPress.
|
45 |
+
|
46 |
+
**Improvements**
|
47 |
+
|
48 |
+
- New form editor with syntax highlighting, more advanced field options & better visual feedback.
|
49 |
+
- Better support for MailChimp `address` fields.
|
50 |
+
- Better support for choice fields (eg groupings, list choice & country fields).
|
51 |
+
- All fields marked as `required` are now validated server-side as well (instead of just MailChimp required fields).
|
52 |
+
- All integrations have their own settings page now.
|
53 |
+
- Events Manager: checkbox is now automatically added to booking forms.
|
54 |
+
- Tons of usability & accessibility improvements.
|
55 |
+
- Tons of code improvements: improved memory usage, 100+ new unit tests & better usage of various best practices.
|
56 |
+
- The [premium plugin](https://mc4wp.com/) is now an add-on of this plugin.
|
57 |
+
|
58 |
+
**Additions**
|
59 |
+
|
60 |
+
- New "Preview Form" option, showing unsaved form changes.
|
61 |
+
- Integrations can now be "implicit", thus no longer showing a checkbox option to visitors.
|
62 |
+
- New JavaScript API, replacing jQuery event hooks.
|
63 |
+
- Ninja Forms integration
|
64 |
+
- Introduced various new filter & action hooks, please see the new [code reference for developers](http://developer.mc4wp.com/) for more information.
|
65 |
+
|
66 |
+
#### 2.3.18 - November 2, 2015
|
67 |
+
|
68 |
+
**Fixes**
|
69 |
+
|
70 |
+
- Incorrect number of parameters for `error_log` statement in integrations class.
|
71 |
+
|
72 |
+
**Improvements**
|
73 |
+
|
74 |
+
- Usage tracking is now scheduled once a week (instead of daily).
|
75 |
+
- Preparations for [the upcoming MailChimp for WordPress version 3.0 release](https://mc4wp.com/blog/breaking-backwards-compatibility-in-version-3-0/).
|
76 |
+
- Tested compatibility with WordPress 4.4
|
77 |
+
|
78 |
+
#### 2.3.17 - October 22, 2015
|
79 |
+
|
80 |
+
**Fixes**
|
81 |
+
|
82 |
+
- Honeypot field being autofilled in Chrome, causing a form error.
|
83 |
+
|
84 |
+
**Improvements**
|
85 |
+
|
86 |
+
- Updated Portugese translations.
|
87 |
+
|
88 |
+
|
89 |
+
#### 2.3.16 - October 14, 2015
|
90 |
+
|
91 |
+
**Fixes**
|
92 |
+
|
93 |
+
- Error in Russian translation, causing a broken link on the MailChimp settings page.
|
94 |
+
|
95 |
+
**Improvements**
|
96 |
+
|
97 |
+
- Textual improvements to MailChimp settings page.
|
98 |
+
- Connectivity issues with MailChimp will now _always_ show an error message.
|
99 |
+
- Renewing MailChimp lists will now also update the output of the `{subscriber_count}` tag.
|
100 |
+
|
101 |
+
#### 2.3.15 - October 9, 2015
|
102 |
+
|
103 |
+
**Fixes**
|
104 |
+
|
105 |
+
- Fixes JS error when form contains no submit button
|
106 |
+
|
107 |
+
**Improvements**
|
108 |
+
|
109 |
+
- Only prefix `url` fields with `http://` if it is filled.
|
110 |
+
- Updated Spanish & Catalan translations, thanks to [Xavier Gimeno Torrent](http://www.xaviergimeno.net/).
|
111 |
+
- Fix `mc4wp_form_before_fields` being applied twice.
|
112 |
+
- Position honeypot field to the right for Right-To-Left sites.
|
113 |
+
- `_mc4wp_lists` can now be a comma-separated string of MailChimp list ID's to subscribe to (or an array).
|
114 |
+
- Minor other defensive coding improvements to prevent clashes with other plugins.
|
115 |
+
|
116 |
+
**Additions**
|
117 |
+
|
118 |
+
- Added opt-in usage tracking to help us make the plugin better. No sensitive data is tracked.
|
119 |
+
|
120 |
+
#### 2.3.14 - September 25
|
121 |
+
|
122 |
+
**Fixes**
|
123 |
+
|
124 |
+
- Use of undefined constant in previous update.
|
125 |
+
|
126 |
+
#### 2.3.13 - September 25, 2015
|
127 |
+
|
128 |
+
**Fixes**
|
129 |
+
|
130 |
+
- Honeypot causing horizontal scrollbar on RTL sites.
|
131 |
+
- List choice fields not showing when using one of the default form themes.
|
132 |
+
|
133 |
+
**Improvements**
|
134 |
+
|
135 |
+
- Minor styling improvements for RTL sites.
|
136 |
+
- MailChimp list fields of type "website" will now become HTML5 `url` type fields.
|
137 |
+
- Auto-prefix fields of type `url` with `http://`
|
138 |
+
|
139 |
+
#### 2.3.12 - September 21, 2015
|
140 |
+
|
141 |
+
**Fixes**
|
142 |
+
|
143 |
+
- Issue with interest groupings not being fetched after updating to version 2.3.11
|
144 |
+
|
145 |
+
#### 2.3.11 - September 21, 2015
|
146 |
+
|
147 |
+
**Fixes**
|
148 |
+
|
149 |
+
- Honeypot field being filled by browser's autocomplete.
|
150 |
+
- Styling issue for submit buttons in Mobile Safari.
|
151 |
+
- Empty response from MailChimp API
|
152 |
+
|
153 |
+
**Improvements**
|
154 |
+
|
155 |
+
- Do not query MailChimp API for interest groupings if list has none.
|
156 |
+
- Integration errors are now logged to PHP's error log for easier debugging.
|
157 |
+
|
158 |
+
**Additions**
|
159 |
+
|
160 |
+
- You can now use shortcodes in the form content.
|
161 |
+
|
162 |
+
#### 2.3.10 - September 7, 2015
|
163 |
+
|
164 |
+
**Fixes**
|
165 |
+
|
166 |
+
- Showing "not connected" when the plugin was actually connected to MailChimp.
|
167 |
+
- Issue with `address` fields when `addr1` was not given.
|
168 |
+
- Comment form checkbox not outputted for some older themes.
|
169 |
+
|
170 |
+
**Improvements**
|
171 |
+
|
172 |
+
- Do not flush MailChimp cache on every settings save.
|
173 |
+
- Add default CSS styles for `number` fields.
|
174 |
+
- Placeholders will now work in older version of IE as well.
|
175 |
+
|
176 |
+
#### 2.3.9 - September 1, 2015
|
177 |
+
|
178 |
+
**Improvements**
|
179 |
+
|
180 |
+
- MailChimp lists cache is now automatically flushed after changing your API key setting.
|
181 |
+
- Better field population after submitting a form with errors.
|
182 |
+
- More helpful error message when no list is selected.
|
183 |
+
- Translate options when installing plugin from a language other than English.
|
184 |
+
- Add form mark-up to WPML configuration file.
|
185 |
+
- Sign-up checkbox in comment form is now shown before the "submit comment" button.
|
186 |
+
- URL-encode variables in "Redirect URL" setting.
|
187 |
+
- Better error message when connected to MailChimp but account has no lists.
|
188 |
+
|
189 |
+
**Additions**
|
190 |
+
|
191 |
+
- Add `mc4wp_form_action` filter to set a custom `action` attribute on the form element.
|
192 |
+
|
193 |
+
#### 2.3.8 - August 18, 2015
|
194 |
+
|
195 |
+
**Fixes**
|
196 |
+
|
197 |
+
- Prevented JS error when outputting forms with no submit button.
|
198 |
+
- Using `0` as a Redirect URL resulted in a blank page.
|
199 |
+
- Sign-up checkbox was showing twice in the Easy Digital Downloads checkout when showing registration fields, thanks [Daniel Espinoza](https://github.com/growdev).
|
200 |
+
- Default form was not automatically translated for languages other than English.
|
201 |
+
|
202 |
+
**Improvements**
|
203 |
+
|
204 |
+
- Better way to hide the honeypot field, which stops bots from subscribing to your lists.
|
205 |
+
- role="form" is no longer needed, thanks [XhmikosR](https://github.com/XhmikosR)!
|
206 |
+
- Filter `mc4wp_form_animate_scroll` now disables just the scroll animation, not the scroll itself.
|
207 |
+
- Revamped UI for MailChimp lists overview
|
208 |
+
- Updated German & Greek translations.
|
209 |
+
|
210 |
+
**Additions**
|
211 |
+
|
212 |
+
- Added `mc4wp_form_is_submitted()` and `mc4wp_form_get_response_html()` functions.
|
213 |
+
|
214 |
+
#### 2.3.7 - July 13, 2015
|
215 |
+
|
216 |
+
**Improvements**
|
217 |
+
|
218 |
+
- Use the same order as MailChimp.com, which is useful when you have over 100 MailChimp lists.
|
219 |
+
- Use `/* ... */` for inline JavaScript comments to prevent errors with minified HTML - props [Ed Gifford](https://github.com/egifford)
|
220 |
+
|
221 |
+
**Additions**
|
222 |
+
|
223 |
+
- Filter: `mc4wp_form_animate_scroll` to disable animated scroll-to after submitting a form.
|
224 |
+
- Add `{current_path}` variable to use in form templates.
|
225 |
+
- Add `default` attribute to `{data_name}` variables, usage: `{data_something default="The default value"}`
|
226 |
+
|
227 |
+
#### 2.3.6 - July 6, 2015
|
228 |
+
|
229 |
+
**Fixes**
|
230 |
+
|
231 |
+
- Undefined index notice when visitor's USER_AGENT is not set.
|
232 |
+
|
233 |
+
**Improvements**
|
234 |
+
|
235 |
+
- Relayed the browser's Accept-Language header to MailChimp for auto-detecting a subscriber's language.
|
236 |
+
- Better CSS for form reset
|
237 |
+
- Updated HTML5 placeholder polyfill
|
238 |
+
|
239 |
+
#### 2.3.5 - June 24, 2015
|
240 |
+
|
241 |
+
**Fixes**
|
242 |
+
|
243 |
+
- Faulty update for v3.0 appearing for people running GitHub updater plugin.
|
244 |
+
|
245 |
+
**Improvements**
|
246 |
+
|
247 |
+
- Updated language files.
|
248 |
+
- Now passing the form as a parameter to `mc4wp_form_css_classes` filter.
|
249 |
+
|
250 |
+
#### 2.3.4 - May 29, 2015
|
251 |
+
|
252 |
+
**Fixes**
|
253 |
+
|
254 |
+
- Issue with GROUPINGS not being sent to MailChimp
|
255 |
+
|
256 |
+
**Improvements**
|
257 |
+
|
258 |
+
- Code preview in Field Builder is now read-only
|
259 |
+
|
260 |
+
#### 2.3.3 - May 27, 2015
|
261 |
+
|
262 |
+
**Fixes**
|
263 |
+
|
264 |
+
- Get correct IP address when using proxy like Cloudflare or Sucuri WAF.
|
265 |
+
- Use strict type check for printing inline CSS that hides honeypot field
|
266 |
+
|
267 |
+
**Improvements**
|
268 |
+
|
269 |
+
- Add `contactemail` and `contactname` to field name guesses when integrating with third-party form.
|
270 |
+
- Re-enable `sslverify`
|
271 |
+
|
272 |
+
#### 2.3.2 - May 12, 2015
|
273 |
+
|
274 |
+
**Fixes**
|
275 |
+
|
276 |
+
- Groupings not being sent to MailChimp
|
277 |
+
- Issue when using more than one `{data_xx}` replacement
|
278 |
+
|
279 |
+
**Improvements**
|
280 |
+
|
281 |
+
- IE8 compatibility for honeypot fallback script.
|
282 |
+
|
283 |
+
#### 2.3.1 - May 6, 2015
|
284 |
+
|
285 |
+
**Fixes**
|
286 |
+
|
287 |
+
- PHP notice in `includes/class-tools.php`, introduced by version 2.3.
|
288 |
+
|
289 |
+
#### 2.3 - May 6, 2015
|
290 |
+
|
291 |
+
**Fixes**
|
292 |
+
|
293 |
+
- The email address is no longer automatically added to the Redirect URL as this is against Google Analytics policy. To add it again, use `?email={email}` in your Redirect URL setting.
|
294 |
+
- Registration type integrations were not correctly picking up on first- and last names.
|
295 |
+
- JavaScript error in IE8 because of `setAttribute` call on honeypot field.
|
296 |
+
- API class `subscribe` method now always returns a boolean.
|
297 |
+
|
298 |
+
**Improvements**
|
299 |
+
|
300 |
+
- Add `role` attribute to form elements
|
301 |
+
- Major code refactoring for easier unit testing and improved code readability.
|
302 |
+
- Use Composer for autoloading all plugin classes (PHP 5.2 compatible)
|
303 |
+
- You can now use [form variables in both forms, messages as checkbox label texts](https://mc4wp.com/kb/using-variables-in-your-form-or-messages/).
|
304 |
+
|
305 |
+
**Additions**
|
306 |
+
|
307 |
+
- You can now handle unsubscribe calls with our forms too.
|
308 |
+
- Added Portugese, Indonesian, German (CH) and Spanish (PR) translations.
|
309 |
+
|
310 |
+
#### 2.2.9 - April 15, 2015
|
311 |
+
|
312 |
+
**Fixes**
|
313 |
+
|
314 |
+
- Menu item for settings page not appearing on Google App Engine ([#88](https://github.com/ibericode/mailchimp-for-wordpress/issues/88))
|
315 |
+
|
316 |
+
**Improvements**
|
317 |
+
|
318 |
+
- Updated Italian, Russian & Turkish translations. [Want to help translate the plugin? Full translations get a free Pro license](https://www.transifex.com/projects/p/mailchimp-for-wordpress/).
|
319 |
+
|
320 |
+
#### 2.2.8 - March 24, 2015
|
321 |
+
|
322 |
+
**Fixes**
|
323 |
+
|
324 |
+
- API key field value was not properly escaped.
|
325 |
+
- Background images were stripped from submit buttons.
|
326 |
+
|
327 |
+
**Improvements**
|
328 |
+
|
329 |
+
- Better sanitising of all settings
|
330 |
+
- Updated all translations
|
331 |
+
|
332 |
+
**Additions**
|
333 |
+
|
334 |
+
- Added `mc4wp_before_checkbox` and `mc4wp_after_checkbox` filters to easily add more fields to sign-up checkbox integrations.
|
335 |
+
- Added some helper methods related to interest groupings to `MC4WP_MailChimp` class.
|
336 |
+
- Allow setting custom MailChimp lists to subscribe to using `lists` attribute on shortcode.
|
337 |
+
|
338 |
+
#### 2.2.7 - March 11, 2015
|
339 |
+
|
340 |
+
**Fixes**
|
341 |
+
|
342 |
+
- Honeypot field was visible for themes or templates not calling `wp_head()` and `wp_footer()`
|
343 |
+
|
344 |
+
**Improvements**
|
345 |
+
|
346 |
+
- Various minor code improvements
|
347 |
+
- Updated German, Spanish, Brazilian, French, Hungarian and Russian translations.
|
348 |
+
|
349 |
+
**Additions**
|
350 |
+
|
351 |
+
- Added [mc4wp_form_success](https://github.com/ibericode/mailchimp-for-wordpress/blob/06f0c833027f347a288d2cb9805e0614767409b6/includes/class-form-request.php#L292-L301) action hook to hook into successful sign-ups
|
352 |
+
- Added [mc4wp_form_data](https://github.com/ibericode/mailchimp-for-wordpress/blob/06f0c833027f347a288d2cb9805e0614767409b6/includes/class-form-request.php#L138-L142) filter hook to modify all form data before processing
|
353 |
+
|
354 |
+
|
355 |
+
#### 2.2.6 - February 26, 2015
|
356 |
+
|
357 |
+
**Fixes**
|
358 |
+
|
359 |
+
- CSS reset wasn't working for WooCommerce checkout sign-up checkbox.
|
360 |
+
- `mc4wp-submitted` class was not added in IE8
|
361 |
+
- Incorrect `action` attribute on form element for some server configurations
|
362 |
+
|
363 |
+
**Improvements**
|
364 |
+
|
365 |
+
- Anti-SPAM improvements: a better honeypot field and a timestamp field to prevent instant form submissions.
|
366 |
+
- Reset `background-image` on submit buttons when using CSS themes
|
367 |
+
- Smarter email detection when integrating with third-party forms
|
368 |
+
- Updated all translations
|
369 |
+
|
370 |
+
**Additions**
|
371 |
+
|
372 |
+
- Custom fallback for browsers not supporting `input[type="date"]`
|
373 |
+
|
374 |
+
|
375 |
+
#### 2.2.5 - February 13, 2015
|
376 |
+
|
377 |
+
**Fixed**
|
378 |
+
|
379 |
+
- Issue where WooCommerce checkout sign-up was not working for cheque payments.
|
380 |
+
- Translation were loaded too late to properly translate some strings, like the admin menu items.
|
381 |
+
|
382 |
+
**Improvements**
|
383 |
+
|
384 |
+
- The presence of required list fields in form mark-up is now checked as you type.
|
385 |
+
- Number fields will now repopulate if an error occurred.
|
386 |
+
- Updated all translations.
|
387 |
+
- Make sure there is only one plugin instance.
|
388 |
+
- Various other code improvements.
|
389 |
+
|
390 |
+
**Additions**
|
391 |
+
|
392 |
+
- Added support for [GitHub Updater Plugin](https://github.com/afragen/github-updater).
|
393 |
+
- You can now specify whether you want to send a welcome email (only with double opt-in disabled).
|
394 |
+
|
395 |
+
A huge thank you to [Stefan Oderbolz](http://metaodi.ch/) for various fixed and improvements related to translations in this release.
|
396 |
+
|
397 |
+
|
398 |
+
#### 2.2.4 - February 4, 2015
|
399 |
+
|
400 |
+
**Fixed**
|
401 |
+
|
402 |
+
- Textual fix as entering "0" for no redirection does not work.
|
403 |
+
|
404 |
+
**Improvements**
|
405 |
+
|
406 |
+
- Moved third-party scripts to their own directory for easier exclusion
|
407 |
+
- All code is now adhering to the WP Code Standards
|
408 |
+
- Updated [Dutch, German, Spanish, Hungarian, French, Italian and Turkish translations](https://www.transifex.com/projects/p/mailchimp-for-wordpress/).
|
409 |
+
|
410 |
+
**Additions**
|
411 |
+
|
412 |
+
- Now showing a heads up when at limit of 100 MailChimp lists. ([#71](https://github.com/ibericode/mailchimp-for-wordpress/issues/71))
|
413 |
+
- Added `wpml-config.xml` file for better WPML compatibility
|
414 |
+
- Added filter `mc4wp_menu_items` for adding & removing menu items from add-ons
|
415 |
+
|
416 |
+
#### 2.2.3 - January 24, 2015
|
417 |
+
|
418 |
+
Minor improvements and additions for compatibility with the [MailChimp Sync plugin](https://wordpress.org/plugins/mailchimp-sync/).
|
419 |
+
|
420 |
+
#### 2.2.2 - January 13, 2015
|
421 |
+
|
422 |
+
**Fixes**
|
423 |
+
|
424 |
+
- Plugin wasn't connecting to MailChimp for users on MailChimp server `us10` (API keys ending in `-us10`)
|
425 |
+
|
426 |
+
#### 2.2.1 - January 12, 2015
|
427 |
+
|
428 |
+
**Improvements**
|
429 |
+
|
430 |
+
- Use JS object to transfer lists data to Field Wizard.
|
431 |
+
- Field Wizard strings are now translatable
|
432 |
+
- Add `is_spam` method to checkbox integration to battle spam sign-ups
|
433 |
+
- Minor code & code style improvements
|
434 |
+
- Updated Danish, German, Spanish, French, Italian and Portugese (Brazil) translations
|
435 |
+
|
436 |
+
**Additions**
|
437 |
+
|
438 |
+
- You can now set `MC_LOCATION`, `MC_NOTES` and `MC_LANGUAGE` from your form HTML
|
439 |
+
- The submit button now has a default value when generating HTML for it
|
440 |
+
|
441 |
+
#### 2.2 - December 9, 2014
|
442 |
+
|
443 |
+
**Fixes**
|
444 |
+
|
445 |
+
- "Select at least one list" notice appearing when unselecting any MailChimp list in Form settings
|
446 |
+
- If an error occurs, textareas will no longer lose their value
|
447 |
+
|
448 |
+
**Improvements**
|
449 |
+
|
450 |
+
- Improved the way form submissions are handled
|
451 |
+
- Minor code & documentation improvements
|
452 |
+
- Updated Dutch, French, Portugese and Spanish translations
|
453 |
+
|
454 |
+
**Additions**
|
455 |
+
|
456 |
+
- Added sign-up checkbox integration for [WooCommerce](https://wordpress.org/plugins/woocommerce/) checkout.
|
457 |
+
- Added sign-up checkbox integration for [Easy Digital Downloads](https://wordpress.org/plugins/easy-digital-downloads/) checkout.
|
458 |
+
- The entered email will now be appended to the URL when redirecting to another page
|
assets/css/codemirror.css
DELETED
@@ -1,334 +0,0 @@
|
|
1 |
-
/* BASICS */
|
2 |
-
|
3 |
-
.CodeMirror {
|
4 |
-
/* Set height, width, borders, and global font properties here */
|
5 |
-
font-family: monospace;
|
6 |
-
height: 300px;
|
7 |
-
color: black;
|
8 |
-
}
|
9 |
-
|
10 |
-
/* PADDING */
|
11 |
-
|
12 |
-
.CodeMirror-lines {
|
13 |
-
padding: 4px 0; /* Vertical padding around content */
|
14 |
-
}
|
15 |
-
.CodeMirror pre {
|
16 |
-
padding: 0 4px; /* Horizontal padding of content */
|
17 |
-
}
|
18 |
-
|
19 |
-
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
20 |
-
background-color: white; /* The little square between H and V scrollbars */
|
21 |
-
}
|
22 |
-
|
23 |
-
/* GUTTER */
|
24 |
-
|
25 |
-
.CodeMirror-gutters {
|
26 |
-
border-right: 1px solid #ddd;
|
27 |
-
background-color: #f7f7f7;
|
28 |
-
white-space: nowrap;
|
29 |
-
}
|
30 |
-
.CodeMirror-linenumbers {}
|
31 |
-
.CodeMirror-linenumber {
|
32 |
-
padding: 0 3px 0 5px;
|
33 |
-
min-width: 20px;
|
34 |
-
text-align: right;
|
35 |
-
color: #999;
|
36 |
-
white-space: nowrap;
|
37 |
-
}
|
38 |
-
|
39 |
-
.CodeMirror-guttermarker { color: black; }
|
40 |
-
.CodeMirror-guttermarker-subtle { color: #999; }
|
41 |
-
|
42 |
-
/* CURSOR */
|
43 |
-
|
44 |
-
.CodeMirror-cursor {
|
45 |
-
border-left: 1px solid black;
|
46 |
-
border-right: none;
|
47 |
-
width: 0;
|
48 |
-
}
|
49 |
-
/* Shown when moving in bi-directional text */
|
50 |
-
.CodeMirror div.CodeMirror-secondarycursor {
|
51 |
-
border-left: 1px solid silver;
|
52 |
-
}
|
53 |
-
.cm-fat-cursor .CodeMirror-cursor {
|
54 |
-
width: auto;
|
55 |
-
border: 0;
|
56 |
-
background: #7e7;
|
57 |
-
}
|
58 |
-
.cm-fat-cursor div.CodeMirror-cursors {
|
59 |
-
z-index: 1;
|
60 |
-
}
|
61 |
-
|
62 |
-
.cm-animate-fat-cursor {
|
63 |
-
width: auto;
|
64 |
-
border: 0;
|
65 |
-
-webkit-animation: blink 1.06s steps(1) infinite;
|
66 |
-
-moz-animation: blink 1.06s steps(1) infinite;
|
67 |
-
animation: blink 1.06s steps(1) infinite;
|
68 |
-
background-color: #7e7;
|
69 |
-
}
|
70 |
-
@-moz-keyframes blink {
|
71 |
-
0% {}
|
72 |
-
50% { background-color: transparent; }
|
73 |
-
100% {}
|
74 |
-
}
|
75 |
-
@-webkit-keyframes blink {
|
76 |
-
0% {}
|
77 |
-
50% { background-color: transparent; }
|
78 |
-
100% {}
|
79 |
-
}
|
80 |
-
@keyframes blink {
|
81 |
-
0% {}
|
82 |
-
50% { background-color: transparent; }
|
83 |
-
100% {}
|
84 |
-
}
|
85 |
-
|
86 |
-
/* Can style cursor different in overwrite (non-insert) mode */
|
87 |
-
.CodeMirror-overwrite .CodeMirror-cursor {}
|
88 |
-
|
89 |
-
.cm-tab { display: inline-block; text-decoration: inherit; }
|
90 |
-
|
91 |
-
.CodeMirror-ruler {
|
92 |
-
border-left: 1px solid #ccc;
|
93 |
-
position: absolute;
|
94 |
-
}
|
95 |
-
|
96 |
-
/* DEFAULT THEME */
|
97 |
-
|
98 |
-
.cm-s-default .cm-header {color: blue;}
|
99 |
-
.cm-s-default .cm-quote {color: #090;}
|
100 |
-
.cm-negative {color: #d44;}
|
101 |
-
.cm-positive {color: #292;}
|
102 |
-
.cm-header, .cm-strong {font-weight: bold;}
|
103 |
-
.cm-em {font-style: italic;}
|
104 |
-
.cm-link {text-decoration: underline;}
|
105 |
-
.cm-strikethrough {text-decoration: line-through;}
|
106 |
-
|
107 |
-
.cm-s-default .cm-keyword {color: #708;}
|
108 |
-
.cm-s-default .cm-atom {color: #219;}
|
109 |
-
.cm-s-default .cm-number {color: #164;}
|
110 |
-
.cm-s-default .cm-def {color: #00f;}
|
111 |
-
.cm-s-default .cm-variable,
|
112 |
-
.cm-s-default .cm-punctuation,
|
113 |
-
.cm-s-default .cm-property,
|
114 |
-
.cm-s-default .cm-operator {}
|
115 |
-
.cm-s-default .cm-variable-2 {color: #05a;}
|
116 |
-
.cm-s-default .cm-variable-3 {color: #085;}
|
117 |
-
.cm-s-default .cm-comment {color: #a50;}
|
118 |
-
.cm-s-default .cm-string {color: #a11;}
|
119 |
-
.cm-s-default .cm-string-2 {color: #f50;}
|
120 |
-
.cm-s-default .cm-meta {color: #555;}
|
121 |
-
.cm-s-default .cm-qualifier {color: #555;}
|
122 |
-
.cm-s-default .cm-builtin {color: #30a;}
|
123 |
-
.cm-s-default .cm-bracket {color: #997;}
|
124 |
-
.cm-s-default .cm-tag {color: #170;}
|
125 |
-
.cm-s-default .cm-attribute {color: #00c;}
|
126 |
-
.cm-s-default .cm-hr {color: #999;}
|
127 |
-
.cm-s-default .cm-link {color: #00c;}
|
128 |
-
|
129 |
-
.cm-s-default .cm-error {color: #f00;}
|
130 |
-
.cm-invalidchar {color: #f00;}
|
131 |
-
|
132 |
-
.CodeMirror-composing { border-bottom: 2px solid; }
|
133 |
-
|
134 |
-
/* Default styles for common addons */
|
135 |
-
|
136 |
-
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
137 |
-
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
138 |
-
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
139 |
-
.CodeMirror-activeline-background {background: #e8f2ff;}
|
140 |
-
|
141 |
-
/* STOP */
|
142 |
-
|
143 |
-
/* The rest of this file contains styles related to the mechanics of
|
144 |
-
the editor. You probably shouldn't touch them. */
|
145 |
-
|
146 |
-
.CodeMirror {
|
147 |
-
position: relative;
|
148 |
-
overflow: hidden;
|
149 |
-
background: white;
|
150 |
-
}
|
151 |
-
|
152 |
-
.CodeMirror-scroll {
|
153 |
-
overflow: scroll !important; /* Things will break if this is overridden */
|
154 |
-
/* 30px is the magic margin used to hide the element's real scrollbars */
|
155 |
-
/* See overflow: hidden in .CodeMirror */
|
156 |
-
margin-bottom: -30px; margin-right: -30px;
|
157 |
-
padding-bottom: 30px;
|
158 |
-
height: 100%;
|
159 |
-
outline: none; /* Prevent dragging from highlighting the element */
|
160 |
-
position: relative;
|
161 |
-
}
|
162 |
-
.CodeMirror-sizer {
|
163 |
-
position: relative;
|
164 |
-
border-right: 30px solid transparent;
|
165 |
-
}
|
166 |
-
|
167 |
-
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
168 |
-
before actuall scrolling happens, thus preventing shaking and
|
169 |
-
flickering artifacts. */
|
170 |
-
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
171 |
-
position: absolute;
|
172 |
-
z-index: 6;
|
173 |
-
display: none;
|
174 |
-
}
|
175 |
-
.CodeMirror-vscrollbar {
|
176 |
-
right: 0; top: 0;
|
177 |
-
overflow-x: hidden;
|
178 |
-
overflow-y: scroll;
|
179 |
-
}
|
180 |
-
.CodeMirror-hscrollbar {
|
181 |
-
bottom: 0; left: 0;
|
182 |
-
overflow-y: hidden;
|
183 |
-
overflow-x: scroll;
|
184 |
-
}
|
185 |
-
.CodeMirror-scrollbar-filler {
|
186 |
-
right: 0; bottom: 0;
|
187 |
-
}
|
188 |
-
.CodeMirror-gutter-filler {
|
189 |
-
left: 0; bottom: 0;
|
190 |
-
}
|
191 |
-
|
192 |
-
.CodeMirror-gutters {
|
193 |
-
position: absolute; left: 0; top: 0;
|
194 |
-
z-index: 3;
|
195 |
-
}
|
196 |
-
.CodeMirror-gutter {
|
197 |
-
white-space: normal;
|
198 |
-
height: 100%;
|
199 |
-
display: inline-block;
|
200 |
-
margin-bottom: -30px;
|
201 |
-
/* Hack to make IE7 behave */
|
202 |
-
*zoom:1;
|
203 |
-
*display:inline;
|
204 |
-
}
|
205 |
-
.CodeMirror-gutter-wrapper {
|
206 |
-
position: absolute;
|
207 |
-
z-index: 4;
|
208 |
-
background: none !important;
|
209 |
-
border: none !important;
|
210 |
-
}
|
211 |
-
.CodeMirror-gutter-background {
|
212 |
-
position: absolute;
|
213 |
-
top: 0; bottom: 0;
|
214 |
-
z-index: 4;
|
215 |
-
}
|
216 |
-
.CodeMirror-gutter-elt {
|
217 |
-
position: absolute;
|
218 |
-
cursor: default;
|
219 |
-
z-index: 4;
|
220 |
-
}
|
221 |
-
.CodeMirror-gutter-wrapper {
|
222 |
-
-webkit-user-select: none;
|
223 |
-
-moz-user-select: none;
|
224 |
-
user-select: none;
|
225 |
-
}
|
226 |
-
|
227 |
-
.CodeMirror-lines {
|
228 |
-
cursor: text;
|
229 |
-
min-height: 1px; /* prevents collapsing before first draw */
|
230 |
-
}
|
231 |
-
.CodeMirror pre {
|
232 |
-
/* Reset some styles that the rest of the page might have set */
|
233 |
-
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
234 |
-
border-width: 0;
|
235 |
-
background: transparent;
|
236 |
-
font-family: inherit;
|
237 |
-
font-size: inherit;
|
238 |
-
margin: 0;
|
239 |
-
white-space: pre;
|
240 |
-
word-wrap: normal;
|
241 |
-
line-height: inherit;
|
242 |
-
color: inherit;
|
243 |
-
z-index: 2;
|
244 |
-
position: relative;
|
245 |
-
overflow: visible;
|
246 |
-
-webkit-tap-highlight-color: transparent;
|
247 |
-
}
|
248 |
-
.CodeMirror-wrap pre {
|
249 |
-
word-wrap: break-word;
|
250 |
-
white-space: pre-wrap;
|
251 |
-
word-break: normal;
|
252 |
-
}
|
253 |
-
|
254 |
-
.CodeMirror-linebackground {
|
255 |
-
position: absolute;
|
256 |
-
left: 0; right: 0; top: 0; bottom: 0;
|
257 |
-
z-index: 0;
|
258 |
-
}
|
259 |
-
|
260 |
-
.CodeMirror-linewidget {
|
261 |
-
position: relative;
|
262 |
-
z-index: 2;
|
263 |
-
overflow: auto;
|
264 |
-
}
|
265 |
-
|
266 |
-
.CodeMirror-widget {}
|
267 |
-
|
268 |
-
.CodeMirror-code {
|
269 |
-
outline: none;
|
270 |
-
}
|
271 |
-
|
272 |
-
/* Force content-box sizing for the elements where we expect it */
|
273 |
-
.CodeMirror-scroll,
|
274 |
-
.CodeMirror-sizer,
|
275 |
-
.CodeMirror-gutter,
|
276 |
-
.CodeMirror-gutters,
|
277 |
-
.CodeMirror-linenumber {
|
278 |
-
-moz-box-sizing: content-box;
|
279 |
-
box-sizing: content-box;
|
280 |
-
}
|
281 |
-
|
282 |
-
.CodeMirror-measure {
|
283 |
-
position: absolute;
|
284 |
-
width: 100%;
|
285 |
-
height: 0;
|
286 |
-
overflow: hidden;
|
287 |
-
visibility: hidden;
|
288 |
-
}
|
289 |
-
|
290 |
-
.CodeMirror-cursor { position: absolute; }
|
291 |
-
.CodeMirror-measure pre { position: static; }
|
292 |
-
|
293 |
-
div.CodeMirror-cursors {
|
294 |
-
visibility: hidden;
|
295 |
-
position: relative;
|
296 |
-
z-index: 3;
|
297 |
-
}
|
298 |
-
div.CodeMirror-dragcursors {
|
299 |
-
visibility: visible;
|
300 |
-
}
|
301 |
-
|
302 |
-
.CodeMirror-focused div.CodeMirror-cursors {
|
303 |
-
visibility: visible;
|
304 |
-
}
|
305 |
-
|
306 |
-
.CodeMirror-selected { background: #d9d9d9; }
|
307 |
-
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
308 |
-
.CodeMirror-crosshair { cursor: crosshair; }
|
309 |
-
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
310 |
-
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
311 |
-
|
312 |
-
.cm-searching {
|
313 |
-
background: #ffa;
|
314 |
-
background: rgba(255, 255, 0, .4);
|
315 |
-
}
|
316 |
-
|
317 |
-
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
318 |
-
.CodeMirror span { *vertical-align: text-bottom; }
|
319 |
-
|
320 |
-
/* Used to force a border model for a node */
|
321 |
-
.cm-force-border { padding-right: .1px; }
|
322 |
-
|
323 |
-
@media print {
|
324 |
-
/* Hide the cursor when printing */
|
325 |
-
.CodeMirror div.CodeMirror-cursors {
|
326 |
-
visibility: hidden;
|
327 |
-
}
|
328 |
-
}
|
329 |
-
|
330 |
-
/* See issue #2901 */
|
331 |
-
.cm-tab-wrap-hack:after { content: ''; }
|
332 |
-
|
333 |
-
/* Help users use markselection to safely style text background */
|
334 |
-
span.CodeMirror-selectedtext { background: none; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/codemirror.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected,.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}
|
|
assets/css/form-basic.css
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
/* MailChimp for WP - Default Form Styles */
|
2 |
.mc4wp-form-basic,
|
3 |
.mc4wp-form-theme {
|
1 |
+
.mc4wp-form input[name^="_mc4wp_honey"] {
|
2 |
+
display: none !important; }
|
3 |
+
|
4 |
/* MailChimp for WP - Default Form Styles */
|
5 |
.mc4wp-form-basic,
|
6 |
.mc4wp-form-theme {
|
assets/css/form-basic.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.mc4wp-form-basic,.mc4wp-form-theme{margin:1em 0}.mc4wp-form-basic,.mc4wp-form-basic input,.mc4wp-form-basic label,.mc4wp-form-theme,.mc4wp-form-theme input,.mc4wp-form-theme label{width:auto;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-basic:after,.mc4wp-form-theme:after{content:"";display:table;clear:both}.mc4wp-form-basic label,.mc4wp-form-theme label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-basic input.placeholdersjs,.mc4wp-form-theme input.placeholdersjs{color:#aaa!important}.mc4wp-form-basic input[type=text],.mc4wp-form-basic input[type=email],.mc4wp-form-basic input[type=tel],.mc4wp-form-basic input[type=url],.mc4wp-form-basic input[type=date],.mc4wp-form-basic select,.mc4wp-form-basic textarea,.mc4wp-form-theme input[type=text],.mc4wp-form-theme input[type=email],.mc4wp-form-theme input[type=tel],.mc4wp-form-theme input[type=url],.mc4wp-form-theme input[type=date],.mc4wp-form-theme select,.mc4wp-form-theme textarea{min-height:28px;width:100%;max-width:480px}.mc4wp-form-basic input[type=number],.mc4wp-form-theme input[type=number]{min-width:40px}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=checkbox],.mc4wp-form-theme input[type=radio]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-theme input[type=checkbox]{-webkit-appearance:checkbox;-moz-appearance:checkbox;appearance:checkbox}.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=radio]{-webkit-appearance:radio;-moz-appearance:radio;appearance:radio}.mc4wp-form-basic button,.mc4wp-form-basic input[type=
|
1 |
+
.mc4wp-form input[name^="_mc4wp_honey"]{display:none!important}.mc4wp-form-basic,.mc4wp-form-theme{margin:1em 0}.mc4wp-form-basic,.mc4wp-form-basic input,.mc4wp-form-basic label,.mc4wp-form-theme,.mc4wp-form-theme input,.mc4wp-form-theme label{width:auto;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-basic:after,.mc4wp-form-theme:after{content:"";display:table;clear:both}.mc4wp-form-basic label,.mc4wp-form-theme label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-basic input.placeholdersjs,.mc4wp-form-theme input.placeholdersjs{color:#aaa!important}.mc4wp-form-basic input[type=text],.mc4wp-form-basic input[type=email],.mc4wp-form-basic input[type=tel],.mc4wp-form-basic input[type=url],.mc4wp-form-basic input[type=date],.mc4wp-form-basic select,.mc4wp-form-basic textarea,.mc4wp-form-theme input[type=text],.mc4wp-form-theme input[type=email],.mc4wp-form-theme input[type=tel],.mc4wp-form-theme input[type=url],.mc4wp-form-theme input[type=date],.mc4wp-form-theme select,.mc4wp-form-theme textarea{min-height:28px;width:100%;max-width:480px}.mc4wp-form-basic input[type=number],.mc4wp-form-theme input[type=number]{min-width:40px}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=checkbox],.mc4wp-form-theme input[type=radio]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-theme input[type=checkbox]{-webkit-appearance:checkbox;-moz-appearance:checkbox;appearance:checkbox}.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=radio]{-webkit-appearance:radio;-moz-appearance:radio;appearance:radio}.mc4wp-form-basic button,.mc4wp-form-basic input[type=submit],.mc4wp-form-basic input[type=button],.mc4wp-form-theme button,.mc4wp-form-theme input[type=submit],.mc4wp-form-theme input[type=button]{cursor:pointer;display:inline-block;-webkit-appearance:none;-moz-appearance:none;appearance:none}.mc4wp-form-basic label>span,.mc4wp-form-basic li>label,.mc4wp-form-theme label>span,.mc4wp-form-theme li>label{font-weight:400}.mc4wp-form-basic .mc4wp-alert,.mc4wp-form-theme .mc4wp-alert{color:#c09853;clear:both}.mc4wp-form-basic .mc4wp-success,.mc4wp-form-theme .mc4wp-success{color:#468847}.mc4wp-form-basic .mc4wp-notice,.mc4wp-form-theme .mc4wp-notice{color:#3a87ad}.mc4wp-form-basic .mc4wp-error,.mc4wp-form-theme .mc4wp-error{color:#CD5C5C}.rtl .mc4wp-form-reset input[type=checkbox],.rtl .mc4wp-form-reset input[type=radio]{margin:0 0 0 6px}
|
assets/css/form-themes.css
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
/* MailChimp for WP - Default Form Styles */
|
2 |
.mc4wp-form-basic,
|
3 |
.mc4wp-form-theme {
|
1 |
+
.mc4wp-form input[name^="_mc4wp_honey"] {
|
2 |
+
display: none !important; }
|
3 |
+
|
4 |
/* MailChimp for WP - Default Form Styles */
|
5 |
.mc4wp-form-basic,
|
6 |
.mc4wp-form-theme {
|
assets/css/form-themes.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.mc4wp-form-basic,.mc4wp-form-theme{margin:1em 0}.mc4wp-form-basic,.mc4wp-form-basic input,.mc4wp-form-basic label,.mc4wp-form-theme,.mc4wp-form-theme input,.mc4wp-form-theme label{width:auto;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-basic:after,.mc4wp-form-theme:after{content:"";display:table;clear:both}.mc4wp-form-basic label,.mc4wp-form-theme label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-basic input.placeholdersjs,.mc4wp-form-theme input.placeholdersjs{color:#aaa!important}.mc4wp-form-basic input[type=text],.mc4wp-form-basic input[type=email],.mc4wp-form-basic input[type=tel],.mc4wp-form-basic input[type=url],.mc4wp-form-basic input[type=date],.mc4wp-form-basic select,.mc4wp-form-basic textarea,.mc4wp-form-theme input[type=text],.mc4wp-form-theme input[type=email],.mc4wp-form-theme input[type=tel],.mc4wp-form-theme input[type=url],.mc4wp-form-theme input[type=date],.mc4wp-form-theme select,.mc4wp-form-theme textarea{min-height:28px;width:100%;max-width:480px}.mc4wp-form-basic input[type=number],.mc4wp-form-theme input[type=number]{min-width:40px}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=checkbox],.mc4wp-form-theme input[type=radio]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-theme input[type=checkbox]{-webkit-appearance:checkbox;-moz-appearance:checkbox;appearance:checkbox}.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=radio]{-webkit-appearance:radio;-moz-appearance:radio;appearance:radio}.mc4wp-form-basic button,.mc4wp-form-basic input[type=
|
1 |
+
.mc4wp-form input[name^="_mc4wp_honey"]{display:none!important}.mc4wp-form-basic,.mc4wp-form-theme{margin:1em 0}.mc4wp-form-basic,.mc4wp-form-basic input,.mc4wp-form-basic label,.mc4wp-form-theme,.mc4wp-form-theme input,.mc4wp-form-theme label{width:auto;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-basic:after,.mc4wp-form-theme:after{content:"";display:table;clear:both}.mc4wp-form-basic label,.mc4wp-form-theme label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-basic input.placeholdersjs,.mc4wp-form-theme input.placeholdersjs{color:#aaa!important}.mc4wp-form-basic input[type=text],.mc4wp-form-basic input[type=email],.mc4wp-form-basic input[type=tel],.mc4wp-form-basic input[type=url],.mc4wp-form-basic input[type=date],.mc4wp-form-basic select,.mc4wp-form-basic textarea,.mc4wp-form-theme input[type=text],.mc4wp-form-theme input[type=email],.mc4wp-form-theme input[type=tel],.mc4wp-form-theme input[type=url],.mc4wp-form-theme input[type=date],.mc4wp-form-theme select,.mc4wp-form-theme textarea{min-height:28px;width:100%;max-width:480px}.mc4wp-form-basic input[type=number],.mc4wp-form-theme input[type=number]{min-width:40px}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=checkbox],.mc4wp-form-theme input[type=radio]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-theme input[type=checkbox]{-webkit-appearance:checkbox;-moz-appearance:checkbox;appearance:checkbox}.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=radio]{-webkit-appearance:radio;-moz-appearance:radio;appearance:radio}.mc4wp-form-basic button,.mc4wp-form-basic input[type=submit],.mc4wp-form-basic input[type=button],.mc4wp-form-theme button,.mc4wp-form-theme input[type=submit],.mc4wp-form-theme input[type=button]{cursor:pointer;display:inline-block;-webkit-appearance:none;-moz-appearance:none;appearance:none}.mc4wp-form-basic label>span,.mc4wp-form-basic li>label,.mc4wp-form-theme label>span,.mc4wp-form-theme li>label{font-weight:400}.mc4wp-form-basic .mc4wp-alert,.mc4wp-form-theme .mc4wp-alert{color:#c09853;clear:both}.mc4wp-form-basic .mc4wp-success,.mc4wp-form-theme .mc4wp-success{color:#468847}.mc4wp-form-basic .mc4wp-notice,.mc4wp-form-theme .mc4wp-notice{color:#3a87ad}.mc4wp-form-basic .mc4wp-error,.mc4wp-form-theme .mc4wp-error{color:#CD5C5C}.rtl .mc4wp-form-reset input[type=checkbox],.rtl .mc4wp-form-reset input[type=radio]{margin:0 0 0 6px}.mc4wp-form-theme input[type=text],.mc4wp-form-theme input[type=email],.mc4wp-form-theme input[type=tel],.mc4wp-form-theme input[type=url],.mc4wp-form-theme input[type=date],.mc4wp-form-theme input[type=number],.mc4wp-form-theme select,.mc4wp-form-theme textarea{height:auto;margin:0;padding:8px 16px;line-height:1.428571429;color:#555!important;vertical-align:middle;background:#fff;border:1px solid #ccc;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);text-shadow:none}.mc4wp-form-theme button:focus,.mc4wp-form-theme input:focus,.mc4wp-form-theme select:focus,.mc4wp-form-theme textarea:focus{outline:0;background-image:none}.mc4wp-form-theme textarea{height:auto}.mc4wp-form-theme input[disabled],.mc4wp-form-theme input[readonly]{background-color:#eee}.mc4wp-form-theme button,.mc4wp-form-theme input[type=submit],.mc4wp-form-theme input[type=button]{display:inline-block;padding:8px 16px;margin:0;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-shadow:none;background:0 0;text-shadow:none;filter:none;height:auto;width:auto}.mc4wp-form-theme button:focus,.mc4wp-form-theme button:hover,.mc4wp-form-theme input[type=submit]:focus,.mc4wp-form-theme input[type=submit]:hover,.mc4wp-form-theme input[type=button]:focus,.mc4wp-form-theme input[type=button]:hover{outline:0;color:#333;text-decoration:none;background:0 0}.mc4wp-form-theme-dark button,.mc4wp-form-theme-dark input[type=submit]{color:#fff!important;background-color:#444!important;border-color:#1e1e1e}.mc4wp-form-theme-dark button:active,.mc4wp-form-theme-dark button:focus,.mc4wp-form-theme-dark button:hover,.mc4wp-form-theme-dark input[type=submit]:active,.mc4wp-form-theme-dark input[type=submit]:focus,.mc4wp-form-theme-dark input[type=submit]:hover{color:#fff!important;background-color:#1e1e1e!important;border-color:#000}.mc4wp-form-theme-dark input[type=text]:focus,.mc4wp-form-theme-dark input[type=email]:focus,.mc4wp-form-theme-dark input[type=tel]:focus,.mc4wp-form-theme-dark input[type=url]:focus,.mc4wp-form-theme-dark input[type=date]:focus,.mc4wp-form-theme-dark select:focus,.mc4wp-form-theme-dark textarea:focus{border-color:#6a6a6a;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(68,68,68,.15);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(68,68,68,.15);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(68,68,68,.15)}.mc4wp-form-theme-light button,.mc4wp-form-theme-light input[type=submit]{color:#000!important;background-color:#fff!important;border-color:#d9d9d9}.mc4wp-form-theme-light button:active,.mc4wp-form-theme-light button:focus,.mc4wp-form-theme-light button:hover,.mc4wp-form-theme-light input[type=submit]:active,.mc4wp-form-theme-light input[type=submit]:focus,.mc4wp-form-theme-light input[type=submit]:hover{color:#000!important;background-color:#d9d9d9!important;border-color:#b3b3b3}.mc4wp-form-theme-light input[type=text]:focus,.mc4wp-form-theme-light input[type=email]:focus,.mc4wp-form-theme-light input[type=tel]:focus,.mc4wp-form-theme-light input[type=url]:focus,.mc4wp-form-theme-light input[type=date]:focus,.mc4wp-form-theme-light select:focus,.mc4wp-form-theme-light textarea:focus{border-color:#d9d9d9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(255,255,255,.15);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(255,255,255,.15)}.mc4wp-form-theme-red button,.mc4wp-form-theme-red input[type=submit]{color:#fff!important;background-color:#d9534f!important;border-color:#b52b27}.mc4wp-form-theme-red button:active,.mc4wp-form-theme-red button:focus,.mc4wp-form-theme-red button:hover,.mc4wp-form-theme-red input[type=submit]:active,.mc4wp-form-theme-red input[type=submit]:focus,.mc4wp-form-theme-red input[type=submit]:hover{color:#fff!important;background-color:#b52b27!important;border-color:#761c19}.mc4wp-form-theme-red input[type=text]:focus,.mc4wp-form-theme-red input[type=email]:focus,.mc4wp-form-theme-red input[type=tel]:focus,.mc4wp-form-theme-red input[type=url]:focus,.mc4wp-form-theme-red input[type=date]:focus,.mc4wp-form-theme-red select:focus,.mc4wp-form-theme-red textarea:focus{border-color:#e7908e;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(217,83,79,.15);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(217,83,79,.15);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(217,83,79,.15)}.mc4wp-form-theme-blue button,.mc4wp-form-theme-blue input[type=submit]{color:#fff!important;background-color:#428bca!important;border-color:#2a6496}.mc4wp-form-theme-blue button:active,.mc4wp-form-theme-blue button:focus,.mc4wp-form-theme-blue button:hover,.mc4wp-form-theme-blue input[type=submit]:active,.mc4wp-form-theme-blue input[type=submit]:focus,.mc4wp-form-theme-blue input[type=submit]:hover{color:#fff!important;background-color:#2a6496!important;border-color:#193c5a}.mc4wp-form-theme-blue input[type=text]:focus,.mc4wp-form-theme-blue input[type=email]:focus,.mc4wp-form-theme-blue input[type=tel]:focus,.mc4wp-form-theme-blue input[type=url]:focus,.mc4wp-form-theme-blue input[type=date]:focus,.mc4wp-form-theme-blue select:focus,.mc4wp-form-theme-blue textarea:focus{border-color:#7eb0db;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(66,139,202,.15);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(66,139,202,.15);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(66,139,202,.15)}.mc4wp-form-theme-green button,.mc4wp-form-theme-green input[type=submit]{color:#fff!important;background-color:#5cb85c!important;border-color:#3d8b3d}.mc4wp-form-theme-green button:active,.mc4wp-form-theme-green button:focus,.mc4wp-form-theme-green button:hover,.mc4wp-form-theme-green input[type=submit]:active,.mc4wp-form-theme-green input[type=submit]:focus,.mc4wp-form-theme-green input[type=submit]:hover{color:#fff!important;background-color:#3d8b3d!important;border-color:#255625}.mc4wp-form-theme-green input[type=text]:focus,.mc4wp-form-theme-green input[type=email]:focus,.mc4wp-form-theme-green input[type=tel]:focus,.mc4wp-form-theme-green input[type=url]:focus,.mc4wp-form-theme-green input[type=date]:focus,.mc4wp-form-theme-green select:focus,.mc4wp-form-theme-green textarea:focus{border-color:#91cf91;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(92,184,92,.15);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(92,184,92,.15);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(92,184,92,.15)}
|
assets/js/admin.js
CHANGED
@@ -150,8 +150,7 @@ var Settings = function(context, helpers, events ) {
|
|
150 |
if(!unsaved) return;
|
151 |
|
152 |
e = e|| window.event;
|
153 |
-
var confirmationMessage = 'It looks like you have been editing something. '
|
154 |
-
+ 'If you leave before saving, your changes will be lost.';
|
155 |
|
156 |
e.returnValue = confirmationMessage; //Gecko + IE
|
157 |
return confirmationMessage; //Gecko + Webkit, Safari, Chrome etc.
|
@@ -2018,4 +2017,4 @@ else if (typeof define === "function" && define.amd) define(function() {return m
|
|
2018 |
}.call(this));
|
2019 |
|
2020 |
},{}]},{},[1])
|
2021 |
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJhc3NldHMvYnJvd3NlcmlmeS9hZG1pbi5qcyIsImFzc2V0cy9icm93c2VyaWZ5L2FkbWluL2hlbHBlcnMuanMiLCJhc3NldHMvYnJvd3NlcmlmeS9hZG1pbi9zZXR0aW5ncy5qcyIsImFzc2V0cy9icm93c2VyaWZ5L2FkbWluL3RhYnMuanMiLCJhc3NldHMvYnJvd3NlcmlmeS9hZG1pbi91cmwuanMiLCJub2RlX21vZHVsZXMvbWl0aHJpbC9taXRocmlsLm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nIGV2ZW50cyBpZlxuICAgICAgICAvLyB0aGUgc2VsZWN0b3IgaXMgYSByZWd1bGFyIGV4cHJlc3Npb24uXG4gICAgICAgIGlmIChldnQgaW5zdGFuY2VvZiBSZWdFeHApIHtcbiAgICAgICAgICAgIHJlc3BvbnNlID0ge307XG4gICAgICAgICAgICBmb3IgKGtleSBpbiBldmVudHMpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRzLmhhc093blByb3BlcnR5KGtleSkgJiYgZXZ0LnRlc3Qoa2V5KSkge1xuICAgICAgICAgICAgICAgICAgICByZXNwb25zZVtrZXldID0gZXZlbnRzW2tleV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcmVzcG9uc2UgPSBldmVudHNbZXZ0XSB8fCAoZXZlbnRzW2V2dF0gPSBbXSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzcG9uc2U7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFRha2VzIGEgbGlzdCBvZiBsaXN0ZW5lciBvYmplY3RzIGFuZCBmbGF0dGVucyBpdCBpbnRvIGEgbGlzdCBvZiBsaXN0ZW5lciBmdW5jdGlvbnMuXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge09iamVjdFtdfSBsaXN0ZW5lcnMgUmF3IGxpc3RlbmVyIG9iamVjdHMuXG4gICAgICogQHJldHVybiB7RnVuY3Rpb25bXX0gSnVzdCB0aGUgbGlzdGVuZXIgZnVuY3Rpb25zLlxuICAgICAqL1xuICAgIHByb3RvLmZsYXR0ZW5MaXN0ZW5lcnMgPSBmdW5jdGlvbiBmbGF0dGVuTGlzdGVuZXJzKGxpc3RlbmVycykge1xuICAgICAgICB2YXIgZmxhdExpc3RlbmVycyA9IFtdO1xuICAgICAgICB2YXIgaTtcblxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGlzdGVuZXJzLmxlbmd0aDsga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nMpIHtcbiAgICAgICAgdmFyIGk7XG4gICAgICAgIHZhciB2YWx1ZTtcbiAgICAgICAgdmFyIHNpbmdsZSA9IHJlbW92ZSA/IHRoaXMucmVtb3ZlTGlzdGVuZXIgOiB0aGlzLmFkZExpc3RlbmVyO1xuICAgICAgICB2YXIgbXVsdGlwbGUgPSByZW1vdmUgPyB0aGlzLnJlbW92ZUxpc3RlbmVycyA6IHRoaXMuYWRkTGlzdGVuZXJzO1xuXG4gICAgICAgIC8vIElmIGV2dCBpcyBhbiBvYmplY3QgdGhlbiBwYXNzIGVhY2ggb2YgaXRzIHByb3BlcnRpZXMgdG8gdGhpcyBtZXRob2RcbiAgICAgICAgaWYgKHR5cGVvZiBldnQgPT09ICdvYmplY3QnICYmICEoZXZ0IGluc3RhbmNlb2YgUmVnRXhwKSkge1xuICAgICAgICAgICAgZm9yIChpIGluIGV2dCkge1xuICAgICAgICAgICAgICAgIGlmIChldnQuaGFzT3duUHJvcGVydHkoaSkgJiYgKHZhbHVlID0gZXZ0W2ldKSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBQYXNzIHRoZSBzaW5nbGUgbGlzdGVuZXIgc3RyYWlnaHQgdGhyb3VnaCB0byB0aGUgc2luZ3VsYXIgbWV0aG9kXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNpbmdsZS5jYWxsKHRoaXMsIGksIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIE90aGVyd2lzZSBwYXNzIGJhY2sgdG8gdGhlIG11bHRpcGxlIGZ1bmN0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICBtdWx0aXBsZS5jYWxsKHRoaXMsIGksIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgIC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ZW50RW1pdHRlcjtcbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICAgIGV4cG9ydHMuRXZlbnRFbWl0dGVyID0gRXZlbnRFbWl0dGVyO1xuICAgIH1cbn0uY2FsbCh0aGlzKSk7XG4iXX0=
|
150 |
if(!unsaved) return;
|
151 |
|
152 |
e = e|| window.event;
|
153 |
+
var confirmationMessage = 'It looks like you have been editing something. If you leave before saving, your changes will be lost.';
|
|
|
154 |
|
155 |
e.returnValue = confirmationMessage; //Gecko + IE
|
156 |
return confirmationMessage; //Gecko + Webkit, Safari, Chrome etc.
|
2017 |
}.call(this));
|
2018 |
|
2019 |
},{}]},{},[1])
|
2020 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJhc3NldHMvYnJvd3NlcmlmeS9hZG1pbi5qcyIsImFzc2V0cy9icm93c2VyaWZ5L2FkbWluL2hlbHBlcnMuanMiLCJhc3NldHMvYnJvd3NlcmlmeS9hZG1pbi9zZXR0aW5ncy5qcyIsImFzc2V0cy9icm93c2VyaWZ5L2FkbWluL3RhYnMuanMiLCJhc3NldHMvYnJvd3NlcmlmeS9hZG1pbi91cmwuanMiLCJub2RlX21vZHVsZXMvbWl0aHJpbC9taXRocmlsLmpzIiwibm9kZV9tb2R1bGVzL3dvbGZ5ODctZXZlbnRlbWl0dGVyL0V2ZW50RW1pdHRlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQ3JCQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQ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XG4gICAgICAgIC8vIFJlbW92ZSBkaWZmZXJlbnQgdGhpbmdzIGRlcGVuZGluZyBvbiB0aGUgc3RhdGUgb2YgZXZ0XG4gICAgICAgIGlmICh0eXBlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgLy8gUmVtb3ZlIGFsbCBsaXN0ZW5lcnMgZm9yIHRoZSBzcGVjaWZpZWQgZXZlbnRcbiAgICAgICAgICAgIGRlbGV0ZSBldmVudHNbZXZ0XTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChldnQgaW5zdGFuY2VvZiBSZWdFeHApIHtcbiAgICAgICAgICAgIC8vIFJlbW92ZSBhbGwgZXZlbnRzIG1hdGNoaW5nIHRoZSByZWdleC5cbiAgICAgICAgICAgIGZvciAoa2V5IGluIGV2ZW50cykge1xuICAgICAgICAgICAgICAgIGlmIChldmVudHMuaGFzT3duUHJvcGVydHkoa2V5KSAmJiBldnQudGVzdChrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBldmVudHNba2V5XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAvLyBSZW1vdmUgYWxsIGxpc3RlbmVycyBpbiBhbGwgZXZlbnRzXG4gICAgICAgICAgICBkZWxldGUgdGhpcy5fZXZlbnRzO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIEFsaWFzIG9mIHJlbW92ZUV2ZW50LlxuICAgICAqXG4gICAgICogQWRkZWQgdG8gbWlycm9yIHRoZSBub2RlIEFQSS5cbiAgICAgKi9cbiAgICBwcm90by5yZW1vdmVBbGxMaXN0ZW5lcnMgPSBhbGlhcygncmVtb3ZlRXZlbnQnKTtcblxuICAgIC8qKlxuICAgICAqIEVtaXRzIGFuIGV2ZW50IG9mIHlvdXIgY2hvaWNlLlxuICAgICAqIFdoZ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XJzTWFwID0gdGhpcy5nZXRMaXN0ZW5lcnNBc09iamVjdChldnQpO1xuICAgICAgICB2YXIgbGlzdGVuZXJzO1xuICAgICAgICB2YXIgbGlzdGVuZXI7XG4gICAgICAgIHZhciBpO1xuICAgICAgICB2YXIga2V5O1xuICAgICAgICB2YXIgcmVzcG9uc2U7XG5cbiAgICAgICAgZm9yIChrZXkgaW4gbGlzdGVuZXJzTWFwKSB7XG4gICAgICAgICAgICBpZiAobGlzdGVuZXJzTWFwLmhhc093blByb3BlcnR5KGtleSkpIHtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnNNYXBba2V5XS5zbGljZSgwKTtcbiAgICAgICAgICAgICAgICBpID0gbGlzdGVuZXJzLmxlbmd0aDtcblxuICAgICAgICAgICAgICAgIHdoaWxlIChpLS0pIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhlIGxpc3RlbmVyIHJldHVybnMgdHJ1ZSB0aGVuIGl0IHNoYWxsIGJlIHJlbW92ZWQgZnJvbSB0aGUgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhlIGZ1bmN0aW9uIGlzIGV4ZWN1dGVkIGVpdGhlciB3aXRoIGEgYmFzaWMgY2FsbCBvciBhbiBhcHBseSBpZiB0aGVyZSBpcyBhbiBhcmdzIGFycmF5XG4gICAgICAgICAgICAgICAgICAgIGxpc3RlbmVyID0gbGlzdGVuZXJzW2ldO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChsaXN0ZW5lci5vbmNlID09PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZUxpc3RlbmVyKGV2dCwgbGlzdGVuZXIubGlzdGVuZXIpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBsaXN0ZW5lci5saXN0ZW5lci5hcHBseSh0aGlzLCBhcmdzIHx8IFtdKTtcblxuICAgICAgIC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MgcHJldmlvdXMgdmFsdWUgYW5kIHJldHVybnMgYSByZWZlcmVuY2UgdG8gdGhpcyB2ZXJzaW9uLlxuICAgICAqXG4gICAgICogQHJldHVybiB7RnVuY3Rpb259IE5vbiBjb25mbGljdGluZyBFdmVudEVtaXR0ZXIgY2xhc3MuXG4gICAgICovXG4gICAgRXZlbnRFbWl0dGVyLm5vQ29uZmxpY3QgPSBmdW5jdGlvbiBub0NvbmZsaWN0KCkge1xuICAgICAgICBleHBvcnRzLkV2ZW50RW1pdHRlciA9IG9yaWdpbmFsR2xvYmFsVmFsdWU7XG4gICAgICAgIHJldHVybiBFdmVudEVtaXR0ZXI7XG4gICAgfTtcblxuICAgIC8vIEV4cG9zZSB0aGUgY2xhc3MgZWl0aGVyIHZpYSBBTUQsIENvbW1vbkpTIG9yIHRoZSBnbG9iYWwgb2JqZWN0XG4gICAgaWYgKHR5cGVvZiBkZWZpbmUgPT09ICdmdW5jdGlvbicgJiYgZGVmaW5lLmFtZCkge1xuICAgICAgICBkZWZpbmUoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIEV2ZW50RW1pdHRlcjtcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIGVsc2UgaWYgKHR5cGVvZiBtb2R1bGUgPT09ICdvYmplY3QnICYmIG1vZHVsZS5leHBvcnRzKXtcbiAgICAgICAgbW9kdWxlLmV4cG9ydHMgPSBFdmVudEVtaXR0ZXI7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICBleHBvcnRzLkV2ZW50RW1pdHRlciA9IEV2ZW50RW1pdHRlcjtcbiAgICB9XG59LmNhbGwodGhpcykpO1xuIl19
|
assets/js/forms-admin.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
2 |
-
var rows = function(m) {
|
3 |
'use strict';
|
4 |
|
5 |
var r = {};
|
@@ -7,7 +7,7 @@ var rows = function(m) {
|
|
7 |
r.label = function (config) {
|
8 |
// label row
|
9 |
return m("div", [
|
10 |
-
m("label",
|
11 |
m("input.widefat", {
|
12 |
type : "text",
|
13 |
value : config.label(),
|
@@ -19,7 +19,7 @@ var rows = function(m) {
|
|
19 |
|
20 |
r.defaultValue = function (config) {
|
21 |
return m("div", [
|
22 |
-
m("label",
|
23 |
m("input.widefat", {
|
24 |
type : "text",
|
25 |
value : config.value(),
|
@@ -32,11 +32,11 @@ var rows = function(m) {
|
|
32 |
return m('div', [
|
33 |
m('div.row', [
|
34 |
m('div.col.col-3', [
|
35 |
-
m('label',
|
36 |
m('input', {type: 'number', onchange: m.withAttr('value', config.min)})
|
37 |
]),
|
38 |
m('div.col.col-3', [
|
39 |
-
m('label',
|
40 |
m('input', {type: 'number', onchange: m.withAttr('value', config.max)})
|
41 |
])
|
42 |
])
|
@@ -52,7 +52,7 @@ var rows = function(m) {
|
|
52 |
checked : config.required(),
|
53 |
onchange: m.withAttr('checked', config.required)
|
54 |
}),
|
55 |
-
|
56 |
])
|
57 |
]);
|
58 |
};
|
@@ -67,7 +67,7 @@ var rows = function(m) {
|
|
67 |
checked : config.placeholder(),
|
68 |
onchange: m.withAttr('checked', config.placeholder)
|
69 |
}),
|
70 |
-
|
71 |
])
|
72 |
]);
|
73 |
}
|
@@ -81,14 +81,14 @@ var rows = function(m) {
|
|
81 |
checked : config.wrap(),
|
82 |
onchange: m.withAttr('checked', config.wrap)
|
83 |
}),
|
84 |
-
|
85 |
])
|
86 |
]);
|
87 |
};
|
88 |
|
89 |
r.choiceType = function (config) {
|
90 |
return m('div', [
|
91 |
-
m('label',
|
92 |
m('select', {
|
93 |
value : config.type(),
|
94 |
onchange: m.withAttr('value', config.type)
|
@@ -96,15 +96,15 @@ var rows = function(m) {
|
|
96 |
m('option', {
|
97 |
value : 'select',
|
98 |
selected: config.type() === 'select' ? 'selected' : false
|
99 |
-
},
|
100 |
m('option', {
|
101 |
value : 'radio',
|
102 |
selected: config.type() === 'radio' ? 'selected' : false
|
103 |
-
},
|
104 |
m('option', {
|
105 |
value : 'checkbox',
|
106 |
selected: config.type() === 'checkbox' ? 'selected' : false
|
107 |
-
},
|
108 |
])
|
109 |
]);
|
110 |
};
|
@@ -113,7 +113,7 @@ var rows = function(m) {
|
|
113 |
|
114 |
|
115 |
return m('div', [
|
116 |
-
m('label',
|
117 |
m('div.limit-height', [
|
118 |
m("table", [
|
119 |
|
@@ -154,9 +154,9 @@ var rows = function(m) {
|
|
154 |
|
155 |
module.exports = rows;
|
156 |
},{}],2:[function(require,module,exports){
|
157 |
-
var forms = function(m) {
|
158 |
var forms = {};
|
159 |
-
var rows = require('./field-forms-rows.js')(m);
|
160 |
|
161 |
// route to one of the other form configs, default to "text"
|
162 |
forms.render = function(config) {
|
@@ -349,12 +349,12 @@ var g = function(m) {
|
|
349 |
|
350 |
module.exports = g;
|
351 |
},{"../third-party/beautify-html.js":11,"../third-party/render.js":12}],4:[function(require,module,exports){
|
352 |
-
var FieldHelper = function(m, tabs, editor, fields) {
|
353 |
'use strict';
|
354 |
|
355 |
var generate = require('./field-generator.js')(m);
|
356 |
-
var overlay = require('./overlay.js')(m);
|
357 |
-
var forms = require('./field-forms.js')(m);
|
358 |
var fieldConfig;
|
359 |
|
360 |
editor.on('blur', m.redraw);
|
@@ -406,7 +406,7 @@ var FieldHelper = function(m, tabs, editor, fields) {
|
|
406 |
var availableFields = fields.getAll();
|
407 |
|
408 |
var fieldsChoice = m( "div.available-fields.small-margin", [
|
409 |
-
m("strong",
|
410 |
|
411 |
(availableFields.length) ?
|
412 |
|
@@ -434,12 +434,7 @@ var FieldHelper = function(m, tabs, editor, fields) {
|
|
434 |
:
|
435 |
|
436 |
// no fields
|
437 |
-
m( "p",
|
438 |
-
"No fields, did you ",
|
439 |
-
m("a", {
|
440 |
-
onclick: function() { tabs.open('settings'); }
|
441 |
-
}, "select a MailChimp list in the form settings?")
|
442 |
-
])
|
443 |
]);
|
444 |
|
445 |
// build DOM for overlay
|
@@ -468,7 +463,7 @@ var FieldHelper = function(m, tabs, editor, fields) {
|
|
468 |
"class": "button-primary",
|
469 |
type: "button",
|
470 |
onclick: createFieldHTMLAndAddToForm
|
471 |
-
},
|
472 |
])
|
473 |
]), setActiveField);
|
474 |
}
|
@@ -488,7 +483,7 @@ var FieldHelper = function(m, tabs, editor, fields) {
|
|
488 |
|
489 |
module.exports = FieldHelper;
|
490 |
},{"./field-forms.js":2,"./field-generator.js":3,"./overlay.js":9}],5:[function(require,module,exports){
|
491 |
-
var FieldFactory = function(settings, fields) {
|
492 |
'use strict';
|
493 |
|
494 |
/**
|
@@ -567,11 +562,11 @@ var FieldFactory = function(settings, fields) {
|
|
567 |
if( data.type !== 'address' ) {
|
568 |
register(data);
|
569 |
} else {
|
570 |
-
register({ name: data.name + '[addr1]', type: 'text', title:
|
571 |
-
register({ name: data.name + '[city]', type: 'text', title:
|
572 |
-
register({ name: data.name + '[state]', type: 'text', title:
|
573 |
-
register({ name: data.name + '[zip]', type: 'text', title:
|
574 |
-
register({ name: data.name + '[country]', type: 'select', title:
|
575 |
}
|
576 |
|
577 |
return true;
|
@@ -613,9 +608,9 @@ var FieldFactory = function(settings, fields) {
|
|
613 |
// register submit button
|
614 |
register({
|
615 |
name: '',
|
616 |
-
value:
|
617 |
type: "submit",
|
618 |
-
title:
|
619 |
});
|
620 |
|
621 |
// register lists choice field
|
@@ -626,9 +621,9 @@ var FieldFactory = function(settings, fields) {
|
|
626 |
register({
|
627 |
name: '_mc4wp_lists',
|
628 |
type: 'checkbox',
|
629 |
-
title:
|
630 |
choices: choices,
|
631 |
-
help:
|
632 |
});
|
633 |
|
634 |
choices = {
|
@@ -638,10 +633,10 @@ var FieldFactory = function(settings, fields) {
|
|
638 |
register({
|
639 |
name: '_mc4wp_action',
|
640 |
type: 'radio',
|
641 |
-
title:
|
642 |
choices: choices,
|
643 |
value: 'subscribe',
|
644 |
-
help:
|
645 |
});
|
646 |
}
|
647 |
|
@@ -1074,7 +1069,7 @@ var FormWatcher = function(m, editor, settings, fields, events) {
|
|
1074 |
|
1075 |
module.exports = FormWatcher;
|
1076 |
},{}],9:[function(require,module,exports){
|
1077 |
-
var overlay = function(
|
1078 |
'use strict';
|
1079 |
|
1080 |
var _element,
|
@@ -1126,7 +1121,7 @@ var overlay = function( m ) {
|
|
1126 |
// close icon
|
1127 |
m('span', {
|
1128 |
"class": 'close dashicons dashicons-no',
|
1129 |
-
title :
|
1130 |
onclick: onCloseCallback
|
1131 |
}),
|
1132 |
|
@@ -1135,7 +1130,7 @@ var overlay = function( m ) {
|
|
1135 |
)
|
1136 |
,
|
1137 |
m('div.overlay-background', {
|
1138 |
-
title
|
1139 |
onclick: onCloseCallback
|
1140 |
})
|
1141 |
];
|
@@ -1147,6 +1142,7 @@ module.exports = overlay;
|
|
1147 |
'use strict';
|
1148 |
|
1149 |
// deps
|
|
|
1150 |
var m = window.mc4wp.deps.mithril;
|
1151 |
var events = mc4wp.events;
|
1152 |
var settings = mc4wp.settings;
|
@@ -1161,13 +1157,13 @@ var fields = require('./admin/fields.js')(m, events);
|
|
1161 |
var textareaElement = document.getElementById('mc4wp-form-content');
|
1162 |
var editor = window.formEditor = new FormEditor( textareaElement );
|
1163 |
var watcher = new FormWatcher( m, formEditor, settings, fields, events );
|
1164 |
-
var fieldHelper = new FieldHelper( m, tabs, formEditor, fields );
|
1165 |
|
1166 |
// mount field helper on element
|
1167 |
m.mount( document.getElementById( 'mc4wp-field-wizard'), fieldHelper );
|
1168 |
|
1169 |
// register fields and redraw screen in 2 seconds (fixes IE8 bug)
|
1170 |
-
var fieldsFactory = new FieldsFactory(settings,fields);
|
1171 |
events.on('selectedLists.change', fieldsFactory.work);
|
1172 |
fieldsFactory.work(settings.getSelectedLists());
|
1173 |
window.setTimeout( function() {m.redraw();}, 2000 );
|
@@ -13484,4 +13480,4 @@ if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
|
|
13484 |
});
|
13485 |
|
13486 |
},{"../../lib/codemirror":16}]},{},[10])
|
13487 |
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJhc3NldHMvYnJvd3NlcmlmeS9hZG1pbi9maWVsZC1mb3Jtcy1yb3dzLmpzIiwiYXNzZXRzL2Jyb3dzZXJpZnkvYWRtaW4vZmllbGQtZm9ybXMuanMiLCJhc3NldHMvYnJvd3NlcmlmeS9hZG1pbi9maWVsZC1nZW5lcmF0b3IuanMiLCJhc3NldHMvYnJvd3NlcmlmeS9hZG1pbi9maWVsZC1oZWxwZXIuanMiLCJhc3NldHMvYnJvd3NlcmlmeS9hZG1pbi9maWVsZHMtZmFjdG9yeS5qcyIsImFzc2V0cy9icm93c2VyaWZ5L2FkbWluL2ZpZWxkcy5qcyIsImFzc2V0cy9icm93c2VyaWZ5L2FkbWluL2Zvcm0tZWRpdG9yLmpzIiwiYXNzZXRzL2Jyb3dzZXJpZnkvYWRtaW4vZm9ybS13YXRjaGVyLmpzIiwiYXNzZXRzL2Jyb3dzZXJpZnkvYWRtaW4vb3ZlcmxheS5qcyIsImFzc2V0cy9icm93c2VyaWZ5L2Zvcm1zLWFkbWluLmpzIiwiYXNzZXRzL2Jyb3dzZXJpZnkvdGhpcmQtcGFydHkvYmVhdXRpZnktaHRtbC5qcyIsImFzc2V0cy9icm93c2VyaWZ5L3RoaXJkLXBhcnR5L3JlbmRlci5qcyIsIm5vZGVfbW9kdWxlcy9jb2RlbWlycm9yL2FkZG9uL2VkaXQvY2xvc2V0YWcuanM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