MailPoet Newsletters (New) - Version 3.0.2

Version Description

  • 2017-10-03 =
  • Improved: plugin capabilities can be managed with Members plugin;
  • Improved: removes unsightly horizontal scrollbar in some parts of the newsletter editor;
  • Improved: email templates to be displayed in order of last modification;
  • Fixed: it's not possible to submit a subscription form multiple times with an existing e-mail address anymore. Thanks Suyog Palav and Bits of Freedom!
  • Fixed: users subscribed before registering on a site are synchronized during WP users sync. Thanks Nicolas!
Download this release

Release Info

Developer wysija
Plugin Icon 128x128 MailPoet Newsletters (New)
Version 3.0.2
Comparing to
See all releases

Code changes from version 3.0.1 to 3.0.2

Files changed (52) hide show
  1. assets/css/admin-global.4193f33b.css +32 -0
  2. assets/css/manifest.json +2 -1
  3. assets/css/{newsletter_editor.47c884ae.css → newsletter_editor.40bfeff4.css} +2 -2
  4. assets/fonts/index.php +0 -0
  5. assets/fonts/mailpoet.svg +11 -0
  6. assets/fonts/mailpoet.ttf +0 -0
  7. assets/fonts/mailpoet.woff +0 -0
  8. assets/js/{admin.e3b1aa46.js → admin.5545d8c1.js} +504 -483
  9. assets/js/{admin_vendor.53a6d3ec.js → admin_vendor.5bfea06b.js} +0 -0
  10. assets/js/manifest.json +4 -4
  11. assets/js/{newsletter_editor.2627c560.js → newsletter_editor.ea5d61a2.js} +504 -483
  12. assets/js/{vendor.b4463523.js → vendor.3c88b878.js} +1 -1
  13. lang/index.php +0 -3
  14. lang/mailpoet-da_DK.mo +0 -0
  15. lang/mailpoet-de_DE.mo +0 -0
  16. lang/mailpoet-en_GB.mo +0 -0
  17. lang/mailpoet-es_ES.mo +0 -0
  18. lang/mailpoet-fa_IR.mo +0 -0
  19. lang/mailpoet-fr_CA.mo +0 -0
  20. lang/mailpoet-fr_FR.mo +0 -0
  21. lang/mailpoet-it_IT.mo +0 -0
  22. lang/mailpoet-ja.mo +0 -0
  23. lang/mailpoet-nl_NL.mo +0 -0
  24. lang/mailpoet-pl_PL.mo +0 -0
  25. lang/mailpoet-pt_BR.mo +0 -0
  26. lang/mailpoet-pt_PT.mo +0 -0
  27. lang/mailpoet-ru_RU.mo +0 -0
  28. lang/mailpoet-sv_SE.mo +0 -0
  29. lang/mailpoet-tr_TR.mo +0 -0
  30. lang/mailpoet.pot +118 -69
  31. lib/API/JSON/v1/AutomatedLatestContent.php +2 -1
  32. lib/API/JSON/v1/NewsletterTemplates.php +1 -1
  33. lib/API/JSON/v1/Subscribers.php +16 -0
  34. lib/Config/AccessControl.php +29 -24
  35. lib/Config/Activator.php +6 -0
  36. lib/Config/Capabilities.php +85 -0
  37. lib/Config/Initializer.php +6 -3
  38. lib/Config/Menu.php +158 -168
  39. lib/Models/Subscriber.php +2 -17
  40. lib/Segments/WP.php +12 -0
  41. lib/Subscription/Pages.php +1 -1
  42. lib/Util/Helpers.php +5 -0
  43. mailpoet.php +2 -3
  44. readme.txt +8 -1
  45. vendor/autoload.php +1 -1
  46. vendor/composer/autoload_classmap.php +1 -0
  47. vendor/composer/autoload_real.php +7 -7
  48. vendor/composer/autoload_static.php +6 -5
  49. views/settings.html +1 -1
  50. views/settings/advanced.html +21 -0
  51. views/settings/premium.html +4 -4
  52. views/update.html +2 -12
assets/css/admin-global.4193f33b.css ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face {
2
+ font-family: 'mailpoet';
3
+ src: url("../fonts/mailpoet.ttf?mx0b6n") format('truetype'), url("../fonts/mailpoet.woff?mx0b6n") format('woff'), url("../fonts/mailpoet.svg?mx0b6n#mailpoet") format('svg');
4
+ font-weight: normal;
5
+ font-style: normal;
6
+ }
7
+ [class^="mailpoet-icon-"],
8
+ [class*=" mailpoet-icon-"] {
9
+ font-family: 'mailpoet' !important;
10
+ speak: none;
11
+ font-style: normal;
12
+ font-weight: normal;
13
+ font-variant: normal;
14
+ text-transform: none;
15
+ line-height: 1;
16
+ /* Better Font Rendering =========== */
17
+ -webkit-font-smoothing: antialiased;
18
+ -moz-osx-font-smoothing: grayscale;
19
+ }
20
+ .mailpoet-icon-logo:before {
21
+ content: "\e900";
22
+ }
23
+ /*
24
+ Style for Members plugin
25
+ */
26
+ .members-tab-title .mailpoet-icon-logo {
27
+ vertical-align: middle;
28
+ height: 20px;
29
+ width: 20px;
30
+ font-size: 20px;
31
+ margin-right: 3px;
32
+ }
assets/css/manifest.json CHANGED
@@ -1,7 +1,8 @@
1
  {
 
2
  "admin.css": "admin.8b85810c.css",
3
  "importExport.css": "importExport.b3745466.css",
4
- "newsletter_editor.css": "newsletter_editor.47c884ae.css",
5
  "public.css": "public.cae357df.css",
6
  "rtl.css": "rtl.d41d8cd9.css"
7
  }
1
  {
2
+ "admin-global.css": "admin-global.4193f33b.css",
3
  "admin.css": "admin.8b85810c.css",
4
  "importExport.css": "importExport.b3745466.css",
5
+ "newsletter_editor.css": "newsletter_editor.40bfeff4.css",
6
  "public.css": "public.cae357df.css",
7
  "rtl.css": "rtl.d41d8cd9.css"
8
  }
assets/css/{newsletter_editor.47c884ae.css → newsletter_editor.40bfeff4.css} RENAMED
@@ -2130,7 +2130,7 @@ input.mailpoet_option_offset_left_small {
2130
  transition: all 250ms cubic-bezier(0.42, 0, 0.58, 1) /* ease-in-out */;
2131
  max-height: 2000px;
2132
  opacity: 1;
2133
- overflow-y: hidden;
2134
  }
2135
  .mailpoet_automated_latest_content_display_options.mailpoet_closed {
2136
  max-height: 0px;
@@ -2164,7 +2164,7 @@ input.mailpoet_option_offset_left_small {
2164
  transition: all 250ms cubic-bezier(0.42, 0, 0.58, 1) /* ease-in-out */;
2165
  max-height: 2000px;
2166
  opacity: 1;
2167
- overflow-y: hidden;
2168
  overflow-x: hidden;
2169
  }
2170
  .mailpoet_settings_posts_display_options.mailpoet_closed,
2130
  transition: all 250ms cubic-bezier(0.42, 0, 0.58, 1) /* ease-in-out */;
2131
  max-height: 2000px;
2132
  opacity: 1;
2133
+ overflow-y: inherit;
2134
  }
2135
  .mailpoet_automated_latest_content_display_options.mailpoet_closed {
2136
  max-height: 0px;
2164
  transition: all 250ms cubic-bezier(0.42, 0, 0.58, 1) /* ease-in-out */;
2165
  max-height: 2000px;
2166
  opacity: 1;
2167
+ overflow-y: inherit;
2168
  overflow-x: hidden;
2169
  }
2170
  .mailpoet_settings_posts_display_options.mailpoet_closed,
assets/fonts/index.php ADDED
File without changes
assets/fonts/mailpoet.svg ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="mailpoet" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="0" d="" />
10
+ <glyph unicode="&#xe900;" glyph-name="optimised" horiz-adv-x="972" d="M230.188 949.695c-21.982-3.361-41.376-14.741-48.618-28.188l-5.948-11.637 0.517-265.588c0.776-263.779 0.776-265.847 6.206-273.088 11.12-15.258 40.601-22.24 68.79-16.551 16.551 3.621 25.861 9.827 32.584 21.723 3.879 7.499 4.397 23.791 5.689 185.161l1.293 176.628 60.514-161.111c33.102-88.702 63.875-168.612 68.013-177.404 13.707-29.481 35.687-41.376 72.151-39.049 21.206 1.293 39.308 9.827 47.584 22.499 3.361 5.172 35.947 91.806 72.41 192.662s67.237 185.42 68.53 187.49c1.551 2.587 2.587-69.307 2.587-185.937v-190.335l5.948-11.379c8.533-16.809 20.172-21.982 49.652-21.982 27.929 0.259 39.825 4.914 49.911 20.172l6.982 10.603v530.401l-5.689 9.31c-12.671 20.43-50.17 31.033-91.806 25.601-34.394-4.138-53.79-16.292-66.72-41.118-2.587-5.172-35.947-101.89-73.961-214.902s-69.824-206.367-70.6-207.403c-1.034-1.034-32.326 86.115-69.824 193.954-37.757 107.581-71.892 205.075-76.030 216.453-10.086 26.118-25.601 42.929-45.514 48.877-17.326 5.172-46.807 6.982-64.652 4.138zM54.854 243.443c-20.172-3.879-43.963-19.136-51.204-33.619-6.206-11.379-4.914-32.843 2.587-47.841 23.533-46.807 71.634-86.892 126.717-104.736 17.068-5.689 23.274-5.948 120.252-7.499 97.235-1.551 102.926-1.81 116.373-7.241 29.739-11.896 51.204-35.687 61.807-68.013 3.621-11.12 13.964-21.206 25.861-25.344 4.914-1.551 18.361-2.844 29.739-2.844 16.809 0 23.533 1.293 32.584 5.689 11.896 6.206 13.964 9.31 26.895 38.791 11.896 27.671 39.567 49.652 70.858 56.117 8.533 1.81 47.067 2.844 100.856 2.844 99.563 0 113.786 2.068 151.801 20.689 49.652 24.567 96.978 77.84 101.373 113.529 3.104 26.118-17.326 49.394-51.204 58.187-25.601 6.465-41.635-0.517-54.825-24.050-11.12-19.655-29.998-38.015-47.841-46.29l-14.741-6.982-99.563-1.551c-90.77-1.293-101.373-2.068-120.252-6.982-27.154-7.499-58.444-23.016-80.427-40.084l-17.844-13.964-16.809 13.964c-20.689 16.809-51.462 32.584-78.875 39.825-19.136 5.172-28.705 5.948-120.252 7.241l-99.563 1.551-15.775 7.241c-18.102 8.533-32.584 21.982-48.36 45.773-16.034 24.567-26.895 29.998-50.17 25.601z" />
11
+ </font></defs></svg>
assets/fonts/mailpoet.ttf ADDED
Binary file
assets/fonts/mailpoet.woff ADDED
Binary file
assets/js/{admin.e3b1aa46.js → admin.5545d8c1.js} RENAMED
@@ -3412,7 +3412,7 @@ webpackJsonp([0],[
3412
  /***/ function(module, exports, __webpack_require__) {
3413
 
3414
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var require;var require;/*!
3415
- * Select2 4.0.3
3416
  * https://select2.github.io
3417
  *
3418
  * Released under the MIT license
@@ -3422,462 +3422,480 @@ webpackJsonp([0],[
3422
  if (true) {
3423
  // AMD. Register as an anonymous module.
3424
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(273)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
3425
- } else if (typeof exports === 'object') {
3426
  // Node/CommonJS
3427
- factory(require('jquery'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3428
  } else {
3429
  // Browser globals
3430
  factory(jQuery);
3431
  }
3432
- }(function (jQuery) {
3433
  // This is needed so we can catch the AMD loader configuration and use it
3434
  // The inner file should be wrapped (by `banner.start.js`) in a function that
3435
  // returns the AMD loader references.
3436
- var S2 =
3437
- (function () {
3438
  // Restore the Select2 AMD loader so it can be used
3439
  // Needed mostly in the language files, where the loader is not inserted
3440
  if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
3441
  var S2 = jQuery.fn.select2.amd;
3442
  }
3443
- var S2;(function () { if (!S2 || !S2.requirejs) {
3444
- if (!S2) { S2 = {}; } else { require = S2; }
3445
- /**
3446
- * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
3447
- * Available via the MIT or new BSD license.
3448
- * see: http://github.com/jrburke/almond for details
3449
- */
3450
- //Going sloppy to avoid 'use strict' string cost, but strict practices should
3451
- //be followed.
3452
- /*jslint sloppy: true */
3453
- /*global setTimeout: false */
3454
-
3455
- var requirejs, require, define;
3456
- (function (undef) {
3457
- var main, req, makeMap, handlers,
3458
- defined = {},
3459
- waiting = {},
3460
- config = {},
3461
- defining = {},
3462
- hasOwn = Object.prototype.hasOwnProperty,
3463
- aps = [].slice,
3464
- jsSuffixRegExp = /\.js$/;
3465
-
3466
- function hasProp(obj, prop) {
3467
- return hasOwn.call(obj, prop);
3468
- }
3469
-
3470
- /**
3471
- * Given a relative module name, like ./something, normalize it to
3472
- * a real name that can be mapped to a path.
3473
- * @param {String} name the relative name
3474
- * @param {String} baseName a real name that the name arg is relative
3475
- * to.
3476
- * @returns {String} normalized name
3477
- */
3478
- function normalize(name, baseName) {
3479
- var nameParts, nameSegment, mapValue, foundMap, lastIndex,
3480
- foundI, foundStarMap, starI, i, j, part,
3481
- baseParts = baseName && baseName.split("/"),
3482
- map = config.map,
3483
- starMap = (map && map['*']) || {};
3484
-
3485
- //Adjust any relative paths.
3486
- if (name && name.charAt(0) === ".") {
3487
- //If have a base name, try to normalize against it,
3488
- //otherwise, assume it is a top-level require that will
3489
- //be relative to baseUrl in the end.
3490
- if (baseName) {
3491
- name = name.split('/');
3492
- lastIndex = name.length - 1;
3493
-
3494
- // Node .js allowance:
3495
- if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
3496
- name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
3497
- }
3498
-
3499
- //Lop off the last part of baseParts, so that . matches the
3500
- //"directory" and not name of the baseName's module. For instance,
3501
- //baseName of "one/two/three", maps to "one/two/three.js", but we
3502
- //want the directory, "one/two" for this normalization.
3503
- name = baseParts.slice(0, baseParts.length - 1).concat(name);
3504
-
3505
- //start trimDots
3506
- for (i = 0; i < name.length; i += 1) {
3507
- part = name[i];
3508
- if (part === ".") {
3509
- name.splice(i, 1);
3510
- i -= 1;
3511
- } else if (part === "..") {
3512
- if (i === 1 && (name[2] === '..' || name[0] === '..')) {
3513
- //End of the line. Keep at least one non-dot
3514
- //path segment at the front so it can be mapped
3515
- //correctly to disk. Otherwise, there is likely
3516
- //no path mapping for a path starting with '..'.
3517
- //This can still fail, but catches the most reasonable
3518
- //uses of ..
3519
- break;
3520
- } else if (i > 0) {
3521
- name.splice(i - 1, 2);
3522
- i -= 2;
3523
- }
3524
- }
3525
- }
3526
- //end trimDots
3527
-
3528
- name = name.join("/");
3529
- } else if (name.indexOf('./') === 0) {
3530
- // No baseName, so this is ID is resolved relative
3531
- // to baseUrl, pull off the leading dot.
3532
- name = name.substring(2);
3533
- }
3534
- }
3535
-
3536
- //Apply map config if available.
3537
- if ((baseParts || starMap) && map) {
3538
- nameParts = name.split('/');
3539
-
3540
- for (i = nameParts.length; i > 0; i -= 1) {
3541
- nameSegment = nameParts.slice(0, i).join("/");
3542
-
3543
- if (baseParts) {
3544
- //Find the longest baseName segment match in the config.
3545
- //So, do joins on the biggest to smallest lengths of baseParts.
3546
- for (j = baseParts.length; j > 0; j -= 1) {
3547
- mapValue = map[baseParts.slice(0, j).join('/')];
3548
-
3549
- //baseName segment has config, find if it has one for
3550
- //this name.
3551
- if (mapValue) {
3552
- mapValue = mapValue[nameSegment];
3553
- if (mapValue) {
3554
- //Match, update name to the new value.
3555
- foundMap = mapValue;
3556
- foundI = i;
3557
- break;
3558
- }
3559
- }
3560
- }
3561
- }
3562
-
3563
- if (foundMap) {
3564
- break;
3565
- }
3566
-
3567
- //Check for a star map match, but just hold on to it,
3568
- //if there is a shorter segment match later in a matching
3569
- //config, then favor over this star map.
3570
- if (!foundStarMap && starMap && starMap[nameSegment]) {
3571
- foundStarMap = starMap[nameSegment];
3572
- starI = i;
3573
- }
3574
- }
3575
-
3576
- if (!foundMap && foundStarMap) {
3577
- foundMap = foundStarMap;
3578
- foundI = starI;
3579
- }
3580
-
3581
- if (foundMap) {
3582
- nameParts.splice(0, foundI, foundMap);
3583
- name = nameParts.join('/');
3584
- }
3585
- }
3586
-
3587
- return name;
3588
- }
3589
-
3590
- function makeRequire(relName, forceSync) {
3591
- return function () {
3592
- //A version of a require function that passes a moduleName
3593
- //value for items that may need to
3594
- //look up paths relative to the moduleName
3595
- var args = aps.call(arguments, 0);
3596
-
3597
- //If first arg is not require('string'), and there is only
3598
- //one arg, it is the array form without a callback. Insert
3599
- //a null so that the following concat is correct.
3600
- if (typeof args[0] !== 'string' && args.length === 1) {
3601
- args.push(null);
3602
- }
3603
- return req.apply(undef, args.concat([relName, forceSync]));
3604
- };
3605
- }
3606
-
3607
- function makeNormalize(relName) {
3608
- return function (name) {
3609
- return normalize(name, relName);
3610
- };
3611
- }
3612
-
3613
- function makeLoad(depName) {
3614
- return function (value) {
3615
- defined[depName] = value;
3616
- };
3617
- }
3618
-
3619
- function callDep(name) {
3620
- if (hasProp(waiting, name)) {
3621
- var args = waiting[name];
3622
- delete waiting[name];
3623
- defining[name] = true;
3624
- main.apply(undef, args);
3625
- }
3626
-
3627
- if (!hasProp(defined, name) && !hasProp(defining, name)) {
3628
- throw new Error('No ' + name);
3629
- }
3630
- return defined[name];
3631
- }
3632
-
3633
- //Turns a plugin!resource to [plugin, resource]
3634
- //with the plugin being undefined if the name
3635
- //did not have a plugin prefix.
3636
- function splitPrefix(name) {
3637
- var prefix,
3638
- index = name ? name.indexOf('!') : -1;
3639
- if (index > -1) {
3640
- prefix = name.substring(0, index);
3641
- name = name.substring(index + 1, name.length);
3642
- }
3643
- return [prefix, name];
3644
- }
3645
-
3646
- /**
3647
- * Makes a name map, normalizing the name, and using a plugin
3648
- * for normalization if necessary. Grabs a ref to plugin
3649
- * too, as an optimization.
3650
- */
3651
- makeMap = function (name, relName) {
3652
- var plugin,
3653
- parts = splitPrefix(name),
3654
- prefix = parts[0];
3655
-
3656
- name = parts[1];
3657
-
3658
- if (prefix) {
3659
- prefix = normalize(prefix, relName);
3660
- plugin = callDep(prefix);
3661
- }
3662
-
3663
- //Normalize according
3664
- if (prefix) {
3665
- if (plugin && plugin.normalize) {
3666
- name = plugin.normalize(name, makeNormalize(relName));
3667
- } else {
3668
- name = normalize(name, relName);
3669
- }
3670
- } else {
3671
- name = normalize(name, relName);
3672
- parts = splitPrefix(name);
3673
- prefix = parts[0];
3674
- name = parts[1];
3675
- if (prefix) {
3676
- plugin = callDep(prefix);
3677
- }
3678
- }
3679
-
3680
- //Using ridiculous property names for space reasons
3681
- return {
3682
- f: prefix ? prefix + '!' + name : name, //fullName
3683
- n: name,
3684
- pr: prefix,
3685
- p: plugin
3686
- };
3687
- };
3688
-
3689
- function makeConfig(name) {
3690
- return function () {
3691
- return (config && config.config && config.config[name]) || {};
3692
- };
3693
- }
3694
-
3695
- handlers = {
3696
- require: function (name) {
3697
- return makeRequire(name);
3698
- },
3699
- exports: function (name) {
3700
- var e = defined[name];
3701
- if (typeof e !== 'undefined') {
3702
- return e;
3703
- } else {
3704
- return (defined[name] = {});
3705
- }
3706
- },
3707
- module: function (name) {
3708
- return {
3709
- id: name,
3710
- uri: '',
3711
- exports: defined[name],
3712
- config: makeConfig(name)
3713
- };
3714
- }
3715
- };
3716
-
3717
- main = function (name, deps, callback, relName) {
3718
- var cjsModule, depName, ret, map, i,
3719
- args = [],
3720
- callbackType = typeof callback,
3721
- usingExports;
3722
-
3723
- //Use name if no relName
3724
- relName = relName || name;
3725
-
3726
- //Call the callback to define the module, if necessary.
3727
- if (callbackType === 'undefined' || callbackType === 'function') {
3728
- //Pull out the defined dependencies and pass the ordered
3729
- //values to the callback.
3730
- //Default to [require, exports, module] if no deps
3731
- deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
3732
- for (i = 0; i < deps.length; i += 1) {
3733
- map = makeMap(deps[i], relName);
3734
- depName = map.f;
3735
-
3736
- //Fast path CommonJS standard dependencies.
3737
- if (depName === "require") {
3738
- args[i] = handlers.require(name);
3739
- } else if (depName === "exports") {
3740
- //CommonJS module spec 1.1
3741
- args[i] = handlers.exports(name);
3742
- usingExports = true;
3743
- } else if (depName === "module") {
3744
- //CommonJS module spec 1.1
3745
- cjsModule = args[i] = handlers.module(name);
3746
- } else if (hasProp(defined, depName) ||
3747
- hasProp(waiting, depName) ||
3748
- hasProp(defining, depName)) {
3749
- args[i] = callDep(depName);
3750
- } else if (map.p) {
3751
- map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
3752
- args[i] = defined[depName];
3753
- } else {
3754
- throw new Error(name + ' missing ' + depName);
3755
- }
3756
- }
3757
-
3758
- ret = callback ? callback.apply(defined[name], args) : undefined;
3759
-
3760
- if (name) {
3761
- //If setting exports via "module" is in play,
3762
- //favor that over return value and exports. After that,
3763
- //favor a non-undefined return value over exports use.
3764
- if (cjsModule && cjsModule.exports !== undef &&
3765
- cjsModule.exports !== defined[name]) {
3766
- defined[name] = cjsModule.exports;
3767
- } else if (ret !== undef || !usingExports) {
3768
- //Use the return value from the function.
3769
- defined[name] = ret;
3770
- }
3771
- }
3772
- } else if (name) {
3773
- //May just be an object definition for the module. Only
3774
- //worry about defining if have a module name.
3775
- defined[name] = callback;
3776
- }
3777
- };
3778
-
3779
- requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
3780
- if (typeof deps === "string") {
3781
- if (handlers[deps]) {
3782
- //callback in this case is really relName
3783
- return handlers[deps](callback);
3784
- }
3785
- //Just return the module wanted. In this scenario, the
3786
- //deps arg is the module name, and second arg (if passed)
3787
- //is just the relName.
3788
- //Normalize module name, if it contains . or ..
3789
- return callDep(makeMap(deps, callback).f);
3790
- } else if (!deps.splice) {
3791
- //deps is a config object, not an array.
3792
- config = deps;
3793
- if (config.deps) {
3794
- req(config.deps, config.callback);
3795
- }
3796
- if (!callback) {
3797
- return;
3798
- }
3799
-
3800
- if (callback.splice) {
3801
- //callback is an array, which means it is a dependency list.
3802
- //Adjust args if there are dependencies
3803
- deps = callback;
3804
- callback = relName;
3805
- relName = null;
3806
- } else {
3807
- deps = undef;
3808
- }
3809
- }
3810
-
3811
- //Support require(['a'])
3812
- callback = callback || function () {};
3813
-
3814
- //If relName is a function, it is an errback handler,
3815
- //so remove it.
3816
- if (typeof relName === 'function') {
3817
- relName = forceSync;
3818
- forceSync = alt;
3819
- }
3820
-
3821
- //Simulate async callback;
3822
- if (forceSync) {
3823
- main(undef, deps, callback, relName);
3824
- } else {
3825
- //Using a non-zero value because of concern for what old browsers
3826
- //do, and latest browsers "upgrade" to 4 if lower value is used:
3827
- //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
3828
- //If want a value immediately, use require('id') instead -- something
3829
- //that works in almond on the global level, but not guaranteed and
3830
- //unlikely to work in other AMD implementations.
3831
- setTimeout(function () {
3832
- main(undef, deps, callback, relName);
3833
- }, 4);
3834
- }
3835
-
3836
- return req;
3837
- };
3838
-
3839
- /**
3840
- * Just drops the config on the floor, but returns req in case
3841
- * the config return value is used.
3842
- */
3843
- req.config = function (cfg) {
3844
- return req(cfg);
3845
- };
3846
-
3847
- /**
3848
- * Expose module registry for debugging and tooling
3849
- */
3850
- requirejs._defined = defined;
3851
-
3852
- define = function (name, deps, callback) {
3853
- if (typeof name !== 'string') {
3854
- throw new Error('See almond README: incorrect module build, no module name');
3855
- }
3856
-
3857
- //This module may not have dependencies
3858
- if (!deps.splice) {
3859
- //deps is not an array, so probably means
3860
- //an object literal or factory function for
3861
- //the value. Adjust args.
3862
- callback = deps;
3863
- deps = [];
3864
- }
3865
-
3866
- if (!hasProp(defined, name) && !hasProp(waiting, name)) {
3867
- waiting[name] = [name, deps, callback];
3868
- }
3869
- };
3870
-
3871
- define.amd = {
3872
- jQuery: true
3873
- };
3874
- }());
3875
-
3876
- S2.requirejs = requirejs;S2.require = require;S2.define = define;
3877
- }
3878
- }());
3879
- S2.define("almond", function(){});
3880
-
 
 
 
 
3881
  /* global jQuery:false, $:false */
3882
  S2.define('jquery',[],function () {
3883
  var _$ = jQuery || $;
@@ -3892,7 +3910,7 @@ webpackJsonp([0],[
3892
 
3893
  return _$;
3894
  });
3895
-
3896
  S2.define('select2/utils',[
3897
  'jquery'
3898
  ], function ($) {
@@ -4169,7 +4187,7 @@ webpackJsonp([0],[
4169
 
4170
  return Utils;
4171
  });
4172
-
4173
  S2.define('select2/results',[
4174
  'jquery',
4175
  './utils'
@@ -4693,7 +4711,7 @@ webpackJsonp([0],[
4693
 
4694
  return Results;
4695
  });
4696
-
4697
  S2.define('select2/keys',[
4698
 
4699
  ], function () {
@@ -4719,7 +4737,7 @@ webpackJsonp([0],[
4719
 
4720
  return KEYS;
4721
  });
4722
-
4723
  S2.define('select2/selection/base',[
4724
  'jquery',
4725
  '../utils',
@@ -4878,7 +4896,7 @@ webpackJsonp([0],[
4878
 
4879
  return BaseSelection;
4880
  });
4881
-
4882
  S2.define('select2/selection/single',[
4883
  'jquery',
4884
  './base',
@@ -4978,7 +4996,7 @@ webpackJsonp([0],[
4978
 
4979
  return SingleSelection;
4980
  });
4981
-
4982
  S2.define('select2/selection/multiple',[
4983
  'jquery',
4984
  './base',
@@ -5088,7 +5106,7 @@ webpackJsonp([0],[
5088
 
5089
  return MultipleSelection;
5090
  });
5091
-
5092
  S2.define('select2/selection/placeholder',[
5093
  '../utils'
5094
  ], function (Utils) {
@@ -5138,7 +5156,7 @@ webpackJsonp([0],[
5138
 
5139
  return Placeholder;
5140
  });
5141
-
5142
  S2.define('select2/selection/allowClear',[
5143
  'jquery',
5144
  '../keys'
@@ -5236,7 +5254,7 @@ webpackJsonp([0],[
5236
 
5237
  return AllowClear;
5238
  });
5239
-
5240
  S2.define('select2/selection/search',[
5241
  'jquery',
5242
  '../utils',
@@ -5459,7 +5477,7 @@ webpackJsonp([0],[
5459
 
5460
  return Search;
5461
  });
5462
-
5463
  S2.define('select2/selection/eventRelay',[
5464
  'jquery'
5465
  ], function ($) {
@@ -5505,7 +5523,7 @@ webpackJsonp([0],[
5505
 
5506
  return EventRelay;
5507
  });
5508
-
5509
  S2.define('select2/translation',[
5510
  'jquery',
5511
  'require'
@@ -5542,7 +5560,7 @@ webpackJsonp([0],[
5542
 
5543
  return Translation;
5544
  });
5545
-
5546
  S2.define('select2/diacritics',[
5547
 
5548
  ], function () {
@@ -6390,7 +6408,7 @@ webpackJsonp([0],[
6390
 
6391
  return diacritics;
6392
  });
6393
-
6394
  S2.define('select2/data/base',[
6395
  '../utils'
6396
  ], function (Utils) {
@@ -6431,7 +6449,7 @@ webpackJsonp([0],[
6431
 
6432
  return BaseAdapter;
6433
  });
6434
-
6435
  S2.define('select2/data/select',[
6436
  './base',
6437
  '../utils',
@@ -6604,7 +6622,7 @@ webpackJsonp([0],[
6604
  }
6605
  }
6606
 
6607
- if (data.id) {
6608
  option.value = data.id;
6609
  }
6610
 
@@ -6717,7 +6735,7 @@ webpackJsonp([0],[
6717
 
6718
  return SelectAdapter;
6719
  });
6720
-
6721
  S2.define('select2/data/array',[
6722
  './select',
6723
  '../utils',
@@ -6797,7 +6815,7 @@ webpackJsonp([0],[
6797
 
6798
  return ArrayAdapter;
6799
  });
6800
-
6801
  S2.define('select2/data/ajax',[
6802
  './array',
6803
  '../utils',
@@ -6907,7 +6925,7 @@ webpackJsonp([0],[
6907
 
6908
  return AjaxAdapter;
6909
  });
6910
-
6911
  S2.define('select2/data/tags',[
6912
  'jquery'
6913
  ], function ($) {
@@ -6963,7 +6981,10 @@ webpackJsonp([0],[
6963
  }, true)
6964
  );
6965
 
6966
- var checkText = option.text === params.term;
 
 
 
6967
 
6968
  if (checkText || checkChildren) {
6969
  if (child) {
@@ -7033,7 +7054,7 @@ webpackJsonp([0],[
7033
 
7034
  return Tags;
7035
  });
7036
-
7037
  S2.define('select2/data/tokenizer',[
7038
  'jquery'
7039
  ], function ($) {
@@ -7150,7 +7171,7 @@ webpackJsonp([0],[
7150
 
7151
  return Tokenizer;
7152
  });
7153
-
7154
  S2.define('select2/data/minimumInputLength',[
7155
 
7156
  ], function () {
@@ -7181,7 +7202,7 @@ webpackJsonp([0],[
7181
 
7182
  return MinimumInputLength;
7183
  });
7184
-
7185
  S2.define('select2/data/maximumInputLength',[
7186
 
7187
  ], function () {
@@ -7213,7 +7234,7 @@ webpackJsonp([0],[
7213
 
7214
  return MaximumInputLength;
7215
  });
7216
-
7217
  S2.define('select2/data/maximumSelectionLength',[
7218
 
7219
  ], function (){
@@ -7245,7 +7266,7 @@ webpackJsonp([0],[
7245
 
7246
  return MaximumSelectionLength;
7247
  });
7248
-
7249
  S2.define('select2/dropdown',[
7250
  'jquery',
7251
  './utils'
@@ -7288,7 +7309,7 @@ webpackJsonp([0],[
7288
 
7289
  return Dropdown;
7290
  });
7291
-
7292
  S2.define('select2/dropdown/search',[
7293
  'jquery',
7294
  '../utils'
@@ -7354,7 +7375,7 @@ webpackJsonp([0],[
7354
  });
7355
 
7356
  container.on('focus', function () {
7357
- if (container.isOpen()) {
7358
  self.$search.focus();
7359
  }
7360
  });
@@ -7390,7 +7411,7 @@ webpackJsonp([0],[
7390
 
7391
  return Search;
7392
  });
7393
-
7394
  S2.define('select2/dropdown/hidePlaceholder',[
7395
 
7396
  ], function () {
@@ -7433,7 +7454,7 @@ webpackJsonp([0],[
7433
 
7434
  return HidePlaceholder;
7435
  });
7436
-
7437
  S2.define('select2/dropdown/infiniteScroll',[
7438
  'jquery'
7439
  ], function ($) {
@@ -7523,7 +7544,7 @@ webpackJsonp([0],[
7523
 
7524
  return InfiniteScroll;
7525
  });
7526
-
7527
  S2.define('select2/dropdown/attachBody',[
7528
  'jquery',
7529
  '../utils'
@@ -7746,7 +7767,7 @@ webpackJsonp([0],[
7746
 
7747
  return AttachBody;
7748
  });
7749
-
7750
  S2.define('select2/dropdown/minimumResultsForSearch',[
7751
 
7752
  ], function () {
@@ -7786,7 +7807,7 @@ webpackJsonp([0],[
7786
 
7787
  return MinimumResultsForSearch;
7788
  });
7789
-
7790
  S2.define('select2/dropdown/selectOnClose',[
7791
 
7792
  ], function () {
@@ -7837,7 +7858,7 @@ webpackJsonp([0],[
7837
 
7838
  return SelectOnClose;
7839
  });
7840
-
7841
  S2.define('select2/dropdown/closeOnSelect',[
7842
 
7843
  ], function () {
@@ -7873,7 +7894,7 @@ webpackJsonp([0],[
7873
 
7874
  return CloseOnSelect;
7875
  });
7876
-
7877
  S2.define('select2/i18n/en',[],function () {
7878
  // English
7879
  return {
@@ -7918,7 +7939,7 @@ webpackJsonp([0],[
7918
  }
7919
  };
7920
  });
7921
-
7922
  S2.define('select2/defaults',[
7923
  'jquery',
7924
  'require',
@@ -8315,7 +8336,7 @@ webpackJsonp([0],[
8315
 
8316
  return defaults;
8317
  });
8318
-
8319
  S2.define('select2/options',[
8320
  'require',
8321
  'jquery',
@@ -8438,7 +8459,7 @@ webpackJsonp([0],[
8438
 
8439
  return Options;
8440
  });
8441
-
8442
  S2.define('select2/core',[
8443
  'jquery',
8444
  './options',
@@ -9051,14 +9072,14 @@ webpackJsonp([0],[
9051
 
9052
  return Select2;
9053
  });
9054
-
9055
  S2.define('jquery-mousewheel',[
9056
  'jquery'
9057
  ], function ($) {
9058
  // Used to shim jQuery.mousewheel for non-full builds.
9059
  return $;
9060
  });
9061
-
9062
  S2.define('jquery.select2',[
9063
  'jquery',
9064
  'jquery-mousewheel',
@@ -9116,7 +9137,7 @@ webpackJsonp([0],[
9116
 
9117
  return Select2;
9118
  });
9119
-
9120
  // Return the AMD loader configuration so it can be used outside of this file
9121
  return {
9122
  define: S2.define,
3412
  /***/ function(module, exports, __webpack_require__) {
3413
 
3414
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var require;var require;/*!
3415
+ * Select2 4.0.4
3416
  * https://select2.github.io
3417
  *
3418
  * Released under the MIT license
3422
  if (true) {
3423
  // AMD. Register as an anonymous module.
3424
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(273)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
3425
+ } else if (typeof module === 'object' && module.exports) {
3426
  // Node/CommonJS
3427
+ module.exports = function (root, jQuery) {
3428
+ if (jQuery === undefined) {
3429
+ // require('jQuery') returns a factory that requires window to
3430
+ // build a jQuery instance, we normalize how we use modules
3431
+ // that require this pattern but the window provided is a noop
3432
+ // if it's defined (how jquery works)
3433
+ if (typeof window !== 'undefined') {
3434
+ jQuery = require('jquery');
3435
+ }
3436
+ else {
3437
+ jQuery = require('jquery')(root);
3438
+ }
3439
+ }
3440
+ factory(jQuery);
3441
+ return jQuery;
3442
+ };
3443
  } else {
3444
  // Browser globals
3445
  factory(jQuery);
3446
  }
3447
+ } (function (jQuery) {
3448
  // This is needed so we can catch the AMD loader configuration and use it
3449
  // The inner file should be wrapped (by `banner.start.js`) in a function that
3450
  // returns the AMD loader references.
3451
+ var S2 =(function () {
 
3452
  // Restore the Select2 AMD loader so it can be used
3453
  // Needed mostly in the language files, where the loader is not inserted
3454
  if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
3455
  var S2 = jQuery.fn.select2.amd;
3456
  }
3457
+ var S2;(function () { if (!S2 || !S2.requirejs) {
3458
+ if (!S2) { S2 = {}; } else { require = S2; }
3459
+ /**
3460
+ * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
3461
+ * Released under MIT license, http://github.com/requirejs/almond/LICENSE
3462
+ */
3463
+ //Going sloppy to avoid 'use strict' string cost, but strict practices should
3464
+ //be followed.
3465
+ /*global setTimeout: false */
3466
+
3467
+ var requirejs, require, define;
3468
+ (function (undef) {
3469
+ var main, req, makeMap, handlers,
3470
+ defined = {},
3471
+ waiting = {},
3472
+ config = {},
3473
+ defining = {},
3474
+ hasOwn = Object.prototype.hasOwnProperty,
3475
+ aps = [].slice,
3476
+ jsSuffixRegExp = /\.js$/;
3477
+
3478
+ function hasProp(obj, prop) {
3479
+ return hasOwn.call(obj, prop);
3480
+ }
3481
+
3482
+ /**
3483
+ * Given a relative module name, like ./something, normalize it to
3484
+ * a real name that can be mapped to a path.
3485
+ * @param {String} name the relative name
3486
+ * @param {String} baseName a real name that the name arg is relative
3487
+ * to.
3488
+ * @returns {String} normalized name
3489
+ */
3490
+ function normalize(name, baseName) {
3491
+ var nameParts, nameSegment, mapValue, foundMap, lastIndex,
3492
+ foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
3493
+ baseParts = baseName && baseName.split("/"),
3494
+ map = config.map,
3495
+ starMap = (map && map['*']) || {};
3496
+
3497
+ //Adjust any relative paths.
3498
+ if (name) {
3499
+ name = name.split('/');
3500
+ lastIndex = name.length - 1;
3501
+
3502
+ // If wanting node ID compatibility, strip .js from end
3503
+ // of IDs. Have to do this here, and not in nameToUrl
3504
+ // because node allows either .js or non .js to map
3505
+ // to same file.
3506
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
3507
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
3508
+ }
3509
+
3510
+ // Starts with a '.' so need the baseName
3511
+ if (name[0].charAt(0) === '.' && baseParts) {
3512
+ //Convert baseName to array, and lop off the last part,
3513
+ //so that . matches that 'directory' and not name of the baseName's
3514
+ //module. For instance, baseName of 'one/two/three', maps to
3515
+ //'one/two/three.js', but we want the directory, 'one/two' for
3516
+ //this normalization.
3517
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
3518
+ name = normalizedBaseParts.concat(name);
3519
+ }
3520
+
3521
+ //start trimDots
3522
+ for (i = 0; i < name.length; i++) {
3523
+ part = name[i];
3524
+ if (part === '.') {
3525
+ name.splice(i, 1);
3526
+ i -= 1;
3527
+ } else if (part === '..') {
3528
+ // If at the start, or previous value is still ..,
3529
+ // keep them so that when converted to a path it may
3530
+ // still work when converted to a path, even though
3531
+ // as an ID it is less than ideal. In larger point
3532
+ // releases, may be better to just kick out an error.
3533
+ if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
3534
+ continue;
3535
+ } else if (i > 0) {
3536
+ name.splice(i - 1, 2);
3537
+ i -= 2;
3538
+ }
3539
+ }
3540
+ }
3541
+ //end trimDots
3542
+
3543
+ name = name.join('/');
3544
+ }
3545
+
3546
+ //Apply map config if available.
3547
+ if ((baseParts || starMap) && map) {
3548
+ nameParts = name.split('/');
3549
+
3550
+ for (i = nameParts.length; i > 0; i -= 1) {
3551
+ nameSegment = nameParts.slice(0, i).join("/");
3552
+
3553
+ if (baseParts) {
3554
+ //Find the longest baseName segment match in the config.
3555
+ //So, do joins on the biggest to smallest lengths of baseParts.
3556
+ for (j = baseParts.length; j > 0; j -= 1) {
3557
+ mapValue = map[baseParts.slice(0, j).join('/')];
3558
+
3559
+ //baseName segment has config, find if it has one for
3560
+ //this name.
3561
+ if (mapValue) {
3562
+ mapValue = mapValue[nameSegment];
3563
+ if (mapValue) {
3564
+ //Match, update name to the new value.
3565
+ foundMap = mapValue;
3566
+ foundI = i;
3567
+ break;
3568
+ }
3569
+ }
3570
+ }
3571
+ }
3572
+
3573
+ if (foundMap) {
3574
+ break;
3575
+ }
3576
+
3577
+ //Check for a star map match, but just hold on to it,
3578
+ //if there is a shorter segment match later in a matching
3579
+ //config, then favor over this star map.
3580
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
3581
+ foundStarMap = starMap[nameSegment];
3582
+ starI = i;
3583
+ }
3584
+ }
3585
+
3586
+ if (!foundMap && foundStarMap) {
3587
+ foundMap = foundStarMap;
3588
+ foundI = starI;
3589
+ }
3590
+
3591
+ if (foundMap) {
3592
+ nameParts.splice(0, foundI, foundMap);
3593
+ name = nameParts.join('/');
3594
+ }
3595
+ }
3596
+
3597
+ return name;
3598
+ }
3599
+
3600
+ function makeRequire(relName, forceSync) {
3601
+ return function () {
3602
+ //A version of a require function that passes a moduleName
3603
+ //value for items that may need to
3604
+ //look up paths relative to the moduleName
3605
+ var args = aps.call(arguments, 0);
3606
+
3607
+ //If first arg is not require('string'), and there is only
3608
+ //one arg, it is the array form without a callback. Insert
3609
+ //a null so that the following concat is correct.
3610
+ if (typeof args[0] !== 'string' && args.length === 1) {
3611
+ args.push(null);
3612
+ }
3613
+ return req.apply(undef, args.concat([relName, forceSync]));
3614
+ };
3615
+ }
3616
+
3617
+ function makeNormalize(relName) {
3618
+ return function (name) {
3619
+ return normalize(name, relName);
3620
+ };
3621
+ }
3622
+
3623
+ function makeLoad(depName) {
3624
+ return function (value) {
3625
+ defined[depName] = value;
3626
+ };
3627
+ }
3628
+
3629
+ function callDep(name) {
3630
+ if (hasProp(waiting, name)) {
3631
+ var args = waiting[name];
3632
+ delete waiting[name];
3633
+ defining[name] = true;
3634
+ main.apply(undef, args);
3635
+ }
3636
+
3637
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
3638
+ throw new Error('No ' + name);
3639
+ }
3640
+ return defined[name];
3641
+ }
3642
+
3643
+ //Turns a plugin!resource to [plugin, resource]
3644
+ //with the plugin being undefined if the name
3645
+ //did not have a plugin prefix.
3646
+ function splitPrefix(name) {
3647
+ var prefix,
3648
+ index = name ? name.indexOf('!') : -1;
3649
+ if (index > -1) {
3650
+ prefix = name.substring(0, index);
3651
+ name = name.substring(index + 1, name.length);
3652
+ }
3653
+ return [prefix, name];
3654
+ }
3655
+
3656
+ //Creates a parts array for a relName where first part is plugin ID,
3657
+ //second part is resource ID. Assumes relName has already been normalized.
3658
+ function makeRelParts(relName) {
3659
+ return relName ? splitPrefix(relName) : [];
3660
+ }
3661
+
3662
+ /**
3663
+ * Makes a name map, normalizing the name, and using a plugin
3664
+ * for normalization if necessary. Grabs a ref to plugin
3665
+ * too, as an optimization.
3666
+ */
3667
+ makeMap = function (name, relParts) {
3668
+ var plugin,
3669
+ parts = splitPrefix(name),
3670
+ prefix = parts[0],
3671
+ relResourceName = relParts[1];
3672
+
3673
+ name = parts[1];
3674
+
3675
+ if (prefix) {
3676
+ prefix = normalize(prefix, relResourceName);
3677
+ plugin = callDep(prefix);
3678
+ }
3679
+
3680
+ //Normalize according
3681
+ if (prefix) {
3682
+ if (plugin && plugin.normalize) {
3683
+ name = plugin.normalize(name, makeNormalize(relResourceName));
3684
+ } else {
3685
+ name = normalize(name, relResourceName);
3686
+ }
3687
+ } else {
3688
+ name = normalize(name, relResourceName);
3689
+ parts = splitPrefix(name);
3690
+ prefix = parts[0];
3691
+ name = parts[1];
3692
+ if (prefix) {
3693
+ plugin = callDep(prefix);
3694
+ }
3695
+ }
3696
+
3697
+ //Using ridiculous property names for space reasons
3698
+ return {
3699
+ f: prefix ? prefix + '!' + name : name, //fullName
3700
+ n: name,
3701
+ pr: prefix,
3702
+ p: plugin
3703
+ };
3704
+ };
3705
+
3706
+ function makeConfig(name) {
3707
+ return function () {
3708
+ return (config && config.config && config.config[name]) || {};
3709
+ };
3710
+ }
3711
+
3712
+ handlers = {
3713
+ require: function (name) {
3714
+ return makeRequire(name);
3715
+ },
3716
+ exports: function (name) {
3717
+ var e = defined[name];
3718
+ if (typeof e !== 'undefined') {
3719
+ return e;
3720
+ } else {
3721
+ return (defined[name] = {});
3722
+ }
3723
+ },
3724
+ module: function (name) {
3725
+ return {
3726
+ id: name,
3727
+ uri: '',
3728
+ exports: defined[name],
3729
+ config: makeConfig(name)
3730
+ };
3731
+ }
3732
+ };
3733
+
3734
+ main = function (name, deps, callback, relName) {
3735
+ var cjsModule, depName, ret, map, i, relParts,
3736
+ args = [],
3737
+ callbackType = typeof callback,
3738
+ usingExports;
3739
+
3740
+ //Use name if no relName
3741
+ relName = relName || name;
3742
+ relParts = makeRelParts(relName);
3743
+
3744
+ //Call the callback to define the module, if necessary.
3745
+ if (callbackType === 'undefined' || callbackType === 'function') {
3746
+ //Pull out the defined dependencies and pass the ordered
3747
+ //values to the callback.
3748
+ //Default to [require, exports, module] if no deps
3749
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
3750
+ for (i = 0; i < deps.length; i += 1) {
3751
+ map = makeMap(deps[i], relParts);
3752
+ depName = map.f;
3753
+
3754
+ //Fast path CommonJS standard dependencies.
3755
+ if (depName === "require") {
3756
+ args[i] = handlers.require(name);
3757
+ } else if (depName === "exports") {
3758
+ //CommonJS module spec 1.1
3759
+ args[i] = handlers.exports(name);
3760
+ usingExports = true;
3761
+ } else if (depName === "module") {
3762
+ //CommonJS module spec 1.1
3763
+ cjsModule = args[i] = handlers.module(name);
3764
+ } else if (hasProp(defined, depName) ||
3765
+ hasProp(waiting, depName) ||
3766
+ hasProp(defining, depName)) {
3767
+ args[i] = callDep(depName);
3768
+ } else if (map.p) {
3769
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
3770
+ args[i] = defined[depName];
3771
+ } else {
3772
+ throw new Error(name + ' missing ' + depName);
3773
+ }
3774
+ }
3775
+
3776
+ ret = callback ? callback.apply(defined[name], args) : undefined;
3777
+
3778
+ if (name) {
3779
+ //If setting exports via "module" is in play,
3780
+ //favor that over return value and exports. After that,
3781
+ //favor a non-undefined return value over exports use.
3782
+ if (cjsModule && cjsModule.exports !== undef &&
3783
+ cjsModule.exports !== defined[name]) {
3784
+ defined[name] = cjsModule.exports;
3785
+ } else if (ret !== undef || !usingExports) {
3786
+ //Use the return value from the function.
3787
+ defined[name] = ret;
3788
+ }
3789
+ }
3790
+ } else if (name) {
3791
+ //May just be an object definition for the module. Only
3792
+ //worry about defining if have a module name.
3793
+ defined[name] = callback;
3794
+ }
3795
+ };
3796
+
3797
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
3798
+ if (typeof deps === "string") {
3799
+ if (handlers[deps]) {
3800
+ //callback in this case is really relName
3801
+ return handlers[deps](callback);
3802
+ }
3803
+ //Just return the module wanted. In this scenario, the
3804
+ //deps arg is the module name, and second arg (if passed)
3805
+ //is just the relName.
3806
+ //Normalize module name, if it contains . or ..
3807
+ return callDep(makeMap(deps, makeRelParts(callback)).f);
3808
+ } else if (!deps.splice) {
3809
+ //deps is a config object, not an array.
3810
+ config = deps;
3811
+ if (config.deps) {
3812
+ req(config.deps, config.callback);
3813
+ }
3814
+ if (!callback) {
3815
+ return;
3816
+ }
3817
+
3818
+ if (callback.splice) {
3819
+ //callback is an array, which means it is a dependency list.
3820
+ //Adjust args if there are dependencies
3821
+ deps = callback;
3822
+ callback = relName;
3823
+ relName = null;
3824
+ } else {
3825
+ deps = undef;
3826
+ }
3827
+ }
3828
+
3829
+ //Support require(['a'])
3830
+ callback = callback || function () {};
3831
+
3832
+ //If relName is a function, it is an errback handler,
3833
+ //so remove it.
3834
+ if (typeof relName === 'function') {
3835
+ relName = forceSync;
3836
+ forceSync = alt;
3837
+ }
3838
+
3839
+ //Simulate async callback;
3840
+ if (forceSync) {
3841
+ main(undef, deps, callback, relName);
3842
+ } else {
3843
+ //Using a non-zero value because of concern for what old browsers
3844
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
3845
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
3846
+ //If want a value immediately, use require('id') instead -- something
3847
+ //that works in almond on the global level, but not guaranteed and
3848
+ //unlikely to work in other AMD implementations.
3849
+ setTimeout(function () {
3850
+ main(undef, deps, callback, relName);
3851
+ }, 4);
3852
+ }
3853
+
3854
+ return req;
3855
+ };
3856
+
3857
+ /**
3858
+ * Just drops the config on the floor, but returns req in case
3859
+ * the config return value is used.
3860
+ */
3861
+ req.config = function (cfg) {
3862
+ return req(cfg);
3863
+ };
3864
+
3865
+ /**
3866
+ * Expose module registry for debugging and tooling
3867
+ */
3868
+ requirejs._defined = defined;
3869
+
3870
+ define = function (name, deps, callback) {
3871
+ if (typeof name !== 'string') {
3872
+ throw new Error('See almond README: incorrect module build, no module name');
3873
+ }
3874
+
3875
+ //This module may not have dependencies
3876
+ if (!deps.splice) {
3877
+ //deps is not an array, so probably means
3878
+ //an object literal or factory function for
3879
+ //the value. Adjust args.
3880
+ callback = deps;
3881
+ deps = [];
3882
+ }
3883
+
3884
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
3885
+ waiting[name] = [name, deps, callback];
3886
+ }
3887
+ };
3888
+
3889
+ define.amd = {
3890
+ jQuery: true
3891
+ };
3892
+ }());
3893
+
3894
+ S2.requirejs = requirejs;S2.require = require;S2.define = define;
3895
+ }
3896
+ }());
3897
+ S2.define("almond", function(){});
3898
+
3899
  /* global jQuery:false, $:false */
3900
  S2.define('jquery',[],function () {
3901
  var _$ = jQuery || $;
3910
 
3911
  return _$;
3912
  });
3913
+
3914
  S2.define('select2/utils',[
3915
  'jquery'
3916
  ], function ($) {
4187
 
4188
  return Utils;
4189
  });
4190
+
4191
  S2.define('select2/results',[
4192
  'jquery',
4193
  './utils'
4711
 
4712
  return Results;
4713
  });
4714
+
4715
  S2.define('select2/keys',[
4716
 
4717
  ], function () {
4737
 
4738
  return KEYS;
4739
  });
4740
+
4741
  S2.define('select2/selection/base',[
4742
  'jquery',
4743
  '../utils',
4896
 
4897
  return BaseSelection;
4898
  });
4899
+
4900
  S2.define('select2/selection/single',[
4901
  'jquery',
4902
  './base',
4996
 
4997
  return SingleSelection;
4998
  });
4999
+
5000
  S2.define('select2/selection/multiple',[
5001
  'jquery',
5002
  './base',
5106
 
5107
  return MultipleSelection;
5108
  });
5109
+
5110
  S2.define('select2/selection/placeholder',[
5111
  '../utils'
5112
  ], function (Utils) {
5156
 
5157
  return Placeholder;
5158
  });
5159
+
5160
  S2.define('select2/selection/allowClear',[
5161
  'jquery',
5162
  '../keys'
5254
 
5255
  return AllowClear;
5256
  });
5257
+
5258
  S2.define('select2/selection/search',[
5259
  'jquery',
5260
  '../utils',
5477
 
5478
  return Search;
5479
  });
5480
+
5481
  S2.define('select2/selection/eventRelay',[
5482
  'jquery'
5483
  ], function ($) {
5523
 
5524
  return EventRelay;
5525
  });
5526
+
5527
  S2.define('select2/translation',[
5528
  'jquery',
5529
  'require'
5560
 
5561
  return Translation;
5562
  });
5563
+
5564
  S2.define('select2/diacritics',[
5565
 
5566
  ], function () {
6408
 
6409
  return diacritics;
6410
  });
6411
+
6412
  S2.define('select2/data/base',[
6413
  '../utils'
6414
  ], function (Utils) {
6449
 
6450
  return BaseAdapter;
6451
  });
6452
+
6453
  S2.define('select2/data/select',[
6454
  './base',
6455
  '../utils',
6622
  }
6623
  }
6624
 
6625
+ if (data.id !== undefined) {
6626
  option.value = data.id;
6627
  }
6628
 
6735
 
6736
  return SelectAdapter;
6737
  });
6738
+
6739
  S2.define('select2/data/array',[
6740
  './select',
6741
  '../utils',
6815
 
6816
  return ArrayAdapter;
6817
  });
6818
+
6819
  S2.define('select2/data/ajax',[
6820
  './array',
6821
  '../utils',
6925
 
6926
  return AjaxAdapter;
6927
  });
6928
+
6929
  S2.define('select2/data/tags',[
6930
  'jquery'
6931
  ], function ($) {
6981
  }, true)
6982
  );
6983
 
6984
+ var optionText = (option.text || '').toUpperCase();
6985
+ var paramsTerm = (params.term || '').toUpperCase();
6986
+
6987
+ var checkText = optionText === paramsTerm;
6988
 
6989
  if (checkText || checkChildren) {
6990
  if (child) {
7054
 
7055
  return Tags;
7056
  });
7057
+
7058
  S2.define('select2/data/tokenizer',[
7059
  'jquery'
7060
  ], function ($) {
7171
 
7172
  return Tokenizer;
7173
  });
7174
+
7175
  S2.define('select2/data/minimumInputLength',[
7176
 
7177
  ], function () {
7202
 
7203
  return MinimumInputLength;
7204
  });
7205
+
7206
  S2.define('select2/data/maximumInputLength',[
7207
 
7208
  ], function () {
7234
 
7235
  return MaximumInputLength;
7236
  });
7237
+
7238
  S2.define('select2/data/maximumSelectionLength',[
7239
 
7240
  ], function (){
7266
 
7267
  return MaximumSelectionLength;
7268
  });
7269
+
7270
  S2.define('select2/dropdown',[
7271
  'jquery',
7272
  './utils'
7309
 
7310
  return Dropdown;
7311
  });
7312
+
7313
  S2.define('select2/dropdown/search',[
7314
  'jquery',
7315
  '../utils'
7375
  });
7376
 
7377
  container.on('focus', function () {
7378
+ if (!container.isOpen()) {
7379
  self.$search.focus();
7380
  }
7381
  });
7411
 
7412
  return Search;
7413
  });
7414
+
7415
  S2.define('select2/dropdown/hidePlaceholder',[
7416
 
7417
  ], function () {
7454
 
7455
  return HidePlaceholder;
7456
  });
7457
+
7458
  S2.define('select2/dropdown/infiniteScroll',[
7459
  'jquery'
7460
  ], function ($) {
7544
 
7545
  return InfiniteScroll;
7546
  });
7547
+
7548
  S2.define('select2/dropdown/attachBody',[
7549
  'jquery',
7550
  '../utils'
7767
 
7768
  return AttachBody;
7769
  });
7770
+
7771
  S2.define('select2/dropdown/minimumResultsForSearch',[
7772
 
7773
  ], function () {
7807
 
7808
  return MinimumResultsForSearch;
7809
  });
7810
+
7811
  S2.define('select2/dropdown/selectOnClose',[
7812
 
7813
  ], function () {
7858
 
7859
  return SelectOnClose;
7860
  });
7861
+
7862
  S2.define('select2/dropdown/closeOnSelect',[
7863
 
7864
  ], function () {
7894
 
7895
  return CloseOnSelect;
7896
  });
7897
+
7898
  S2.define('select2/i18n/en',[],function () {
7899
  // English
7900
  return {
7939
  }
7940
  };
7941
  });
7942
+
7943
  S2.define('select2/defaults',[
7944
  'jquery',
7945
  'require',
8336
 
8337
  return defaults;
8338
  });
8339
+
8340
  S2.define('select2/options',[
8341
  'require',
8342
  'jquery',
8459
 
8460
  return Options;
8461
  });
8462
+
8463
  S2.define('select2/core',[
8464
  'jquery',
8465
  './options',
9072
 
9073
  return Select2;
9074
  });
9075
+
9076
  S2.define('jquery-mousewheel',[
9077
  'jquery'
9078
  ], function ($) {
9079
  // Used to shim jQuery.mousewheel for non-full builds.
9080
  return $;
9081
  });
9082
+
9083
  S2.define('jquery.select2',[
9084
  'jquery',
9085
  'jquery-mousewheel',
9137
 
9138
  return Select2;
9139
  });
9140
+
9141
  // Return the AMD loader configuration so it can be used outside of this file
9142
  return {
9143
  define: S2.define,
assets/js/{admin_vendor.53a6d3ec.js → admin_vendor.5bfea06b.js} RENAMED
File without changes
assets/js/manifest.json CHANGED
@@ -1,10 +1,10 @@
1
  {
2
  "mp2migrator.js": "mp2migrator.e755af46.js",
3
  "public.js": "public.6e3f442a.js",
4
- "admin.js": "admin.e3b1aa46.js",
5
- "admin_vendor.js": "admin_vendor.53a6d3ec.js",
6
  "form_editor.js": "form_editor.c4bc7e0b.js",
7
  "mailpoet.js": "mailpoet.eab93337.js",
8
- "newsletter_editor.js": "newsletter_editor.2627c560.js",
9
- "vendor.js": "vendor.b4463523.js"
10
  }
1
  {
2
  "mp2migrator.js": "mp2migrator.e755af46.js",
3
  "public.js": "public.6e3f442a.js",
4
+ "admin.js": "admin.5545d8c1.js",
5
+ "admin_vendor.js": "admin_vendor.5bfea06b.js",
6
  "form_editor.js": "form_editor.c4bc7e0b.js",
7
  "mailpoet.js": "mailpoet.eab93337.js",
8
+ "newsletter_editor.js": "newsletter_editor.ea5d61a2.js",
9
+ "vendor.js": "vendor.3c88b878.js"
10
  }
assets/js/{newsletter_editor.2627c560.js → newsletter_editor.ea5d61a2.js} RENAMED
@@ -1747,7 +1747,7 @@ webpackJsonp([4],{
1747
  /***/ function(module, exports, __webpack_require__) {
1748
 
1749
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var require;var require;/*!
1750
- * Select2 4.0.3
1751
  * https://select2.github.io
1752
  *
1753
  * Released under the MIT license
@@ -1757,462 +1757,480 @@ webpackJsonp([4],{
1757
  if (true) {
1758
  // AMD. Register as an anonymous module.
1759
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(273)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
1760
- } else if (typeof exports === 'object') {
1761
  // Node/CommonJS
1762
- factory(require('jquery'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1763
  } else {
1764
  // Browser globals
1765
  factory(jQuery);
1766
  }
1767
- }(function (jQuery) {
1768
  // This is needed so we can catch the AMD loader configuration and use it
1769
  // The inner file should be wrapped (by `banner.start.js`) in a function that
1770
  // returns the AMD loader references.
1771
- var S2 =
1772
- (function () {
1773
  // Restore the Select2 AMD loader so it can be used
1774
  // Needed mostly in the language files, where the loader is not inserted
1775
  if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
1776
  var S2 = jQuery.fn.select2.amd;
1777
  }
1778
- var S2;(function () { if (!S2 || !S2.requirejs) {
1779
- if (!S2) { S2 = {}; } else { require = S2; }
1780
- /**
1781
- * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
1782
- * Available via the MIT or new BSD license.
1783
- * see: http://github.com/jrburke/almond for details
1784
- */
1785
- //Going sloppy to avoid 'use strict' string cost, but strict practices should
1786
- //be followed.
1787
- /*jslint sloppy: true */
1788
- /*global setTimeout: false */
1789
-
1790
- var requirejs, require, define;
1791
- (function (undef) {
1792
- var main, req, makeMap, handlers,
1793
- defined = {},
1794
- waiting = {},
1795
- config = {},
1796
- defining = {},
1797
- hasOwn = Object.prototype.hasOwnProperty,
1798
- aps = [].slice,
1799
- jsSuffixRegExp = /\.js$/;
1800
-
1801
- function hasProp(obj, prop) {
1802
- return hasOwn.call(obj, prop);
1803
- }
1804
-
1805
- /**
1806
- * Given a relative module name, like ./something, normalize it to
1807
- * a real name that can be mapped to a path.
1808
- * @param {String} name the relative name
1809
- * @param {String} baseName a real name that the name arg is relative
1810
- * to.
1811
- * @returns {String} normalized name
1812
- */
1813
- function normalize(name, baseName) {
1814
- var nameParts, nameSegment, mapValue, foundMap, lastIndex,
1815
- foundI, foundStarMap, starI, i, j, part,
1816
- baseParts = baseName && baseName.split("/"),
1817
- map = config.map,
1818
- starMap = (map && map['*']) || {};
1819
-
1820
- //Adjust any relative paths.
1821
- if (name && name.charAt(0) === ".") {
1822
- //If have a base name, try to normalize against it,
1823
- //otherwise, assume it is a top-level require that will
1824
- //be relative to baseUrl in the end.
1825
- if (baseName) {
1826
- name = name.split('/');
1827
- lastIndex = name.length - 1;
1828
-
1829
- // Node .js allowance:
1830
- if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
1831
- name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
1832
- }
1833
-
1834
- //Lop off the last part of baseParts, so that . matches the
1835
- //"directory" and not name of the baseName's module. For instance,
1836
- //baseName of "one/two/three", maps to "one/two/three.js", but we
1837
- //want the directory, "one/two" for this normalization.
1838
- name = baseParts.slice(0, baseParts.length - 1).concat(name);
1839
-
1840
- //start trimDots
1841
- for (i = 0; i < name.length; i += 1) {
1842
- part = name[i];
1843
- if (part === ".") {
1844
- name.splice(i, 1);
1845
- i -= 1;
1846
- } else if (part === "..") {
1847
- if (i === 1 && (name[2] === '..' || name[0] === '..')) {
1848
- //End of the line. Keep at least one non-dot
1849
- //path segment at the front so it can be mapped
1850
- //correctly to disk. Otherwise, there is likely
1851
- //no path mapping for a path starting with '..'.
1852
- //This can still fail, but catches the most reasonable
1853
- //uses of ..
1854
- break;
1855
- } else if (i > 0) {
1856
- name.splice(i - 1, 2);
1857
- i -= 2;
1858
- }
1859
- }
1860
- }
1861
- //end trimDots
1862
-
1863
- name = name.join("/");
1864
- } else if (name.indexOf('./') === 0) {
1865
- // No baseName, so this is ID is resolved relative
1866
- // to baseUrl, pull off the leading dot.
1867
- name = name.substring(2);
1868
- }
1869
- }
1870
-
1871
- //Apply map config if available.
1872
- if ((baseParts || starMap) && map) {
1873
- nameParts = name.split('/');
1874
-
1875
- for (i = nameParts.length; i > 0; i -= 1) {
1876
- nameSegment = nameParts.slice(0, i).join("/");
1877
-
1878
- if (baseParts) {
1879
- //Find the longest baseName segment match in the config.
1880
- //So, do joins on the biggest to smallest lengths of baseParts.
1881
- for (j = baseParts.length; j > 0; j -= 1) {
1882
- mapValue = map[baseParts.slice(0, j).join('/')];
1883
-
1884
- //baseName segment has config, find if it has one for
1885
- //this name.
1886
- if (mapValue) {
1887
- mapValue = mapValue[nameSegment];
1888
- if (mapValue) {
1889
- //Match, update name to the new value.
1890
- foundMap = mapValue;
1891
- foundI = i;
1892
- break;
1893
- }
1894
- }
1895
- }
1896
- }
1897
-
1898
- if (foundMap) {
1899
- break;
1900
- }
1901
-
1902
- //Check for a star map match, but just hold on to it,
1903
- //if there is a shorter segment match later in a matching
1904
- //config, then favor over this star map.
1905
- if (!foundStarMap && starMap && starMap[nameSegment]) {
1906
- foundStarMap = starMap[nameSegment];
1907
- starI = i;
1908
- }
1909
- }
1910
-
1911
- if (!foundMap && foundStarMap) {
1912
- foundMap = foundStarMap;
1913
- foundI = starI;
1914
- }
1915
-
1916
- if (foundMap) {
1917
- nameParts.splice(0, foundI, foundMap);
1918
- name = nameParts.join('/');
1919
- }
1920
- }
1921
-
1922
- return name;
1923
- }
1924
-
1925
- function makeRequire(relName, forceSync) {
1926
- return function () {
1927
- //A version of a require function that passes a moduleName
1928
- //value for items that may need to
1929
- //look up paths relative to the moduleName
1930
- var args = aps.call(arguments, 0);
1931
-
1932
- //If first arg is not require('string'), and there is only
1933
- //one arg, it is the array form without a callback. Insert
1934
- //a null so that the following concat is correct.
1935
- if (typeof args[0] !== 'string' && args.length === 1) {
1936
- args.push(null);
1937
- }
1938
- return req.apply(undef, args.concat([relName, forceSync]));
1939
- };
1940
- }
1941
-
1942
- function makeNormalize(relName) {
1943
- return function (name) {
1944
- return normalize(name, relName);
1945
- };
1946
- }
1947
-
1948
- function makeLoad(depName) {
1949
- return function (value) {
1950
- defined[depName] = value;
1951
- };
1952
- }
1953
-
1954
- function callDep(name) {
1955
- if (hasProp(waiting, name)) {
1956
- var args = waiting[name];
1957
- delete waiting[name];
1958
- defining[name] = true;
1959
- main.apply(undef, args);
1960
- }
1961
-
1962
- if (!hasProp(defined, name) && !hasProp(defining, name)) {
1963
- throw new Error('No ' + name);
1964
- }
1965
- return defined[name];
1966
- }
1967
-
1968
- //Turns a plugin!resource to [plugin, resource]
1969
- //with the plugin being undefined if the name
1970
- //did not have a plugin prefix.
1971
- function splitPrefix(name) {
1972
- var prefix,
1973
- index = name ? name.indexOf('!') : -1;
1974
- if (index > -1) {
1975
- prefix = name.substring(0, index);
1976
- name = name.substring(index + 1, name.length);
1977
- }
1978
- return [prefix, name];
1979
- }
1980
-
1981
- /**
1982
- * Makes a name map, normalizing the name, and using a plugin
1983
- * for normalization if necessary. Grabs a ref to plugin
1984
- * too, as an optimization.
1985
- */
1986
- makeMap = function (name, relName) {
1987
- var plugin,
1988
- parts = splitPrefix(name),
1989
- prefix = parts[0];
1990
-
1991
- name = parts[1];
1992
-
1993
- if (prefix) {
1994
- prefix = normalize(prefix, relName);
1995
- plugin = callDep(prefix);
1996
- }
1997
-
1998
- //Normalize according
1999
- if (prefix) {
2000
- if (plugin && plugin.normalize) {
2001
- name = plugin.normalize(name, makeNormalize(relName));
2002
- } else {
2003
- name = normalize(name, relName);
2004
- }
2005
- } else {
2006
- name = normalize(name, relName);
2007
- parts = splitPrefix(name);
2008
- prefix = parts[0];
2009
- name = parts[1];
2010
- if (prefix) {
2011
- plugin = callDep(prefix);
2012
- }
2013
- }
2014
-
2015
- //Using ridiculous property names for space reasons
2016
- return {
2017
- f: prefix ? prefix + '!' + name : name, //fullName
2018
- n: name,
2019
- pr: prefix,
2020
- p: plugin
2021
- };
2022
- };
2023
-
2024
- function makeConfig(name) {
2025
- return function () {
2026
- return (config && config.config && config.config[name]) || {};
2027
- };
2028
- }
2029
-
2030
- handlers = {
2031
- require: function (name) {
2032
- return makeRequire(name);
2033
- },
2034
- exports: function (name) {
2035
- var e = defined[name];
2036
- if (typeof e !== 'undefined') {
2037
- return e;
2038
- } else {
2039
- return (defined[name] = {});
2040
- }
2041
- },
2042
- module: function (name) {
2043
- return {
2044
- id: name,
2045
- uri: '',
2046
- exports: defined[name],
2047
- config: makeConfig(name)
2048
- };
2049
- }
2050
- };
2051
-
2052
- main = function (name, deps, callback, relName) {
2053
- var cjsModule, depName, ret, map, i,
2054
- args = [],
2055
- callbackType = typeof callback,
2056
- usingExports;
2057
-
2058
- //Use name if no relName
2059
- relName = relName || name;
2060
-
2061
- //Call the callback to define the module, if necessary.
2062
- if (callbackType === 'undefined' || callbackType === 'function') {
2063
- //Pull out the defined dependencies and pass the ordered
2064
- //values to the callback.
2065
- //Default to [require, exports, module] if no deps
2066
- deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
2067
- for (i = 0; i < deps.length; i += 1) {
2068
- map = makeMap(deps[i], relName);
2069
- depName = map.f;
2070
-
2071
- //Fast path CommonJS standard dependencies.
2072
- if (depName === "require") {
2073
- args[i] = handlers.require(name);
2074
- } else if (depName === "exports") {
2075
- //CommonJS module spec 1.1
2076
- args[i] = handlers.exports(name);
2077
- usingExports = true;
2078
- } else if (depName === "module") {
2079
- //CommonJS module spec 1.1
2080
- cjsModule = args[i] = handlers.module(name);
2081
- } else if (hasProp(defined, depName) ||
2082
- hasProp(waiting, depName) ||
2083
- hasProp(defining, depName)) {
2084
- args[i] = callDep(depName);
2085
- } else if (map.p) {
2086
- map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
2087
- args[i] = defined[depName];
2088
- } else {
2089
- throw new Error(name + ' missing ' + depName);
2090
- }
2091
- }
2092
-
2093
- ret = callback ? callback.apply(defined[name], args) : undefined;
2094
-
2095
- if (name) {
2096
- //If setting exports via "module" is in play,
2097
- //favor that over return value and exports. After that,
2098
- //favor a non-undefined return value over exports use.
2099
- if (cjsModule && cjsModule.exports !== undef &&
2100
- cjsModule.exports !== defined[name]) {
2101
- defined[name] = cjsModule.exports;
2102
- } else if (ret !== undef || !usingExports) {
2103
- //Use the return value from the function.
2104
- defined[name] = ret;
2105
- }
2106
- }
2107
- } else if (name) {
2108
- //May just be an object definition for the module. Only
2109
- //worry about defining if have a module name.
2110
- defined[name] = callback;
2111
- }
2112
- };
2113
-
2114
- requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
2115
- if (typeof deps === "string") {
2116
- if (handlers[deps]) {
2117
- //callback in this case is really relName
2118
- return handlers[deps](callback);
2119
- }
2120
- //Just return the module wanted. In this scenario, the
2121
- //deps arg is the module name, and second arg (if passed)
2122
- //is just the relName.
2123
- //Normalize module name, if it contains . or ..
2124
- return callDep(makeMap(deps, callback).f);
2125
- } else if (!deps.splice) {
2126
- //deps is a config object, not an array.
2127
- config = deps;
2128
- if (config.deps) {
2129
- req(config.deps, config.callback);
2130
- }
2131
- if (!callback) {
2132
- return;
2133
- }
2134
-
2135
- if (callback.splice) {
2136
- //callback is an array, which means it is a dependency list.
2137
- //Adjust args if there are dependencies
2138
- deps = callback;
2139
- callback = relName;
2140
- relName = null;
2141
- } else {
2142
- deps = undef;
2143
- }
2144
- }
2145
-
2146
- //Support require(['a'])
2147
- callback = callback || function () {};
2148
-
2149
- //If relName is a function, it is an errback handler,
2150
- //so remove it.
2151
- if (typeof relName === 'function') {
2152
- relName = forceSync;
2153
- forceSync = alt;
2154
- }
2155
-
2156
- //Simulate async callback;
2157
- if (forceSync) {
2158
- main(undef, deps, callback, relName);
2159
- } else {
2160
- //Using a non-zero value because of concern for what old browsers
2161
- //do, and latest browsers "upgrade" to 4 if lower value is used:
2162
- //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
2163
- //If want a value immediately, use require('id') instead -- something
2164
- //that works in almond on the global level, but not guaranteed and
2165
- //unlikely to work in other AMD implementations.
2166
- setTimeout(function () {
2167
- main(undef, deps, callback, relName);
2168
- }, 4);
2169
- }
2170
-
2171
- return req;
2172
- };
2173
-
2174
- /**
2175
- * Just drops the config on the floor, but returns req in case
2176
- * the config return value is used.
2177
- */
2178
- req.config = function (cfg) {
2179
- return req(cfg);
2180
- };
2181
-
2182
- /**
2183
- * Expose module registry for debugging and tooling
2184
- */
2185
- requirejs._defined = defined;
2186
-
2187
- define = function (name, deps, callback) {
2188
- if (typeof name !== 'string') {
2189
- throw new Error('See almond README: incorrect module build, no module name');
2190
- }
2191
-
2192
- //This module may not have dependencies
2193
- if (!deps.splice) {
2194
- //deps is not an array, so probably means
2195
- //an object literal or factory function for
2196
- //the value. Adjust args.
2197
- callback = deps;
2198
- deps = [];
2199
- }
2200
-
2201
- if (!hasProp(defined, name) && !hasProp(waiting, name)) {
2202
- waiting[name] = [name, deps, callback];
2203
- }
2204
- };
2205
-
2206
- define.amd = {
2207
- jQuery: true
2208
- };
2209
- }());
2210
-
2211
- S2.requirejs = requirejs;S2.require = require;S2.define = define;
2212
- }
2213
- }());
2214
- S2.define("almond", function(){});
2215
-
 
 
 
 
2216
  /* global jQuery:false, $:false */
2217
  S2.define('jquery',[],function () {
2218
  var _$ = jQuery || $;
@@ -2227,7 +2245,7 @@ webpackJsonp([4],{
2227
 
2228
  return _$;
2229
  });
2230
-
2231
  S2.define('select2/utils',[
2232
  'jquery'
2233
  ], function ($) {
@@ -2504,7 +2522,7 @@ webpackJsonp([4],{
2504
 
2505
  return Utils;
2506
  });
2507
-
2508
  S2.define('select2/results',[
2509
  'jquery',
2510
  './utils'
@@ -3028,7 +3046,7 @@ webpackJsonp([4],{
3028
 
3029
  return Results;
3030
  });
3031
-
3032
  S2.define('select2/keys',[
3033
 
3034
  ], function () {
@@ -3054,7 +3072,7 @@ webpackJsonp([4],{
3054
 
3055
  return KEYS;
3056
  });
3057
-
3058
  S2.define('select2/selection/base',[
3059
  'jquery',
3060
  '../utils',
@@ -3213,7 +3231,7 @@ webpackJsonp([4],{
3213
 
3214
  return BaseSelection;
3215
  });
3216
-
3217
  S2.define('select2/selection/single',[
3218
  'jquery',
3219
  './base',
@@ -3313,7 +3331,7 @@ webpackJsonp([4],{
3313
 
3314
  return SingleSelection;
3315
  });
3316
-
3317
  S2.define('select2/selection/multiple',[
3318
  'jquery',
3319
  './base',
@@ -3423,7 +3441,7 @@ webpackJsonp([4],{
3423
 
3424
  return MultipleSelection;
3425
  });
3426
-
3427
  S2.define('select2/selection/placeholder',[
3428
  '../utils'
3429
  ], function (Utils) {
@@ -3473,7 +3491,7 @@ webpackJsonp([4],{
3473
 
3474
  return Placeholder;
3475
  });
3476
-
3477
  S2.define('select2/selection/allowClear',[
3478
  'jquery',
3479
  '../keys'
@@ -3571,7 +3589,7 @@ webpackJsonp([4],{
3571
 
3572
  return AllowClear;
3573
  });
3574
-
3575
  S2.define('select2/selection/search',[
3576
  'jquery',
3577
  '../utils',
@@ -3794,7 +3812,7 @@ webpackJsonp([4],{
3794
 
3795
  return Search;
3796
  });
3797
-
3798
  S2.define('select2/selection/eventRelay',[
3799
  'jquery'
3800
  ], function ($) {
@@ -3840,7 +3858,7 @@ webpackJsonp([4],{
3840
 
3841
  return EventRelay;
3842
  });
3843
-
3844
  S2.define('select2/translation',[
3845
  'jquery',
3846
  'require'
@@ -3877,7 +3895,7 @@ webpackJsonp([4],{
3877
 
3878
  return Translation;
3879
  });
3880
-
3881
  S2.define('select2/diacritics',[
3882
 
3883
  ], function () {
@@ -4725,7 +4743,7 @@ webpackJsonp([4],{
4725
 
4726
  return diacritics;
4727
  });
4728
-
4729
  S2.define('select2/data/base',[
4730
  '../utils'
4731
  ], function (Utils) {
@@ -4766,7 +4784,7 @@ webpackJsonp([4],{
4766
 
4767
  return BaseAdapter;
4768
  });
4769
-
4770
  S2.define('select2/data/select',[
4771
  './base',
4772
  '../utils',
@@ -4939,7 +4957,7 @@ webpackJsonp([4],{
4939
  }
4940
  }
4941
 
4942
- if (data.id) {
4943
  option.value = data.id;
4944
  }
4945
 
@@ -5052,7 +5070,7 @@ webpackJsonp([4],{
5052
 
5053
  return SelectAdapter;
5054
  });
5055
-
5056
  S2.define('select2/data/array',[
5057
  './select',
5058
  '../utils',
@@ -5132,7 +5150,7 @@ webpackJsonp([4],{
5132
 
5133
  return ArrayAdapter;
5134
  });
5135
-
5136
  S2.define('select2/data/ajax',[
5137
  './array',
5138
  '../utils',
@@ -5242,7 +5260,7 @@ webpackJsonp([4],{
5242
 
5243
  return AjaxAdapter;
5244
  });
5245
-
5246
  S2.define('select2/data/tags',[
5247
  'jquery'
5248
  ], function ($) {
@@ -5298,7 +5316,10 @@ webpackJsonp([4],{
5298
  }, true)
5299
  );
5300
 
5301
- var checkText = option.text === params.term;
 
 
 
5302
 
5303
  if (checkText || checkChildren) {
5304
  if (child) {
@@ -5368,7 +5389,7 @@ webpackJsonp([4],{
5368
 
5369
  return Tags;
5370
  });
5371
-
5372
  S2.define('select2/data/tokenizer',[
5373
  'jquery'
5374
  ], function ($) {
@@ -5485,7 +5506,7 @@ webpackJsonp([4],{
5485
 
5486
  return Tokenizer;
5487
  });
5488
-
5489
  S2.define('select2/data/minimumInputLength',[
5490
 
5491
  ], function () {
@@ -5516,7 +5537,7 @@ webpackJsonp([4],{
5516
 
5517
  return MinimumInputLength;
5518
  });
5519
-
5520
  S2.define('select2/data/maximumInputLength',[
5521
 
5522
  ], function () {
@@ -5548,7 +5569,7 @@ webpackJsonp([4],{
5548
 
5549
  return MaximumInputLength;
5550
  });
5551
-
5552
  S2.define('select2/data/maximumSelectionLength',[
5553
 
5554
  ], function (){
@@ -5580,7 +5601,7 @@ webpackJsonp([4],{
5580
 
5581
  return MaximumSelectionLength;
5582
  });
5583
-
5584
  S2.define('select2/dropdown',[
5585
  'jquery',
5586
  './utils'
@@ -5623,7 +5644,7 @@ webpackJsonp([4],{
5623
 
5624
  return Dropdown;
5625
  });
5626
-
5627
  S2.define('select2/dropdown/search',[
5628
  'jquery',
5629
  '../utils'
@@ -5689,7 +5710,7 @@ webpackJsonp([4],{
5689
  });
5690
 
5691
  container.on('focus', function () {
5692
- if (container.isOpen()) {
5693
  self.$search.focus();
5694
  }
5695
  });
@@ -5725,7 +5746,7 @@ webpackJsonp([4],{
5725
 
5726
  return Search;
5727
  });
5728
-
5729
  S2.define('select2/dropdown/hidePlaceholder',[
5730
 
5731
  ], function () {
@@ -5768,7 +5789,7 @@ webpackJsonp([4],{
5768
 
5769
  return HidePlaceholder;
5770
  });
5771
-
5772
  S2.define('select2/dropdown/infiniteScroll',[
5773
  'jquery'
5774
  ], function ($) {
@@ -5858,7 +5879,7 @@ webpackJsonp([4],{
5858
 
5859
  return InfiniteScroll;
5860
  });
5861
-
5862
  S2.define('select2/dropdown/attachBody',[
5863
  'jquery',
5864
  '../utils'
@@ -6081,7 +6102,7 @@ webpackJsonp([4],{
6081
 
6082
  return AttachBody;
6083
  });
6084
-
6085
  S2.define('select2/dropdown/minimumResultsForSearch',[
6086
 
6087
  ], function () {
@@ -6121,7 +6142,7 @@ webpackJsonp([4],{
6121
 
6122
  return MinimumResultsForSearch;
6123
  });
6124
-
6125
  S2.define('select2/dropdown/selectOnClose',[
6126
 
6127
  ], function () {
@@ -6172,7 +6193,7 @@ webpackJsonp([4],{
6172
 
6173
  return SelectOnClose;
6174
  });
6175
-
6176
  S2.define('select2/dropdown/closeOnSelect',[
6177
 
6178
  ], function () {
@@ -6208,7 +6229,7 @@ webpackJsonp([4],{
6208
 
6209
  return CloseOnSelect;
6210
  });
6211
-
6212
  S2.define('select2/i18n/en',[],function () {
6213
  // English
6214
  return {
@@ -6253,7 +6274,7 @@ webpackJsonp([4],{
6253
  }
6254
  };
6255
  });
6256
-
6257
  S2.define('select2/defaults',[
6258
  'jquery',
6259
  'require',
@@ -6650,7 +6671,7 @@ webpackJsonp([4],{
6650
 
6651
  return defaults;
6652
  });
6653
-
6654
  S2.define('select2/options',[
6655
  'require',
6656
  'jquery',
@@ -6773,7 +6794,7 @@ webpackJsonp([4],{
6773
 
6774
  return Options;
6775
  });
6776
-
6777
  S2.define('select2/core',[
6778
  'jquery',
6779
  './options',
@@ -7386,14 +7407,14 @@ webpackJsonp([4],{
7386
 
7387
  return Select2;
7388
  });
7389
-
7390
  S2.define('jquery-mousewheel',[
7391
  'jquery'
7392
  ], function ($) {
7393
  // Used to shim jQuery.mousewheel for non-full builds.
7394
  return $;
7395
  });
7396
-
7397
  S2.define('jquery.select2',[
7398
  'jquery',
7399
  'jquery-mousewheel',
@@ -7451,7 +7472,7 @@ webpackJsonp([4],{
7451
 
7452
  return Select2;
7453
  });
7454
-
7455
  // Return the AMD loader configuration so it can be used outside of this file
7456
  return {
7457
  define: S2.define,
1747
  /***/ function(module, exports, __webpack_require__) {
1748
 
1749
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var require;var require;/*!
1750
+ * Select2 4.0.4
1751
  * https://select2.github.io
1752
  *
1753
  * Released under the MIT license
1757
  if (true) {
1758
  // AMD. Register as an anonymous module.
1759
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(273)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
1760
+ } else if (typeof module === 'object' && module.exports) {
1761
  // Node/CommonJS
1762
+ module.exports = function (root, jQuery) {
1763
+ if (jQuery === undefined) {
1764
+ // require('jQuery') returns a factory that requires window to
1765
+ // build a jQuery instance, we normalize how we use modules
1766
+ // that require this pattern but the window provided is a noop
1767
+ // if it's defined (how jquery works)
1768
+ if (typeof window !== 'undefined') {
1769
+ jQuery = require('jquery');
1770
+ }
1771
+ else {
1772
+ jQuery = require('jquery')(root);
1773
+ }
1774
+ }
1775
+ factory(jQuery);
1776
+ return jQuery;
1777
+ };
1778
  } else {
1779
  // Browser globals
1780
  factory(jQuery);
1781
  }
1782
+ } (function (jQuery) {
1783
  // This is needed so we can catch the AMD loader configuration and use it
1784
  // The inner file should be wrapped (by `banner.start.js`) in a function that
1785
  // returns the AMD loader references.
1786
+ var S2 =(function () {
 
1787
  // Restore the Select2 AMD loader so it can be used
1788
  // Needed mostly in the language files, where the loader is not inserted
1789
  if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
1790
  var S2 = jQuery.fn.select2.amd;
1791
  }
1792
+ var S2;(function () { if (!S2 || !S2.requirejs) {
1793
+ if (!S2) { S2 = {}; } else { require = S2; }
1794
+ /**
1795
+ * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
1796
+ * Released under MIT license, http://github.com/requirejs/almond/LICENSE
1797
+ */
1798
+ //Going sloppy to avoid 'use strict' string cost, but strict practices should
1799
+ //be followed.
1800
+ /*global setTimeout: false */
1801
+
1802
+ var requirejs, require, define;
1803
+ (function (undef) {
1804
+ var main, req, makeMap, handlers,
1805
+ defined = {},
1806
+ waiting = {},
1807
+ config = {},
1808
+ defining = {},
1809
+ hasOwn = Object.prototype.hasOwnProperty,
1810
+ aps = [].slice,
1811
+ jsSuffixRegExp = /\.js$/;
1812
+
1813
+ function hasProp(obj, prop) {
1814
+ return hasOwn.call(obj, prop);
1815
+ }
1816
+
1817
+ /**
1818
+ * Given a relative module name, like ./something, normalize it to
1819
+ * a real name that can be mapped to a path.
1820
+ * @param {String} name the relative name
1821
+ * @param {String} baseName a real name that the name arg is relative
1822
+ * to.
1823
+ * @returns {String} normalized name
1824
+ */
1825
+ function normalize(name, baseName) {
1826
+ var nameParts, nameSegment, mapValue, foundMap, lastIndex,
1827
+ foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
1828
+ baseParts = baseName && baseName.split("/"),
1829
+ map = config.map,
1830
+ starMap = (map && map['*']) || {};
1831
+
1832
+ //Adjust any relative paths.
1833
+ if (name) {
1834
+ name = name.split('/');
1835
+ lastIndex = name.length - 1;
1836
+
1837
+ // If wanting node ID compatibility, strip .js from end
1838
+ // of IDs. Have to do this here, and not in nameToUrl
1839
+ // because node allows either .js or non .js to map
1840
+ // to same file.
1841
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
1842
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
1843
+ }
1844
+
1845
+ // Starts with a '.' so need the baseName
1846
+ if (name[0].charAt(0) === '.' && baseParts) {
1847
+ //Convert baseName to array, and lop off the last part,
1848
+ //so that . matches that 'directory' and not name of the baseName's
1849
+ //module. For instance, baseName of 'one/two/three', maps to
1850
+ //'one/two/three.js', but we want the directory, 'one/two' for
1851
+ //this normalization.
1852
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
1853
+ name = normalizedBaseParts.concat(name);
1854
+ }
1855
+
1856
+ //start trimDots
1857
+ for (i = 0; i < name.length; i++) {
1858
+ part = name[i];
1859
+ if (part === '.') {
1860
+ name.splice(i, 1);
1861
+ i -= 1;
1862
+ } else if (part === '..') {
1863
+ // If at the start, or previous value is still ..,
1864
+ // keep them so that when converted to a path it may
1865
+ // still work when converted to a path, even though
1866
+ // as an ID it is less than ideal. In larger point
1867
+ // releases, may be better to just kick out an error.
1868
+ if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
1869
+ continue;
1870
+ } else if (i > 0) {
1871
+ name.splice(i - 1, 2);
1872
+ i -= 2;
1873
+ }
1874
+ }
1875
+ }
1876
+ //end trimDots
1877
+
1878
+ name = name.join('/');
1879
+ }
1880
+
1881
+ //Apply map config if available.
1882
+ if ((baseParts || starMap) && map) {
1883
+ nameParts = name.split('/');
1884
+
1885
+ for (i = nameParts.length; i > 0; i -= 1) {
1886
+ nameSegment = nameParts.slice(0, i).join("/");
1887
+
1888
+ if (baseParts) {
1889
+ //Find the longest baseName segment match in the config.
1890
+ //So, do joins on the biggest to smallest lengths of baseParts.
1891
+ for (j = baseParts.length; j > 0; j -= 1) {
1892
+ mapValue = map[baseParts.slice(0, j).join('/')];
1893
+
1894
+ //baseName segment has config, find if it has one for
1895
+ //this name.
1896
+ if (mapValue) {
1897
+ mapValue = mapValue[nameSegment];
1898
+ if (mapValue) {
1899
+ //Match, update name to the new value.
1900
+ foundMap = mapValue;
1901
+ foundI = i;
1902
+ break;
1903
+ }
1904
+ }
1905
+ }
1906
+ }
1907
+
1908
+ if (foundMap) {
1909
+ break;
1910
+ }
1911
+
1912
+ //Check for a star map match, but just hold on to it,
1913
+ //if there is a shorter segment match later in a matching
1914
+ //config, then favor over this star map.
1915
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
1916
+ foundStarMap = starMap[nameSegment];
1917
+ starI = i;
1918
+ }
1919
+ }
1920
+
1921
+ if (!foundMap && foundStarMap) {
1922
+ foundMap = foundStarMap;
1923
+ foundI = starI;
1924
+ }
1925
+
1926
+ if (foundMap) {
1927
+ nameParts.splice(0, foundI, foundMap);
1928
+ name = nameParts.join('/');
1929
+ }
1930
+ }
1931
+
1932
+ return name;
1933
+ }
1934
+
1935
+ function makeRequire(relName, forceSync) {
1936
+ return function () {
1937
+ //A version of a require function that passes a moduleName
1938
+ //value for items that may need to
1939
+ //look up paths relative to the moduleName
1940
+ var args = aps.call(arguments, 0);
1941
+
1942
+ //If first arg is not require('string'), and there is only
1943
+ //one arg, it is the array form without a callback. Insert
1944
+ //a null so that the following concat is correct.
1945
+ if (typeof args[0] !== 'string' && args.length === 1) {
1946
+ args.push(null);
1947
+ }
1948
+ return req.apply(undef, args.concat([relName, forceSync]));
1949
+ };
1950
+ }
1951
+
1952
+ function makeNormalize(relName) {
1953
+ return function (name) {
1954
+ return normalize(name, relName);
1955
+ };
1956
+ }
1957
+
1958
+ function makeLoad(depName) {
1959
+ return function (value) {
1960
+ defined[depName] = value;
1961
+ };
1962
+ }
1963
+
1964
+ function callDep(name) {
1965
+ if (hasProp(waiting, name)) {
1966
+ var args = waiting[name];
1967
+ delete waiting[name];
1968
+ defining[name] = true;
1969
+ main.apply(undef, args);
1970
+ }
1971
+
1972
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
1973
+ throw new Error('No ' + name);
1974
+ }
1975
+ return defined[name];
1976
+ }
1977
+
1978
+ //Turns a plugin!resource to [plugin, resource]
1979
+ //with the plugin being undefined if the name
1980
+ //did not have a plugin prefix.
1981
+ function splitPrefix(name) {
1982
+ var prefix,
1983
+ index = name ? name.indexOf('!') : -1;
1984
+ if (index > -1) {
1985
+ prefix = name.substring(0, index);
1986
+ name = name.substring(index + 1, name.length);
1987
+ }
1988
+ return [prefix, name];
1989
+ }
1990
+
1991
+ //Creates a parts array for a relName where first part is plugin ID,
1992
+ //second part is resource ID. Assumes relName has already been normalized.
1993
+ function makeRelParts(relName) {
1994
+ return relName ? splitPrefix(relName) : [];
1995
+ }
1996
+
1997
+ /**
1998
+ * Makes a name map, normalizing the name, and using a plugin
1999
+ * for normalization if necessary. Grabs a ref to plugin
2000
+ * too, as an optimization.
2001
+ */
2002
+ makeMap = function (name, relParts) {
2003
+ var plugin,
2004
+ parts = splitPrefix(name),
2005
+ prefix = parts[0],
2006
+ relResourceName = relParts[1];
2007
+
2008
+ name = parts[1];
2009
+
2010
+ if (prefix) {
2011
+ prefix = normalize(prefix, relResourceName);
2012
+ plugin = callDep(prefix);
2013
+ }
2014
+
2015
+ //Normalize according
2016
+ if (prefix) {
2017
+ if (plugin && plugin.normalize) {
2018
+ name = plugin.normalize(name, makeNormalize(relResourceName));
2019
+ } else {
2020
+ name = normalize(name, relResourceName);
2021
+ }
2022
+ } else {
2023
+ name = normalize(name, relResourceName);
2024
+ parts = splitPrefix(name);
2025
+ prefix = parts[0];
2026
+ name = parts[1];
2027
+ if (prefix) {
2028
+ plugin = callDep(prefix);
2029
+ }
2030
+ }
2031
+
2032
+ //Using ridiculous property names for space reasons
2033
+ return {
2034
+ f: prefix ? prefix + '!' + name : name, //fullName
2035
+ n: name,
2036
+ pr: prefix,
2037
+ p: plugin
2038
+ };
2039
+ };
2040
+
2041
+ function makeConfig(name) {
2042
+ return function () {
2043
+ return (config && config.config && config.config[name]) || {};
2044
+ };
2045
+ }
2046
+
2047
+ handlers = {
2048
+ require: function (name) {
2049
+ return makeRequire(name);
2050
+ },
2051
+ exports: function (name) {
2052
+ var e = defined[name];
2053
+ if (typeof e !== 'undefined') {
2054
+ return e;
2055
+ } else {
2056
+ return (defined[name] = {});
2057
+ }
2058
+ },
2059
+ module: function (name) {
2060
+ return {
2061
+ id: name,
2062
+ uri: '',
2063
+ exports: defined[name],
2064
+ config: makeConfig(name)
2065
+ };
2066
+ }
2067
+ };
2068
+
2069
+ main = function (name, deps, callback, relName) {
2070
+ var cjsModule, depName, ret, map, i, relParts,
2071
+ args = [],
2072
+ callbackType = typeof callback,
2073
+ usingExports;
2074
+
2075
+ //Use name if no relName
2076
+ relName = relName || name;
2077
+ relParts = makeRelParts(relName);
2078
+
2079
+ //Call the callback to define the module, if necessary.
2080
+ if (callbackType === 'undefined' || callbackType === 'function') {
2081
+ //Pull out the defined dependencies and pass the ordered
2082
+ //values to the callback.
2083
+ //Default to [require, exports, module] if no deps
2084
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
2085
+ for (i = 0; i < deps.length; i += 1) {
2086
+ map = makeMap(deps[i], relParts);
2087
+ depName = map.f;
2088
+
2089
+ //Fast path CommonJS standard dependencies.
2090
+ if (depName === "require") {
2091
+ args[i] = handlers.require(name);
2092
+ } else if (depName === "exports") {
2093
+ //CommonJS module spec 1.1
2094
+ args[i] = handlers.exports(name);
2095
+ usingExports = true;
2096
+ } else if (depName === "module") {
2097
+ //CommonJS module spec 1.1
2098
+ cjsModule = args[i] = handlers.module(name);
2099
+ } else if (hasProp(defined, depName) ||
2100
+ hasProp(waiting, depName) ||
2101
+ hasProp(defining, depName)) {
2102
+ args[i] = callDep(depName);
2103
+ } else if (map.p) {
2104
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
2105
+ args[i] = defined[depName];
2106
+ } else {
2107
+ throw new Error(name + ' missing ' + depName);
2108
+ }
2109
+ }
2110
+
2111
+ ret = callback ? callback.apply(defined[name], args) : undefined;
2112
+
2113
+ if (name) {
2114
+ //If setting exports via "module" is in play,
2115
+ //favor that over return value and exports. After that,
2116
+ //favor a non-undefined return value over exports use.
2117
+ if (cjsModule && cjsModule.exports !== undef &&
2118
+ cjsModule.exports !== defined[name]) {
2119
+ defined[name] = cjsModule.exports;
2120
+ } else if (ret !== undef || !usingExports) {
2121
+ //Use the return value from the function.
2122
+ defined[name] = ret;
2123
+ }
2124
+ }
2125
+ } else if (name) {
2126
+ //May just be an object definition for the module. Only
2127
+ //worry about defining if have a module name.
2128
+ defined[name] = callback;
2129
+ }
2130
+ };
2131
+
2132
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
2133
+ if (typeof deps === "string") {
2134
+ if (handlers[deps]) {
2135
+ //callback in this case is really relName
2136
+ return handlers[deps](callback);
2137
+ }
2138
+ //Just return the module wanted. In this scenario, the
2139
+ //deps arg is the module name, and second arg (if passed)
2140
+ //is just the relName.
2141
+ //Normalize module name, if it contains . or ..
2142
+ return callDep(makeMap(deps, makeRelParts(callback)).f);
2143
+ } else if (!deps.splice) {
2144
+ //deps is a config object, not an array.
2145
+ config = deps;
2146
+ if (config.deps) {
2147
+ req(config.deps, config.callback);
2148
+ }
2149
+ if (!callback) {
2150
+ return;
2151
+ }
2152
+
2153
+ if (callback.splice) {
2154
+ //callback is an array, which means it is a dependency list.
2155
+ //Adjust args if there are dependencies
2156
+ deps = callback;
2157
+ callback = relName;
2158
+ relName = null;
2159
+ } else {
2160
+ deps = undef;
2161
+ }
2162
+ }
2163
+
2164
+ //Support require(['a'])
2165
+ callback = callback || function () {};
2166
+
2167
+ //If relName is a function, it is an errback handler,
2168
+ //so remove it.
2169
+ if (typeof relName === 'function') {
2170
+ relName = forceSync;
2171
+ forceSync = alt;
2172
+ }
2173
+
2174
+ //Simulate async callback;
2175
+ if (forceSync) {
2176
+ main(undef, deps, callback, relName);
2177
+ } else {
2178
+ //Using a non-zero value because of concern for what old browsers
2179
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
2180
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
2181
+ //If want a value immediately, use require('id') instead -- something
2182
+ //that works in almond on the global level, but not guaranteed and
2183
+ //unlikely to work in other AMD implementations.
2184
+ setTimeout(function () {
2185
+ main(undef, deps, callback, relName);
2186
+ }, 4);
2187
+ }
2188
+
2189
+ return req;
2190
+ };
2191
+
2192
+ /**
2193
+ * Just drops the config on the floor, but returns req in case
2194
+ * the config return value is used.
2195
+ */
2196
+ req.config = function (cfg) {
2197
+ return req(cfg);
2198
+ };
2199
+
2200
+ /**
2201
+ * Expose module registry for debugging and tooling
2202
+ */
2203
+ requirejs._defined = defined;
2204
+
2205
+ define = function (name, deps, callback) {
2206
+ if (typeof name !== 'string') {
2207
+ throw new Error('See almond README: incorrect module build, no module name');
2208
+ }
2209
+
2210
+ //This module may not have dependencies
2211
+ if (!deps.splice) {
2212
+ //deps is not an array, so probably means
2213
+ //an object literal or factory function for
2214
+ //the value. Adjust args.
2215
+ callback = deps;
2216
+ deps = [];
2217
+ }
2218
+
2219
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
2220
+ waiting[name] = [name, deps, callback];
2221
+ }
2222
+ };
2223
+
2224
+ define.amd = {
2225
+ jQuery: true
2226
+ };
2227
+ }());
2228
+
2229
+ S2.requirejs = requirejs;S2.require = require;S2.define = define;
2230
+ }
2231
+ }());
2232
+ S2.define("almond", function(){});
2233
+
2234
  /* global jQuery:false, $:false */
2235
  S2.define('jquery',[],function () {
2236
  var _$ = jQuery || $;
2245
 
2246
  return _$;
2247
  });
2248
+
2249
  S2.define('select2/utils',[
2250
  'jquery'
2251
  ], function ($) {
2522
 
2523
  return Utils;
2524
  });
2525
+
2526
  S2.define('select2/results',[
2527
  'jquery',
2528
  './utils'
3046
 
3047
  return Results;
3048
  });
3049
+
3050
  S2.define('select2/keys',[
3051
 
3052
  ], function () {
3072
 
3073
  return KEYS;
3074
  });
3075
+
3076
  S2.define('select2/selection/base',[
3077
  'jquery',
3078
  '../utils',
3231
 
3232
  return BaseSelection;
3233
  });
3234
+
3235
  S2.define('select2/selection/single',[
3236
  'jquery',
3237
  './base',
3331
 
3332
  return SingleSelection;
3333
  });
3334
+
3335
  S2.define('select2/selection/multiple',[
3336
  'jquery',
3337
  './base',
3441
 
3442
  return MultipleSelection;
3443
  });
3444
+
3445
  S2.define('select2/selection/placeholder',[
3446
  '../utils'
3447
  ], function (Utils) {
3491
 
3492
  return Placeholder;
3493
  });
3494
+
3495
  S2.define('select2/selection/allowClear',[
3496
  'jquery',
3497
  '../keys'
3589
 
3590
  return AllowClear;
3591
  });
3592
+
3593
  S2.define('select2/selection/search',[
3594
  'jquery',
3595
  '../utils',
3812
 
3813
  return Search;
3814
  });
3815
+
3816
  S2.define('select2/selection/eventRelay',[
3817
  'jquery'
3818
  ], function ($) {
3858
 
3859
  return EventRelay;
3860
  });
3861
+
3862
  S2.define('select2/translation',[
3863
  'jquery',
3864
  'require'
3895
 
3896
  return Translation;
3897
  });
3898
+
3899
  S2.define('select2/diacritics',[
3900
 
3901
  ], function () {
4743
 
4744
  return diacritics;
4745
  });
4746
+
4747
  S2.define('select2/data/base',[
4748
  '../utils'
4749
  ], function (Utils) {
4784
 
4785
  return BaseAdapter;
4786
  });
4787
+
4788
  S2.define('select2/data/select',[
4789
  './base',
4790
  '../utils',
4957
  }
4958
  }
4959
 
4960
+ if (data.id !== undefined) {
4961
  option.value = data.id;
4962
  }
4963
 
5070
 
5071
  return SelectAdapter;
5072
  });
5073
+
5074
  S2.define('select2/data/array',[
5075
  './select',
5076
  '../utils',
5150
 
5151
  return ArrayAdapter;
5152
  });
5153
+
5154
  S2.define('select2/data/ajax',[
5155
  './array',
5156
  '../utils',
5260
 
5261
  return AjaxAdapter;
5262
  });
5263
+
5264
  S2.define('select2/data/tags',[
5265
  'jquery'
5266
  ], function ($) {
5316
  }, true)
5317
  );
5318
 
5319
+ var optionText = (option.text || '').toUpperCase();
5320
+ var paramsTerm = (params.term || '').toUpperCase();
5321
+
5322
+ var checkText = optionText === paramsTerm;
5323
 
5324
  if (checkText || checkChildren) {
5325
  if (child) {
5389
 
5390
  return Tags;
5391
  });
5392
+
5393
  S2.define('select2/data/tokenizer',[
5394
  'jquery'
5395
  ], function ($) {
5506
 
5507
  return Tokenizer;
5508
  });
5509
+
5510
  S2.define('select2/data/minimumInputLength',[
5511
 
5512
  ], function () {
5537
 
5538
  return MinimumInputLength;
5539
  });
5540
+
5541
  S2.define('select2/data/maximumInputLength',[
5542
 
5543
  ], function () {
5569
 
5570
  return MaximumInputLength;
5571
  });
5572
+
5573
  S2.define('select2/data/maximumSelectionLength',[
5574
 
5575
  ], function (){
5601
 
5602
  return MaximumSelectionLength;
5603
  });
5604
+
5605
  S2.define('select2/dropdown',[
5606
  'jquery',
5607
  './utils'
5644
 
5645
  return Dropdown;
5646
  });
5647
+
5648
  S2.define('select2/dropdown/search',[
5649
  'jquery',
5650
  '../utils'
5710
  });
5711
 
5712
  container.on('focus', function () {
5713
+ if (!container.isOpen()) {
5714
  self.$search.focus();
5715
  }
5716
  });
5746
 
5747
  return Search;
5748
  });
5749
+
5750
  S2.define('select2/dropdown/hidePlaceholder',[
5751
 
5752
  ], function () {
5789
 
5790
  return HidePlaceholder;
5791
  });
5792
+
5793
  S2.define('select2/dropdown/infiniteScroll',[
5794
  'jquery'
5795
  ], function ($) {
5879
 
5880
  return InfiniteScroll;
5881
  });
5882
+
5883
  S2.define('select2/dropdown/attachBody',[
5884
  'jquery',
5885
  '../utils'
6102
 
6103
  return AttachBody;
6104
  });
6105
+
6106
  S2.define('select2/dropdown/minimumResultsForSearch',[
6107
 
6108
  ], function () {
6142
 
6143
  return MinimumResultsForSearch;
6144
  });
6145
+
6146
  S2.define('select2/dropdown/selectOnClose',[
6147
 
6148
  ], function () {
6193
 
6194
  return SelectOnClose;
6195
  });
6196
+
6197
  S2.define('select2/dropdown/closeOnSelect',[
6198
 
6199
  ], function () {
6229
 
6230
  return CloseOnSelect;
6231
  });
6232
+
6233
  S2.define('select2/i18n/en',[],function () {
6234
  // English
6235
  return {
6274
  }
6275
  };
6276
  });
6277
+
6278
  S2.define('select2/defaults',[
6279
  'jquery',
6280
  'require',
6671
 
6672
  return defaults;
6673
  });
6674
+
6675
  S2.define('select2/options',[
6676
  'require',
6677
  'jquery',
6794
 
6795
  return Options;
6796
  });
6797
+
6798
  S2.define('select2/core',[
6799
  'jquery',
6800
  './options',
7407
 
7408
  return Select2;
7409
  });
7410
+
7411
  S2.define('jquery-mousewheel',[
7412
  'jquery'
7413
  ], function ($) {
7414
  // Used to shim jQuery.mousewheel for non-full builds.
7415
  return $;
7416
  });
7417
+
7418
  S2.define('jquery.select2',[
7419
  'jquery',
7420
  'jquery-mousewheel',
7472
 
7473
  return Select2;
7474
  });
7475
+
7476
  // Return the AMD loader configuration so it can be used outside of this file
7477
  return {
7478
  define: S2.define,
assets/js/{vendor.b4463523.js → vendor.3c88b878.js} RENAMED
@@ -76,7 +76,7 @@
76
  /******/ script.charset = 'utf-8';
77
  /******/ script.async = true;
78
 
79
- /******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"e3b1aa46","1":"53a6d3ec","2":"c4bc7e0b","3":"eab93337","4":"2627c560"}[chunkId] + ".chunk.js";
80
  /******/ head.appendChild(script);
81
  /******/ }
82
  /******/ };
76
  /******/ script.charset = 'utf-8';
77
  /******/ script.async = true;
78
 
79
+ /******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"5545d8c1","1":"5bfea06b","2":"c4bc7e0b","3":"eab93337","4":"ea5d61a2"}[chunkId] + ".chunk.js";
80
  /******/ head.appendChild(script);
81
  /******/ }
82
  /******/ };
lang/index.php CHANGED
@@ -1,3 +0,0 @@
1
- <?php
2
-
3
- // Silence is golden
 
 
 
lang/mailpoet-da_DK.mo CHANGED
Binary file
lang/mailpoet-de_DE.mo CHANGED
Binary file
lang/mailpoet-en_GB.mo CHANGED
Binary file
lang/mailpoet-es_ES.mo CHANGED
Binary file
lang/mailpoet-fa_IR.mo CHANGED
Binary file
lang/mailpoet-fr_CA.mo CHANGED
Binary file
lang/mailpoet-fr_FR.mo CHANGED
Binary file
lang/mailpoet-it_IT.mo CHANGED
Binary file
lang/mailpoet-ja.mo CHANGED
Binary file
lang/mailpoet-nl_NL.mo CHANGED
Binary file
lang/mailpoet-pl_PL.mo CHANGED
Binary file
lang/mailpoet-pt_BR.mo CHANGED
Binary file
lang/mailpoet-pt_PT.mo CHANGED
Binary file
lang/mailpoet-ru_RU.mo CHANGED
Binary file
lang/mailpoet-sv_SE.mo CHANGED
Binary file
lang/mailpoet-tr_TR.mo CHANGED
Binary file
lang/mailpoet.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
- "POT-Creation-Date: 2017-09-26 13:56:26+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -152,7 +152,7 @@ msgstr ""
152
  msgid "Your MailPoet Sending Service key expires on %s!"
153
  msgstr ""
154
 
155
- #: lib/API/JSON/v1/Services.php:62 views/settings/premium.html:45
156
  msgid "Your MailPoet Sending Service key is invalid."
157
  msgstr ""
158
 
@@ -172,7 +172,7 @@ msgstr ""
172
  msgid "Your Premium key expires on %s."
173
  msgstr ""
174
 
175
- #: lib/API/JSON/v1/Services.php:118 views/settings/premium.html:35
176
  msgid "Your Premium key is invalid."
177
  msgstr ""
178
 
@@ -198,24 +198,28 @@ msgstr ""
198
  msgid "You have not specified any settings to be saved."
199
  msgstr ""
200
 
201
- #: lib/API/JSON/v1/Subscribers.php:27 lib/API/JSON/v1/Subscribers.php:154
202
- #: lib/API/JSON/v1/Subscribers.php:170 lib/API/JSON/v1/Subscribers.php:186
203
  #: lib/API/MP/v1/API.php:48
204
  msgid "This subscriber does not exist."
205
  msgstr ""
206
 
207
- #: lib/API/JSON/v1/Subscribers.php:68
208
  msgid "Please specify a valid form ID."
209
  msgstr ""
210
 
211
- #: lib/API/JSON/v1/Subscribers.php:73
212
  msgid "Please leave the first field empty."
213
  msgstr ""
214
 
215
- #: lib/API/JSON/v1/Subscribers.php:89 views/form/editor.html:57
216
  msgid "Please select a list."
217
  msgstr ""
218
 
 
 
 
 
219
  #: lib/API/MP/v1/API.php:21
220
  #: lib/Subscribers/ImportExport/ImportExportFactory.php:33
221
  #: lib/Subscription/Pages.php:278 views/form/editor.html:219
@@ -242,6 +246,34 @@ msgstr ""
242
  msgid "This subscriber already exists."
243
  msgstr ""
244
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  #: lib/Config/Hooks.php:148
246
  msgid "MailPoet Newsletter"
247
  msgstr ""
@@ -253,10 +285,6 @@ msgid ""
253
  "[link] Knowledge Base article [/link] for steps how to resolve it."
254
  msgstr ""
255
 
256
- #: lib/Config/Initializer.php:156
257
- msgid "You do not have permission to activate/deactivate MailPoet plugin."
258
- msgstr ""
259
-
260
  #: lib/Config/MP2Migrator.php:151
261
  msgid "Start import"
262
  msgstr ""
@@ -343,86 +371,82 @@ msgstr[1] ""
343
  msgid "Settings imported"
344
  msgstr ""
345
 
346
- #: lib/Config/Menu.php:84 lib/Config/Menu.php:85 views/newsletters.html:23
347
  msgid "Emails"
348
  msgstr ""
349
 
350
- #: lib/Config/Menu.php:109 lib/Newsletter/Shortcodes/ShortcodesHelper.php:33
351
  #: views/newsletter/templates/components/sidebar/styles.hbs:75
352
  #: views/newsletters.html:121
353
  msgid "Newsletter"
354
  msgstr ""
355
 
356
- #: lib/Config/Menu.php:110 views/newsletter/editor.html:228
357
  msgid "Newsletter Editor"
358
  msgstr ""
359
 
360
- #: lib/Config/Menu.php:124 lib/Config/Menu.php:125 views/forms.html:25
361
  msgid "Forms"
362
  msgstr ""
363
 
364
- #: lib/Config/Menu.php:149 lib/Config/Menu.php:150
365
  msgid "Form Editor"
366
  msgstr ""
367
 
368
- #: lib/Config/Menu.php:164 lib/Config/Menu.php:165
369
  #: views/subscribers/subscribers.html:18
370
  msgid "Subscribers"
371
  msgstr ""
372
 
373
- #: lib/Config/Menu.php:189 lib/Config/Menu.php:190
374
  #: views/subscribers/importExport/import.html:7
375
  #: views/subscribers/subscribers.html:94
376
  msgid "Import"
377
  msgstr ""
378
 
379
- #: lib/Config/Menu.php:202 lib/Config/Menu.php:203
380
  #: views/subscribers/importExport/export.html:6
381
  #: views/subscribers/importExport/export.html:96
382
  #: views/subscribers/subscribers.html:95
383
  msgid "Export"
384
  msgstr ""
385
 
386
- #: lib/Config/Menu.php:217 lib/Config/Menu.php:218 views/forms.html:53
387
  #: views/newsletters.html:64 views/newsletters.html:166 views/segments.html:13
388
  #: views/subscribers/subscribers.html:66
389
  msgid "Lists"
390
  msgstr ""
391
 
392
- #: lib/Config/Menu.php:244 lib/Config/Menu.php:245 views/form/editor.html:37
393
  #: views/newsletters.html:65 views/settings.html:6
394
  msgid "Settings"
395
  msgstr ""
396
 
397
- #: lib/Config/Menu.php:258 lib/Config/Menu.php:259 views/help.html:5
398
  msgid "Help"
399
  msgstr ""
400
 
401
- #: lib/Config/Menu.php:272 lib/Config/Menu.php:273 views/settings.html:22
402
  msgid "Premium"
403
  msgstr ""
404
 
405
- #: lib/Config/Menu.php:285 lib/Config/Menu.php:286 views/update.html:16
406
  #: views/welcome.html:16
407
  msgid "Welcome"
408
  msgstr ""
409
 
410
- #: lib/Config/Menu.php:298 lib/Config/Menu.php:299 views/segments.html:43
411
  msgid "Update"
412
  msgstr ""
413
 
414
- #: lib/Config/Menu.php:311
415
  msgid "Migration"
416
  msgstr ""
417
 
418
- #: lib/Config/Menu.php:530
419
  msgid "In any WordPress role"
420
  msgstr ""
421
 
422
- #: lib/Config/Menu.php:607 views/premium.html:41
423
- msgid "MailPoet"
424
- msgstr ""
425
-
426
  #: lib/Config/PluginActivatedHook.php:14
427
  msgid ""
428
  "We noticed that you're using an unsupported environment. While MailPoet "
@@ -1262,12 +1286,12 @@ msgid "Please specify a type."
1262
  msgstr ""
1263
 
1264
  #: lib/Models/Form.php:93 lib/Models/Newsletter.php:645
1265
- #: lib/Models/Segment.php:133 lib/Models/Subscriber.php:346
1266
  msgid "All"
1267
  msgstr ""
1268
 
1269
  #: lib/Models/Form.php:98 lib/Models/Newsletter.php:715
1270
- #: lib/Models/Segment.php:138 lib/Models/Subscriber.php:371 views/forms.html:66
1271
  #: views/newsletters.html:77 views/segments.html:50
1272
  #: views/subscribers/subscribers.html:37
1273
  msgid "Trash"
@@ -1281,7 +1305,7 @@ msgstr ""
1281
  msgid "Deleted list"
1282
  msgstr ""
1283
 
1284
- #: lib/Models/Newsletter.php:546 lib/Models/Subscriber.php:282
1285
  #: lib/Subscribers/ImportExport/Export/Export.php:173
1286
  msgid "All Lists"
1287
  msgstr ""
@@ -1356,38 +1380,34 @@ msgid ""
1356
  "The Team"
1357
  msgstr ""
1358
 
1359
- #: lib/Models/Subscriber.php:24
1360
  msgid "Please enter your email address"
1361
  msgstr ""
1362
 
1363
- #: lib/Models/Subscriber.php:25
1364
  msgid "Your email address is invalid!"
1365
  msgstr ""
1366
 
1367
- #: lib/Models/Subscriber.php:192
1368
- msgid "You need to wait before subscribing again."
1369
- msgstr ""
1370
-
1371
- #: lib/Models/Subscriber.php:290
1372
  msgid "Subscribers without a list (%s)"
1373
  msgstr ""
1374
 
1375
- #: lib/Models/Subscriber.php:351 lib/Subscription/Pages.php:301
1376
  #: views/segments.html:30 views/subscribers/subscribers.html:56
1377
  msgid "Subscribed"
1378
  msgstr ""
1379
 
1380
- #: lib/Models/Subscriber.php:356 views/segments.html:31
1381
  #: views/subscribers/subscribers.html:55
1382
  msgid "Unconfirmed"
1383
  msgstr ""
1384
 
1385
- #: lib/Models/Subscriber.php:361 lib/Subscription/Pages.php:309
1386
  #: views/segments.html:32 views/subscribers/subscribers.html:57
1387
  msgid "Unsubscribed"
1388
  msgstr ""
1389
 
1390
- #: lib/Models/Subscriber.php:366 lib/Subscription/Pages.php:317
1391
  #: views/segments.html:33 views/subscribers/subscribers.html:58
1392
  msgid "Bounced"
1393
  msgstr ""
@@ -1689,20 +1709,20 @@ msgstr ""
1689
  msgid "MailPoet Error:"
1690
  msgstr ""
1691
 
1692
- #: mailpoet.php:51
1693
  msgid ""
1694
  "MailPoet plugin requires PHP version 5.3.3 or newer. Please read our "
1695
  "[link]instructions[/link] on how to resolve this issue."
1696
  msgstr ""
1697
 
1698
- #: mailpoet.php:66
1699
  msgid ""
1700
  "MailPoet plugin cannot run under Microsoft's Internet Information Services "
1701
  "(IIS) web server. We recommend that you use a web server powered by Apache "
1702
  "or NGINX."
1703
  msgstr ""
1704
 
1705
- #: mailpoet.php:80
1706
  msgid ""
1707
  "MailPoet cannot start because it is missing core files. Please reinstall "
1708
  "the plugin."
@@ -1873,8 +1893,8 @@ msgstr ""
1873
  #: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:281
1874
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:79
1875
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:221
1876
- #: views/premium.html:56 views/settings/advanced.html:90
1877
- #: views/settings/advanced.html:130 views/settings/bounce.html:190
1878
  #: views/settings/mta.html:589 views/settings/signup.html:34
1879
  #: views/subscribers/importExport/export.html:33
1880
  #: views/subscribers/importExport/import/step2.html:63
@@ -1892,8 +1912,8 @@ msgstr ""
1892
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:139
1893
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:165
1894
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:227
1895
- #: views/premium.html:62 views/premium.html:63 views/settings/advanced.html:101
1896
- #: views/settings/advanced.html:141 views/settings/bounce.html:148
1897
  #: views/settings/bounce.html:179 views/settings/mta.html:546
1898
  #: views/settings/mta.html:600 views/settings/signup.html:46
1899
  #: views/subscribers/importExport/export.html:38
@@ -4054,35 +4074,51 @@ msgstr ""
4054
  msgid "MailPoet's own script. Doesn't work with [link]these hosts[/link]."
4055
  msgstr ""
4056
 
4057
- #: views/settings/advanced.html:74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4058
  msgid "Open and click tracking"
4059
  msgstr ""
4060
 
4061
- #: views/settings/advanced.html:77
4062
  msgid "Enable or disable open and click tracking."
4063
  msgstr ""
4064
 
4065
- #: views/settings/advanced.html:110
4066
  msgid "Share anonymous data"
4067
  msgstr ""
4068
 
4069
- #: views/settings/advanced.html:113
4070
  msgid ""
4071
  "Share anonymous data and help us improve the plugin. We appreciate your "
4072
  "help!"
4073
  msgstr ""
4074
 
4075
- #: views/settings/advanced.html:149
4076
  msgid "Reinstall from scratch"
4077
  msgstr ""
4078
 
4079
- #: views/settings/advanced.html:151
4080
  msgid ""
4081
  "Want to start from the beginning? This will completely delete MailPoet and "
4082
  "reinstall it from scratch. Remember: you will lose all of your data!"
4083
  msgstr ""
4084
 
4085
- #: views/settings/advanced.html:159
4086
  msgid "Reinstall now..."
4087
  msgstr ""
4088
 
@@ -4561,13 +4597,14 @@ msgid "You have selected an invalid sending method."
4561
  msgstr ""
4562
 
4563
  #: views/settings/premium.html:7
4564
- msgid "Premium License Key"
4565
  msgstr ""
4566
 
4567
  #: views/settings/premium.html:10
4568
  msgid ""
4569
- "This key is used for automatic upgrades of your Premium features and access "
4570
- "to support."
 
4571
  msgstr ""
4572
 
4573
  #: views/settings/premium.html:25
@@ -4575,6 +4612,14 @@ msgstr ""
4575
  msgid "Verify"
4576
  msgstr ""
4577
 
 
 
 
 
 
 
 
 
4578
  #: views/settings/premium.html:56
4579
  msgid "Install Premium now."
4580
  msgstr ""
@@ -4690,6 +4735,10 @@ msgstr ""
4690
  msgid "Advanced"
4691
  msgstr ""
4692
 
 
 
 
 
4693
  #: views/settings.html:55
4694
  msgid "Save settings"
4695
  msgstr ""
@@ -5152,7 +5201,7 @@ msgstr ""
5152
  msgid "Care to Give Your Opinion?"
5153
  msgstr ""
5154
 
5155
- #: views/update.html:80 views/welcome.html:93
5156
  msgid "Awesome! Now, take me to MailPoet"
5157
  msgstr ""
5158
 
@@ -5242,22 +5291,22 @@ msgctxt "Error code (inside parentheses)"
5242
  msgid "code: %s"
5243
  msgstr ""
5244
 
5245
- #: lib/Config/Menu.php:97
5246
  msgctxt "newsletters per page (screen options)"
5247
  msgid "Number of newsletters per page"
5248
  msgstr ""
5249
 
5250
- #: lib/Config/Menu.php:137
5251
  msgctxt "forms per page (screen options)"
5252
  msgid "Number of forms per page"
5253
  msgstr ""
5254
 
5255
- #: lib/Config/Menu.php:177
5256
  msgctxt "subscribers per page (screen options)"
5257
  msgid "Number of subscribers per page"
5258
  msgstr ""
5259
 
5260
- #: lib/Config/Menu.php:230
5261
  msgctxt "segments per page (screen options)"
5262
  msgid "Number of segments per page"
5263
  msgstr ""
@@ -5331,7 +5380,7 @@ msgid "S"
5331
  msgstr ""
5332
 
5333
  #: views/settings/advanced.html:13 views/settings/advanced.html:37
5334
- #: views/settings/advanced.html:117
5335
  msgctxt "support article link label"
5336
  msgid "Read more."
5337
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
+ "POT-Creation-Date: 2017-10-03 13:34:28+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
152
  msgid "Your MailPoet Sending Service key expires on %s!"
153
  msgstr ""
154
 
155
+ #: lib/API/JSON/v1/Services.php:62
156
  msgid "Your MailPoet Sending Service key is invalid."
157
  msgstr ""
158
 
172
  msgid "Your Premium key expires on %s."
173
  msgstr ""
174
 
175
+ #: lib/API/JSON/v1/Services.php:118
176
  msgid "Your Premium key is invalid."
177
  msgstr ""
178
 
198
  msgid "You have not specified any settings to be saved."
199
  msgstr ""
200
 
201
+ #: lib/API/JSON/v1/Subscribers.php:30 lib/API/JSON/v1/Subscribers.php:170
202
+ #: lib/API/JSON/v1/Subscribers.php:186 lib/API/JSON/v1/Subscribers.php:202
203
  #: lib/API/MP/v1/API.php:48
204
  msgid "This subscriber does not exist."
205
  msgstr ""
206
 
207
+ #: lib/API/JSON/v1/Subscribers.php:71
208
  msgid "Please specify a valid form ID."
209
  msgstr ""
210
 
211
+ #: lib/API/JSON/v1/Subscribers.php:76
212
  msgid "Please leave the first field empty."
213
  msgstr ""
214
 
215
+ #: lib/API/JSON/v1/Subscribers.php:92 views/form/editor.html:57
216
  msgid "Please select a list."
217
  msgstr ""
218
 
219
+ #: lib/API/JSON/v1/Subscribers.php:110
220
+ msgid "You need to wait before subscribing again."
221
+ msgstr ""
222
+
223
  #: lib/API/MP/v1/API.php:21
224
  #: lib/Subscribers/ImportExport/ImportExportFactory.php:33
225
  #: lib/Subscription/Pages.php:278 views/form/editor.html:219
246
  msgid "This subscriber already exists."
247
  msgstr ""
248
 
249
+ #: lib/Config/AccessControl.php:74
250
+ msgid "Admin menu item"
251
+ msgstr ""
252
+
253
+ #: lib/Config/AccessControl.php:75
254
+ msgid "Manage settings"
255
+ msgstr ""
256
+
257
+ #: lib/Config/AccessControl.php:76
258
+ msgid "Manage emails"
259
+ msgstr ""
260
+
261
+ #: lib/Config/AccessControl.php:77
262
+ msgid "Manage subscribers"
263
+ msgstr ""
264
+
265
+ #: lib/Config/AccessControl.php:78
266
+ msgid "Manage forms"
267
+ msgstr ""
268
+
269
+ #: lib/Config/AccessControl.php:79
270
+ msgid "Manage segments"
271
+ msgstr ""
272
+
273
+ #: lib/Config/Capabilities.php:65 lib/Config/Menu.php:597 views/premium.html:41
274
+ msgid "MailPoet"
275
+ msgstr ""
276
+
277
  #: lib/Config/Hooks.php:148
278
  msgid "MailPoet Newsletter"
279
  msgstr ""
285
  "[link] Knowledge Base article [/link] for steps how to resolve it."
286
  msgstr ""
287
 
 
 
 
 
288
  #: lib/Config/MP2Migrator.php:151
289
  msgid "Start import"
290
  msgstr ""
371
  msgid "Settings imported"
372
  msgstr ""
373
 
374
+ #: lib/Config/Menu.php:82 lib/Config/Menu.php:83 views/newsletters.html:23
375
  msgid "Emails"
376
  msgstr ""
377
 
378
+ #: lib/Config/Menu.php:107 lib/Newsletter/Shortcodes/ShortcodesHelper.php:33
379
  #: views/newsletter/templates/components/sidebar/styles.hbs:75
380
  #: views/newsletters.html:121
381
  msgid "Newsletter"
382
  msgstr ""
383
 
384
+ #: lib/Config/Menu.php:108 views/newsletter/editor.html:228
385
  msgid "Newsletter Editor"
386
  msgstr ""
387
 
388
+ #: lib/Config/Menu.php:120 lib/Config/Menu.php:121 views/forms.html:25
389
  msgid "Forms"
390
  msgstr ""
391
 
392
+ #: lib/Config/Menu.php:145 lib/Config/Menu.php:146
393
  msgid "Form Editor"
394
  msgstr ""
395
 
396
+ #: lib/Config/Menu.php:158 lib/Config/Menu.php:159
397
  #: views/subscribers/subscribers.html:18
398
  msgid "Subscribers"
399
  msgstr ""
400
 
401
+ #: lib/Config/Menu.php:183 lib/Config/Menu.php:184
402
  #: views/subscribers/importExport/import.html:7
403
  #: views/subscribers/subscribers.html:94
404
  msgid "Import"
405
  msgstr ""
406
 
407
+ #: lib/Config/Menu.php:196 lib/Config/Menu.php:197
408
  #: views/subscribers/importExport/export.html:6
409
  #: views/subscribers/importExport/export.html:96
410
  #: views/subscribers/subscribers.html:95
411
  msgid "Export"
412
  msgstr ""
413
 
414
+ #: lib/Config/Menu.php:209 lib/Config/Menu.php:210 views/forms.html:53
415
  #: views/newsletters.html:64 views/newsletters.html:166 views/segments.html:13
416
  #: views/subscribers/subscribers.html:66
417
  msgid "Lists"
418
  msgstr ""
419
 
420
+ #: lib/Config/Menu.php:234 lib/Config/Menu.php:235 views/form/editor.html:37
421
  #: views/newsletters.html:65 views/settings.html:6
422
  msgid "Settings"
423
  msgstr ""
424
 
425
+ #: lib/Config/Menu.php:247 lib/Config/Menu.php:248 views/help.html:5
426
  msgid "Help"
427
  msgstr ""
428
 
429
+ #: lib/Config/Menu.php:261 lib/Config/Menu.php:262
430
  msgid "Premium"
431
  msgstr ""
432
 
433
+ #: lib/Config/Menu.php:274 lib/Config/Menu.php:275 views/update.html:16
434
  #: views/welcome.html:16
435
  msgid "Welcome"
436
  msgstr ""
437
 
438
+ #: lib/Config/Menu.php:287 lib/Config/Menu.php:288 views/segments.html:43
439
  msgid "Update"
440
  msgstr ""
441
 
442
+ #: lib/Config/Menu.php:300
443
  msgid "Migration"
444
  msgstr ""
445
 
446
+ #: lib/Config/Menu.php:520
447
  msgid "In any WordPress role"
448
  msgstr ""
449
 
 
 
 
 
450
  #: lib/Config/PluginActivatedHook.php:14
451
  msgid ""
452
  "We noticed that you're using an unsupported environment. While MailPoet "
1286
  msgstr ""
1287
 
1288
  #: lib/Models/Form.php:93 lib/Models/Newsletter.php:645
1289
+ #: lib/Models/Segment.php:133 lib/Models/Subscriber.php:331
1290
  msgid "All"
1291
  msgstr ""
1292
 
1293
  #: lib/Models/Form.php:98 lib/Models/Newsletter.php:715
1294
+ #: lib/Models/Segment.php:138 lib/Models/Subscriber.php:356 views/forms.html:66
1295
  #: views/newsletters.html:77 views/segments.html:50
1296
  #: views/subscribers/subscribers.html:37
1297
  msgid "Trash"
1305
  msgid "Deleted list"
1306
  msgstr ""
1307
 
1308
+ #: lib/Models/Newsletter.php:546 lib/Models/Subscriber.php:267
1309
  #: lib/Subscribers/ImportExport/Export/Export.php:173
1310
  msgid "All Lists"
1311
  msgstr ""
1380
  "The Team"
1381
  msgstr ""
1382
 
1383
+ #: lib/Models/Subscriber.php:23
1384
  msgid "Please enter your email address"
1385
  msgstr ""
1386
 
1387
+ #: lib/Models/Subscriber.php:24
1388
  msgid "Your email address is invalid!"
1389
  msgstr ""
1390
 
1391
+ #: lib/Models/Subscriber.php:275
 
 
 
 
1392
  msgid "Subscribers without a list (%s)"
1393
  msgstr ""
1394
 
1395
+ #: lib/Models/Subscriber.php:336 lib/Subscription/Pages.php:301
1396
  #: views/segments.html:30 views/subscribers/subscribers.html:56
1397
  msgid "Subscribed"
1398
  msgstr ""
1399
 
1400
+ #: lib/Models/Subscriber.php:341 views/segments.html:31
1401
  #: views/subscribers/subscribers.html:55
1402
  msgid "Unconfirmed"
1403
  msgstr ""
1404
 
1405
+ #: lib/Models/Subscriber.php:346 lib/Subscription/Pages.php:309
1406
  #: views/segments.html:32 views/subscribers/subscribers.html:57
1407
  msgid "Unsubscribed"
1408
  msgstr ""
1409
 
1410
+ #: lib/Models/Subscriber.php:351 lib/Subscription/Pages.php:317
1411
  #: views/segments.html:33 views/subscribers/subscribers.html:58
1412
  msgid "Bounced"
1413
  msgstr ""
1709
  msgid "MailPoet Error:"
1710
  msgstr ""
1711
 
1712
+ #: mailpoet.php:50
1713
  msgid ""
1714
  "MailPoet plugin requires PHP version 5.3.3 or newer. Please read our "
1715
  "[link]instructions[/link] on how to resolve this issue."
1716
  msgstr ""
1717
 
1718
+ #: mailpoet.php:65
1719
  msgid ""
1720
  "MailPoet plugin cannot run under Microsoft's Internet Information Services "
1721
  "(IIS) web server. We recommend that you use a web server powered by Apache "
1722
  "or NGINX."
1723
  msgstr ""
1724
 
1725
+ #: mailpoet.php:79
1726
  msgid ""
1727
  "MailPoet cannot start because it is missing core files. Please reinstall "
1728
  "the plugin."
1893
  #: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:281
1894
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:79
1895
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:221
1896
+ #: views/premium.html:56 views/settings/advanced.html:111
1897
+ #: views/settings/advanced.html:151 views/settings/bounce.html:190
1898
  #: views/settings/mta.html:589 views/settings/signup.html:34
1899
  #: views/subscribers/importExport/export.html:33
1900
  #: views/subscribers/importExport/import/step2.html:63
1912
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:139
1913
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:165
1914
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:227
1915
+ #: views/premium.html:62 views/premium.html:63 views/settings/advanced.html:122
1916
+ #: views/settings/advanced.html:162 views/settings/bounce.html:148
1917
  #: views/settings/bounce.html:179 views/settings/mta.html:546
1918
  #: views/settings/mta.html:600 views/settings/signup.html:46
1919
  #: views/subscribers/importExport/export.html:38
4074
  msgid "MailPoet's own script. Doesn't work with [link]these hosts[/link]."
4075
  msgstr ""
4076
 
4077
+ #: views/settings/advanced.html:73
4078
+ msgid "Roles and capabilities"
4079
+ msgstr ""
4080
+
4081
+ #: views/settings/advanced.html:75
4082
+ msgid "Manage which WordPress roles access which features of MailPoet."
4083
+ msgstr ""
4084
+
4085
+ #: views/settings/advanced.html:81
4086
+ msgid "Manage using the Members plugin"
4087
+ msgstr ""
4088
+
4089
+ #: views/settings/advanced.html:84
4090
+ msgid "Install the plugin [link]Members[/link] (free) to manage permissions."
4091
+ msgstr ""
4092
+
4093
+ #: views/settings/advanced.html:95
4094
  msgid "Open and click tracking"
4095
  msgstr ""
4096
 
4097
+ #: views/settings/advanced.html:98
4098
  msgid "Enable or disable open and click tracking."
4099
  msgstr ""
4100
 
4101
+ #: views/settings/advanced.html:131
4102
  msgid "Share anonymous data"
4103
  msgstr ""
4104
 
4105
+ #: views/settings/advanced.html:134
4106
  msgid ""
4107
  "Share anonymous data and help us improve the plugin. We appreciate your "
4108
  "help!"
4109
  msgstr ""
4110
 
4111
+ #: views/settings/advanced.html:170
4112
  msgid "Reinstall from scratch"
4113
  msgstr ""
4114
 
4115
+ #: views/settings/advanced.html:172
4116
  msgid ""
4117
  "Want to start from the beginning? This will completely delete MailPoet and "
4118
  "reinstall it from scratch. Remember: you will lose all of your data!"
4119
  msgstr ""
4120
 
4121
+ #: views/settings/advanced.html:180
4122
  msgid "Reinstall now..."
4123
  msgstr ""
4124
 
4597
  msgstr ""
4598
 
4599
  #: views/settings/premium.html:7
4600
+ msgid "Activation Key"
4601
  msgstr ""
4602
 
4603
  #: views/settings/premium.html:10
4604
  msgid ""
4605
+ "This key is used to validate your free or paid subscription. Paying "
4606
+ "customers will enjoy automatic upgrades of their Premium plugin and access "
4607
+ "to faster support."
4608
  msgstr ""
4609
 
4610
  #: views/settings/premium.html:25
4612
  msgid "Verify"
4613
  msgstr ""
4614
 
4615
+ #: views/settings/premium.html:35
4616
+ msgid "Your key is not valid for the Premium plugin."
4617
+ msgstr ""
4618
+
4619
+ #: views/settings/premium.html:45
4620
+ msgid "Your key is not valid for the MailPoet Sending Service."
4621
+ msgstr ""
4622
+
4623
  #: views/settings/premium.html:56
4624
  msgid "Install Premium now."
4625
  msgstr ""
4735
  msgid "Advanced"
4736
  msgstr ""
4737
 
4738
+ #: views/settings.html:22
4739
+ msgid "Key Activation"
4740
+ msgstr ""
4741
+
4742
  #: views/settings.html:55
4743
  msgid "Save settings"
4744
  msgstr ""
5201
  msgid "Care to Give Your Opinion?"
5202
  msgstr ""
5203
 
5204
+ #: views/update.html:70 views/welcome.html:93
5205
  msgid "Awesome! Now, take me to MailPoet"
5206
  msgstr ""
5207
 
5291
  msgid "code: %s"
5292
  msgstr ""
5293
 
5294
+ #: lib/Config/Menu.php:95
5295
  msgctxt "newsletters per page (screen options)"
5296
  msgid "Number of newsletters per page"
5297
  msgstr ""
5298
 
5299
+ #: lib/Config/Menu.php:133
5300
  msgctxt "forms per page (screen options)"
5301
  msgid "Number of forms per page"
5302
  msgstr ""
5303
 
5304
+ #: lib/Config/Menu.php:171
5305
  msgctxt "subscribers per page (screen options)"
5306
  msgid "Number of subscribers per page"
5307
  msgstr ""
5308
 
5309
+ #: lib/Config/Menu.php:222
5310
  msgctxt "segments per page (screen options)"
5311
  msgid "Number of segments per page"
5312
  msgstr ""
5380
  msgstr ""
5381
 
5382
  #: views/settings/advanced.html:13 views/settings/advanced.html:37
5383
+ #: views/settings/advanced.html:138
5384
  msgctxt "support article link label"
5385
  msgid "Read more."
5386
  msgstr ""
lib/API/JSON/v1/AutomatedLatestContent.php CHANGED
@@ -20,13 +20,14 @@ class AutomatedLatestContent extends APIEndpoint {
20
 
21
  function getPostTypes() {
22
  $post_types = array_map(function($post_type) {
 
23
  return array(
24
  'name' => $post_type->name,
25
  'label' => $post_type->label
26
  );
27
  }, get_post_types(array(), 'objects'));
28
  return $this->successResponse(
29
- $post_types
30
  );
31
  }
32
 
20
 
21
  function getPostTypes() {
22
  $post_types = array_map(function($post_type) {
23
+ if(!empty($post_type->exclude_from_search)) return;
24
  return array(
25
  'name' => $post_type->name,
26
  'label' => $post_type->label
27
  );
28
  }, get_post_types(array(), 'objects'));
29
  return $this->successResponse(
30
+ array_filter($post_types)
31
  );
32
  }
33
 
lib/API/JSON/v1/NewsletterTemplates.php CHANGED
@@ -29,7 +29,7 @@ class NewsletterTemplates extends APIEndpoint {
29
  }
30
 
31
  function getAll() {
32
- $collection = NewsletterTemplate::findMany();
33
  $templates = array_map(function($item) {
34
  return $item->asArray();
35
  }, $collection);
29
  }
30
 
31
  function getAll() {
32
+ $collection = NewsletterTemplate::orderByDesc('created_at')->orderByAsc('name')->findMany();
33
  $templates = array_map(function($item) {
34
  return $item->asArray();
35
  }, $collection);
lib/API/JSON/v1/Subscribers.php CHANGED
@@ -10,10 +10,13 @@ use MailPoet\Form\Util\FieldNameObfuscator;
10
  use MailPoet\Models\Form;
11
  use MailPoet\Models\StatisticsForms;
12
  use MailPoet\Models\Subscriber;
 
13
 
14
  if(!defined('ABSPATH')) exit;
15
 
16
  class Subscribers extends APIEndpoint {
 
 
17
  public $permissions = array(
18
  'global' => AccessControl::PERMISSION_MANAGE_SUBSCRIBERS,
19
  'methods' => array('subscribe' => AccessControl::NO_ACCESS_RESTRICTION)
@@ -94,6 +97,19 @@ class Subscribers extends APIEndpoint {
94
  $form_fields = $form->getFieldList();
95
  $data = array_intersect_key($data, array_flip($form_fields));
96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  $subscriber = Subscriber::subscribe($data, $segment_ids);
98
  $errors = $subscriber->getErrors();
99
 
10
  use MailPoet\Models\Form;
11
  use MailPoet\Models\StatisticsForms;
12
  use MailPoet\Models\Subscriber;
13
+ use MailPoet\Util\Helpers;
14
 
15
  if(!defined('ABSPATH')) exit;
16
 
17
  class Subscribers extends APIEndpoint {
18
+ const SUBSCRIPTION_LIMIT_COOLDOWN = 60;
19
+
20
  public $permissions = array(
21
  'global' => AccessControl::PERMISSION_MANAGE_SUBSCRIBERS,
22
  'methods' => array('subscribe' => AccessControl::NO_ACCESS_RESTRICTION)
97
  $form_fields = $form->getFieldList();
98
  $data = array_intersect_key($data, array_flip($form_fields));
99
 
100
+ // make sure we don't allow too many subscriptions with the same ip address
101
+ $subscription_count = Subscriber::where(
102
+ 'subscribed_ip',
103
+ Helpers::getIP()
104
+ )->whereRaw(
105
+ '(TIME_TO_SEC(TIMEDIFF(NOW(), created_at)) < ? OR TIME_TO_SEC(TIMEDIFF(NOW(), updated_at)) < ?)',
106
+ array(self::SUBSCRIPTION_LIMIT_COOLDOWN, self::SUBSCRIPTION_LIMIT_COOLDOWN)
107
+ )->count();
108
+
109
+ if($subscription_count > 0) {
110
+ throw new \Exception(__('You need to wait before subscribing again.', 'mailpoet'));
111
+ }
112
+
113
  $subscriber = Subscriber::subscribe($data, $segment_ids);
114
  $errors = $subscriber->getErrors();
115
 
lib/Config/AccessControl.php CHANGED
@@ -8,26 +8,25 @@ if(!defined('ABSPATH')) exit;
8
  require_once(ABSPATH . 'wp-includes/pluggable.php');
9
 
10
  class AccessControl {
11
- const PERMISSION_ACCESS_PLUGIN_ADMIN = 'access_plugin_admin';
12
- const PERMISSION_MANAGE_SETTINGS = 'manage_settings';
13
- const PERMISSION_MANAGE_EMAILS = 'manage_emails';
14
- const PERMISSION_MANAGE_SUBSCRIBERS = 'manage_subscribers';
15
- const PERMISSION_MANAGE_FORMS = 'manage_forms';
16
- const PERMISSION_MANAGE_SEGMENTS = 'manage_segments';
17
- const PERMISSION_UPDATE_PLUGIN = 'update_plugin';
18
- const NO_ACCESS_RESTRICTION = 'no_access_restriction';
19
 
20
  public $permissions;
21
- public $current_user_roles;
22
  public $user_capabilities;
23
 
24
  function __construct() {
25
- $this->permissions = $this->getDefaultPermissions();
26
  $this->user_roles = $this->getUserRoles();
27
  $this->user_capabilities = $this->getUserCapabilities();
28
  }
29
 
30
- private function getDefaultPermissions() {
31
  return array(
32
  self::PERMISSION_ACCESS_PLUGIN_ADMIN => WPHooks::applyFilters(
33
  'mailpoet_permission_access_plugin_admin',
@@ -67,12 +66,17 @@ class AccessControl {
67
  'administrator'
68
  )
69
  ),
70
- self::PERMISSION_UPDATE_PLUGIN => WPHooks::applyFilters(
71
- 'mailpoet_permission_update_plugin',
72
- array(
73
- 'administrator'
74
- )
75
- ),
 
 
 
 
 
76
  );
77
  }
78
 
@@ -94,11 +98,12 @@ class AccessControl {
94
 
95
  function validatePermission($permission) {
96
  if($permission === self::NO_ACCESS_RESTRICTION) return true;
97
- if(empty($this->permissions[$permission])) return false;
98
- $permitted_roles = array_intersect(
99
- $this->user_roles,
100
- $this->permissions[$permission]
101
- );
102
- return (!empty($permitted_roles));
 
103
  }
104
- }
8
  require_once(ABSPATH . 'wp-includes/pluggable.php');
9
 
10
  class AccessControl {
11
+ const PERMISSION_ACCESS_PLUGIN_ADMIN = 'mailpoet_access_plugin_admin';
12
+ const PERMISSION_MANAGE_SETTINGS = 'mailpoet_manage_settings';
13
+ const PERMISSION_MANAGE_EMAILS = 'mailpoet_manage_emails';
14
+ const PERMISSION_MANAGE_SUBSCRIBERS = 'mailpoet_manage_subscribers';
15
+ const PERMISSION_MANAGE_FORMS = 'mailpoet_manage_forms';
16
+ const PERMISSION_MANAGE_SEGMENTS = 'mailpoet_manage_segments';
17
+ const NO_ACCESS_RESTRICTION = 'mailpoet_no_access_restriction';
 
18
 
19
  public $permissions;
20
+ public $user_roles;
21
  public $user_capabilities;
22
 
23
  function __construct() {
24
+ $this->permissions = self::getDefaultPermissions();
25
  $this->user_roles = $this->getUserRoles();
26
  $this->user_capabilities = $this->getUserCapabilities();
27
  }
28
 
29
+ static function getDefaultPermissions() {
30
  return array(
31
  self::PERMISSION_ACCESS_PLUGIN_ADMIN => WPHooks::applyFilters(
32
  'mailpoet_permission_access_plugin_admin',
66
  'administrator'
67
  )
68
  ),
69
+ );
70
+ }
71
+
72
+ static function getPermissionLabels() {
73
+ return array(
74
+ self::PERMISSION_ACCESS_PLUGIN_ADMIN => __('Admin menu item', 'mailpoet'),
75
+ self::PERMISSION_MANAGE_SETTINGS => __('Manage settings', 'mailpoet'),
76
+ self::PERMISSION_MANAGE_EMAILS => __('Manage emails', 'mailpoet'),
77
+ self::PERMISSION_MANAGE_SUBSCRIBERS => __('Manage subscribers', 'mailpoet'),
78
+ self::PERMISSION_MANAGE_FORMS => __('Manage forms', 'mailpoet'),
79
+ self::PERMISSION_MANAGE_SEGMENTS => __('Manage segments', 'mailpoet'),
80
  );
81
  }
82
 
98
 
99
  function validatePermission($permission) {
100
  if($permission === self::NO_ACCESS_RESTRICTION) return true;
101
+ foreach($this->user_roles as $role) {
102
+ $role_object = get_role($role);
103
+ if($role_object && $role_object->has_cap($permission)) {
104
+ return true;
105
+ }
106
+ }
107
+ return false;
108
  }
109
+ }
lib/Config/Activator.php CHANGED
@@ -14,10 +14,16 @@ class Activator {
14
  $populator = new Populator();
15
  $populator->up();
16
  Setting::setValue('db_version', Env::$version);
 
 
 
17
  }
18
 
19
  function deactivate() {
20
  $migrator = new Migrator();
21
  $migrator->down();
 
 
 
22
  }
23
  }
14
  $populator = new Populator();
15
  $populator->up();
16
  Setting::setValue('db_version', Env::$version);
17
+
18
+ $caps = new Capabilities();
19
+ $caps->setupWPCapabilities();
20
  }
21
 
22
  function deactivate() {
23
  $migrator = new Migrator();
24
  $migrator->down();
25
+
26
+ $caps = new Capabilities();
27
+ $caps->removeWPCapabilities();
28
  }
29
  }
lib/Config/Capabilities.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace MailPoet\Config;
4
+
5
+ use MailPoet\WP\Hooks;
6
+
7
+ class Capabilities {
8
+ const MEMBERS_CAP_GROUP_NAME = 'mailpoet';
9
+
10
+ private $renderer = null;
11
+
12
+ function __construct($renderer = null) {
13
+ if($renderer !== null) {
14
+ $this->renderer = $renderer;
15
+ }
16
+ }
17
+
18
+ function init() {
19
+ $this->setupMembersCapabilities();
20
+ }
21
+
22
+ function setupWPCapabilities() {
23
+ $permissions = AccessControl::getDefaultPermissions();
24
+ $role_objects = array();
25
+ foreach($permissions as $name => $roles) {
26
+ foreach($roles as $role) {
27
+ if(!isset($role_objects[$role])) {
28
+ $role_objects[$role] = get_role($role);
29
+ }
30
+ $role_objects[$role]->add_cap($name);
31
+ }
32
+ }
33
+ }
34
+
35
+ function removeWPCapabilities() {
36
+ $permissions = AccessControl::getDefaultPermissions();
37
+ $role_objects = array();
38
+ foreach($permissions as $name => $roles) {
39
+ foreach($roles as $role) {
40
+ if(!isset($role_objects[$role])) {
41
+ $role_objects[$role] = get_role($role);
42
+ }
43
+ $role_objects[$role]->remove_cap($name);
44
+ }
45
+ }
46
+ }
47
+
48
+ function setupMembersCapabilities() {
49
+ Hooks::addAction('admin_enqueue_scripts', array($this, 'enqueueMembersStyles'));
50
+ Hooks::addAction('members_register_cap_groups', array($this, 'registerMembersCapGroup'));
51
+ Hooks::addAction('members_register_caps', array($this, 'registerMembersCapabilities'));
52
+ }
53
+
54
+ function enqueueMembersStyles() {
55
+ wp_enqueue_style(
56
+ 'mailpoet-admin-global',
57
+ Env::$assets_url . '/css/' . $this->renderer->getCssAsset('admin-global.css')
58
+ );
59
+ }
60
+
61
+ function registerMembersCapGroup() {
62
+ members_register_cap_group(
63
+ self::MEMBERS_CAP_GROUP_NAME,
64
+ array(
65
+ 'label' => __('MailPoet', 'mailpoet'),
66
+ 'caps' => array(),
67
+ 'icon' => 'mailpoet-icon-logo',
68
+ 'priority' => 30
69
+ )
70
+ );
71
+ }
72
+
73
+ function registerMembersCapabilities() {
74
+ $permissions = AccessControl::getPermissionLabels();
75
+ foreach($permissions as $name => $label) {
76
+ members_register_cap(
77
+ $name,
78
+ array(
79
+ 'label' => $label,
80
+ 'group' => self::MEMBERS_CAP_GROUP_NAME
81
+ )
82
+ );
83
+ }
84
+ }
85
+ }
lib/Config/Initializer.php CHANGED
@@ -125,6 +125,7 @@ class Initializer {
125
  $this->setupUpdater();
126
 
127
  $this->setupLocalizer();
 
128
  $this->setupMenu();
129
  $this->setupShortcodes();
130
  $this->setupImages();
@@ -152,9 +153,6 @@ class Initializer {
152
 
153
  // if current db version and plugin version differ
154
  if(version_compare($current_db_version, Env::$version) !== 0) {
155
- if(!$this->access_control->validatePermission(AccessControl::PERMISSION_UPDATE_PLUGIN)) {
156
- throw new \Exception(__('You do not have permission to activate/deactivate MailPoet plugin.', 'mailpoet'));
157
- }
158
  $this->runActivator();
159
  }
160
  }
@@ -189,6 +187,11 @@ class Initializer {
189
  $localizer->init();
190
  }
191
 
 
 
 
 
 
192
  function setupMenu() {
193
  $menu = new Menu($this->renderer, Env::$assets_url, $this->access_control);
194
  $menu->init();
125
  $this->setupUpdater();
126
 
127
  $this->setupLocalizer();
128
+ $this->setupCapabilities();
129
  $this->setupMenu();
130
  $this->setupShortcodes();
131
  $this->setupImages();
153
 
154
  // if current db version and plugin version differ
155
  if(version_compare($current_db_version, Env::$version) !== 0) {
 
 
 
156
  $this->runActivator();
157
  }
158
  }
187
  $localizer->init();
188
  }
189
 
190
+ function setupCapabilities() {
191
+ $caps = new Capabilities($this->renderer);
192
+ $caps->init();
193
+ }
194
+
195
  function setupMenu() {
196
  $menu = new Menu($this->renderer, Env::$assets_url, $this->access_control);
197
  $menu->init();
lib/Config/Menu.php CHANGED
@@ -37,7 +37,6 @@ class Menu {
37
  $this->renderer = $renderer;
38
  $this->assets_url = $assets_url;
39
  $this->access_control = $access_control;
40
- $this->user_capability = $this->access_control->getUserFirstCapability();
41
  $subscribers_feature = new SubscribersFeature();
42
  $this->subscribers_over_limit = $subscribers_feature->check();
43
  $this->checkMailPoetAPIKey();
@@ -70,7 +69,7 @@ class Menu {
70
  add_menu_page(
71
  'MailPoet',
72
  'MailPoet',
73
- $this->user_capability,
74
  self::MAIN_PAGE_SLUG,
75
  null,
76
  $this->assets_url . '/img/menu_icon.png',
@@ -78,186 +77,176 @@ class Menu {
78
  );
79
 
80
  // Emails page
81
- if($this->access_control->validatePermission(AccessControl::PERMISSION_MANAGE_EMAILS)) {
82
- $newsletters_page = add_submenu_page(
83
- self::MAIN_PAGE_SLUG,
84
- $this->setPageTitle(__('Emails', 'mailpoet')),
85
- __('Emails', 'mailpoet'),
86
- $this->user_capability,
87
- self::MAIN_PAGE_SLUG,
88
- array(
89
- $this,
90
- 'newsletters'
91
- )
92
- );
93
 
94
- // add limit per page to screen options
95
- add_action('load-' . $newsletters_page, function() {
96
- add_screen_option('per_page', array(
97
- 'label' => _x(
98
- 'Number of newsletters per page',
99
- 'newsletters per page (screen options)',
100
- 'mailpoet'
101
- ),
102
- 'option' => 'mailpoet_newsletters_per_page'
103
- ));
104
- });
105
-
106
- // newsletter editor
107
- add_submenu_page(
108
- true,
109
- $this->setPageTitle(__('Newsletter', 'mailpoet')),
110
- __('Newsletter Editor', 'mailpoet'),
111
- $this->user_capability,
112
- 'mailpoet-newsletter-editor',
113
- array(
114
- $this,
115
- 'newletterEditor'
116
- )
117
- );
118
- }
119
 
120
  // Forms page
121
- if($this->access_control->validatePermission(AccessControl::PERMISSION_MANAGE_FORMS)) {
122
- $forms_page = add_submenu_page(
123
- self::MAIN_PAGE_SLUG,
124
- $this->setPageTitle(__('Forms', 'mailpoet')),
125
- __('Forms', 'mailpoet'),
126
- $this->user_capability,
127
- 'mailpoet-forms',
128
- array(
129
- $this,
130
- 'forms'
131
- )
132
- );
133
 
134
- // add limit per page to screen options
135
- add_action('load-' . $forms_page, function() {
136
- add_screen_option('per_page', array(
137
- 'label' => _x(
138
- 'Number of forms per page',
139
- 'forms per page (screen options)',
140
- 'mailpoet'
141
- ),
142
- 'option' => 'mailpoet_forms_per_page'
143
- ));
144
- });
145
-
146
- // form editor
147
- add_submenu_page(
148
- true,
149
- $this->setPageTitle(__('Form Editor', 'mailpoet')),
150
- __('Form Editor', 'mailpoet'),
151
- $this->user_capability,
152
- 'mailpoet-form-editor',
153
- array(
154
- $this,
155
- 'formEditor'
156
- )
157
- );
158
- }
159
 
160
  // Subscribers page
161
- if($this->access_control->validatePermission(AccessControl::PERMISSION_MANAGE_SUBSCRIBERS)) {
162
- $subscribers_page = add_submenu_page(
163
- self::MAIN_PAGE_SLUG,
164
- $this->setPageTitle(__('Subscribers', 'mailpoet')),
165
- __('Subscribers', 'mailpoet'),
166
- $this->user_capability,
167
- 'mailpoet-subscribers',
168
- array(
169
- $this,
170
- 'subscribers'
171
- )
172
- );
173
 
174
- // add limit per page to screen options
175
- add_action('load-' . $subscribers_page, function() {
176
- add_screen_option('per_page', array(
177
- 'label' => _x(
178
- 'Number of subscribers per page',
179
- 'subscribers per page (screen options)',
180
- 'mailpoet'
181
- ),
182
- 'option' => 'mailpoet_subscribers_per_page'
183
- ));
184
- });
185
-
186
- // import
187
- add_submenu_page(
188
- 'admin.php?page=mailpoet-subscribers',
189
- $this->setPageTitle(__('Import', 'mailpoet')),
190
- __('Import', 'mailpoet'),
191
- $this->user_capability,
192
- 'mailpoet-import',
193
- array(
194
- $this,
195
- 'import'
196
- )
197
- );
198
 
199
- // export
200
- add_submenu_page(
201
- true,
202
- $this->setPageTitle(__('Export', 'mailpoet')),
203
- __('Export', 'mailpoet'),
204
- $this->user_capability,
205
- 'mailpoet-export',
206
- array(
207
- $this,
208
- 'export'
209
- )
210
- );
211
- }
212
 
213
  // Segments page
214
- if($this->access_control->validatePermission(AccessControl::PERMISSION_MANAGE_SEGMENTS)) {
215
- $segments_page = add_submenu_page(
216
- self::MAIN_PAGE_SLUG,
217
- $this->setPageTitle(__('Lists', 'mailpoet')),
218
- __('Lists', 'mailpoet'),
219
- $this->user_capability,
220
- 'mailpoet-segments',
221
- array(
222
- $this,
223
- 'segments'
224
- )
225
- );
226
 
227
- // add limit per page to screen options
228
- add_action('load-' . $segments_page, function() {
229
- add_screen_option('per_page', array(
230
- 'label' => _x(
231
- 'Number of segments per page',
232
- 'segments per page (screen options)',
233
- 'mailpoet'
234
- ),
235
- 'option' => 'mailpoet_segments_per_page'
236
- ));
237
- });
238
- }
239
 
240
  // Settings page
241
- if($this->access_control->validatePermission(AccessControl::PERMISSION_MANAGE_SETTINGS)) {
242
- add_submenu_page(
243
- self::MAIN_PAGE_SLUG,
244
- $this->setPageTitle(__('Settings', 'mailpoet')),
245
- __('Settings', 'mailpoet'),
246
- $this->user_capability,
247
- 'mailpoet-settings',
248
- array(
249
- $this,
250
- 'settings'
251
- )
252
- );
253
- }
254
 
255
  // Help page
256
  add_submenu_page(
257
  self::MAIN_PAGE_SLUG,
258
  $this->setPageTitle(__('Help', 'mailpoet')),
259
  __('Help', 'mailpoet'),
260
- $this->user_capability,
261
  'mailpoet-help',
262
  array(
263
  $this,
@@ -271,7 +260,7 @@ class Menu {
271
  License::getLicense() ? true : self::MAIN_PAGE_SLUG,
272
  $this->setPageTitle(__('Premium', 'mailpoet')),
273
  __('Premium', 'mailpoet'),
274
- $this->user_capability,
275
  'mailpoet-premium',
276
  array(
277
  $this,
@@ -284,7 +273,7 @@ class Menu {
284
  true,
285
  $this->setPageTitle(__('Welcome', 'mailpoet')),
286
  __('Welcome', 'mailpoet'),
287
- $this->user_capability,
288
  'mailpoet-welcome',
289
  array(
290
  $this,
@@ -297,7 +286,7 @@ class Menu {
297
  true,
298
  $this->setPageTitle(__('Update', 'mailpoet')),
299
  __('Update', 'mailpoet'),
300
- $this->user_capability,
301
  'mailpoet-update',
302
  array(
303
  $this,
@@ -310,7 +299,7 @@ class Menu {
310
  true,
311
  $this->setPageTitle(__('Migration', 'mailpoet')),
312
  '',
313
- $this->user_capability,
314
  'mailpoet-migration',
315
  array(
316
  $this,
@@ -422,6 +411,7 @@ class Menu {
422
  'premium_key_valid' => !empty($this->premium_key_valid),
423
  'mss_active' => Bridge::isMPSendingServiceEnabled(),
424
  'mss_key_valid' => !empty($mp_api_key_valid),
 
425
  'pages' => Pages::getAll(),
426
  'flags' => $flags,
427
  'current_user' => wp_get_current_user(),
@@ -658,7 +648,7 @@ class Menu {
658
  true,
659
  'MailPoet',
660
  'MailPoet',
661
- $access_control->getUserFirstCapability(),
662
  $_REQUEST['page'],
663
  array(
664
  __CLASS__,
37
  $this->renderer = $renderer;
38
  $this->assets_url = $assets_url;
39
  $this->access_control = $access_control;
 
40
  $subscribers_feature = new SubscribersFeature();
41
  $this->subscribers_over_limit = $subscribers_feature->check();
42
  $this->checkMailPoetAPIKey();
69
  add_menu_page(
70
  'MailPoet',
71
  'MailPoet',
72
+ AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN,
73
  self::MAIN_PAGE_SLUG,
74
  null,
75
  $this->assets_url . '/img/menu_icon.png',
77
  );
78
 
79
  // Emails page
80
+ $newsletters_page = add_submenu_page(
81
+ self::MAIN_PAGE_SLUG,
82
+ $this->setPageTitle(__('Emails', 'mailpoet')),
83
+ __('Emails', 'mailpoet'),
84
+ AccessControl::PERMISSION_MANAGE_EMAILS,
85
+ self::MAIN_PAGE_SLUG,
86
+ array(
87
+ $this,
88
+ 'newsletters'
89
+ )
90
+ );
 
91
 
92
+ // add limit per page to screen options
93
+ add_action('load-' . $newsletters_page, function() {
94
+ add_screen_option('per_page', array(
95
+ 'label' => _x(
96
+ 'Number of newsletters per page',
97
+ 'newsletters per page (screen options)',
98
+ 'mailpoet'
99
+ ),
100
+ 'option' => 'mailpoet_newsletters_per_page'
101
+ ));
102
+ });
103
+
104
+ // newsletter editor
105
+ add_submenu_page(
106
+ true,
107
+ $this->setPageTitle(__('Newsletter', 'mailpoet')),
108
+ __('Newsletter Editor', 'mailpoet'),
109
+ AccessControl::PERMISSION_MANAGE_EMAILS,
110
+ 'mailpoet-newsletter-editor',
111
+ array(
112
+ $this,
113
+ 'newletterEditor'
114
+ )
115
+ );
 
116
 
117
  // Forms page
118
+ $forms_page = add_submenu_page(
119
+ self::MAIN_PAGE_SLUG,
120
+ $this->setPageTitle(__('Forms', 'mailpoet')),
121
+ __('Forms', 'mailpoet'),
122
+ AccessControl::PERMISSION_MANAGE_FORMS,
123
+ 'mailpoet-forms',
124
+ array(
125
+ $this,
126
+ 'forms'
127
+ )
128
+ );
 
129
 
130
+ // add limit per page to screen options
131
+ add_action('load-' . $forms_page, function() {
132
+ add_screen_option('per_page', array(
133
+ 'label' => _x(
134
+ 'Number of forms per page',
135
+ 'forms per page (screen options)',
136
+ 'mailpoet'
137
+ ),
138
+ 'option' => 'mailpoet_forms_per_page'
139
+ ));
140
+ });
141
+
142
+ // form editor
143
+ add_submenu_page(
144
+ true,
145
+ $this->setPageTitle(__('Form Editor', 'mailpoet')),
146
+ __('Form Editor', 'mailpoet'),
147
+ AccessControl::PERMISSION_MANAGE_FORMS,
148
+ 'mailpoet-form-editor',
149
+ array(
150
+ $this,
151
+ 'formEditor'
152
+ )
153
+ );
 
154
 
155
  // Subscribers page
156
+ $subscribers_page = add_submenu_page(
157
+ self::MAIN_PAGE_SLUG,
158
+ $this->setPageTitle(__('Subscribers', 'mailpoet')),
159
+ __('Subscribers', 'mailpoet'),
160
+ AccessControl::PERMISSION_MANAGE_SUBSCRIBERS,
161
+ 'mailpoet-subscribers',
162
+ array(
163
+ $this,
164
+ 'subscribers'
165
+ )
166
+ );
 
167
 
168
+ // add limit per page to screen options
169
+ add_action('load-' . $subscribers_page, function() {
170
+ add_screen_option('per_page', array(
171
+ 'label' => _x(
172
+ 'Number of subscribers per page',
173
+ 'subscribers per page (screen options)',
174
+ 'mailpoet'
175
+ ),
176
+ 'option' => 'mailpoet_subscribers_per_page'
177
+ ));
178
+ });
179
+
180
+ // import
181
+ add_submenu_page(
182
+ 'admin.php?page=mailpoet-subscribers',
183
+ $this->setPageTitle(__('Import', 'mailpoet')),
184
+ __('Import', 'mailpoet'),
185
+ AccessControl::PERMISSION_MANAGE_SUBSCRIBERS,
186
+ 'mailpoet-import',
187
+ array(
188
+ $this,
189
+ 'import'
190
+ )
191
+ );
192
 
193
+ // export
194
+ add_submenu_page(
195
+ true,
196
+ $this->setPageTitle(__('Export', 'mailpoet')),
197
+ __('Export', 'mailpoet'),
198
+ AccessControl::PERMISSION_MANAGE_SUBSCRIBERS,
199
+ 'mailpoet-export',
200
+ array(
201
+ $this,
202
+ 'export'
203
+ )
204
+ );
 
205
 
206
  // Segments page
207
+ $segments_page = add_submenu_page(
208
+ self::MAIN_PAGE_SLUG,
209
+ $this->setPageTitle(__('Lists', 'mailpoet')),
210
+ __('Lists', 'mailpoet'),
211
+ AccessControl::PERMISSION_MANAGE_SEGMENTS,
212
+ 'mailpoet-segments',
213
+ array(
214
+ $this,
215
+ 'segments'
216
+ )
217
+ );
 
218
 
219
+ // add limit per page to screen options
220
+ add_action('load-' . $segments_page, function() {
221
+ add_screen_option('per_page', array(
222
+ 'label' => _x(
223
+ 'Number of segments per page',
224
+ 'segments per page (screen options)',
225
+ 'mailpoet'
226
+ ),
227
+ 'option' => 'mailpoet_segments_per_page'
228
+ ));
229
+ });
 
230
 
231
  // Settings page
232
+ add_submenu_page(
233
+ self::MAIN_PAGE_SLUG,
234
+ $this->setPageTitle(__('Settings', 'mailpoet')),
235
+ __('Settings', 'mailpoet'),
236
+ AccessControl::PERMISSION_MANAGE_SETTINGS,
237
+ 'mailpoet-settings',
238
+ array(
239
+ $this,
240
+ 'settings'
241
+ )
242
+ );
 
 
243
 
244
  // Help page
245
  add_submenu_page(
246
  self::MAIN_PAGE_SLUG,
247
  $this->setPageTitle(__('Help', 'mailpoet')),
248
  __('Help', 'mailpoet'),
249
+ AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN,
250
  'mailpoet-help',
251
  array(
252
  $this,
260
  License::getLicense() ? true : self::MAIN_PAGE_SLUG,
261
  $this->setPageTitle(__('Premium', 'mailpoet')),
262
  __('Premium', 'mailpoet'),
263
+ AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN,
264
  'mailpoet-premium',
265
  array(
266
  $this,
273
  true,
274
  $this->setPageTitle(__('Welcome', 'mailpoet')),
275
  __('Welcome', 'mailpoet'),
276
+ AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN,
277
  'mailpoet-welcome',
278
  array(
279
  $this,
286
  true,
287
  $this->setPageTitle(__('Update', 'mailpoet')),
288
  __('Update', 'mailpoet'),
289
+ AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN,
290
  'mailpoet-update',
291
  array(
292
  $this,
299
  true,
300
  $this->setPageTitle(__('Migration', 'mailpoet')),
301
  '',
302
+ AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN,
303
  'mailpoet-migration',
304
  array(
305
  $this,
411
  'premium_key_valid' => !empty($this->premium_key_valid),
412
  'mss_active' => Bridge::isMPSendingServiceEnabled(),
413
  'mss_key_valid' => !empty($mp_api_key_valid),
414
+ 'members_plugin_active' => is_plugin_active('members/members.php'),
415
  'pages' => Pages::getAll(),
416
  'flags' => $flags,
417
  'current_user' => wp_get_current_user(),
648
  true,
649
  'MailPoet',
650
  'MailPoet',
651
+ AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN,
652
  $_REQUEST['page'],
653
  array(
654
  __CLASS__,
lib/Models/Subscriber.php CHANGED
@@ -14,7 +14,6 @@ class Subscriber extends Model {
14
  const STATUS_UNSUBSCRIBED = 'unsubscribed';
15
  const STATUS_UNCONFIRMED = 'unconfirmed';
16
  const STATUS_BOUNCED = 'bounced';
17
- const SUBSCRIPTION_LIMIT_COOLDOWN = 60;
18
  const SUBSCRIBER_TOKEN_LENGTH = 6;
19
 
20
  function __construct() {
@@ -175,22 +174,7 @@ class Subscriber extends Model {
175
  'signup_confirmation.enabled'
176
  );
177
 
178
- $subscriber_data['subscribed_ip'] = (isset($_SERVER['REMOTE_ADDR']))
179
- ? $_SERVER['REMOTE_ADDR']
180
- : null;
181
-
182
- // make sure we don't allow too many subscriptions with the same ip address
183
- $subscription_count = Subscriber::where(
184
- 'subscribed_ip',
185
- $subscriber_data['subscribed_ip']
186
- )->whereRaw(
187
- 'TIME_TO_SEC(TIMEDIFF(NOW(), created_at)) < ?',
188
- self::SUBSCRIPTION_LIMIT_COOLDOWN
189
- )->count();
190
-
191
- if($subscription_count > 0) {
192
- throw new \Exception(__('You need to wait before subscribing again.', 'mailpoet'));
193
- }
194
 
195
  $subscriber = self::findOne($subscriber_data['email']);
196
 
@@ -205,6 +189,7 @@ class Subscriber extends Model {
205
  } else {
206
  // store subscriber data to be updated after confirmation
207
  $subscriber->setUnconfirmedData($subscriber_data);
 
208
  }
209
 
210
  // restore trashed subscriber
14
  const STATUS_UNSUBSCRIBED = 'unsubscribed';
15
  const STATUS_UNCONFIRMED = 'unconfirmed';
16
  const STATUS_BOUNCED = 'bounced';
 
17
  const SUBSCRIBER_TOKEN_LENGTH = 6;
18
 
19
  function __construct() {
174
  'signup_confirmation.enabled'
175
  );
176
 
177
+ $subscriber_data['subscribed_ip'] = Helpers::getIP();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
 
179
  $subscriber = self::findOne($subscriber_data['email']);
180
 
189
  } else {
190
  // store subscriber data to be updated after confirmation
191
  $subscriber->setUnconfirmedData($subscriber_data);
192
+ $subscriber->setExpr('updated_at', 'NOW()');
193
  }
194
 
195
  // restore trashed subscriber
lib/Segments/WP.php CHANGED
@@ -80,6 +80,7 @@ class WP {
80
 
81
  static function synchronizeUsers() {
82
 
 
83
  self::updateSubscribersEmails();
84
  self::insertSubscribers();
85
  self::removeFromTrash();
@@ -92,6 +93,17 @@ class WP {
92
  return true;
93
  }
94
 
 
 
 
 
 
 
 
 
 
 
 
95
  private static function updateSubscribersEmails() {
96
  global $wpdb;
97
  $subscribers_table = Subscriber::$_table;
80
 
81
  static function synchronizeUsers() {
82
 
83
+ self::updateSubscriberWPUserIds();
84
  self::updateSubscribersEmails();
85
  self::insertSubscribers();
86
  self::removeFromTrash();
93
  return true;
94
  }
95
 
96
+ private static function updateSubscriberWPUserIds() {
97
+ global $wpdb;
98
+ $subscribers_table = Subscriber::$_table;
99
+ Subscriber::raw_execute(sprintf('
100
+ UPDATE IGNORE %s mps
101
+ JOIN %s as wu ON mps.email = wu.user_email
102
+ SET mps.wp_user_id = wu.ID
103
+ WHERE mps.wp_user_id IS NULL
104
+ ', $subscribers_table, $wpdb->users));
105
+ }
106
+
107
  private static function updateSubscribersEmails() {
108
  global $wpdb;
109
  $subscribers_table = Subscriber::$_table;
lib/Subscription/Pages.php CHANGED
@@ -64,7 +64,7 @@ class Pages {
64
  $subscriber_data = $this->subscriber->getUnconfirmedData();
65
 
66
  $this->subscriber->status = Subscriber::STATUS_SUBSCRIBED;
67
- $this->subscriber->confirmed_ip = (!empty($_SERVER['REMOTE_ADDR'])) ? $_SERVER['REMOTE_ADDR'] : null;
68
  $this->subscriber->setExpr('confirmed_at', 'NOW()');
69
  $this->subscriber->unconfirmed_data = null;
70
  $this->subscriber->save();
64
  $subscriber_data = $this->subscriber->getUnconfirmedData();
65
 
66
  $this->subscriber->status = Subscriber::STATUS_SUBSCRIBED;
67
+ $this->subscriber->confirmed_ip = Helpers::getIP();
68
  $this->subscriber->setExpr('confirmed_at', 'NOW()');
69
  $this->subscriber->unconfirmed_data = null;
70
  $this->subscriber->save();
lib/Util/Helpers.php CHANGED
@@ -146,4 +146,9 @@ class Helpers {
146
  return explode(self::DIVIDER, $object);
147
  }
148
 
 
 
 
 
 
149
  }
146
  return explode(self::DIVIDER, $object);
147
  }
148
 
149
+ static function getIP() {
150
+ return (isset($_SERVER['REMOTE_ADDR']))
151
+ ? $_SERVER['REMOTE_ADDR']
152
+ : null;
153
+ }
154
  }
mailpoet.php CHANGED
@@ -4,7 +4,7 @@ if(!defined('ABSPATH')) exit;
4
 
5
  /*
6
  * Plugin Name: MailPoet 3 (new)
7
- * Version: 3.0.1
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
10
  * Author: MailPoet
@@ -12,7 +12,6 @@ if(!defined('ABSPATH')) exit;
12
  * Requires at least: 4.6
13
  * Tested up to: 4.8
14
  *
15
- * Text Domain: mailpoet
16
  * Domain Path: /lang/
17
  *
18
  * @package WordPress
@@ -21,7 +20,7 @@ if(!defined('ABSPATH')) exit;
21
  */
22
 
23
  $mailpoet_plugin = array(
24
- 'version' => '3.0.1',
25
  'filename' => __FILE__,
26
  'path' => dirname(__FILE__),
27
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
4
 
5
  /*
6
  * Plugin Name: MailPoet 3 (new)
7
+ * Version: 3.0.2
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
10
  * Author: MailPoet
12
  * Requires at least: 4.6
13
  * Tested up to: 4.8
14
  *
 
15
  * Domain Path: /lang/
16
  *
17
  * @package WordPress
20
  */
21
 
22
  $mailpoet_plugin = array(
23
+ 'version' => '3.0.2',
24
  'filename' => __FILE__,
25
  'path' => dirname(__FILE__),
26
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: newsletter, email, welcome email, post notification, autoresponder, signup
4
  Requires at least: 4.6
5
  Tested up to: 4.8
6
  Requires PHP: 5.3
7
- Stable tag: 3.0.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -114,6 +114,13 @@ Stop by our [support site](https://www.mailpoet.com/support).
114
 
115
  == Changelog ==
116
 
 
 
 
 
 
 
 
117
  = 3.0.1 - 2017-09-26 =
118
  * Added: images can be resized in newsletter editor;
119
  * Fixed: scheduled newsletters that are unscheduled will not be mistakenly sent. Thx Georges in Provence;
4
  Requires at least: 4.6
5
  Tested up to: 4.8
6
  Requires PHP: 5.3
7
+ Stable tag: 3.0.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
114
 
115
  == Changelog ==
116
 
117
+ = 3.0.2 - 2017-10-03 =
118
+ * Improved: plugin capabilities can be managed with Members plugin;
119
+ * Improved: removes unsightly horizontal scrollbar in some parts of the newsletter editor;
120
+ * Improved: email templates to be displayed in order of last modification;
121
+ * Fixed: it's not possible to submit a subscription form multiple times with an existing e-mail address anymore. Thanks Suyog Palav and Bits of Freedom!
122
+ * Fixed: users subscribed before registering on a site are synchronized during WP users sync. Thanks Nicolas!
123
+
124
  = 3.0.1 - 2017-09-26 =
125
  * Added: images can be resized in newsletter editor;
126
  * Fixed: scheduled newsletters that are unscheduled will not be mistakenly sent. Thx Georges in Provence;
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitf2444e07caaed476ec8d2343d153c0ec::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit80a9d6aa63279f2b4c07f332343fb652::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -51,6 +51,7 @@ return array(
51
  'MailPoet\\Analytics\\Reporter' => $baseDir . '/lib/Analytics/Reporter.php',
52
  'MailPoet\\Config\\AccessControl' => $baseDir . '/lib/Config/AccessControl.php',
53
  'MailPoet\\Config\\Activator' => $baseDir . '/lib/Config/Activator.php',
 
54
  'MailPoet\\Config\\Changelog' => $baseDir . '/lib/Config/Changelog.php',
55
  'MailPoet\\Config\\Database' => $baseDir . '/lib/Config/Database.php',
56
  'MailPoet\\Config\\DeferredAdminNotices' => $baseDir . '/lib/Config/DeferredAdminNotices.php',
51
  'MailPoet\\Analytics\\Reporter' => $baseDir . '/lib/Analytics/Reporter.php',
52
  'MailPoet\\Config\\AccessControl' => $baseDir . '/lib/Config/AccessControl.php',
53
  'MailPoet\\Config\\Activator' => $baseDir . '/lib/Config/Activator.php',
54
+ 'MailPoet\\Config\\Capabilities' => $baseDir . '/lib/Config/Capabilities.php',
55
  'MailPoet\\Config\\Changelog' => $baseDir . '/lib/Config/Changelog.php',
56
  'MailPoet\\Config\\Database' => $baseDir . '/lib/Config/Database.php',
57
  'MailPoet\\Config\\DeferredAdminNotices' => $baseDir . '/lib/Config/DeferredAdminNotices.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitf2444e07caaed476ec8d2343d153c0ec
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitf2444e07caaed476ec8d2343d153c0ec
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitf2444e07caaed476ec8d2343d153c0ec', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitf2444e07caaed476ec8d2343d153c0ec', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitf2444e07caaed476ec8d2343d153c0ec::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitf2444e07caaed476ec8d2343d153c0ec
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInitf2444e07caaed476ec8d2343d153c0ec::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequiref2444e07caaed476ec8d2343d153c0ec($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequiref2444e07caaed476ec8d2343d153c0ec($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit80a9d6aa63279f2b4c07f332343fb652
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit80a9d6aa63279f2b4c07f332343fb652', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit80a9d6aa63279f2b4c07f332343fb652', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit80a9d6aa63279f2b4c07f332343fb652::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit80a9d6aa63279f2b4c07f332343fb652::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire80a9d6aa63279f2b4c07f332343fb652($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire80a9d6aa63279f2b4c07f332343fb652($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitf2444e07caaed476ec8d2343d153c0ec
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@@ -141,6 +141,7 @@ class ComposerStaticInitf2444e07caaed476ec8d2343d153c0ec
141
  'MailPoet\\Analytics\\Reporter' => __DIR__ . '/../..' . '/lib/Analytics/Reporter.php',
142
  'MailPoet\\Config\\AccessControl' => __DIR__ . '/../..' . '/lib/Config/AccessControl.php',
143
  'MailPoet\\Config\\Activator' => __DIR__ . '/../..' . '/lib/Config/Activator.php',
 
144
  'MailPoet\\Config\\Changelog' => __DIR__ . '/../..' . '/lib/Config/Changelog.php',
145
  'MailPoet\\Config\\Database' => __DIR__ . '/../..' . '/lib/Config/Database.php',
146
  'MailPoet\\Config\\DeferredAdminNotices' => __DIR__ . '/../..' . '/lib/Config/DeferredAdminNotices.php',
@@ -835,10 +836,10 @@ class ComposerStaticInitf2444e07caaed476ec8d2343d153c0ec
835
  public static function getInitializer(ClassLoader $loader)
836
  {
837
  return \Closure::bind(function () use ($loader) {
838
- $loader->prefixLengthsPsr4 = ComposerStaticInitf2444e07caaed476ec8d2343d153c0ec::$prefixLengthsPsr4;
839
- $loader->prefixDirsPsr4 = ComposerStaticInitf2444e07caaed476ec8d2343d153c0ec::$prefixDirsPsr4;
840
- $loader->prefixesPsr0 = ComposerStaticInitf2444e07caaed476ec8d2343d153c0ec::$prefixesPsr0;
841
- $loader->classMap = ComposerStaticInitf2444e07caaed476ec8d2343d153c0ec::$classMap;
842
 
843
  }, null, ClassLoader::class);
844
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit80a9d6aa63279f2b4c07f332343fb652
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
141
  'MailPoet\\Analytics\\Reporter' => __DIR__ . '/../..' . '/lib/Analytics/Reporter.php',
142
  'MailPoet\\Config\\AccessControl' => __DIR__ . '/../..' . '/lib/Config/AccessControl.php',
143
  'MailPoet\\Config\\Activator' => __DIR__ . '/../..' . '/lib/Config/Activator.php',
144
+ 'MailPoet\\Config\\Capabilities' => __DIR__ . '/../..' . '/lib/Config/Capabilities.php',
145
  'MailPoet\\Config\\Changelog' => __DIR__ . '/../..' . '/lib/Config/Changelog.php',
146
  'MailPoet\\Config\\Database' => __DIR__ . '/../..' . '/lib/Config/Database.php',
147
  'MailPoet\\Config\\DeferredAdminNotices' => __DIR__ . '/../..' . '/lib/Config/DeferredAdminNotices.php',
836
  public static function getInitializer(ClassLoader $loader)
837
  {
838
  return \Closure::bind(function () use ($loader) {
839
+ $loader->prefixLengthsPsr4 = ComposerStaticInit80a9d6aa63279f2b4c07f332343fb652::$prefixLengthsPsr4;
840
+ $loader->prefixDirsPsr4 = ComposerStaticInit80a9d6aa63279f2b4c07f332343fb652::$prefixDirsPsr4;
841
+ $loader->prefixesPsr0 = ComposerStaticInit80a9d6aa63279f2b4c07f332343fb652::$prefixesPsr0;
842
+ $loader->classMap = ComposerStaticInit80a9d6aa63279f2b4c07f332343fb652::$classMap;
843
 
844
  }, null, ClassLoader::class);
845
  }
views/settings.html CHANGED
@@ -19,7 +19,7 @@
19
  <a class="nav-tab" href="#basics"><%= __('Basics') %></a>
20
  <a class="nav-tab" href="#signup"><%= __('Sign-up Confirmation') %></a>
21
  <a class="nav-tab" href="#advanced"><%= __('Advanced') %></a>
22
- <a class="nav-tab" href="#premium"><%= __('Premium') %></a>
23
  </h2>
24
 
25
  <!-- sending method -->
19
  <a class="nav-tab" href="#basics"><%= __('Basics') %></a>
20
  <a class="nav-tab" href="#signup"><%= __('Sign-up Confirmation') %></a>
21
  <a class="nav-tab" href="#advanced"><%= __('Advanced') %></a>
22
+ <a class="nav-tab" href="#premium"><%= __('Key Activation') %></a>
23
  </h2>
24
 
25
  <!-- sending method -->
views/settings/advanced.html CHANGED
@@ -67,6 +67,27 @@
67
  </p>
68
  </td>
69
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  <!-- link tracking -->
71
  <tr>
72
  <th scope="row">
67
  </p>
68
  </td>
69
  </tr>
70
+ <!-- roles and capabilities -->
71
+ <tr>
72
+ <th scope="row">
73
+ <%= __('Roles and capabilities') %>
74
+ <p class="description">
75
+ <%= __('Manage which WordPress roles access which features of MailPoet.') %>
76
+ </p>
77
+ </th>
78
+ <td>
79
+ <% if (members_plugin_active) %>
80
+ <p>
81
+ <a href="<%= admin_url('users.php?page=roles') %>"><%= __('Manage using the Members plugin') %></a>
82
+ </p>
83
+ <% else %>
84
+ <%= __('Install the plugin [link]Members[/link] (free) to manage permissions.')
85
+ |replaceLinkTags('https://wordpress.org/plugins/members/', {'target' : '_blank'})
86
+ |raw
87
+ %>
88
+ <% endif %>
89
+ </td>
90
+ </tr>
91
  <!-- link tracking -->
92
  <tr>
93
  <th scope="row">
views/settings/premium.html CHANGED
@@ -4,10 +4,10 @@
4
  <tr>
5
  <th scope="row">
6
  <label for="mailpoet_premium_key">
7
- <%= __('Premium License Key') %>
8
  </label>
9
  <p class="description">
10
- <%= __('This key is used for automatic upgrades of your Premium features and access to support.') %>
11
  </p>
12
  </th>
13
  <td>
@@ -32,7 +32,7 @@
32
  <div
33
  class="mailpoet_premium_key_invalid mailpoet_error_item mailpoet_error<% if not(settings.premium.premium_key) or premium_key_valid %> mailpoet_hidden<% endif %>"
34
  >
35
- <%= __('Your Premium key is invalid.') %>
36
  </div>
37
  <div
38
  class="mailpoet_mss_key_valid mailpoet_success_item mailpoet_success<% if not(settings.mta.mailpoet_api_key) or not(mss_key_valid) %> mailpoet_hidden<% endif %>"
@@ -42,7 +42,7 @@
42
  <div
43
  class="mailpoet_mss_key_invalid mailpoet_error_item mailpoet_error<% if not(settings.mta.mailpoet_api_key) or mss_key_valid %> mailpoet_hidden<% endif %>"
44
  >
45
- <%= __('Your MailPoet Sending Service key is invalid.') %>
46
  </div>
47
  <div
48
  class="mailpoet_premium_download mailpoet_spaced_block"
4
  <tr>
5
  <th scope="row">
6
  <label for="mailpoet_premium_key">
7
+ <%= __('Activation Key') %>
8
  </label>
9
  <p class="description">
10
+ <%= __('This key is used to validate your free or paid subscription. Paying customers will enjoy automatic upgrades of their Premium plugin and access to faster support.') %>
11
  </p>
12
  </th>
13
  <td>
32
  <div
33
  class="mailpoet_premium_key_invalid mailpoet_error_item mailpoet_error<% if not(settings.premium.premium_key) or premium_key_valid %> mailpoet_hidden<% endif %>"
34
  >
35
+ <%= __('Your key is not valid for the Premium plugin.') %>
36
  </div>
37
  <div
38
  class="mailpoet_mss_key_valid mailpoet_success_item mailpoet_success<% if not(settings.mta.mailpoet_api_key) or not(mss_key_valid) %> mailpoet_hidden<% endif %>"
42
  <div
43
  class="mailpoet_mss_key_invalid mailpoet_error_item mailpoet_error<% if not(settings.mta.mailpoet_api_key) or mss_key_valid %> mailpoet_hidden<% endif %>"
44
  >
45
+ <%= __('Your key is not valid for the MailPoet Sending Service.') %>
46
  </div>
47
  <div
48
  class="mailpoet_premium_download mailpoet_spaced_block"
views/update.html CHANGED
@@ -60,18 +60,8 @@
60
  <div class="feature-section one-col mailpoet_centered">
61
  <h2><%= __('Care to Give Your Opinion?') %></h2>
62
 
63
- <div class="pd-embed" id="pd_1505214143"></div>
64
- <script type="text/javascript">
65
- var _polldaddy = [] || _polldaddy;
66
- _polldaddy.push( {
67
- type: "iframe",
68
- auto: "1",
69
- domain: "mailpoet.polldaddy.com/s/",
70
- id: "what-s-one-feature-that-s-missing-in-mailpoet",
71
- placeholder: "pd_1505214143"
72
- } );
73
- (function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/survey.js':'http://i0.poll.fm/survey.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-embed'));
74
- </script>
75
  </div>
76
 
77
  <hr>
60
  <div class="feature-section one-col mailpoet_centered">
61
  <h2><%= __('Care to Give Your Opinion?') %></h2>
62
 
63
+ <script type="text/javascript" charset="utf-8" src="https://static.polldaddy.com/p/9840615.js"></script>
64
+ <noscript><a href="https://polldaddy.com/poll/9840615/">How did you find out about our plugin?</a></noscript>
 
 
 
 
 
 
 
 
 
 
65
  </div>
66
 
67
  <hr>