Contact Form by WPForms – Drag & Drop Form Builder for WordPress - Version 1.3.2

Version Description

  • Added: WP.org review request
  • Added: New form class, .inline-fields, to apply single line form layout
  • Changed: All Smart Tags now available for Email Subject field in form notifications
  • Fixed: Email addresses reporting as invalid of the domain contained capitalization
  • Fixed: Author related Smart Tags not working in form notification fields
  • Fixed: Typo on settings page related to Carbon Copy
  • Fixed: PHP 7.1 warning messages inside the form builder
Download this release

Release Info

Developer jaredatch
Plugin Icon 128x128 Contact Form by WPForms – Drag & Drop Form Builder for WordPress
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.3.1.2 to 1.3.2

assets/css/flatpickr.min.css CHANGED
@@ -1,13 +1 @@
1
- .flatpickr-input{cursor:pointer;z-index:1}.flatpickr-mobileInput{opacity:0;visibility:hidden;position:absolute;width:0;height:0;box-sizing:border-box;padding:0}.flatpickr-calendar{background:#fff;display:none;max-height:0;opacity:0;visibility:hidden;text-align:center;padding:0;animation:none;direction:ltr;border:1px solid #e6e6e6;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:242px;box-sizing:border-box;}.flatpickr-calendar.open{display:inline-block;opacity:1;visibility:visible;max-height:320px;z-index:99999;animation:flatpickrFadeInDown .5s cubic-bezier(0,1,.5,1)}.flatpickr-calendar.inline{opacity:1;visibility:visible;max-height:320px;display:block;position:relative}.flatpickr-calendar.static{display:none;position:relative;}.flatpickr-calendar.static.open{display:block}.flatpickr-calendar.hasWeeks{width:auto}.flatpickr-calendar.dateIsPicked.hasTime .flatpickr-time{height:38px}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-month{background:transparent;color:rgba(0,0,0,0.8);fill:rgba(0,0,0,0.8);height:28px;line-height:24px;text-align:center;position:relative;user-select:none}.flatpickr-prev-month,.flatpickr-next-month{text-decoration:none;cursor:pointer;position:absolute;top:10px;height:16px;line-height:16px;}.flatpickr-prev-month i,.flatpickr-next-month i{position:relative}.flatpickr-prev-month.flatpickr-prev-month,.flatpickr-next-month.flatpickr-prev-month{/*
2
- /*rtl:begin:ignore*/left:5px;/*
3
- /*rtl:end:ignore*/}/*
4
- /*rtl:begin:ignore*/
5
- /*
6
- /*rtl:end:ignore*/
7
- .flatpickr-prev-month.flatpickr-next-month,.flatpickr-next-month.flatpickr-next-month{/*
8
- /*rtl:begin:ignore*/right:5px;/*
9
- /*rtl:end:ignore*/}/*
10
- /*rtl:begin:ignore*/
11
- /*
12
- /*rtl:end:ignore*/
13
- .flatpickr-prev-month svg,.flatpickr-next-month svg{width:14px;}.flatpickr-prev-month svg path,.flatpickr-next-month svg path{transition:fill .1s;fill:inherit}.flatpickr-prev-month svg:hover,.flatpickr-next-month svg:hover{fill:#f64747}.flatpickr-prev-month:hover,.flatpickr-next-month:hover{color:#959ea9}.numInputWrapper{position:relative;height:auto;}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;z-index:9;cursor:pointer;border:1px solid rgba(57,57,57,0.05);box-sizing:border-box;}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute;top:33%}.numInputWrapper span.arrowUp{top:0;border-bottom:0;}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6)}.numInputWrapper span.arrowDown{top:50%;}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6)}.numInputWrapper span svg{width:inherit;height:auto;}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05);}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;top:5px;display:inline-block;text-align:center;}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;padding-left:7px}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block;}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.8)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.8)}.flatpickr-current-month input.cur-year{background:transparent;box-sizing:border-box;color:inherit;cursor:default;padding:0 0 0 .5ch;margin:0;display:inline;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:initial;border:0;border-radius:0;vertical-align:initial;}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden}.flatpickr-days{padding:1px;outline:0;text-align:left;width:240px;box-sizing:border-box;display:inline-block;display:flex;flex-wrap:wrap;}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;box-sizing:border-box;color:#393939;cursor:pointer;display:inline-block;display:inline-block\9;position:relative;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-weight:300;width:14.2857143%;flex-basis:14.2857143%;max-width:34px;height:34px;line-height:34px;margin:1px 0 0 0;text-align:center;transition:50ms all ease-out;}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9;}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.inRange{border-radius:0}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}span.flatpickr-weekday{cursor:default;font-size:90%;color:rgba(0,0,0,0.54);height:24px;line-height:24px;margin:0;background:transparent;text-align:center;display:block;float:left;width:14.28%;font-weight:bold}.flatpickr-weekwrapper{display:inline-block;float:left;}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;border-right:1px solid #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%}.flatpickr-weekwrapper span.flatpickr-day{display:block;width:100%;max-width:none}.flatpickr-innerContainer{display:block;display:flex;}.flatpickr-innerContainer:after{display:inline-block;content:"";clear:both}.flatpickr-rContainer{display:inline-block}.flatpickr-time{text-align:center;border-top:0;outline:0;display:block;height:0;line-height:36px;max-height:36px;box-sizing:border-box;overflow:hidden;transition:height .33s cubic-bezier(0,1,.5,1);display:flex;}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{flex:1;width:40%;height:36px;float:left;}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;cursor:pointer;color:#393939;font-size:14px;position:relative;box-sizing:border-box;}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400;}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{background:#f0f0f0}.hasWeeks .flatpickr-days,.hasTime .flatpickr-days{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.hasWeeks .flatpickr-days{border-left:0}.dateIsPicked .flatpickr-innerContainer + .flatpickr-time{border-top:1px solid #e6e6e6}@media all and (-ms-high-contrast:none){.flatpickr-days{width:256px}.flatpickr-month{padding:0;}.flatpickr-month svg{top:0 !important}}@-moz-keyframes flatpickrFadeInDown{from{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:none}}@-webkit-keyframes flatpickrFadeInDown{from{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:none}}@-o-keyframes flatpickrFadeInDown{from{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:none}}@keyframes flatpickrFadeInDown{from{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:none}}
1
+ .flatpickr-calendar{background:transparent;overflow:hidden;max-height:0;opacity:0;visibility:hidden;text-align:center;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:293.75px;box-sizing:border-box;-webkit-transition:top .1s cubic-bezier(0,1,.5,1);transition:top .1s cubic-bezier(0,1,.5,1);z-index:9999999999;background:#fff;box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;visibility:visible;overflow:visible;max-height:640px}.flatpickr-calendar.open{display:inline-block;-webkit-animation:flatpickrFadeInDown .3s cubic-bezier(0,1,.5,1);animation:flatpickrFadeInDown .3s cubic-bezier(0,1,.5,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:relative;top:2px}.flatpickr-calendar.static.open{display:block}.flatpickr-calendar.hasWeeks{width:auto}.flatpickr-calendar.dateIsPicked.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:24px;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flatpickr-next-month,.flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:10px;height:16px;line-height:16px}.flatpickr-next-month i,.flatpickr-prev-month i{position:relative}.flatpickr-next-month.flatpickr-prev-month,.flatpickr-prev-month.flatpickr-prev-month{left:calc(3.57% - 1.5px)}.flatpickr-next-month.flatpickr-next-month,.flatpickr-prev-month.flatpickr-next-month{right:calc(3.57% - 1.5px)}.flatpickr-next-month:hover,.flatpickr-prev-month:hover{color:#959ea9}.flatpickr-next-month:hover svg,.flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-next-month svg,.flatpickr-prev-month svg{width:14px}.flatpickr-next-month svg path,.flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.05);box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute;top:33%}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6)}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6)}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;top:5px;display:inline-block;text-align:center}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;padding-left:7px}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;box-sizing:border-box;color:inherit;cursor:default;padding:0 0 0 .5ch;margin:0;display:inline;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden}.flatpickr-days,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{padding:0 2.375px;outline:0;text-align:left;width:293.75px;box-sizing:border-box;display:inline-block;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:distribute;justify-content:space-around}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:38px;height:38px;line-height:38px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.inRange{border-radius:0;box-shadow:-3.75px 0 0 #e6e6e6,3.75px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{pointer-events:none}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}span.flatpickr-weekday{cursor:default;font-size:90%;color:rgba(0,0,0,.54);height:27.166666666666668px;line-height:24px;background:transparent;text-align:center;display:block;float:left;width:14.28%;font-weight:700;margin:0;padding-top:3.166666666666667px}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:1px 12px 0;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%}.flatpickr-weekwrapper span.flatpickr-day{display:block;width:100%;max-width:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-ms-flexbox;display:flex;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;box-sizing:border-box;overflow:hidden;-webkit-transition:height .33s cubic-bezier(0,1,.5,1);transition:height .33s cubic-bezier(0,1,.5,1);display:-webkit-box;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-ms-flex:1;flex:1 1 0%;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;cursor:pointer;color:#393939;font-size:14px;position:relative;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover{background:#f0f0f0}.hasTime .flatpickr-days,.hasWeeks .flatpickr-days{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.hasWeeks .flatpickr-days{border-left:0}@media (-ms-high-contrast:none){.flatpickr-month{padding:0}.flatpickr-month svg{top:0!important}}@-webkit-keyframes flatpickrFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes flatpickrFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:none;transform:none}}
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/wpforms-base.css CHANGED
@@ -1,5 +1,5 @@
1
  /* ==========================================================================
2
- Base - basic bare bones styling
3
  ========================================================================== */
4
 
5
  .wpforms-clear:before {
@@ -10,7 +10,7 @@
10
  .wpforms-clear:after {
11
  clear: both;
12
  content: " ";
13
- display: table;
14
  }
15
 
16
  .wpforms-container ul,
@@ -121,7 +121,7 @@
121
  .wpforms-container .wpforms-field-row:after {
122
  clear: both;
123
  content: " ";
124
- display: table;
125
  }
126
 
127
 
@@ -148,55 +148,55 @@
148
  margin-left: 4%;
149
  clear: none;
150
  }
151
-
152
  .wpforms-container .wpforms-one-half,
153
  .wpforms-container .wpforms-three-sixths,
154
  .wpforms-container .wpforms-two-fourths {
155
  width: 48%;
156
  }
157
-
158
  .wpforms-container .wpforms-one-third,
159
  .wpforms-container .wpforms-two-sixths {
160
  width: 30.6666666667%;
161
  }
162
-
163
  .wpforms-container .wpforms-four-sixths,
164
  .wpforms-container .wpforms-two-thirds {
165
  width: 65.3333333333%;
166
  }
167
-
168
  .wpforms-container .wpforms-one-fourth {
169
  width: 22%;
170
  }
171
-
172
  .wpforms-container .wpforms-three-fourths {
173
  width: 74%;
174
  }
175
-
176
  .wpforms-container .wpforms-one-fifth {
177
  width: 16.8%;
178
  }
179
-
180
  .wpforms-container .wpforms-two-fifths {
181
  width: 37.6%;
182
  }
183
-
184
  .wpforms-container .wpforms-three-fifths {
185
  width: 58.4%;
186
  }
187
-
188
  .wpforms-container .wpforms-four-fifths {
189
  width: 79.2%;
190
  }
191
-
192
  .wpforms-container .wpforms-one-sixth {
193
  width: 13.3333333333%;
194
  }
195
-
196
  .wpforms-container .wpforms-five-sixths {
197
  width: 82.6666666667%;
198
  }
199
-
200
  .wpforms-container .wpforms-first {
201
  clear: both !important;
202
  margin-left: 0 !important;
@@ -232,7 +232,7 @@
232
  padding-right: 26px;
233
  }
234
 
235
- /* Private */
236
  .wpforms-container .wpforms-first-half {
237
  float: left;
238
  width: 48%;
@@ -266,6 +266,42 @@
266
  }
267
 
268
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  /* Set Styles
270
  ----------------------------------------------------------------------------- */
271
 
@@ -563,4 +599,14 @@
563
  .wpforms-container .wpforms-page-indicator.connector .wpforms-page-indicator-page-number {
564
  display: none;
565
  }
 
 
 
 
 
 
 
 
 
 
566
  }
1
  /* ==========================================================================
2
+ Base - basic bare bones styling
3
  ========================================================================== */
4
 
5
  .wpforms-clear:before {
10
  .wpforms-clear:after {
11
  clear: both;
12
  content: " ";
13
+ display: table;
14
  }
15
 
16
  .wpforms-container ul,
121
  .wpforms-container .wpforms-field-row:after {
122
  clear: both;
123
  content: " ";
124
+ display: table;
125
  }
126
 
127
 
148
  margin-left: 4%;
149
  clear: none;
150
  }
151
+
152
  .wpforms-container .wpforms-one-half,
153
  .wpforms-container .wpforms-three-sixths,
154
  .wpforms-container .wpforms-two-fourths {
155
  width: 48%;
156
  }
157
+
158
  .wpforms-container .wpforms-one-third,
159
  .wpforms-container .wpforms-two-sixths {
160
  width: 30.6666666667%;
161
  }
162
+
163
  .wpforms-container .wpforms-four-sixths,
164
  .wpforms-container .wpforms-two-thirds {
165
  width: 65.3333333333%;
166
  }
167
+
168
  .wpforms-container .wpforms-one-fourth {
169
  width: 22%;
170
  }
171
+
172
  .wpforms-container .wpforms-three-fourths {
173
  width: 74%;
174
  }
175
+
176
  .wpforms-container .wpforms-one-fifth {
177
  width: 16.8%;
178
  }
179
+
180
  .wpforms-container .wpforms-two-fifths {
181
  width: 37.6%;
182
  }
183
+
184
  .wpforms-container .wpforms-three-fifths {
185
  width: 58.4%;
186
  }
187
+
188
  .wpforms-container .wpforms-four-fifths {
189
  width: 79.2%;
190
  }
191
+
192
  .wpforms-container .wpforms-one-sixth {
193
  width: 13.3333333333%;
194
  }
195
+
196
  .wpforms-container .wpforms-five-sixths {
197
  width: 82.6666666667%;
198
  }
199
+
200
  .wpforms-container .wpforms-first {
201
  clear: both !important;
202
  margin-left: 0 !important;
232
  padding-right: 26px;
233
  }
234
 
235
+ /* Legacy, for BC */
236
  .wpforms-container .wpforms-first-half {
237
  float: left;
238
  width: 48%;
266
  }
267
 
268
 
269
+ /* Preset Layouts
270
+ ----------------------------------------------------------------------------- */
271
+
272
+ /* Single line */
273
+ .wpforms-container.inline-fields {
274
+ overflow: hidden;
275
+ }
276
+
277
+ .wpforms-container.inline-fields .wpforms-field-container {
278
+ display: table;
279
+ width: calc(100% - 160px);
280
+ float: left;
281
+ }
282
+
283
+ .wpforms-container.inline-fields .wpforms-field {
284
+ display: table-cell;
285
+ padding-right: 2%;
286
+ }
287
+
288
+ .wpforms-container.inline-fields .wpforms-submit-container {
289
+ float: right;
290
+ width: 160px;
291
+ }
292
+
293
+ .wpforms-container.inline-fields .wpforms-submit {
294
+ display: block;
295
+ width: 100%;
296
+ }
297
+
298
+ .wpforms-container.inline-fields input.wpforms-field-medium,
299
+ .wpforms-container.inline-fields select.wpforms-field-medium,
300
+ .wpforms-container.inline-fields .wpforms-field-row.wpforms-field-medium {
301
+ max-width: 100%;
302
+ }
303
+
304
+
305
  /* Set Styles
306
  ----------------------------------------------------------------------------- */
307
 
599
  .wpforms-container .wpforms-page-indicator.connector .wpforms-page-indicator-page-number {
600
  display: none;
601
  }
602
+
603
+ /* Preset layout - single line */
604
+ .wpforms-container.inline-fields .wpforms-field-container,
605
+ .wpforms-container.inline-fields .wpforms-field {
606
+ display: block;
607
+ width: 100%;
608
+ }
609
+ .wpforms-container.inline-fields .wpforms-submit-container {
610
+ width: 100%;
611
+ }
612
  }
assets/css/wpforms-full.css CHANGED
@@ -1,5 +1,5 @@
1
  /* ==========================================================================
2
- Theme - standard form styling
3
  ========================================================================== */
4
 
5
  .wpforms-clear:before {
@@ -10,7 +10,7 @@
10
  .wpforms-clear:after {
11
  clear: both;
12
  content: " ";
13
- display: table;
14
  }
15
 
16
 
@@ -200,7 +200,7 @@ div.wpforms-container-full .wpforms-form .wpforms-field-row:before {
200
  div.wpforms-container-full .wpforms-form .wpforms-field-row:after {
201
  clear: both;
202
  content: " ";
203
- display: table;
204
  }
205
 
206
 
@@ -227,55 +227,55 @@ div.wpforms-container-full .wpforms-form .wpforms-two-thirds {
227
  margin-left: 4%;
228
  clear: none;
229
  }
230
-
231
  div.wpforms-container-full .wpforms-form .wpforms-one-half,
232
  div.wpforms-container-full .wpforms-form .wpforms-three-sixths,
233
  div.wpforms-container-full .wpforms-form .wpforms-two-fourths {
234
  width: 48%;
235
  }
236
-
237
  div.wpforms-container-full .wpforms-form .wpforms-one-third,
238
  div.wpforms-container-full .wpforms-form .wpforms-two-sixths {
239
  width: 30.6666666667%;
240
  }
241
-
242
  div.wpforms-container-full .wpforms-form .wpforms-four-sixths,
243
  div.wpforms-container-full .wpforms-form .wpforms-two-thirds {
244
  width: 65.3333333333%;
245
  }
246
-
247
  div.wpforms-container-full .wpforms-form .wpforms-one-fourth {
248
  width: 22%;
249
  }
250
-
251
  div.wpforms-container-full .wpforms-form .wpforms-three-fourths {
252
  width: 74%;
253
  }
254
-
255
  div.wpforms-container-full .wpforms-form .wpforms-one-fifth {
256
  width: 16.8%;
257
  }
258
-
259
  div.wpforms-container-full .wpforms-form .wpforms-two-fifths {
260
  width: 37.6%;
261
  }
262
-
263
  div.wpforms-container-full .wpforms-form .wpforms-three-fifths {
264
  width: 58.4%;
265
  }
266
-
267
  div.wpforms-container-full .wpforms-form .wpforms-four-fifths {
268
  width: 79.2%;
269
  }
270
-
271
  div.wpforms-container-full .wpforms-form .wpforms-one-sixth {
272
  width: 13.3333333333%;
273
  }
274
-
275
  div.wpforms-container-full .wpforms-form .wpforms-five-sixths {
276
  width: 82.6666666667%;
277
  }
278
-
279
  div.wpforms-container-full .wpforms-form .wpforms-first {
280
  clear: both !important;
281
  margin-left: 0 !important;
@@ -345,6 +345,43 @@ div.wpforms-container-full .wpforms-form div.wpforms-last {
345
  }
346
 
347
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  /* Set Styles
349
  ----------------------------------------------------------------------------- */
350
 
@@ -811,4 +848,14 @@ div.wpforms-container-full .wpforms-form .wpforms-field-hidden {
811
  div.wpforms-container-full .wpforms-form .wpforms-page-indicator.connector .wpforms-page-indicator-page-number {
812
  display: none;
813
  }
 
 
 
 
 
 
 
 
 
 
814
  }
1
  /* ==========================================================================
2
+ Theme - standard form styling
3
  ========================================================================== */
4
 
5
  .wpforms-clear:before {
10
  .wpforms-clear:after {
11
  clear: both;
12
  content: " ";
13
+ display: table;
14
  }
15
 
16
 
200
  div.wpforms-container-full .wpforms-form .wpforms-field-row:after {
201
  clear: both;
202
  content: " ";
203
+ display: table;
204
  }
205
 
206
 
227
  margin-left: 4%;
228
  clear: none;
229
  }
230
+
231
  div.wpforms-container-full .wpforms-form .wpforms-one-half,
232
  div.wpforms-container-full .wpforms-form .wpforms-three-sixths,
233
  div.wpforms-container-full .wpforms-form .wpforms-two-fourths {
234
  width: 48%;
235
  }
236
+
237
  div.wpforms-container-full .wpforms-form .wpforms-one-third,
238
  div.wpforms-container-full .wpforms-form .wpforms-two-sixths {
239
  width: 30.6666666667%;
240
  }
241
+
242
  div.wpforms-container-full .wpforms-form .wpforms-four-sixths,
243
  div.wpforms-container-full .wpforms-form .wpforms-two-thirds {
244
  width: 65.3333333333%;
245
  }
246
+
247
  div.wpforms-container-full .wpforms-form .wpforms-one-fourth {
248
  width: 22%;
249
  }
250
+
251
  div.wpforms-container-full .wpforms-form .wpforms-three-fourths {
252
  width: 74%;
253
  }
254
+
255
  div.wpforms-container-full .wpforms-form .wpforms-one-fifth {
256
  width: 16.8%;
257
  }
258
+
259
  div.wpforms-container-full .wpforms-form .wpforms-two-fifths {
260
  width: 37.6%;
261
  }
262
+
263
  div.wpforms-container-full .wpforms-form .wpforms-three-fifths {
264
  width: 58.4%;
265
  }
266
+
267
  div.wpforms-container-full .wpforms-form .wpforms-four-fifths {
268
  width: 79.2%;
269
  }
270
+
271
  div.wpforms-container-full .wpforms-form .wpforms-one-sixth {
272
  width: 13.3333333333%;
273
  }
274
+
275
  div.wpforms-container-full .wpforms-form .wpforms-five-sixths {
276
  width: 82.6666666667%;
277
  }
278
+
279
  div.wpforms-container-full .wpforms-form .wpforms-first {
280
  clear: both !important;
281
  margin-left: 0 !important;
345
  }
346
 
347
 
348
+ /* Preset Layouts
349
+ ----------------------------------------------------------------------------- */
350
+
351
+ /* Single line */
352
+ div.wpforms-container-full.inline-fields {
353
+ overflow: hidden;
354
+ }
355
+
356
+ div.wpforms-container-full.inline-fields .wpforms-form .wpforms-field-container {
357
+ display: table;
358
+ width: calc(100% - 160px);
359
+ float: left;
360
+ }
361
+
362
+ div.wpforms-container-full.inline-fields .wpforms-form .wpforms-field {
363
+ display: table-cell;
364
+ padding-right: 2%;
365
+ }
366
+
367
+ div.wpforms-container-full.inline-fields .wpforms-form .wpforms-submit-container {
368
+ float: right;
369
+ width: 160px;
370
+ clear: none;
371
+ }
372
+
373
+ div.wpforms-container-full.inline-fields .wpforms-form .wpforms-submit {
374
+ display: block;
375
+ width: 100%;
376
+ }
377
+
378
+ div.wpforms-container-full.inline-fields .wpforms-form input.wpforms-field-medium,
379
+ div.wpforms-container-full.inline-fields .wpforms-form select.wpforms-field-medium,
380
+ div.wpforms-container-full.inline-fields .wpforms-form .wpforms-field-row.wpforms-field-medium {
381
+ max-width: 100%;
382
+ }
383
+
384
+
385
  /* Set Styles
386
  ----------------------------------------------------------------------------- */
387
 
848
  div.wpforms-container-full .wpforms-form .wpforms-page-indicator.connector .wpforms-page-indicator-page-number {
849
  display: none;
850
  }
851
+
852
+ /* Preset layout - single line */
853
+ div.wpforms-container-full.inline-fields .wpforms-form .wpforms-field-container,
854
+ div.wpforms-container-full.inline-fields .wpforms-form .wpforms-field {
855
+ display: block;
856
+ width: 100%;
857
+ }
858
+ div.wpforms-container-full.inline-fields .wpforms-form .wpforms-submit-container {
859
+ width: 100%;
860
+ }
861
  }
assets/js/flatpickr.min.js CHANGED
@@ -1,1625 +1,3 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
4
-
5
- /*! flatpickr v2.2.4-modified, @license MIT */
6
- function Flatpickr(element, config) {
7
- var self = this;
8
-
9
- function init() {
10
- if (element._flatpickr) destroy(element._flatpickr);
11
-
12
- element._flatpickr = self;
13
-
14
- self.element = element;
15
- self.instanceConfig = config || {};
16
-
17
- setupFormats();
18
-
19
- parseConfig();
20
- setupLocale();
21
- setupInputs();
22
- setupDates();
23
-
24
- setupHelperFunctions();
25
-
26
- self.isOpen = self.config.inline;
27
- self.changeMonth = changeMonth;
28
- self.clear = clear;
29
- self.close = close;
30
- self.destroy = destroy;
31
- self.formatDate = formatDate;
32
- self.jumpToDate = jumpToDate;
33
- self.open = open;
34
- self.parseDate = parseDate;
35
- self.redraw = redraw;
36
- self.set = set;
37
- self.setDate = setDate;
38
- self.toggle = toggle;
39
-
40
- self.isMobile = !self.config.disableMobile && !self.config.inline && self.config.mode === "single" && !self.config.disable.length && !self.config.enable.length && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
41
-
42
- if (!self.isMobile) build();
43
-
44
- bind();
45
-
46
- self.minDateHasTime = self.config.minDate && (self.config.minDate.getHours() || self.config.minDate.getMinutes() || self.config.minDate.getSeconds());
47
-
48
- self.maxDateHasTime = self.config.maxDate && (self.config.maxDate.getHours() || self.config.maxDate.getMinutes() || self.config.maxDate.getSeconds());
49
-
50
- if (!self.isMobile) {
51
- Object.defineProperty(self, "dateIsPicked", {
52
- set: function set(bool) {
53
- if (bool) return self.calendarContainer.classList.add("dateIsPicked");
54
- self.calendarContainer.classList.remove("dateIsPicked");
55
- }
56
- });
57
- }
58
-
59
- self.dateIsPicked = self.selectedDates.length > 0 || self.config.noCalendar;
60
-
61
- if (self.selectedDates.length) {
62
- if (self.config.enableTime) setHoursFromDate();
63
- updateValue();
64
- }
65
-
66
- if (self.config.weekNumbers) self.calendarContainer.style.width = self.days.offsetWidth + self.weekWrapper.offsetWidth + 2 + "px";
67
-
68
- triggerEvent("Ready");
69
- }
70
-
71
- function updateTime(e) {
72
- if (self.config.noCalendar && !self.selectedDates.length)
73
- // picking time only
74
- self.selectedDates = [self.now];
75
-
76
- timeWrapper(e);
77
-
78
- if (!self.selectedDates.length) return;
79
-
80
- setHoursFromInputs();
81
- updateValue();
82
- }
83
-
84
- function setHoursFromInputs() {
85
- if (!self.config.enableTime) return;
86
-
87
- var hours = parseInt(self.hourElement.value, 10) || 0,
88
- minutes = parseInt(self.minuteElement.value, 10) || 0,
89
- seconds = self.config.enableSeconds ? parseInt(self.secondElement.value, 10) || 0 : 0;
90
-
91
- if (self.amPM) hours = hours % 12 + 12 * (self.amPM.innerHTML === "PM");
92
-
93
- if (self.minDateHasTime && compareDates(latestSelectedDateObj(), self.config.minDate) === 0) {
94
- hours = Math.max(hours, self.config.minDate.getHours());
95
- if (hours === self.config.minDate.getHours()) minutes = Math.max(minutes, self.config.minDate.getMinutes());
96
- } else if (self.maxDateHasTime && compareDates(latestSelectedDateObj(), self.config.maxDate) === 0) {
97
- hours = Math.min(hours, self.config.maxDate.getHours());
98
- if (hours === self.config.maxDate.getHours()) minutes = Math.min(minutes, self.config.maxDate.getMinutes());
99
- }
100
-
101
- setHours(hours, minutes, seconds);
102
- }
103
-
104
- function setHoursFromDate(dateObj) {
105
- var date = dateObj || latestSelectedDateObj();
106
-
107
- if (date) setHours(date.getHours(), date.getMinutes(), date.getSeconds());
108
- }
109
-
110
- function setHours(hours, minutes, seconds) {
111
- if (self.selectedDates.length) {
112
- self.selectedDates[self.selectedDates.length - 1].setHours(hours % 24, minutes, seconds || 0, 0);
113
- }
114
-
115
- if (!self.config.enableTime || self.isMobile) return;
116
-
117
- self.hourElement.value = self.pad(!self.config.time_24hr ? (12 + hours) % 12 + 12 * (hours % 12 === 0) : hours);
118
-
119
- self.minuteElement.value = self.pad(minutes);
120
-
121
- if (!self.config.time_24hr && self.selectedDates.length) self.amPM.textContent = latestSelectedDateObj().getHours() >= 12 ? "PM" : "AM";
122
-
123
- if (self.config.enableSeconds) self.secondElement.value = self.pad(seconds);
124
- }
125
-
126
- function bind() {
127
- if (self.config.wrap) {
128
- ["open", "close", "toggle", "clear"].forEach(function (el) {
129
- try {
130
- self.element.querySelector("[data-" + el + "]").addEventListener("click", self[el]);
131
- } catch (e) {
132
- //
133
- }
134
- });
135
- }
136
-
137
- if ("createEvent" in document) {
138
- self.changeEvent = document.createEvent("HTMLEvents");
139
- self.changeEvent.initEvent("change", false, true);
140
- }
141
-
142
- if (self.isMobile) return setupMobile();
143
-
144
- self.debouncedResize = debounce(onResize, 50);
145
- self.triggerChange = function () {
146
- return triggerEvent("Change");
147
- };
148
- self.debouncedChange = debounce(self.triggerChange, 1000);
149
-
150
- if (self.config.mode === "range") self.days.addEventListener("mouseover", onMouseOver);
151
-
152
- document.addEventListener("keydown", onKeyDown);
153
- window.addEventListener("resize", self.debouncedResize);
154
-
155
- var clickEvent = typeof window.ontouchstart !== "undefined" ? "touchstart" : "click";
156
-
157
- document.addEventListener(clickEvent, documentClick);
158
- document.addEventListener("blur", documentClick);
159
-
160
- if (self.config.clickOpens) (self.altInput || self.input).addEventListener("focus", open);
161
-
162
- if (!self.config.noCalendar) {
163
- self.prevMonthNav.addEventListener("click", function () {
164
- return changeMonth(-1);
165
- });
166
- self.nextMonthNav.addEventListener("click", function () {
167
- return changeMonth(1);
168
- });
169
-
170
- self.currentYearElement.addEventListener("wheel", function (e) {
171
- return debounce(yearScroll(e), 50);
172
- });
173
- self.currentYearElement.addEventListener("focus", function () {
174
- self.currentYearElement.select();
175
- });
176
-
177
- self.currentYearElement.addEventListener("input", function (event) {
178
- if (event.target.value.length === 4) {
179
- self.currentYearElement.blur();
180
- handleYearChange(event.target.value);
181
- event.target.value = self.currentYear;
182
- }
183
- });
184
-
185
- self.days.addEventListener("click", selectDate);
186
- }
187
-
188
- if (self.config.enableTime) {
189
- self.timeContainer.addEventListener("wheel", function (e) {
190
- return debounce(updateTime(e), 5);
191
- });
192
- self.timeContainer.addEventListener("input", updateTime);
193
-
194
- self.timeContainer.addEventListener("wheel", self.debouncedChange);
195
- self.timeContainer.addEventListener("input", self.triggerChange);
196
-
197
- self.hourElement.addEventListener("focus", function () {
198
- self.hourElement.select();
199
- });
200
- self.minuteElement.addEventListener("focus", function () {
201
- self.minuteElement.select();
202
- });
203
-
204
- if (self.secondElement) {
205
- self.secondElement.addEventListener("focus", function () {
206
- self.secondElement.select();
207
- });
208
- }
209
-
210
- if (self.amPM) {
211
- self.amPM.addEventListener("click", function (e) {
212
- updateTime(e);
213
- self.triggerChange(e);
214
- });
215
- }
216
- }
217
- }
218
-
219
- function jumpToDate(jumpDate) {
220
- jumpDate = jumpDate ? parseDate(jumpDate) : latestSelectedDateObj() || (self.config.minDate > self.now ? self.config.minDate : self.now);
221
-
222
- try {
223
- self.currentYear = jumpDate.getFullYear();
224
- self.currentMonth = jumpDate.getMonth();
225
- } catch (e) {
226
- console.error(e.stack);
227
- console.warn("Invalid date supplied: " + jumpDate);
228
- }
229
-
230
- self.redraw();
231
- }
232
-
233
- function incrementNumInput(e, delta) {
234
- var input = e.target.parentNode.childNodes[0];
235
- input.value = parseInt(input.value, 10) + delta * (input.step || 1);
236
-
237
- try {
238
- input.dispatchEvent(new Event("input", { "bubbles": true }));
239
- } catch (e) {
240
- var ev = document.createEvent("CustomEvent");
241
- ev.initCustomEvent("input", true, true, {});
242
- input.dispatchEvent(ev);
243
- }
244
- }
245
-
246
- function createNumberInput(inputClassName) {
247
- var wrapper = createElement("div", "numInputWrapper"),
248
- numInput = createElement("input", "numInput " + inputClassName),
249
- arrowUp = createElement("span", "arrowUp"),
250
- arrowDown = createElement("span", "arrowDown");
251
-
252
- numInput.type = "text";
253
- wrapper.appendChild(numInput);
254
- wrapper.appendChild(arrowUp);
255
- wrapper.appendChild(arrowDown);
256
-
257
- arrowUp.addEventListener("click", function (e) {
258
- return incrementNumInput(e, 1);
259
- });
260
- arrowDown.addEventListener("click", function (e) {
261
- return incrementNumInput(e, -1);
262
- });
263
- return wrapper;
264
- }
265
-
266
- function build() {
267
- var fragment = document.createDocumentFragment();
268
- self.calendarContainer = createElement("div", "flatpickr-calendar");
269
- self.numInputType = navigator.userAgent.indexOf("MSIE 9.0") > 0 ? "text" : "number";
270
-
271
- if (!self.config.noCalendar) {
272
- fragment.appendChild(buildMonthNav());
273
- self.innerContainer = createElement("div", "flatpickr-innerContainer");
274
-
275
- if (self.config.weekNumbers) self.innerContainer.appendChild(buildWeeks());
276
-
277
- self.rContainer = createElement("div", "flatpickr-rContainer");
278
- self.rContainer.appendChild(buildWeekdays());
279
- self.rContainer.appendChild(buildDays());
280
- self.innerContainer.appendChild(self.rContainer);
281
- fragment.appendChild(self.innerContainer);
282
- }
283
-
284
- if (self.config.enableTime) fragment.appendChild(buildTime());
285
-
286
- self.calendarContainer.appendChild(fragment);
287
-
288
- if (self.config.inline || self.config.static) {
289
- self.calendarContainer.classList.add(self.config.inline ? "inline" : "static");
290
- positionCalendar();
291
-
292
- if (self.config.appendTo && self.config.appendTo.nodeType) self.config.appendTo.appendChild(self.calendarContainer);else {
293
- self.element.parentNode.insertBefore(self.calendarContainer, (self.altInput || self.input).nextSibling);
294
- }
295
- } else document.body.appendChild(self.calendarContainer);
296
- }
297
-
298
- function createDay(className, date, dayNumber) {
299
- var dateIsEnabled = isEnabled(date),
300
- dayElement = createElement("span", "flatpickr-day " + className, date.getDate());
301
-
302
- dayElement.dateObj = date;
303
-
304
- if (compareDates(date, self.now) === 0) dayElement.classList.add("today");
305
-
306
- if (dateIsEnabled) {
307
- dayElement.tabIndex = 0;
308
-
309
- if (isDateSelected(date)) {
310
- dayElement.classList.add("selected");
311
-
312
- if (self.config.mode === "range") {
313
- dayElement.classList.add(compareDates(date, self.selectedDates[0]) === 0 ? "startRange" : "endRange");
314
- } else self.selectedDateElem = dayElement;
315
- }
316
- } else {
317
- dayElement.classList.add("disabled");
318
- if (self.selectedDates[0] && date > self.minRangeDate && date < self.selectedDates[0]) self.minRangeDate = date;else if (self.selectedDates[0] && date < self.maxRangeDate && date > self.selectedDates[0]) self.maxRangeDate = date;
319
- }
320
-
321
- if (self.config.mode === "range") {
322
- if (isDateInRange(date) && !isDateSelected(date)) dayElement.classList.add("inRange");
323
-
324
- if (self.selectedDates.length === 1 && (date < self.minRangeDate || date > self.maxRangeDate)) dayElement.classList.add("notAllowed");
325
- }
326
-
327
- if (self.config.weekNumbers && className !== "prevMonthDay" && dayNumber % 7 === 1) {
328
- self.weekNumbers.insertAdjacentHTML("beforeend", "<span class='disabled flatpickr-day'>" + self.config.getWeek(date) + "</span>");
329
- }
330
-
331
- triggerEvent("DayCreate", dayElement);
332
-
333
- return dayElement;
334
- }
335
-
336
- function buildDays() {
337
- if (!self.days) {
338
- self.days = createElement("div", "flatpickr-days");
339
- self.days.tabIndex = -1;
340
- }
341
-
342
- self.firstOfMonth = (new Date(self.currentYear, self.currentMonth, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;
343
-
344
- self.prevMonthDays = self.utils.getDaysinMonth((self.currentMonth - 1 + 12) % 12);
345
-
346
- var daysInMonth = self.utils.getDaysinMonth(),
347
- days = document.createDocumentFragment();
348
-
349
- var dayNumber = self.prevMonthDays + 1 - self.firstOfMonth;
350
-
351
- if (self.config.weekNumbers) self.weekNumbers.innerHTML = "";
352
-
353
- if (self.config.mode === "range") {
354
- // const dateLimits = self.config.enable.length || self.config.disable.length || self.config.mixDate || self.config.maxDate;
355
- self.minRangeDate = new Date(self.currentYear, self.currentMonth - 1, dayNumber);
356
- self.maxRangeDate = new Date(self.currentYear, self.currentMonth + 1, (42 - self.firstOfMonth) % daysInMonth);
357
- }
358
-
359
- self.days.innerHTML = "";
360
-
361
- // prepend days from the ending of previous month
362
- for (var i = 0; dayNumber <= self.prevMonthDays; i++, dayNumber++) {
363
- days.appendChild(createDay("prevMonthDay", new Date(self.currentYear, self.currentMonth - 1, dayNumber), dayNumber));
364
- }
365
-
366
- // Start at 1 since there is no 0th day
367
- for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++) {
368
- days.appendChild(createDay("", new Date(self.currentYear, self.currentMonth, dayNumber), dayNumber));
369
- }
370
-
371
- // append days from the next month
372
- for (var dayNum = daysInMonth + 1; dayNum <= 42 - self.firstOfMonth; dayNum++) {
373
- days.appendChild(createDay("nextMonthDay", new Date(self.currentYear, self.currentMonth + 1, dayNum % daysInMonth), dayNum));
374
- }
375
-
376
- self.days.appendChild(days);
377
- return self.days;
378
- }
379
-
380
- function buildMonthNav() {
381
- var monthNavFragment = document.createDocumentFragment();
382
- self.monthNav = createElement("div", "flatpickr-month");
383
-
384
- self.prevMonthNav = createElement("span", "flatpickr-prev-month");
385
- self.prevMonthNav.innerHTML = self.config.prevArrow;
386
-
387
- self.currentMonthElement = createElement("span", "cur-month");
388
-
389
- var yearInput = createNumberInput("cur-year");
390
- self.currentYearElement = yearInput.childNodes[0];
391
- self.currentYearElement.title = self.l10n.scrollTitle;
392
-
393
- if (self.config.minDate) self.currentYearElement.min = self.config.minDate.getFullYear();
394
-
395
- if (self.config.maxDate) {
396
- self.currentYearElement.max = self.config.maxDate.getFullYear();
397
-
398
- self.currentYearElement.disabled = self.config.minDate && self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();
399
- }
400
-
401
- self.nextMonthNav = createElement("span", "flatpickr-next-month");
402
- self.nextMonthNav.innerHTML = self.config.nextArrow;
403
-
404
- self.navigationCurrentMonth = createElement("span", "flatpickr-current-month");
405
- self.navigationCurrentMonth.appendChild(self.currentMonthElement);
406
- self.navigationCurrentMonth.appendChild(yearInput);
407
-
408
- monthNavFragment.appendChild(self.prevMonthNav);
409
- monthNavFragment.appendChild(self.navigationCurrentMonth);
410
- monthNavFragment.appendChild(self.nextMonthNav);
411
- self.monthNav.appendChild(monthNavFragment);
412
-
413
- updateNavigationCurrentMonth();
414
-
415
- return self.monthNav;
416
- }
417
-
418
- function buildTime() {
419
- self.calendarContainer.classList.add("hasTime");
420
- self.timeContainer = createElement("div", "flatpickr-time");
421
- self.timeContainer.tabIndex = -1;
422
- var separator = createElement("span", "flatpickr-time-separator", ":");
423
-
424
- var hourInput = createNumberInput("flatpickr-hour");
425
- self.hourElement = hourInput.childNodes[0];
426
-
427
- var minuteInput = createNumberInput("flatpickr-minute");
428
- self.minuteElement = minuteInput.childNodes[0];
429
-
430
- self.hourElement.tabIndex = self.minuteElement.tabIndex = 0;
431
- self.hourElement.pattern = self.minuteElement.pattern = "\d*";
432
-
433
- self.hourElement.value = self.pad(latestSelectedDateObj() ? latestSelectedDateObj().getHours() : self.config.defaultHour);
434
-
435
- self.minuteElement.value = self.pad(latestSelectedDateObj() ? latestSelectedDateObj().getMinutes() : self.config.defaultMinute);
436
-
437
- self.hourElement.step = self.config.hourIncrement;
438
- self.minuteElement.step = self.config.minuteIncrement;
439
-
440
- self.hourElement.min = self.config.time_24hr ? 0 : 1;
441
- self.hourElement.max = self.config.time_24hr ? 23 : 12;
442
-
443
- self.minuteElement.min = 0;
444
- self.minuteElement.max = 59;
445
-
446
- self.hourElement.title = self.minuteElement.title = self.l10n.scrollTitle;
447
-
448
- self.timeContainer.appendChild(hourInput);
449
- self.timeContainer.appendChild(separator);
450
- self.timeContainer.appendChild(minuteInput);
451
-
452
- if (self.config.time_24hr) self.timeContainer.classList.add("time24hr");
453
-
454
- if (self.config.enableSeconds) {
455
- self.timeContainer.classList.add("hasSeconds");
456
-
457
- var secondInput = createNumberInput("flatpickr-second");
458
- self.secondElement = secondInput.childNodes[0];
459
-
460
- self.secondElement.pattern = self.hourElement.pattern;
461
- self.secondElement.value = latestSelectedDateObj() ? self.pad(latestSelectedDateObj().getSeconds()) : "00";
462
-
463
- self.secondElement.step = self.minuteElement.step;
464
- self.secondElement.min = self.minuteElement.min;
465
- self.secondElement.max = self.minuteElement.max;
466
-
467
- self.timeContainer.appendChild(createElement("span", "flatpickr-time-separator", ":"));
468
- self.timeContainer.appendChild(secondInput);
469
- }
470
-
471
- if (!self.config.time_24hr) {
472
- // add self.amPM if appropriate
473
- self.amPM = createElement("span", "flatpickr-am-pm", ["AM", "PM"][self.hourElement.value > 11 | 0]);
474
- self.amPM.title = self.l10n.toggleTitle;
475
- self.amPM.tabIndex = 0;
476
- self.timeContainer.appendChild(self.amPM);
477
- }
478
-
479
- return self.timeContainer;
480
- }
481
-
482
- function buildWeekdays() {
483
- if (!self.weekdayContainer) self.weekdayContainer = createElement("div", "flatpickr-weekdays");
484
-
485
- var firstDayOfWeek = self.l10n.firstDayOfWeek;
486
- var weekdays = self.l10n.weekdays.shorthand.slice();
487
-
488
- if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {
489
- weekdays = [].concat(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));
490
- }
491
-
492
- self.weekdayContainer.innerHTML = "\n\t\t<span class=flatpickr-weekday>\n\t\t\t" + weekdays.join("</span><span class=flatpickr-weekday>") + "\n\t\t</span>\n\t\t";
493
-
494
- return self.weekdayContainer;
495
- }
496
-
497
- function buildWeeks() {
498
- self.calendarContainer.classList.add("hasWeeks");
499
- self.weekWrapper = createElement("div", "flatpickr-weekwrapper");
500
- self.weekWrapper.appendChild(createElement("span", "flatpickr-weekday", self.l10n.weekAbbreviation));
501
- self.weekNumbers = createElement("div", "flatpickr-weeks");
502
- self.weekWrapper.appendChild(self.weekNumbers);
503
-
504
- return self.weekWrapper;
505
- }
506
-
507
- function changeMonth(value, is_offset) {
508
- self.currentMonth = typeof is_offset === "undefined" || is_offset ? self.currentMonth + value : value;
509
-
510
- handleYearChange();
511
- updateNavigationCurrentMonth();
512
- buildDays();
513
-
514
- if (!self.config.noCalendar) self.days.focus();
515
-
516
- triggerEvent("MonthChange");
517
- }
518
-
519
- function clear() {
520
- var triggerChangeEvent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
521
-
522
- self.input.value = "";
523
-
524
- if (self.altInput) self.altInput.value = "";
525
-
526
- if (self.mobileInput) self.mobileInput.value = "";
527
-
528
- self.selectedDates = [];
529
- self.dateIsPicked = false;
530
-
531
- self.redraw();
532
-
533
- if (triggerChangeEvent !== false)
534
- // triggerChangeEvent is true (default) or an Event
535
- triggerEvent("Change");
536
- }
537
-
538
- function close() {
539
- self.isOpen = false;
540
-
541
- if (!self.isMobile) {
542
- self.calendarContainer.classList.remove("open");
543
- (self.altInput || self.input).classList.remove("active");
544
- }
545
-
546
- triggerEvent("Close");
547
- }
548
-
549
- function destroy(instance) {
550
- instance = instance || self;
551
- instance.clear(false);
552
-
553
- document.removeEventListener("keydown", onKeyDown);
554
- window.removeEventListener("resize", instance.debouncedResize);
555
-
556
- document.removeEventListener("click", documentClick);
557
- document.removeEventListener("blur", documentClick);
558
-
559
- if (instance.isMobile && instance.mobileInput && instance.mobileInput.parentNode) instance.mobileInput.parentNode.removeChild(instance.mobileInput);else if (instance.calendarContainer && instance.calendarContainer.parentNode) instance.calendarContainer.parentNode.removeChild(instance.calendarContainer);
560
-
561
- if (instance.altInput) {
562
- instance.input.type = "text";
563
- if (instance.altInput.parentNode) instance.altInput.parentNode.removeChild(instance.altInput);
564
- }
565
-
566
- instance.input.classList.remove("flatpickr-input");
567
- instance.input.removeEventListener("focus", open);
568
- instance.input.removeAttribute("readonly");
569
- }
570
-
571
- function isCalendarElem(elem) {
572
- var e = elem;
573
- while (e) {
574
- if (/flatpickr-day|flatpickr-calendar/.test(e.className)) return true;
575
- e = e.parentNode;
576
- }
577
-
578
- return false;
579
- }
580
-
581
- function documentClick(e) {
582
- var isInput = self.element.contains(e.target) || e.target === self.input || e.target === self.altInput;
583
-
584
- if (self.isOpen && !isCalendarElem(e.target) && !isInput) {
585
- self.close();
586
-
587
- if (self.config.mode === "range" && self.selectedDates.length === 1) {
588
- self.clear();
589
- self.redraw();
590
- }
591
- }
592
- }
593
-
594
- function formatDate(frmt, dateObj) {
595
- if (self.config.formatDate) return self.config.formatDate(frmt, dateObj);
596
-
597
- var chars = frmt.split("");
598
- return chars.map(function (c, i) {
599
- return self.formats[c] && chars[i - 1] !== "\\" ? self.formats[c](dateObj) : c !== "\\" ? c : "";
600
- }).join("");
601
- }
602
-
603
- function handleYearChange(newYear) {
604
- if (self.currentMonth < 0 || self.currentMonth > 11) {
605
- self.currentYear += self.currentMonth % 11;
606
- self.currentMonth = (self.currentMonth + 12) % 12;
607
- triggerEvent("YearChange");
608
- } else if (newYear && (!self.currentYearElement.min || newYear >= self.currentYearElement.min) && (!self.currentYearElement.max || newYear <= self.currentYearElement.max)) {
609
- self.currentYear = parseInt(newYear, 10) || self.currentYear;
610
-
611
- if (self.config.maxDate && self.currentYear === self.config.maxDate.getFullYear()) {
612
- self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);
613
- } else if (self.config.minDate && self.currentYear === self.config.minDate.getFullYear()) {
614
- self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);
615
- }
616
-
617
- self.redraw();
618
- triggerEvent("YearChange");
619
- }
620
- }
621
-
622
- function isEnabled(dateToCheck) {
623
- if (self.config.minDate && compareDates(dateToCheck, self.config.minDate) < 0 || self.config.maxDate && compareDates(dateToCheck, self.config.maxDate) > 0) return false;
624
-
625
- if (!self.config.enable.length && !self.config.disable.length) return true;
626
-
627
- dateToCheck = parseDate(dateToCheck, true); // timeless
628
-
629
- var bool = self.config.enable.length > 0,
630
- array = bool ? self.config.enable : self.config.disable;
631
-
632
- for (var i = 0, d; i < array.length; i++) {
633
- d = array[i];
634
-
635
- if (d instanceof Function && d(dateToCheck)) // disabled by function
636
- return bool;else if ((d instanceof Date || typeof d === "string") && parseDate(d, true).getTime() === dateToCheck.getTime())
637
- // disabled by date string
638
- return bool;else if ( // disabled by range
639
- (typeof d === "undefined" ? "undefined" : _typeof(d)) === "object" && d.from && d.to && dateToCheck >= parseDate(d.from) && dateToCheck <= parseDate(d.to)) return bool;
640
- }
641
-
642
- return !bool;
643
- }
644
-
645
- function onKeyDown(e) {
646
- if (self.isOpen) {
647
- switch (e.which) {
648
- case 13:
649
- if (self.timeContainer && self.timeContainer.contains(e.target)) updateValue();else selectDate(e);
650
-
651
- break;
652
-
653
- case 27:
654
- // escape
655
- self.clear();
656
- self.redraw();
657
- self.close();
658
- break;
659
-
660
- case 37:
661
- if (e.target !== self.input & e.target !== self.altInput) changeMonth(-1);
662
- break;
663
-
664
- case 38:
665
- e.preventDefault();
666
-
667
- if (self.timeContainer && self.timeContainer.contains(e.target)) updateTime(e);else {
668
- self.currentYear++;
669
- self.redraw();
670
- }
671
-
672
- break;
673
-
674
- case 39:
675
- if (e.target !== self.input & e.target !== self.altInput) changeMonth(1);
676
- break;
677
-
678
- case 40:
679
- e.preventDefault();
680
- if (self.timeContainer && self.timeContainer.contains(e.target)) updateTime(e);else {
681
- self.currentYear--;
682
- self.redraw();
683
- }
684
-
685
- break;
686
-
687
- default:
688
- break;
689
- }
690
- }
691
- }
692
-
693
- function onMouseOver(e) {
694
- if (self.selectedDates.length !== 1 || !e.target.classList.contains("flatpickr-day")) return;
695
-
696
- var hoverDate = e.target.dateObj,
697
- initialDate = parseDate(self.selectedDates[0], true),
698
- rangeStartDate = Math.min(hoverDate.getTime(), self.selectedDates[0].getTime()),
699
- rangeEndDate = Math.max(hoverDate.getTime(), self.selectedDates[0].getTime()),
700
- containsDisabled = false;
701
-
702
- for (var t = rangeStartDate; t < rangeEndDate; t += self.utils.duration.DAY) {
703
- if (!isEnabled(new Date(t))) {
704
- containsDisabled = true;
705
- break;
706
- }
707
- }
708
-
709
- for (var timestamp = self.days.childNodes[0].dateObj.getTime(), i = 0; i < 42; i++, timestamp += self.utils.duration.DAY) {
710
- var outOfRange = timestamp < self.minRangeDate.getTime() || timestamp > self.maxRangeDate.getTime();
711
-
712
- if (outOfRange) {
713
- self.days.childNodes[i].classList.add("notAllowed");
714
- self.days.childNodes[i].classList.remove("inRange", "startRange", "endRange");
715
- continue;
716
- } else if (containsDisabled && !outOfRange) continue;
717
-
718
- self.days.childNodes[i].classList.remove("startRange", "inRange", "endRange", "notAllowed");
719
-
720
- var minRangeDate = Math.max(self.minRangeDate.getTime(), rangeStartDate),
721
- maxRangeDate = Math.min(self.maxRangeDate.getTime(), rangeEndDate);
722
-
723
- e.target.classList.add(hoverDate < self.selectedDates[0] ? "startRange" : "endRange");
724
-
725
- if (initialDate > hoverDate && timestamp === initialDate.getTime()) self.days.childNodes[i].classList.add("endRange");else if (initialDate < hoverDate && timestamp === initialDate.getTime()) self.days.childNodes[i].classList.add("startRange");else if (timestamp > minRangeDate && timestamp < maxRangeDate) self.days.childNodes[i].classList.add("inRange");
726
- }
727
- }
728
-
729
- function onResize() {
730
- if (self.isOpen && !self.config.static && !self.config.inline) positionCalendar();
731
- }
732
-
733
- function open(e) {
734
- if (self.isMobile) {
735
- if (e) {
736
- e.preventDefault();
737
- e.target.blur();
738
- }
739
-
740
- setTimeout(function () {
741
- self.mobileInput.click();
742
- }, 0);
743
-
744
- triggerEvent("Open");
745
- return;
746
- } else if (self.isOpen || (self.altInput || self.input).disabled || self.config.inline) return;
747
-
748
- self.calendarContainer.classList.add("open");
749
-
750
- if (!self.config.static && !self.config.inline) positionCalendar();
751
-
752
- self.isOpen = true;
753
-
754
- if (!self.config.allowInput) {
755
- (self.altInput || self.input).blur();
756
- (self.config.noCalendar ? self.timeContainer : self.selectedDateElem ? self.selectedDateElem : self.days).focus();
757
- }
758
-
759
- (self.altInput || self.input).classList.add("active");
760
- triggerEvent("Open");
761
- }
762
-
763
- function parseConfig() {
764
- var boolOpts = ["utc", "wrap", "weekNumbers", "allowInput", "clickOpens", "time_24hr", "enableTime", "noCalendar", "altInput", "shorthandCurrentMonth", "inline", "static", "enableSeconds", "disableMobile"];
765
- self.config = Object.create(Flatpickr.defaultConfig);
766
- var userConfig = _extends({}, self.instanceConfig, self.element.dataset || {});
767
-
768
- Object.defineProperty(self.config, "minDate", {
769
- get: function get() {
770
- return this._minDate;
771
- },
772
- set: function set(date) {
773
- this._minDate = parseDate(date);
774
-
775
- if (self.days) redraw();
776
-
777
- if (!self.currentYearElement) return;
778
-
779
- if (date && this._minDate instanceof Date) {
780
- self.minDateHasTime = this._minDate.getHours() || this._minDate.getMinutes() || this._minDate.getSeconds();
781
-
782
- self.currentYearElement.min = this._minDate.getFullYear();
783
- } else self.currentYearElement.removeAttribute("min");
784
-
785
- self.currentYearElement.disabled = this._maxDate && this._minDate && this._maxDate.getFullYear() === this._minDate.getFullYear();
786
- }
787
- });
788
-
789
- Object.defineProperty(self.config, "maxDate", {
790
- get: function get() {
791
- return this._maxDate;
792
- },
793
- set: function set(date) {
794
- this._maxDate = parseDate(date);
795
- if (self.days) redraw();
796
-
797
- if (!self.currentYearElement) return;
798
-
799
- if (date && this._maxDate instanceof Date) {
800
- self.currentYearElement.max = this._maxDate.getFullYear();
801
- self.maxDateHasTime = this._maxDate.getHours() || this._maxDate.getMinutes() || this._maxDate.getSeconds();
802
- } else self.currentYearElement.removeAttribute("max");
803
-
804
- self.currentYearElement.disabled = this._maxDate && this._minDate && this._maxDate.getFullYear() === this._minDate.getFullYear();
805
- }
806
- });
807
-
808
- _extends(self.config, userConfig);
809
-
810
- for (var i = 0; i < boolOpts.length; i++) {
811
- self.config[boolOpts[i]] = self.config[boolOpts[i]] === true || self.config[boolOpts[i]] === "true";
812
- }if (!userConfig.dateFormat && userConfig.enableTime) {
813
- self.config.dateFormat = self.config.noCalendar ? "H:i" + (self.config.enableSeconds ? ":S" : "") : Flatpickr.defaultConfig.dateFormat + " H:i" + (self.config.enableSeconds ? ":S" : "");
814
- }
815
-
816
- if (userConfig.altInput && userConfig.enableTime && !userConfig.altFormat) {
817
- self.config.altFormat = self.config.noCalendar ? "h:i" + (self.config.enableSeconds ? ":S K" : " K") : Flatpickr.defaultConfig.altFormat + (" h:i" + (self.config.enableSeconds ? ":S" : "") + " K");
818
- }
819
- }
820
-
821
- function setupLocale() {
822
- if (_typeof(self.config.locale) !== "object" && typeof Flatpickr.l10ns[self.config.locale] === "undefined") console.warn("flatpickr: invalid locale " + self.config.locale);
823
-
824
- self.l10n = _extends(Object.create(Flatpickr.l10ns.default), _typeof(self.config.locale) === "object" ? self.config.locale : self.config.locale !== "default" ? Flatpickr.l10ns[self.config.locale] || {} : {});
825
- }
826
-
827
- function parseDate(date) {
828
- var timeless = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
829
-
830
- if (!date) return null;
831
-
832
- var dateTimeRegex = /(\d+)/g,
833
- timeRegex = /^(\d{1,2})[:\s](\d\d)?[:\s]?(\d\d)?\s?(a|p)?/i,
834
- timestamp = /^(\d+)$/g,
835
- date_orig = date;
836
-
837
- if (date.toFixed) // timestamp
838
- date = new Date(date);else if (typeof date === "string") {
839
- date = date.trim();
840
-
841
- if (date === "today") {
842
- date = new Date();
843
- timeless = true;
844
- } else if (self.config.parseDate) date = self.config.parseDate(date);else if (timeRegex.test(date)) {
845
- // time picker
846
- var m = date.match(timeRegex),
847
- hours = !m[4] ? m[1] // military time, no conversion needed
848
- : m[1] % 12 + (m[4].toLowerCase() === "p" ? 12 : 0); // am/pm
849
-
850
- date = new Date();
851
- date.setHours(hours, m[2] || 0, m[3] || 0);
852
- } else if (/Z$/.test(date) || /GMT$/.test(date)) // datestrings w/ timezone
853
- date = new Date(date);else if (dateTimeRegex.test(date) && /^[0-9]/.test(date)) {
854
- var d = date.match(dateTimeRegex);
855
- date = new Date(d[0] + "/" + (d[1] || 1) + "/" + (d[2] || 1) + " " + (d[3] || 0) + ":" + (d[4] || 0) + ":" + (d[5] || 0));
856
- } else // fallback
857
- date = new Date(date);
858
- }
859
-
860
- if (!(date instanceof Date)) {
861
- console.warn("flatpickr: invalid date " + date_orig);
862
- console.info(self.element);
863
- return null;
864
- }
865
-
866
- if (self.config.utc && !date.fp_isUTC) date = date.fp_toUTC();
867
-
868
- if (timeless) date.setHours(0, 0, 0, 0);
869
-
870
- return date;
871
- }
872
-
873
- function positionCalendar() {
874
- var calendarHeight = self.calendarContainer.offsetHeight,
875
- input = self.altInput || self.input,
876
- inputBounds = input.getBoundingClientRect(),
877
- distanceFromBottom = window.innerHeight - inputBounds.bottom + input.offsetHeight;
878
-
879
- var top = void 0,
880
- left = window.pageXOffset + inputBounds.left;
881
-
882
- if (distanceFromBottom < calendarHeight) {
883
- top = window.pageYOffset - calendarHeight + inputBounds.top - 2;
884
- self.calendarContainer.classList.remove("arrowTop");
885
- self.calendarContainer.classList.add("arrowBottom");
886
- } else {
887
- top = window.pageYOffset + input.offsetHeight + inputBounds.top + 2;
888
- self.calendarContainer.classList.remove("arrowBottom");
889
- self.calendarContainer.classList.add("arrowTop");
890
- }
891
-
892
- if (!self.config.static && !self.config.inline) {
893
- self.calendarContainer.style.top = top + "px";
894
- self.calendarContainer.style.left = left + "px";
895
- }
896
- }
897
-
898
- function redraw() {
899
- if (self.config.noCalendar || self.isMobile) return;
900
-
901
- buildWeekdays();
902
- updateNavigationCurrentMonth();
903
- buildDays();
904
- }
905
-
906
- function selectDate(e) {
907
- if (self.config.allowInput && e.which === 13 && e.target === (self.altInput || self.input)) return self.setDate((self.altInput || self.input).value), e.target.blur();
908
-
909
- if (!e.target.classList.contains("flatpickr-day") || e.target.classList.contains("disabled") || e.target.classList.contains("notAllowed")) return;
910
-
911
- var selectedDate = e.target.dateObj;
912
- self.selectedDateElem = e.target;
913
-
914
- if (self.config.mode === "single") {
915
- self.selectedDates = [selectedDate];
916
-
917
- if (!self.config.enableTime) self.close();
918
- } else if (self.config.mode === "multiple") {
919
- var selectedIndex = isDateSelected(selectedDate);
920
- if (selectedIndex) self.selectedDates.splice(selectedIndex, 1);else self.selectedDates.push(selectedDate);
921
- } else if (self.config.mode === "range") {
922
- if (self.selectedDates.length === 2) self.clear();
923
-
924
- self.selectedDates.push(selectedDate);
925
- self.selectedDates.sort(function (a, b) {
926
- return a.getTime() - b.getTime();
927
- });
928
- }
929
-
930
- setHoursFromInputs();
931
-
932
- if (selectedDate.getMonth() !== self.currentMonth && self.config.mode !== "range") {
933
- self.currentYear = selectedDate.getFullYear();
934
- self.currentMonth = selectedDate.getMonth();
935
- updateNavigationCurrentMonth();
936
- }
937
-
938
- buildDays();
939
-
940
- if (self.minDateHasTime && self.config.enableTime && compareDates(selectedDate, self.config.minDate) === 0) setHoursFromDate(self.config.minDate);
941
-
942
- updateValue();
943
-
944
- setTimeout(function () {
945
- return self.dateIsPicked = true;
946
- }, 50);
947
-
948
- if (self.config.mode === "range" && self.selectedDates.length === 1) onMouseOver(e);
949
-
950
- triggerEvent("Change");
951
- }
952
-
953
- function set(option, value) {
954
- self.config[option] = value;
955
- self.redraw();
956
- jumpToDate();
957
- }
958
-
959
- function setDate(date, triggerChange) {
960
- if (!date) return self.clear();
961
-
962
- self.selectedDates = (Array.isArray(date) ? date.map(parseDate) : [parseDate(date)]).filter(function (d) {
963
- return d instanceof Date && isEnabled(d);
964
- });
965
- self.redraw();
966
- jumpToDate();
967
-
968
- setHoursFromDate();
969
- updateValue();
970
-
971
- self.dateIsPicked = self.selectedDates.length > 0;
972
-
973
- if (triggerChange) triggerEvent("Change");
974
- }
975
-
976
- function setupDates() {
977
- self.selectedDates = [];
978
- self.now = new Date();
979
- var inputDate = self.config.defaultDate || self.input.value;
980
-
981
- if (Array.isArray(inputDate)) self.selectedDates = inputDate.map(parseDate);else if (inputDate) {
982
- switch (self.config.mode) {
983
- case "single":
984
- self.selectedDates = [parseDate(inputDate)];
985
- break;
986
-
987
- case "multiple":
988
- self.selectedDates = inputDate.split("; ").map(parseDate);
989
- break;
990
-
991
- case "range":
992
- self.selectedDates = inputDate.split(self.l10n.rangeSeparator).map(parseDate);
993
- break;
994
-
995
- default:
996
- break;
997
- }
998
- }
999
-
1000
- self.selectedDates = self.selectedDates.filter(function (d) {
1001
- return d instanceof Date && d.getTime() && isEnabled(d);
1002
- });
1003
-
1004
- var initialDate = self.selectedDates.length ? self.selectedDates[0] : self.config.minDate > self.now ? self.config.minDate : self.now;
1005
-
1006
- self.currentYear = initialDate.getFullYear();
1007
- self.currentMonth = initialDate.getMonth();
1008
- }
1009
-
1010
- function setupHelperFunctions() {
1011
- self.utils = {
1012
- duration: {
1013
- DAY: 86400000
1014
- },
1015
- getDaysinMonth: function getDaysinMonth() {
1016
- var month = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : self.currentMonth;
1017
- var yr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : self.currentYear;
1018
-
1019
- if (month === 1 && (yr % 4 === 0 && yr % 100 !== 0 || yr % 400 === 0)) return 29;
1020
- return self.l10n.daysInMonth[month];
1021
- },
1022
-
1023
- monthToStr: function monthToStr(monthNumber) {
1024
- var short = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : self.config.shorthandCurrentMonth;
1025
- return self.l10n.months[(short ? "short" : "long") + "hand"][monthNumber];
1026
- }
1027
- };
1028
- }
1029
-
1030
- function setupFormats() {
1031
- self.formats = {
1032
- // weekday name, short, e.g. Thu
1033
- D: function D(date) {
1034
- return self.l10n.weekdays.shorthand[self.formats.w(date)];
1035
- },
1036
-
1037
- // full month name e.g. January
1038
- F: function F(date) {
1039
- return self.utils.monthToStr(self.formats.n(date) - 1, false);
1040
- },
1041
-
1042
- // hours with leading zero e.g. 03
1043
- H: function H(date) {
1044
- return Flatpickr.prototype.pad(date.getHours());
1045
- },
1046
-
1047
- // day (1-30) with ordinal suffix e.g. 1st, 2nd
1048
- J: function J(date) {
1049
- return date.getDate() + self.l10n.ordinal(date.getDate());
1050
- },
1051
-
1052
- // AM/PM
1053
- K: function K(date) {
1054
- return date.getHours() > 11 ? "PM" : "AM";
1055
- },
1056
-
1057
- // shorthand month e.g. Jan, Sep, Oct, etc
1058
- M: function M(date) {
1059
- return self.utils.monthToStr(date.getMonth(), true);
1060
- },
1061
-
1062
- // seconds 00-59
1063
- S: function S(date) {
1064
- return Flatpickr.prototype.pad(date.getSeconds());
1065
- },
1066
-
1067
- // unix timestamp
1068
- U: function U(date) {
1069
- return date.getTime() / 1000;
1070
- },
1071
-
1072
- // full year e.g. 2016
1073
- Y: function Y(date) {
1074
- return date.getFullYear();
1075
- },
1076
-
1077
- // day in month, padded (01-30)
1078
- d: function d(date) {
1079
- return Flatpickr.prototype.pad(self.formats.j(date));
1080
- },
1081
-
1082
- // hour from 1-12 (am/pm)
1083
- h: function h(date) {
1084
- return date.getHours() % 12 ? date.getHours() % 12 : 12;
1085
- },
1086
-
1087
- // minutes, padded with leading zero e.g. 09
1088
- i: function i(date) {
1089
- return Flatpickr.prototype.pad(date.getMinutes());
1090
- },
1091
-
1092
- // day in month (1-30)
1093
- j: function j(date) {
1094
- return date.getDate();
1095
- },
1096
-
1097
- // weekday name, full, e.g. Thursday
1098
- l: function l(date) {
1099
- return self.l10n.weekdays.longhand[self.formats.w(date)];
1100
- },
1101
-
1102
- // padded month number (01-12)
1103
- m: function m(date) {
1104
- return Flatpickr.prototype.pad(self.formats.n(date));
1105
- },
1106
-
1107
- // the month number (1-12)
1108
- n: function n(date) {
1109
- return date.getMonth() + 1;
1110
- },
1111
-
1112
- // seconds 0-59
1113
- s: function s(date) {
1114
- return date.getSeconds();
1115
- },
1116
-
1117
- // number of the day of the week
1118
- w: function w(date) {
1119
- return date.getDay();
1120
- },
1121
-
1122
- // last two digits of year e.g. 16 for 2016
1123
- y: function y(date) {
1124
- return String(self.formats.Y(date)).substring(2);
1125
- }
1126
- };
1127
- }
1128
-
1129
- function setupInputs() {
1130
- self.input = self.config.wrap ? self.element.querySelector("[data-input]") : self.element;
1131
-
1132
- self.input.classList.add("flatpickr-input");
1133
- if (self.config.altInput) {
1134
- // replicate self.element
1135
- self.altInput = createElement(self.input.nodeName, self.config.altInputClass);
1136
- self.altInput.placeholder = self.input.placeholder;
1137
- self.altInput.type = "text";
1138
-
1139
- self.input.type = "hidden";
1140
- if (self.input.parentNode) self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);
1141
- }
1142
-
1143
- if (!self.config.allowInput) (self.altInput || self.input).setAttribute("readonly", "readonly");
1144
- }
1145
-
1146
- function setupMobile() {
1147
-
1148
- if (self.input.parentNode) {
1149
- var inputPrevious = self.input.parentNode.querySelector('.flatpickr-mobile');
1150
- if (inputPrevious)
1151
- self.input.parentNode.removeChild(inputPrevious);
1152
- }
1153
-
1154
- var inputType = self.config.enableTime ? self.config.noCalendar ? "time" : "datetime-local" : "date";
1155
-
1156
- self.mobileInput = createElement("input", "flatpickr-input flatpickr-mobile");
1157
- self.mobileInput.step = "any";
1158
- self.mobileInput.tabIndex = -1;
1159
- self.mobileInput.type = inputType;
1160
- self.mobileInput.disabled = self.input.disabled;
1161
-
1162
- self.mobileFormatStr = inputType === "datetime-local" ? "Y-m-d\\TH:i:S" : inputType === "date" ? "Y-m-d" : "H:i:S";
1163
-
1164
- if (self.selectedDates.length) {
1165
- self.mobileInput.defaultValue = self.mobileInput.value = formatDate(self.mobileFormatStr, self.selectedDates[0]);
1166
- }
1167
-
1168
- if (self.config.minDate) self.mobileInput.min = formatDate("Y-m-d", self.config.minDate);
1169
-
1170
- if (self.config.maxDate) self.mobileInput.max = formatDate("Y-m-d", self.config.maxDate);
1171
-
1172
- self.input.type = "hidden";
1173
- if (self.config.altInput) self.altInput.type = "hidden";
1174
-
1175
- try {
1176
- self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);
1177
- } catch (e) {
1178
- //
1179
- }
1180
-
1181
- self.mobileInput.addEventListener("change", function (e) {
1182
- self.setDate(e.target.value);
1183
- triggerEvent("Change");
1184
- triggerEvent("Close");
1185
- });
1186
- }
1187
-
1188
- function toggle() {
1189
- if (self.isOpen) self.close();else self.open();
1190
- }
1191
-
1192
- function triggerEvent(event, data) {
1193
- if (self.config["on" + event]) {
1194
- var hooks = Array.isArray(self.config["on" + event]) ? self.config["on" + event] : [self.config["on" + event]];
1195
-
1196
- for (var i = 0; i < hooks.length; i++) {
1197
- hooks[i](self.selectedDates, self.input.value, self, data);
1198
- }
1199
- }
1200
-
1201
- if (event === "Change") {
1202
- try {
1203
- self.input.dispatchEvent(new Event("change", { "bubbles": true }));
1204
-
1205
- // many front-end frameworks bind to the input event
1206
- self.input.dispatchEvent(new Event("input", { "bubbles": true }));
1207
- } catch (e) {
1208
- if ("createEvent" in document) return self.input.dispatchEvent(self.changeEvent);
1209
-
1210
- self.input.fireEvent("onchange");
1211
- }
1212
- }
1213
- }
1214
-
1215
- function latestSelectedDateObj() {
1216
- if (self.selectedDates.length) return self.selectedDates[self.selectedDates.length - 1];
1217
- return null;
1218
- }
1219
-
1220
- function isDateSelected(date) {
1221
- for (var i = 0; i < self.selectedDates.length; i++) {
1222
- if (compareDates(self.selectedDates[i], date) === 0) return "" + i;
1223
- }
1224
-
1225
- return false;
1226
- }
1227
-
1228
- function isDateInRange(date) {
1229
- if (self.config.mode !== "range" || self.selectedDates.length < 2) return false;
1230
- return compareDates(date, self.selectedDates[0]) >= 0 && compareDates(date, self.selectedDates[1]) <= 0;
1231
- }
1232
-
1233
- function updateNavigationCurrentMonth() {
1234
- if (self.config.noCalendar || self.isMobile || !self.monthNav) return;
1235
-
1236
- self.currentMonthElement.textContent = self.utils.monthToStr(self.currentMonth) + " ";
1237
- self.currentYearElement.value = self.currentYear;
1238
-
1239
- if (self.config.minDate) {
1240
- var hidePrevMonthArrow = self.currentYear === self.config.minDate.getFullYear() ? (self.currentMonth + 11) % 12 < self.config.minDate.getMonth() : self.currentYear < self.config.minDate.getFullYear();
1241
-
1242
- self.prevMonthNav.style.display = hidePrevMonthArrow ? "none" : "block";
1243
- } else self.prevMonthNav.style.display = "block";
1244
-
1245
- if (self.config.maxDate) {
1246
- var hideNextMonthArrow = self.currentYear === self.config.maxDate.getFullYear() ? self.currentMonth + 1 > self.config.maxDate.getMonth() : self.currentYear > self.config.maxDate.getFullYear();
1247
-
1248
- self.nextMonthNav.style.display = hideNextMonthArrow ? "none" : "block";
1249
- } else self.nextMonthNav.style.display = "block";
1250
- }
1251
-
1252
- function updateValue() {
1253
- if (!self.selectedDates.length) return self.clear();
1254
-
1255
- if (self.isMobile) {
1256
- self.mobileInput.value = self.selectedDates.length ? formatDate(self.mobileFormatStr, latestSelectedDateObj()) : "";
1257
- }
1258
-
1259
- var joinChar = self.config.mode !== "range" ? "; " : self.l10n.rangeSeparator;
1260
-
1261
- self.input.value = self.selectedDates.map(function (dObj) {
1262
- return formatDate(self.config.dateFormat, dObj);
1263
- }).join(joinChar);
1264
-
1265
- if (self.config.altInput) {
1266
- self.altInput.value = self.selectedDates.map(function (dObj) {
1267
- return formatDate(self.config.altFormat, dObj);
1268
- }).join(joinChar);
1269
- }
1270
-
1271
- triggerEvent("ValueUpdate");
1272
- }
1273
-
1274
- function yearScroll(e) {
1275
- e.preventDefault();
1276
-
1277
- var delta = Math.max(-1, Math.min(1, e.wheelDelta || -e.deltaY)),
1278
- newYear = parseInt(e.target.value, 10) + delta;
1279
-
1280
- handleYearChange(newYear);
1281
- e.target.value = self.currentYear;
1282
- }
1283
-
1284
- function createElement(tag) {
1285
- var className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
1286
- var content = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
1287
-
1288
- var e = document.createElement(tag);
1289
- e.className = className;
1290
-
1291
- if (content) e.innerHTML = content;
1292
-
1293
- return e;
1294
- }
1295
-
1296
- function debounce(func, wait, immediate) {
1297
- var timeout = void 0;
1298
- return function () {
1299
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1300
- args[_key] = arguments[_key];
1301
- }
1302
-
1303
- var context = this;
1304
- var later = function later() {
1305
- timeout = null;
1306
- if (!immediate) func.apply(context, args);
1307
- };
1308
-
1309
- clearTimeout(timeout);
1310
- timeout = setTimeout(later, wait);
1311
- if (immediate && !timeout) func.apply(context, args);
1312
- };
1313
- }
1314
-
1315
- function compareDates(date1, date2) {
1316
- if (!(date1 instanceof Date) || !(date2 instanceof Date)) return false;
1317
-
1318
- return new Date(date1.getTime()).setHours(0, 0, 0, 0) - new Date(date2.getTime()).setHours(0, 0, 0, 0);
1319
- }
1320
-
1321
- function timeWrapper(e) {
1322
- e.preventDefault();
1323
- if (e && ((e.target.value || e.target.textContent).length >= 2 || // typed two digits
1324
- e.type !== "keydown" && e.type !== "input" // scroll event
1325
- )) e.target.blur();
1326
-
1327
- if (self.amPM && e.target === self.amPM) return e.target.textContent = ["AM", "PM"][e.target.textContent === "AM" | 0];
1328
-
1329
- var min = Number(e.target.min),
1330
- max = Number(e.target.max),
1331
- step = Number(e.target.step),
1332
- curValue = parseInt(e.target.value, 10),
1333
- delta = Math.max(-1, Math.min(1, e.wheelDelta || -e.deltaY));
1334
-
1335
- var newValue = Number(curValue);
1336
-
1337
- if (e.type === "wheel") newValue = curValue + step * delta;else if (e.type === "keydown") newValue = curValue + step * (e.which === 38 ? 1 : -1);
1338
-
1339
- if (newValue < min) {
1340
- newValue = max + newValue + (e.target !== self.hourElement) + (e.target === self.hourElement && !self.amPM);
1341
- } else if (newValue > max) {
1342
- newValue = e.target === self.hourElement ? newValue - max - !self.amPM : min;
1343
- }
1344
-
1345
- if (self.amPM && e.target === self.hourElement && (step === 1 ? newValue + curValue === 23 : Math.abs(newValue - curValue) > step)) self.amPM.textContent = self.amPM.innerHTML === "PM" ? "AM" : "PM";
1346
-
1347
- e.target.value = self.pad(newValue);
1348
- }
1349
-
1350
- init();
1351
- return self;
1352
- }
1353
-
1354
- Flatpickr.defaultConfig = {
1355
-
1356
- mode: "single",
1357
-
1358
- /* if true, dates will be parsed, formatted, and displayed in UTC.
1359
- preloading date strings w/ timezones is recommended but not necessary */
1360
- utc: false,
1361
-
1362
- // wrap: see https://chmln.github.io/flatpickr/#strap
1363
- wrap: false,
1364
-
1365
- // enables week numbers
1366
- weekNumbers: false,
1367
-
1368
- // allow manual datetime input
1369
- allowInput: false,
1370
-
1371
- /*
1372
- clicking on input opens the date(time)picker.
1373
- disable if you wish to open the calendar manually with .open()
1374
- */
1375
- clickOpens: true,
1376
-
1377
- // display time picker in 24 hour mode
1378
- time_24hr: false,
1379
-
1380
- // enables the time picker functionality
1381
- enableTime: false,
1382
-
1383
- // noCalendar: true will hide the calendar. use for a time picker along w/ enableTime
1384
- noCalendar: false,
1385
-
1386
- // more date format chars at https://chmln.github.io/flatpickr/#dateformat
1387
- dateFormat: "Y-m-d",
1388
-
1389
- // altInput - see https://chmln.github.io/flatpickr/#altinput
1390
- altInput: false,
1391
-
1392
- // the created altInput element will have this class.
1393
- altInputClass: "form-control input",
1394
-
1395
- // same as dateFormat, but for altInput
1396
- altFormat: "F j, Y", // defaults to e.g. June 10, 2016
1397
-
1398
- // defaultDate - either a datestring or a date object. used for datetimepicker"s initial value
1399
- defaultDate: null,
1400
-
1401
- // the minimum date that user can pick (inclusive)
1402
- minDate: null,
1403
-
1404
- // the maximum date that user can pick (inclusive)
1405
- maxDate: null,
1406
-
1407
- // dateparser that transforms a given string to a date object
1408
- parseDate: null,
1409
-
1410
- // dateformatter that transforms a given date object to a string, according to passed format
1411
- formatDate: null,
1412
-
1413
- getWeek: function getWeek(givenDate) {
1414
- var date = new Date(givenDate.getTime());
1415
- date.setHours(0, 0, 0, 0);
1416
-
1417
- // Thursday in current week decides the year.
1418
- date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7);
1419
- // January 4 is always in week 1.
1420
- var week1 = new Date(date.getFullYear(), 0, 4);
1421
- // Adjust to Thursday in week 1 and count number of weeks from date to week1.
1422
- return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000 - 3 + (week1.getDay() + 6) % 7) / 7);
1423
- },
1424
-
1425
- // see https://chmln.github.io/flatpickr/#disable
1426
- enable: [],
1427
-
1428
- // see https://chmln.github.io/flatpickr/#disable
1429
- disable: [],
1430
-
1431
- // display the short version of month names - e.g. Sep instead of September
1432
- shorthandCurrentMonth: false,
1433
-
1434
- // displays calendar inline. see https://chmln.github.io/flatpickr/#inline-calendar
1435
- inline: false,
1436
-
1437
- // position calendar inside wrapper and next to the input element
1438
- // leave at false unless you know what you"re doing
1439
- static: false,
1440
-
1441
- // DOM node to append the calendar to in *static* mode
1442
- appendTo: null,
1443
-
1444
- // code for previous/next icons. this is where you put your custom icon code e.g. fontawesome
1445
- prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",
1446
- nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",
1447
-
1448
- // enables seconds in the time picker
1449
- enableSeconds: false,
1450
-
1451
- // step size used when scrolling/incrementing the hour element
1452
- hourIncrement: 1,
1453
-
1454
- // step size used when scrolling/incrementing the minute element
1455
- minuteIncrement: 5,
1456
-
1457
- // initial value in the hour element
1458
- defaultHour: 12,
1459
-
1460
- // initial value in the minute element
1461
- defaultMinute: 0,
1462
-
1463
- // disable native mobile datetime input support
1464
- disableMobile: false,
1465
-
1466
- // default locale
1467
- locale: "default",
1468
-
1469
- // onChange callback when user selects a date or time
1470
- onChange: null, // function (dateObj, dateStr) {}
1471
-
1472
- // called every time calendar is opened
1473
- onOpen: null, // function (dateObj, dateStr) {}
1474
-
1475
- // called every time calendar is closed
1476
- onClose: null, // function (dateObj, dateStr) {}
1477
-
1478
- // called after calendar is ready
1479
- onReady: null, // function (dateObj, dateStr) {}
1480
-
1481
- onValueUpdate: null,
1482
-
1483
- onDayCreate: null
1484
- };
1485
-
1486
- Flatpickr.l10ns = {
1487
- en: {
1488
- weekdays: {
1489
- shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1490
- longhand: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
1491
- },
1492
- months: {
1493
- shorthand: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
1494
- longhand: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
1495
- },
1496
- daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
1497
- firstDayOfWeek: 0,
1498
- ordinal: function ordinal(nth) {
1499
- var s = nth % 100;
1500
- if (s > 3 && s < 21) return "th";
1501
- switch (s % 10) {
1502
- case 1:
1503
- return "st";
1504
- case 2:
1505
- return "nd";
1506
- case 3:
1507
- return "rd";
1508
- default:
1509
- return "th";
1510
- }
1511
- },
1512
- rangeSeparator: " to ",
1513
- weekAbbreviation: "Wk",
1514
- scrollTitle: "Scroll to increment",
1515
- toggleTitle: "Click to toggle"
1516
- }
1517
- };
1518
-
1519
- Flatpickr.l10ns.default = Flatpickr.l10ns.en;
1520
-
1521
- Flatpickr.localize = function (l10n) {
1522
- return _extends(Flatpickr.l10ns.default, l10n || {});
1523
- };
1524
-
1525
- Flatpickr.prototype = {
1526
- pad: function pad(number) {
1527
- return ("0" + number).slice(-2);
1528
- }
1529
- };
1530
-
1531
- function _flatpickr(nodeList, config) {
1532
- var instances = [];
1533
- for (var i = 0; i < nodeList.length; i++) {
1534
- try {
1535
- nodeList[i]._flatpickr = new Flatpickr(nodeList[i], config || {});
1536
- instances.push(nodeList[i]._flatpickr);
1537
- } catch (e) {
1538
- console.warn(e, e.stack);
1539
- }
1540
- }
1541
-
1542
- return instances.length === 1 ? instances[0] : instances;
1543
- }
1544
- if (typeof HTMLElement !== "undefined") {
1545
- // browser env
1546
- HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {
1547
- return _flatpickr(this, config);
1548
- };
1549
-
1550
- HTMLElement.prototype.flatpickr = function (config) {
1551
- return _flatpickr([this], config);
1552
- };
1553
- }
1554
-
1555
- function flatpickr(selector, config) {
1556
- return _flatpickr(document.querySelectorAll(selector), config);
1557
- }
1558
-
1559
- if (typeof jQuery !== "undefined") {
1560
- jQuery.fn.flatpickr = function (config) {
1561
- return _flatpickr(this, config);
1562
- };
1563
- }
1564
-
1565
- Date.prototype.fp_incr = function (days) {
1566
- return new Date(this.getFullYear(), this.getMonth(), this.getDate() + parseInt(days, 10));
1567
- };
1568
-
1569
- Date.prototype.fp_isUTC = false;
1570
- Date.prototype.fp_toUTC = function () {
1571
- var newDate = new Date(this.getUTCFullYear(), this.getUTCMonth(), this.getUTCDate(), this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds());
1572
-
1573
- newDate.fp_isUTC = true;
1574
- return newDate;
1575
- };
1576
-
1577
- // IE9 classList polyfill
1578
- if (!("classList" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== "undefined") {
1579
- Object.defineProperty(HTMLElement.prototype, "classList", {
1580
- get: function get() {
1581
- var self = this;
1582
- function update(fn) {
1583
- return function (value) {
1584
- var classes = self.className.split(/\s+/),
1585
- index = classes.indexOf(value);
1586
-
1587
- fn(classes, index, value);
1588
- self.className = classes.join(" ");
1589
- };
1590
- }
1591
-
1592
- var ret = {
1593
- add: update(function (classes, index, value) {
1594
- if (!~index) classes.push(value);
1595
- }),
1596
-
1597
- remove: update(function (classes, index) {
1598
- if (~index) classes.splice(index, 1);
1599
- }),
1600
-
1601
- toggle: update(function (classes, index, value) {
1602
- if (~index) classes.splice(index, 1);else classes.push(value);
1603
- }),
1604
-
1605
- contains: function contains(value) {
1606
- return !!~self.className.split(/\s+/).indexOf(value);
1607
- },
1608
-
1609
- item: function item(i) {
1610
- return self.className.split(/\s+/)[i] || null;
1611
- }
1612
- };
1613
-
1614
- Object.defineProperty(ret, "length", {
1615
- get: function get() {
1616
- return self.className.split(/\s+/).length;
1617
- }
1618
- });
1619
-
1620
- return ret;
1621
- }
1622
- });
1623
- }
1624
-
1625
- if (typeof module !== "undefined") module.exports = Flatpickr;
1
+ /*! flatpickr v2.3.4, @license MIT */
2
+ function Flatpickr(e,t){function n(){e._flatpickr&&C(e._flatpickr),e._flatpickr=ae,ae.element=e,ae.instanceConfig=t||{},B(),N(),F(),J(),W(),U(),ae.isOpen=ae.config.inline,ae.changeMonth=b,ae.clear=w,ae.close=y,ae.destroy=C,ae.formatDate=E,ae.jumpToDate=s,ae.open=S,ae.redraw=H,ae.set=P,ae.setDate=R,ae.toggle=K,ae.isMobile=!ae.config.disableMobile&&!ae.config.inline&&"single"===ae.config.mode&&!ae.config.disable.length&&!ae.config.enable.length&&!ae.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),ae.isMobile||f(),c(),ae.isMobile||Object.defineProperty(ae,"dateIsPicked",{set:function(e){return e?ae.calendarContainer.classList.add("dateIsPicked"):void ae.calendarContainer.classList.remove("dateIsPicked")}}),ae.dateIsPicked=ae.selectedDates.length>0||ae.config.noCalendar,ae.selectedDates.length&&(ae.config.enableTime&&r(),G()),ae.config.weekNumbers&&(ae.calendarContainer.style.width=ae.days.clientWidth+ae.weekWrapper.clientWidth+"px"),q("Ready")}function a(e){ae.config.noCalendar&&!ae.selectedDates.length&&(ae.selectedDates=[ae.now]),ne(e),ae.selectedDates.length&&(!ae.minDateHasTime||"input"!==e.type||e.target.value.length>=2?(i(),G()):setTimeout(function(){i(),G()},1e3))}function i(){if(ae.config.enableTime){var e=parseInt(ae.hourElement.value,10)||0,t=parseInt(ae.minuteElement.value,10)||0,n=ae.config.enableSeconds?parseInt(ae.secondElement.value,10)||0:0;ae.amPM&&(e=e%12+12*("PM"===ae.amPM.textContent)),ae.minDateHasTime&&0===te(ae.latestSelectedDateObj,ae.config.minDate)?(e=Math.max(e,ae.config.minDate.getHours()),e===ae.config.minDate.getHours()&&(t=Math.max(t,ae.config.minDate.getMinutes()))):ae.maxDateHasTime&&0===te(ae.latestSelectedDateObj,ae.config.maxDate)&&(e=Math.min(e,ae.config.maxDate.getHours()),e===ae.config.maxDate.getHours()&&(t=Math.min(t,ae.config.maxDate.getMinutes()))),o(e,t,n)}}function r(e){var t=e||ae.latestSelectedDateObj;t&&o(t.getHours(),t.getMinutes(),t.getSeconds())}function o(e,t,n){ae.selectedDates.length&&ae.latestSelectedDateObj.setHours(e%24,t,n||0,0),ae.config.enableTime&&!ae.isMobile&&(ae.hourElement.value=ae.pad(ae.config.time_24hr?e:(12+e)%12+12*(e%12===0)),ae.minuteElement.value=ae.pad(t),!ae.config.time_24hr&&ae.selectedDates.length&&(ae.amPM.textContent=ae.latestSelectedDateObj.getHours()>=12?"PM":"AM"),ae.config.enableSeconds&&(ae.secondElement.value=ae.pad(n)))}function l(e){4===e.target.value.length&&(ae.currentYearElement.blur(),x(e.target.value),e.target.value=ae.currentYear)}function c(){return ae.config.wrap&&["open","close","toggle","clear"].forEach(function(e){try{ae.element.querySelector("[data-"+e+"]").addEventListener("click",ae[e])}catch(e){}}),void 0!==window.document.createEvent&&(ae.changeEvent=window.document.createEvent("HTMLEvents"),ae.changeEvent.initEvent("change",!1,!0)),ae.isMobile?z():(ae.debouncedResize=ee(Y,50),ae.triggerChange=function(){q("Change")},ae.debouncedChange=ee(ae.triggerChange,300),"range"===ae.config.mode&&ae.days&&ae.days.addEventListener("mouseover",L),window.document.addEventListener("keydown",I),ae.config.inline||ae.config.static||window.addEventListener("resize",ae.debouncedResize),window.ontouchstart&&window.document.addEventListener("touchstart",k),window.document.addEventListener("click",k),window.document.addEventListener("blur",k),ae.config.clickOpens&&(ae.altInput||ae.input).addEventListener("focus",S),ae.config.noCalendar||(ae.prevMonthNav.addEventListener("click",function(){return b(-1)}),ae.nextMonthNav.addEventListener("click",function(){return b(1)}),ae.currentYearElement.addEventListener("wheel",function(e){return ee(X(e),50)}),ae.currentYearElement.addEventListener("focus",function(){ae.currentYearElement.select()}),ae.currentYearElement.addEventListener("input",l),ae.currentYearElement.addEventListener("increment",l),ae.days.addEventListener("click",_)),void(ae.config.enableTime&&(ae.timeContainer.addEventListener("transitionend",j),ae.timeContainer.addEventListener("wheel",function(e){return ee(a(e),5)}),ae.timeContainer.addEventListener("input",a),ae.timeContainer.addEventListener("increment",a),ae.timeContainer.addEventListener("increment",ae.debouncedChange),ae.timeContainer.addEventListener("wheel",ae.debouncedChange),ae.timeContainer.addEventListener("input",ae.triggerChange),ae.hourElement.addEventListener("focus",function(){ae.hourElement.select()}),ae.minuteElement.addEventListener("focus",function(){ae.minuteElement.select()}),ae.secondElement&&ae.secondElement.addEventListener("focus",function(){ae.secondElement.select()}),ae.amPM&&ae.amPM.addEventListener("click",function(e){a(e),ae.triggerChange(e)}))))}function s(e){e=e?ae.parseDate(e):ae.latestSelectedDateObj||(ae.config.minDate>ae.now?ae.config.minDate:ae.config.maxDate&&ae.config.maxDate<ae.now?ae.config.maxDate:ae.now);try{ae.currentYear=e.getFullYear(),ae.currentMonth=e.getMonth()}catch(t){console.error(t.stack),console.warn("Invalid date supplied: "+e)}ae.redraw()}function d(e,t){var n=e.target.parentNode.childNodes[0];n.value=parseInt(n.value,10)+t*(n.step||1);try{n.dispatchEvent(new Event("increment",{bubbles:!0}))}catch(e){var a=window.document.createEvent("CustomEvent");a.initCustomEvent("increment",!0,!0,{}),n.dispatchEvent(a)}}function u(e){var t=Z("div","numInputWrapper"),n=Z("input","numInput "+e),a=Z("span","arrowUp"),i=Z("span","arrowDown");return n.type="text",t.appendChild(n),t.appendChild(a),t.appendChild(i),a.addEventListener("click",function(e){return d(e,1)}),i.addEventListener("click",function(e){return d(e,-1)}),t}function f(){var e=window.document.createDocumentFragment();ae.calendarContainer=Z("div","flatpickr-calendar"),ae.numInputType=navigator.userAgent.indexOf("MSIE 9.0")>0?"text":"number",ae.config.noCalendar||(e.appendChild(g()),ae.innerContainer=Z("div","flatpickr-innerContainer"),ae.config.weekNumbers&&ae.innerContainer.appendChild(v()),ae.rContainer=Z("div","flatpickr-rContainer"),ae.rContainer.appendChild(D()),ae.rContainer.appendChild(m()),ae.innerContainer.appendChild(ae.rContainer),e.appendChild(ae.innerContainer)),ae.config.enableTime&&e.appendChild(h()),"range"===ae.config.mode&&ae.calendarContainer.classList.add("rangeMode"),ae.calendarContainer.appendChild(e),ae.config.inline||ae.config.static?(ae.calendarContainer.classList.add(ae.config.inline?"inline":"static"),j(),ae.config.appendTo&&ae.config.appendTo.nodeType?ae.config.appendTo.appendChild(ae.calendarContainer):ae.element.parentNode.insertBefore(ae.calendarContainer,(ae.altInput||ae.input).nextSibling)):window.document.body.appendChild(ae.calendarContainer)}function p(e,t,n){var a=T(t,!0),i=Z("span","flatpickr-day "+e,t.getDate());return i.dateObj=t,0===te(t,ae.now)&&i.classList.add("today"),a?(i.tabIndex=0,V(t)&&(i.classList.add("selected"),"range"===ae.config.mode?i.classList.add(0===te(t,ae.selectedDates[0])?"startRange":"endRange"):ae.selectedDateElem=i)):(i.classList.add("disabled"),ae.selectedDates[0]&&t>ae.minRangeDate&&t<ae.selectedDates[0]?ae.minRangeDate=t:ae.selectedDates[0]&&t<ae.maxRangeDate&&t>ae.selectedDates[0]&&(ae.maxRangeDate=t)),"range"===ae.config.mode&&($(t)&&!V(t)&&i.classList.add("inRange"),1===ae.selectedDates.length&&(t<ae.minRangeDate||t>ae.maxRangeDate)&&i.classList.add("notAllowed")),ae.config.weekNumbers&&"prevMonthDay"!==e&&n%7===1&&ae.weekNumbers.insertAdjacentHTML("beforeend","<span class='disabled flatpickr-day'>"+ae.config.getWeek(t)+"</span>"),q("DayCreate",i),i}function m(){ae.days||(ae.days=Z("div","flatpickr-days"),ae.days.tabIndex=-1),ae.firstOfMonth=(new Date(ae.currentYear,ae.currentMonth,1).getDay()-ae.l10n.firstDayOfWeek+7)%7,ae.prevMonthDays=ae.utils.getDaysinMonth((ae.currentMonth-1+12)%12);var e=ae.utils.getDaysinMonth(),t=window.document.createDocumentFragment(),n=ae.prevMonthDays+1-ae.firstOfMonth;ae.config.weekNumbers&&ae.weekNumbers.firstChild&&(ae.weekNumbers.textContent=""),"range"===ae.config.mode&&(ae.minRangeDate=new Date(ae.currentYear,ae.currentMonth-1,n),ae.maxRangeDate=new Date(ae.currentYear,ae.currentMonth+1,(42-ae.firstOfMonth)%e)),ae.days.firstChild&&(ae.days.textContent="");for(var a=0;n<=ae.prevMonthDays;a++,n++)t.appendChild(p("prevMonthDay",new Date(ae.currentYear,ae.currentMonth-1,n),n));for(n=1;n<=e;n++)t.appendChild(p("",new Date(ae.currentYear,ae.currentMonth,n),n));for(var i=e+1;i<=42-ae.firstOfMonth;i++)t.appendChild(p("nextMonthDay",new Date(ae.currentYear,ae.currentMonth+1,i%e),i));return ae.days.appendChild(t),ae.days}function g(){var e=window.document.createDocumentFragment();ae.monthNav=Z("div","flatpickr-month"),ae.prevMonthNav=Z("span","flatpickr-prev-month"),ae.prevMonthNav.innerHTML=ae.config.prevArrow,ae.currentMonthElement=Z("span","cur-month");var t=u("cur-year");return ae.currentYearElement=t.childNodes[0],ae.currentYearElement.title=ae.l10n.scrollTitle,ae.config.minDate&&(ae.currentYearElement.min=ae.config.minDate.getFullYear()),ae.config.maxDate&&(ae.currentYearElement.max=ae.config.maxDate.getFullYear(),ae.currentYearElement.disabled=ae.config.minDate&&ae.config.minDate.getFullYear()===ae.config.maxDate.getFullYear()),ae.nextMonthNav=Z("span","flatpickr-next-month"),ae.nextMonthNav.innerHTML=ae.config.nextArrow,ae.navigationCurrentMonth=Z("span","flatpickr-current-month"),ae.navigationCurrentMonth.appendChild(ae.currentMonthElement),ae.navigationCurrentMonth.appendChild(t),e.appendChild(ae.prevMonthNav),e.appendChild(ae.navigationCurrentMonth),e.appendChild(ae.nextMonthNav),ae.monthNav.appendChild(e),Q(),ae.monthNav}function h(){ae.calendarContainer.classList.add("hasTime"),ae.config.noCalendar&&ae.calendarContainer.classList.add("noCalendar"),ae.timeContainer=Z("div","flatpickr-time"),ae.timeContainer.tabIndex=-1;var e=Z("span","flatpickr-time-separator",":"),t=u("flatpickr-hour");ae.hourElement=t.childNodes[0];var n=u("flatpickr-minute");if(ae.minuteElement=n.childNodes[0],ae.hourElement.tabIndex=ae.minuteElement.tabIndex=0,ae.hourElement.pattern=ae.minuteElement.pattern="\\d*",ae.hourElement.value=ae.pad(ae.latestSelectedDateObj?ae.latestSelectedDateObj.getHours():ae.config.defaultHour),ae.minuteElement.value=ae.pad(ae.latestSelectedDateObj?ae.latestSelectedDateObj.getMinutes():ae.config.defaultMinute),ae.hourElement.step=ae.config.hourIncrement,ae.minuteElement.step=ae.config.minuteIncrement,ae.hourElement.min=ae.config.time_24hr?0:1,ae.hourElement.max=ae.config.time_24hr?23:12,ae.minuteElement.min=0,ae.minuteElement.max=59,ae.hourElement.title=ae.minuteElement.title=ae.l10n.scrollTitle,ae.timeContainer.appendChild(t),ae.timeContainer.appendChild(e),ae.timeContainer.appendChild(n),ae.config.time_24hr&&ae.timeContainer.classList.add("time24hr"),ae.config.enableSeconds){ae.timeContainer.classList.add("hasSeconds");var a=u("flatpickr-second");ae.secondElement=a.childNodes[0],ae.secondElement.pattern=ae.hourElement.pattern,ae.secondElement.value=ae.latestSelectedDateObj?ae.pad(ae.latestSelectedDateObj.getSeconds()):"00",ae.secondElement.step=ae.minuteElement.step,ae.secondElement.min=ae.minuteElement.min,ae.secondElement.max=ae.minuteElement.max,ae.timeContainer.appendChild(Z("span","flatpickr-time-separator",":")),ae.timeContainer.appendChild(a)}return ae.config.time_24hr||(ae.amPM=Z("span","flatpickr-am-pm",["AM","PM"][ae.hourElement.value>11|0]),ae.amPM.title=ae.l10n.toggleTitle,ae.amPM.tabIndex=0,ae.timeContainer.appendChild(ae.amPM)),ae.timeContainer}function D(){ae.weekdayContainer||(ae.weekdayContainer=Z("div","flatpickr-weekdays"));var e=ae.l10n.firstDayOfWeek,t=ae.l10n.weekdays.shorthand.slice();return e>0&&e<t.length&&(t=[].concat(t.splice(e,t.length),t.splice(0,e))),ae.weekdayContainer.innerHTML="\n\t\t<span class=flatpickr-weekday>\n\t\t\t"+t.join("</span><span class=flatpickr-weekday>")+"\n\t\t</span>\n\t\t",ae.weekdayContainer}function v(){return ae.calendarContainer.classList.add("hasWeeks"),ae.weekWrapper=Z("div","flatpickr-weekwrapper"),ae.weekWrapper.appendChild(Z("span","flatpickr-weekday",ae.l10n.weekAbbreviation)),ae.weekNumbers=Z("div","flatpickr-weeks"),ae.weekWrapper.appendChild(ae.weekNumbers),ae.weekWrapper}function b(e,t){ae.currentMonth="undefined"==typeof t||t?ae.currentMonth+e:e,x(),Q(),m(),ae.config.noCalendar||ae.days.focus(),q("MonthChange")}function w(e){ae.input.value="",ae.altInput&&(ae.altInput.value=""),ae.mobileInput&&(ae.mobileInput.value=""),ae.selectedDates=[],ae.latestSelectedDateObj=null,ae.dateIsPicked=!1,ae.redraw(),e!==!1&&q("Change")}function y(){ae.isOpen=!1,ae.isMobile||(ae.calendarContainer.classList.remove("open"),(ae.altInput||ae.input).classList.remove("active")),q("Close")}function C(e){e=e||ae,e.clear(!1),window.document.removeEventListener("keydown",I),window.removeEventListener("resize",e.debouncedResize),window.document.removeEventListener("click",k),window.document.removeEventListener("touchstart",k),window.document.removeEventListener("blur",k),e.timeContainer&&e.timeContainer.removeEventListener("transitionend",j),e.mobileInput&&e.mobileInput.parentNode?e.mobileInput.parentNode.removeChild(e.mobileInput):e.calendarContainer&&e.calendarContainer.parentNode&&e.calendarContainer.parentNode.removeChild(e.calendarContainer),e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput)),e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeEventListener("focus",S),e.input.removeAttribute("readonly"),delete e.input._flatpickr}function M(e){for(var t=e;t;){if(/flatpickr-day|flatpickr-calendar/.test(t.className))return!0;t=t.parentNode}return!1}function k(e){var t=ae.element.contains(e.target)||e.target===ae.input||e.target===ae.altInput||e.path&&(~e.path.indexOf(ae.input)||~e.path.indexOf(ae.altInput));!ae.isOpen||ae.config.inline||M(e.target)||t||(e.preventDefault(),ae.close(),"range"===ae.config.mode&&1===ae.selectedDates.length&&(ae.clear(),ae.redraw()))}function E(e,t){if(ae.config.formatDate)return ae.config.formatDate(e,t);var n=e.split("");return n.map(function(e,a){return ae.formats[e]&&"\\"!==n[a-1]?ae.formats[e](t):"\\"!==e?e:""}).join("")}function x(e){ae.currentMonth<0||ae.currentMonth>11?(ae.currentYear+=ae.currentMonth%11,ae.currentMonth=(ae.currentMonth+12)%12,q("YearChange")):e&&(!ae.currentYearElement.min||e>=ae.currentYearElement.min)&&(!ae.currentYearElement.max||e<=ae.currentYearElement.max)&&(ae.currentYear=parseInt(e,10)||ae.currentYear,ae.config.maxDate&&ae.currentYear===ae.config.maxDate.getFullYear()?ae.currentMonth=Math.min(ae.config.maxDate.getMonth(),ae.currentMonth):ae.config.minDate&&ae.currentYear===ae.config.minDate.getFullYear()&&(ae.currentMonth=Math.max(ae.config.minDate.getMonth(),ae.currentMonth)),ae.redraw(),q("YearChange"))}function T(e,t){var n=te(e,ae.config.minDate,"undefined"!=typeof t?t:!ae.minDateHasTime)<0,a=te(e,ae.config.maxDate,"undefined"!=typeof t?t:!ae.maxDateHasTime)>0;if(n||a)return!1;if(!ae.config.enable.length&&!ae.config.disable.length)return!0;for(var i,r=ae.parseDate(e,!0),o=ae.config.enable.length>0,l=o?ae.config.enable:ae.config.disable,c=0;c<l.length;c++){if(i=l[c],i instanceof Function&&i(r))return o;if(i instanceof Date&&i.getTime()===r.getTime())return o;if("string"==typeof i&&ae.parseDate(i,!0).getTime()===r.getTime())return o;if("object"===("undefined"==typeof i?"undefined":_typeof(i))&&i.from&&i.to&&r>=i.from&&r<=i.to)return o}return!o}function I(e){if(ae.isOpen)switch(e.which){case 13:ae.timeContainer&&ae.timeContainer.contains(e.target)?G():_(e);break;case 27:ae.clear(),ae.redraw(),ae.close();break;case 37:e.target!==ae.input&e.target!==ae.altInput&&b(-1);break;case 38:e.preventDefault(),ae.timeContainer&&ae.timeContainer.contains(e.target)?a(e):(ae.currentYear++,ae.redraw());break;case 39:e.target!==ae.input&e.target!==ae.altInput&&b(1);break;case 40:e.preventDefault(),ae.timeContainer&&ae.timeContainer.contains(e.target)?a(e):(ae.currentYear--,ae.redraw())}}function L(e){if(1===ae.selectedDates.length&&e.target.classList.contains("flatpickr-day")){for(var t=e.target.dateObj,n=ae.parseDate(ae.selectedDates[0],!0),a=Math.min(t.getTime(),ae.selectedDates[0].getTime()),i=Math.max(t.getTime(),ae.selectedDates[0].getTime()),r=!1,o=a;o<i;o+=ae.utils.duration.DAY)if(!T(new Date(o))){r=!0;break}for(var l=ae.days.childNodes[0].dateObj.getTime(),c=0;c<42;c++,l+=ae.utils.duration.DAY){var s=l<ae.minRangeDate.getTime()||l>ae.maxRangeDate.getTime();if(s)ae.days.childNodes[c].classList.add("notAllowed"),ae.days.childNodes[c].classList.remove("inRange","startRange","endRange");else if(!r||s){ae.days.childNodes[c].classList.remove("startRange","inRange","endRange","notAllowed");var d=Math.max(ae.minRangeDate.getTime(),a),u=Math.min(ae.maxRangeDate.getTime(),i);e.target.classList.add(t<ae.selectedDates[0]?"startRange":"endRange"),n>t&&l===n.getTime()?ae.days.childNodes[c].classList.add("endRange"):n<t&&l===n.getTime()?ae.days.childNodes[c].classList.add("startRange"):l>d&&l<u&&ae.days.childNodes[c].classList.add("inRange")}}}}function Y(){!ae.isOpen||ae.config.static||ae.config.inline||j()}function S(e){return ae.isMobile?(e&&(e.preventDefault(),e.target.blur()),setTimeout(function(){ae.mobileInput.click()},0),void q("Open")):void(ae.isOpen||(ae.altInput||ae.input).disabled||ae.config.inline||(ae.calendarContainer.classList.add("open"),ae.config.static||ae.config.inline||j(),ae.isOpen=!0,ae.config.allowInput||((ae.altInput||ae.input).blur(),(ae.config.noCalendar?ae.timeContainer:ae.selectedDateElem?ae.selectedDateElem:ae.days).focus()),(ae.altInput||ae.input).classList.add("active"),q("Open")))}function O(e){return function(t){var n=ae.config["_"+e+"Date"]=ae.parseDate(t),a=ae.config["_"+("min"===e?"max":"min")+"Date"];ae.selectedDates&&(ae.selectedDates=ae.selectedDates.filter(T),G()),ae.days&&H(),ae.currentYearElement&&(t&&n instanceof Date?(ae[e+"DateHasTime"]=n.getHours()||n.getMinutes()||n.getSeconds(),ae.currentYearElement[e]=n.getFullYear()):ae.currentYearElement.removeAttribute(e),ae.currentYearElement.disabled=a&&n&&a.getFullYear()===n.getFullYear())}}function N(){var e=["utc","wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"];ae.config=Object.create(Flatpickr.defaultConfig),Object.defineProperty(ae.config,"minDate",{get:function(){return this._minDate},set:O("min")}),Object.defineProperty(ae.config,"maxDate",{get:function(){return this._maxDate},set:O("max")});var t=_extends({},ae.instanceConfig,JSON.parse(JSON.stringify(ae.element.dataset||{})));_extends(ae.config,t);for(var n=0;n<e.length;n++)ae.config[e[n]]=ae.config[e[n]]===!0||"true"===ae.config[e[n]];!t.dateFormat&&t.enableTime&&(ae.config.dateFormat=ae.config.noCalendar?"H:i"+(ae.config.enableSeconds?":S":""):Flatpickr.defaultConfig.dateFormat+" H:i"+(ae.config.enableSeconds?":S":"")),t.altInput&&t.enableTime&&!t.altFormat&&(ae.config.altFormat=ae.config.noCalendar?"h:i"+(ae.config.enableSeconds?":S K":" K"):Flatpickr.defaultConfig.altFormat+(" h:i"+(ae.config.enableSeconds?":S":"")+" K"))}function F(){"object"!==_typeof(ae.config.locale)&&"undefined"==typeof Flatpickr.l10ns[ae.config.locale]&&console.warn("flatpickr: invalid locale "+ae.config.locale),ae.l10n=_extends(Object.create(Flatpickr.l10ns.default),"object"===_typeof(ae.config.locale)?ae.config.locale:"default"!==ae.config.locale?Flatpickr.l10ns[ae.config.locale]||{}:{})}function j(e){if(!e||e.target===ae.timeContainer){var t=ae.calendarContainer.offsetHeight,n=ae.calendarContainer.offsetWidth,a=ae.altInput||ae.input,i=a.getBoundingClientRect(),r=window.innerHeight-i.bottom+a.offsetHeight,o=void 0;if(r<t+60?(o=window.pageYOffset-t+i.top-2,ae.calendarContainer.classList.remove("arrowTop"),ae.calendarContainer.classList.add("arrowBottom")):(o=window.pageYOffset+a.offsetHeight+i.top+2,ae.calendarContainer.classList.remove("arrowBottom"),ae.calendarContainer.classList.add("arrowTop")),!ae.config.static&&!ae.config.inline){ae.calendarContainer.style.top=o+"px";var l=window.pageXOffset+i.left,c=window.document.body.offsetWidth-i.right;l+n<=window.document.body.offsetWidth?(ae.calendarContainer.style.left=l+"px",ae.calendarContainer.style.right="auto",ae.calendarContainer.classList.remove("rightMost")):(ae.calendarContainer.style.left="auto",ae.calendarContainer.style.right=c+"px",ae.calendarContainer.classList.add("rightMost"))}}}function H(){ae.config.noCalendar||ae.isMobile||(D(),Q(),m())}function _(e){if(e.preventDefault(),ae.config.allowInput&&13===e.which&&e.target===(ae.altInput||ae.input))return ae.setDate((ae.altInput||ae.input).value),e.target.blur();if(e.target.classList.contains("flatpickr-day")&&!e.target.classList.contains("disabled")&&!e.target.classList.contains("notAllowed")){var t=ae.latestSelectedDateObj=new Date(e.target.dateObj.getTime());if(ae.selectedDateElem=e.target,"single"===ae.config.mode)ae.selectedDates=[t];else if("multiple"===ae.config.mode){var n=V(t);n?ae.selectedDates.splice(n,1):ae.selectedDates.push(t)}else"range"===ae.config.mode&&(2===ae.selectedDates.length&&ae.clear(),ae.selectedDates.push(t),ae.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));i(),t.getMonth()!==ae.currentMonth&&"range"!==ae.config.mode&&(ae.currentYear=t.getFullYear(),ae.currentMonth=t.getMonth(),Q()),m(),ae.minDateHasTime&&ae.config.enableTime&&0===te(t,ae.config.minDate)&&r(ae.config.minDate),G(),setTimeout(function(){return ae.dateIsPicked=!0},50),"range"===ae.config.mode&&1===ae.selectedDates.length&&L(e),"single"!==ae.config.mode||ae.config.enableTime||ae.close(),q("Change")}}function P(e,t){ae.config[e]=t,ae.redraw(),s()}function A(e){if(Array.isArray(e))ae.selectedDates=e.map(ae.parseDate);else if(e)switch(ae.config.mode){case"single":ae.selectedDates=[ae.parseDate(e)];break;case"multiple":ae.selectedDates=e.split("; ").map(ae.parseDate);break;case"range":ae.selectedDates=e.split(ae.l10n.rangeSeparator).map(ae.parseDate)}ae.selectedDates=ae.selectedDates.filter(function(e){return e instanceof Date&&e.getTime()&&T(e,!1)}),ae.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function R(e,t){return e?(A(e),ae.selectedDates.length>0?(ae.dateIsPicked=!0,ae.latestSelectedDateObj=ae.selectedDates[0]):ae.latestSelectedDateObj=null,ae.redraw(),s(),r(),G(),void(t===!0&&q("Change"))):ae.clear()}function W(){function e(e){for(var t=e.length;t--;)"string"==typeof e[t]||+e[t]?e[t]=ae.parseDate(e[t],!0):e[t]&&e[t].from&&e[t].to&&(e[t].from=ae.parseDate(e[t].from),e[t].to=ae.parseDate(e[t].to));return e.filter(function(e){return e})}ae.selectedDates=[],ae.now=new Date,A(ae.config.defaultDate||ae.input.value),ae.config.disable.length&&(ae.config.disable=e(ae.config.disable)),ae.config.enable.length&&(ae.config.enable=e(ae.config.enable));var t=ae.selectedDates.length?ae.selectedDates[0]:ae.config.minDate&&ae.config.minDate.getTime()>ae.now?ae.config.minDate:ae.config.maxDate&&ae.config.maxDate.getTime()<ae.now?ae.config.maxDate:ae.now;ae.currentYear=t.getFullYear(),ae.currentMonth=t.getMonth(),ae.selectedDates.length&&(ae.latestSelectedDateObj=ae.selectedDates[0]),ae.minDateHasTime=ae.config.minDate&&(ae.config.minDate.getHours()||ae.config.minDate.getMinutes()||ae.config.minDate.getSeconds()),ae.maxDateHasTime=ae.config.maxDate&&(ae.config.maxDate.getHours()||ae.config.maxDate.getMinutes()||ae.config.maxDate.getSeconds()),Object.defineProperty(ae,"latestSelectedDateObj",{get:function(){return ae._selectedDateObj||ae.selectedDates[ae.selectedDates.length-1]||null},set:function(e){ae._selectedDateObj=e}})}function U(){ae.utils={duration:{DAY:864e5},getDaysinMonth:function(e,t){return e="undefined"==typeof e?ae.currentMonth:e,t="undefined"==typeof t?ae.currentYear:t,1===e&&(t%4===0&&t%100!==0||t%400===0)?29:ae.l10n.daysInMonth[e]},monthToStr:function(e,t){return t="undefined"==typeof t?ae.config.shorthandCurrentMonth:t,ae.l10n.months[(t?"short":"long")+"hand"][e]}}}function B(){ae.formats={D:function(e){return ae.l10n.weekdays.shorthand[ae.formats.w(e)]},F:function(e){return ae.utils.monthToStr(ae.formats.n(e)-1,!1)},H:function(e){return Flatpickr.prototype.pad(e.getHours())},J:function(e){return e.getDate()+ae.l10n.ordinal(e.getDate())},K:function(e){return e.getHours()>11?"PM":"AM"},M:function(e){return ae.utils.monthToStr(e.getMonth(),!0)},S:function(e){return Flatpickr.prototype.pad(e.getSeconds())},U:function(e){return e.getTime()/1e3},Y:function(e){return e.getFullYear()},d:function(e){return Flatpickr.prototype.pad(ae.formats.j(e))},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return Flatpickr.prototype.pad(e.getMinutes())},j:function(e){return e.getDate()},l:function(e){return ae.l10n.weekdays.longhand[ae.formats.w(e)]},m:function(e){return Flatpickr.prototype.pad(ae.formats.n(e))},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(ae.formats.Y(e)).substring(2)}}}function J(){return ae.input=ae.config.wrap?ae.element.querySelector("[data-input]"):ae.element,ae.input?(ae.input._type=ae.input.type,ae.input.type="text",ae.input.classList.add("flatpickr-input"),ae.config.altInput&&(ae.altInput=Z(ae.input.nodeName,ae.input.className+" "+ae.config.altInputClass),ae.altInput.placeholder=ae.input.placeholder,ae.altInput.type="text",ae.input.type="hidden",ae.input.parentNode&&ae.input.parentNode.insertBefore(ae.altInput,ae.input.nextSibling)),void(ae.config.allowInput||(ae.altInput||ae.input).setAttribute("readonly","readonly"))):console.warn("Error: invalid input element specified",ae.input)}function z(){var e=ae.config.enableTime?ae.config.noCalendar?"time":"datetime-local":"date";ae.mobileInput=Z("input",ae.input.className+" flatpickr-mobile"),ae.mobileInput.step="any",ae.mobileInput.tabIndex=1,ae.mobileInput.type=e,ae.mobileInput.disabled=ae.input.disabled,ae.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",ae.selectedDates.length&&(ae.mobileInput.defaultValue=ae.mobileInput.value=E(ae.mobileFormatStr,ae.selectedDates[0])),ae.config.minDate&&(ae.mobileInput.min=E("Y-m-d",ae.config.minDate)),ae.config.maxDate&&(ae.mobileInput.max=E("Y-m-d",ae.config.maxDate)),ae.input.type="hidden",ae.config.altInput&&(ae.altInput.type="hidden");try{ae.input.parentNode.insertBefore(ae.mobileInput,ae.input.nextSibling)}catch(e){}ae.mobileInput.addEventListener("change",function(e){ae.latestSelectedDateObj=ae.parseDate(e.target.value),ae.setDate(ae.latestSelectedDateObj),q("Change"),q("Close")})}function K(){ae.isOpen?ae.close():ae.open()}function q(e,t){if(ae.config["on"+e])for(var n=Array.isArray(ae.config["on"+e])?ae.config["on"+e]:[ae.config["on"+e]],a=0;a<n.length;a++)n[a](ae.selectedDates,ae.input.value,ae,t);if("Change"===e)if("function"==typeof Event&&Event.constructor)ae.input.dispatchEvent(new Event("change",{bubbles:!0})),ae.input.dispatchEvent(new Event("input",{bubbles:!0}));else{if(void 0!==window.document.createEvent)return ae.input.dispatchEvent(ae.changeEvent);ae.input.fireEvent("onchange")}}function V(e){for(var t=0;t<ae.selectedDates.length;t++)if(0===te(ae.selectedDates[t],e))return""+t;return!1}function $(e){return!("range"!==ae.config.mode||ae.selectedDates.length<2)&&(te(e,ae.selectedDates[0])>=0&&te(e,ae.selectedDates[1])<=0)}function Q(){if(!ae.config.noCalendar&&!ae.isMobile&&ae.monthNav){if(ae.currentMonthElement.textContent=ae.utils.monthToStr(ae.currentMonth)+" ",ae.currentYearElement.value=ae.currentYear,ae.config.minDate){var e=ae.currentYear===ae.config.minDate.getFullYear()?ae.currentMonth<=ae.config.minDate.getMonth():ae.currentYear<ae.config.minDate.getFullYear();ae.prevMonthNav.style.display=e?"none":"block"}else ae.prevMonthNav.style.display="block";if(ae.config.maxDate){var t=ae.currentYear===ae.config.maxDate.getFullYear()?ae.currentMonth+1>ae.config.maxDate.getMonth():ae.currentYear>ae.config.maxDate.getFullYear();ae.nextMonthNav.style.display=t?"none":"block"}else ae.nextMonthNav.style.display="block"}}function G(){if(!ae.selectedDates.length)return ae.clear();ae.isMobile&&(ae.mobileInput.value=ae.selectedDates.length?E(ae.mobileFormatStr,ae.latestSelectedDateObj):"");var e="range"!==ae.config.mode?"; ":ae.l10n.rangeSeparator;ae.input.value=ae.selectedDates.map(function(e){return E(ae.config.dateFormat,e)}).join(e),ae.config.altInput&&(ae.altInput.value=ae.selectedDates.map(function(e){return E(ae.config.altFormat,e)}).join(e)),q("ValueUpdate")}function X(e){e.preventDefault();var t=Math.max(-1,Math.min(1,e.wheelDelta||-e.deltaY)),n=parseInt(e.target.value,10)+t;x(n),e.target.value=ae.currentYear}function Z(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,n&&(a.textContent=n),a}function ee(e,t,n){var a=void 0;return function(){for(var i=arguments.length,r=Array(i),o=0;o<i;o++)r[o]=arguments[o];var l=this,c=function(){a=null,n||e.apply(l,r)};clearTimeout(a),a=setTimeout(c,t),n&&!a&&e.apply(l,r)}}function te(e,t,n){return e instanceof Date&&t instanceof Date&&(n!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime())}function ne(e){if(e.preventDefault(),e&&((e.target.value||e.target.textContent).length>=2||"keydown"!==e.type&&"input"!==e.type)&&e.target.blur(),ae.amPM&&e.target===ae.amPM)return e.target.textContent=["AM","PM"]["AM"===e.target.textContent|0];var t=Number(e.target.min),n=Number(e.target.max),a=Number(e.target.step),i=parseInt(e.target.value,10),r=Math.max(-1,Math.min(1,e.wheelDelta||-e.deltaY)),o=Number(i);switch(e.type){case"wheel":o=i+a*r;break;case"keydown":o=i+a*(38===e.which?1:-1)}"input"!==e.type||2===e.target.value.length?(o<t?o=n+o+(e.target!==ae.hourElement)+(e.target===ae.hourElement&&!ae.amPM):o>n&&(o=e.target===ae.hourElement?o-n-!ae.amPM:t),ae.amPM&&e.target===ae.hourElement&&(1===a?o+i===23:Math.abs(o-i)>a)&&(ae.amPM.textContent="PM"===ae.amPM.textContent?"AM":"PM"),e.target.value=ae.pad(o)):e.target.value=o}var ae=this;return n(),ae}function _flatpickr(e,t){for(var n=Array.prototype.slice.call(e),a=[],i=0;i<n.length;i++)try{n[i]._flatpickr=new Flatpickr(n[i],t||{}),a.push(n[i]._flatpickr)}catch(e){console.warn(e,e.stack)}return 1===a.length?a[0]:a}function flatpickr(e,t){return _flatpickr(window.document.querySelectorAll(e),t)}var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Flatpickr.defaultConfig={mode:"single",utc:!1,wrap:!1,weekNumbers:!1,allowInput:!1,clickOpens:!0,time_24hr:!1,enableTime:!1,noCalendar:!1,dateFormat:"Y-m-d",altInput:!1,altInputClass:"flatpickr-input form-control input",altFormat:"F j, Y",defaultDate:null,minDate:null,maxDate:null,parseDate:null,formatDate:null,getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},enable:[],disable:[],shorthandCurrentMonth:!1,inline:!1,static:!1,appendTo:null,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",enableSeconds:!1,hourIncrement:1,minuteIncrement:5,defaultHour:12,defaultMinute:0,disableMobile:!1,locale:"default",onChange:null,onOpen:null,onClose:null,onReady:null,onValueUpdate:null,onDayCreate:null},Flatpickr.l10ns={en:{weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],
3
+ longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle"}},Flatpickr.l10ns.default=Object.create(Flatpickr.l10ns.en),Flatpickr.localize=function(e){return _extends(Flatpickr.l10ns.default,e||{})},Flatpickr.setDefaults=function(e){return _extends(Flatpickr.defaultConfig,e||{})},Flatpickr.prototype={pad:function(e){return("0"+e).slice(-2)},parseDate:function(e,t){if(!e)return null;var n=/(\d+)/g,a=/^(\d{1,2})[:\s](\d\d)?[:\s]?(\d\d)?\s?(a|p)?/i,i=/^(\d+)$/g,r=e;if(e.toFixed||i.test(e))e=new Date(e);else if("string"==typeof e)if(e=e.trim(),"today"===e)e=new Date,t=!0;else if(this.config&&this.config.parseDate)e=this.config.parseDate(e);else if(a.test(e)){var o=e.match(a),l=o[4]?o[1]%12+("p"===o[4].toLowerCase()?12:0):o[1];e=new Date,e.setHours(l,o[2]||0,o[3]||0)}else if(/Z$/.test(e)||/GMT$/.test(e))e=new Date(e);else if(n.test(e)&&/^[0-9]/.test(e)){var c=e.match(n);e=new Date(c[0]+"/"+(c[1]||1)+"/"+(c[2]||1)+" "+(c[3]||0)+":"+(c[4]||0)+":"+(c[5]||0))}else e=new Date(e);else e instanceof Date&&(e=new Date(e.getTime()));return e instanceof Date?(this.config&&this.config.utc&&!e.fp_isUTC&&(e=e.fp_toUTC()),t===!0&&e.setHours(0,0,0,0),e):(console.warn("flatpickr: invalid date "+r),console.info(this.element),null)}},"undefined"!=typeof HTMLElement&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return _flatpickr(this,e)},HTMLElement.prototype.flatpickr=function(e){return _flatpickr([this],e)}),"undefined"!=typeof jQuery&&(jQuery.fn.flatpickr=function(e){return _flatpickr(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+parseInt(e,10))},Date.prototype.fp_isUTC=!1,Date.prototype.fp_toUTC=function(){var e=new Date(this.getUTCFullYear(),this.getUTCMonth(),this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds());return e.fp_isUTC=!0,e},!window.document.documentElement.classList&&Object.defineProperty&&"undefined"!=typeof HTMLElement&&Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){function e(e){return function(n){var a=t.className.split(/\s+/),i=a.indexOf(n);e(a,i,n),t.className=a.join(" ")}}var t=this,n={add:e(function(e,t,n){~t||e.push(n)}),remove:e(function(e,t){~t&&e.splice(t,1)}),toggle:e(function(e,t,n){~t?e.splice(t,1):e.push(n)}),contains:function(e){return!!~t.className.split(/\s+/).indexOf(e)},item:function(e){return t.className.split(/\s+/)[e]||null}};return Object.defineProperty(n,"length",{get:function(){return t.className.split(/\s+/).length}}),n}}),"undefined"!=typeof module&&(module.exports=Flatpickr);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/wpforms.js CHANGED
@@ -96,7 +96,7 @@
96
 
97
  // Validate email addresses
98
  $.validator.methods.email = function( value, element ) {
99
- return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}$/.test( value );
100
  }
101
 
102
  // Validate confirmations
@@ -179,14 +179,19 @@
179
  $('.wpforms-datepicker').each(function() {
180
  var element = $(this),
181
  form = element.closest('.wpforms-form'),
182
- formID = form.data('formid');
 
183
 
184
- if (typeof window['wpforms_'+formID] != "undefined" && window['wpforms_'+formID].hasOwnProperty('datepicker') ) {
 
 
185
  properties = window['wpforms_'+formID].datepicker;
186
- } else if ( typeof wpforms_datepicker != "undefined") {
187
  properties = wpforms_datepicker;
188
  } else {
189
- properties = {}
 
 
190
  }
191
  element.flatpickr(properties)
192
  });
@@ -205,9 +210,12 @@
205
  $('.wpforms-timepicker').each(function() {
206
  var element = $(this),
207
  form = element.closest('.wpforms-form'),
208
- formID = form.data('formid');
 
209
 
210
- if (typeof window['wpforms_'+formID] != "undefined" && window['wpforms_'+formID].hasOwnProperty('timepicker') ) {
 
 
211
  properties = window['wpforms_'+formID].timepicker;
212
  } else if ( typeof wpforms_timepicker != "undefined") {
213
  properties = wpforms_timepicker;
@@ -355,6 +363,7 @@
355
  $('html, body').animate({
356
  scrollTop: $form.offset().top-75
357
  }, 1000);
 
358
  }
359
  } else if ( action == 'prev' ) {
360
  // Move to prev page
@@ -367,6 +376,7 @@
367
  $('html, body').animate({
368
  scrollTop: $form.offset().top-75
369
  }, 1000);
 
370
  }
371
 
372
  if ( $indicator ) {
96
 
97
  // Validate email addresses
98
  $.validator.methods.email = function( value, element ) {
99
+ return this.optional( element ) || /^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}$/i.test( value );
100
  }
101
 
102
  // Validate confirmations
179
  $('.wpforms-datepicker').each(function() {
180
  var element = $(this),
181
  form = element.closest('.wpforms-form'),
182
+ formID = form.data('formid'),
183
+ fieldID = element.closest('.wpforms-field').data('field-id');
184
 
185
+ if (typeof window['wpforms_'+formID+'_'+fieldID] != 'undefined' && window['wpforms_'+formID+'_'+fieldID].hasOwnProperty('datepicker')) {
186
+ properties = window['wpforms_'+formID+'_'+fieldID].datepicker;
187
+ } else if (typeof window['wpforms_'+formID] != 'undefined' && window['wpforms_'+formID].hasOwnProperty('datepicker')) {
188
  properties = window['wpforms_'+formID].datepicker;
189
+ } else if (typeof wpforms_datepicker != 'undefined') {
190
  properties = wpforms_datepicker;
191
  } else {
192
+ properties = {
193
+ disableMobile: true
194
+ }
195
  }
196
  element.flatpickr(properties)
197
  });
210
  $('.wpforms-timepicker').each(function() {
211
  var element = $(this),
212
  form = element.closest('.wpforms-form'),
213
+ formID = form.data('formid'),
214
+ fieldID = element.closest('.wpforms-field').data('field-id');
215
 
216
+ if (typeof window['wpforms_'+formID+'_'+fieldID] != 'undefined' && window['wpforms_'+formID+'_'+fieldID].hasOwnProperty('timepicker')) {
217
+ properties = window['wpforms_'+formID+'_'+fieldID].timepicker;
218
+ } else if (typeof window['wpforms_'+formID] != "undefined" && window['wpforms_'+formID].hasOwnProperty('timepicker') ) {
219
  properties = window['wpforms_'+formID].timepicker;
220
  } else if ( typeof wpforms_timepicker != "undefined") {
221
  properties = wpforms_timepicker;
363
  $('html, body').animate({
364
  scrollTop: $form.offset().top-75
365
  }, 1000);
366
+ $this.trigger('wpformsPageChange', [ page2, $form ] );
367
  }
368
  } else if ( action == 'prev' ) {
369
  // Move to prev page
376
  $('html, body').animate({
377
  scrollTop: $form.offset().top-75
378
  }, 1000);
379
+ $this.trigger('wpformsPageChange', [ page2, $form ] );
380
  }
381
 
382
  if ( $indicator ) {
includes/admin/class-menu.php CHANGED
@@ -20,9 +20,6 @@ class WPForms_Admin_Menu {
20
  // Let's make some menus
21
  add_action( 'admin_menu', array( $this, 'register_menus' ), 9 );
22
  add_action( 'admin_enqueue_scripts', array( $this, 'menu_icon' ) );
23
-
24
- // Footer text
25
- add_filter( 'admin_footer_text', array( $this, 'admin_footer' ), 1, 2 );
26
  }
27
 
28
  /**
@@ -117,23 +114,5 @@ class WPForms_Admin_Menu {
117
  WPFORMS_VERSION
118
  );
119
  }
120
-
121
- /**
122
- * When user is on a WPForms related admin page, display footer text
123
- * that graciously asks them to rate us.
124
- *
125
- * @since 1.2.1
126
- * @param string $text
127
- * @return string
128
- */
129
- public function admin_footer( $text ) {
130
-
131
- global $current_screen;
132
- if ( !empty( $current_screen->id ) && strpos( $current_screen->id, 'wpforms' ) !== false ) {
133
- $url = 'http://wordpress.org/support/view/plugin-reviews/wpforms-lite?filter=5';
134
- $text = sprintf( __( 'Please rate <strong>WPForms</strong> <a href="%s" target="_blank" rel="noopener">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href="%s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the WPForms team!', 'wpforms' ), $url, $url );
135
- }
136
- return $text;
137
- }
138
  }
139
  $wpforms_admin_menu = new WPForms_Admin_Menu;
20
  // Let's make some menus
21
  add_action( 'admin_menu', array( $this, 'register_menus' ), 9 );
22
  add_action( 'admin_enqueue_scripts', array( $this, 'menu_icon' ) );
 
 
 
23
  }
24
 
25
  /**
114
  WPFORMS_VERSION
115
  );
116
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  }
118
  $wpforms_admin_menu = new WPForms_Admin_Menu;
includes/class-form.php CHANGED
@@ -70,7 +70,7 @@ class WPForms_Form_Handler {
70
  'href' => admin_url( 'admin.php?page=wpforms-builder' ),
71
  'parent' => 'new-content',
72
  );
73
- $wp_admin_bar->add_node( $args );
74
  }
75
 
76
  /**
@@ -89,28 +89,31 @@ class WPForms_Form_Handler {
89
  }
90
 
91
  if ( !empty( $id ) ) {
 
92
  // @todo add $id array support
93
  // If ID is provided, we get a single form
94
  $forms = get_post( absint( $id ) );
95
 
96
- if ( !empty( $args['content_only'] ) && !empty( $forms ) ) {
97
  $forms = wpforms_decode( $forms->post_content );
98
  }
99
 
100
  } else {
 
101
  // No ID provided, get multiple forms
102
- $forms = get_posts(
103
- wp_parse_args(
104
- $args,
105
- array(
106
- 'post_type' => 'wpforms',
107
- 'orderby' => 'id',
108
- 'order' => 'ASC', // old->new
109
- 'no_found_rows' => true,
110
- 'nopaging' => true,
111
- // 'cache_results' => false,
112
- ))
113
  );
 
 
 
 
 
 
114
  }
115
 
116
  if ( empty( $forms ) ) {
@@ -190,7 +193,7 @@ class WPForms_Form_Handler {
190
  'post_title' => esc_html( $title ),
191
  'post_status' => 'publish',
192
  'post_type' => 'wpforms',
193
- 'post_content' => wp_slash( json_encode( $form_content ) ),
194
  )
195
  );
196
  $form_id = wp_insert_post( $form );
@@ -267,7 +270,7 @@ class WPForms_Form_Handler {
267
  'ID' => $form_id,
268
  'post_title' => esc_html( $title ),
269
  'post_excerpt' => $desc,
270
- 'post_content' => wp_slash( json_encode( $data ) ),
271
  );
272
  $form = apply_filters( 'wpforms_save_form_args', $form, $data, $args );
273
  $form_id = wp_update_post( $form );
@@ -315,7 +318,7 @@ class WPForms_Form_Handler {
315
  // Create the duplicate form
316
  $new_form = array(
317
  'post_author' => $form->post_author,
318
- 'post_content' => wp_slash( json_encode( $new_form_data ) ),
319
  'post_excerpt' => $form->post_excerpt,
320
  'post_status' => $form->post_status,
321
  'post_title' => $new_form_data['settings']['form_title'],
@@ -329,7 +332,7 @@ class WPForms_Form_Handler {
329
 
330
  // Set new form title
331
  $new_form_data['settings']['form_title'] .= ' (ID #' . absint( $new_form_id ) . ')';
332
-
333
  // Set new form ID
334
  $new_form_data['id'] = absint( $new_form_id );
335
 
@@ -427,4 +430,4 @@ class WPForms_Form_Handler {
427
 
428
  return isset( $field['meta'] ) ? $field['meta'] : false;
429
  }
430
- }
70
  'href' => admin_url( 'admin.php?page=wpforms-builder' ),
71
  'parent' => 'new-content',
72
  );
73
+ $wp_admin_bar->add_node( $args );
74
  }
75
 
76
  /**
89
  }
90
 
91
  if ( !empty( $id ) ) {
92
+
93
  // @todo add $id array support
94
  // If ID is provided, we get a single form
95
  $forms = get_post( absint( $id ) );
96
 
97
+ if ( !empty( $args['content_only'] ) && !empty( $forms ) && 'wpforms' == $forms->post_type ) {
98
  $forms = wpforms_decode( $forms->post_content );
99
  }
100
 
101
  } else {
102
+
103
  // No ID provided, get multiple forms
104
+ $defaults = array(
105
+ 'post_type' => 'wpforms',
106
+ 'orderby' => 'id',
107
+ 'order' => 'ASC',
108
+ 'no_found_rows' => true,
109
+ 'nopaging' => true,
 
 
 
 
 
110
  );
111
+
112
+ $args = wp_parse_args( $args, $defaults );
113
+
114
+ $args['post_type'] = 'wpforms';
115
+
116
+ $forms = get_posts( $args );
117
  }
118
 
119
  if ( empty( $forms ) ) {
193
  'post_title' => esc_html( $title ),
194
  'post_status' => 'publish',
195
  'post_type' => 'wpforms',
196
+ 'post_content' => wpforms_encode( $form_content ),
197
  )
198
  );
199
  $form_id = wp_insert_post( $form );
270
  'ID' => $form_id,
271
  'post_title' => esc_html( $title ),
272
  'post_excerpt' => $desc,
273
+ 'post_content' => wpforms_encode( $data ),
274
  );
275
  $form = apply_filters( 'wpforms_save_form_args', $form, $data, $args );
276
  $form_id = wp_update_post( $form );
318
  // Create the duplicate form
319
  $new_form = array(
320
  'post_author' => $form->post_author,
321
+ 'post_content' => wpforms_encode( $new_form_data ),
322
  'post_excerpt' => $form->post_excerpt,
323
  'post_status' => $form->post_status,
324
  'post_title' => $new_form_data['settings']['form_title'],
332
 
333
  // Set new form title
334
  $new_form_data['settings']['form_title'] .= ' (ID #' . absint( $new_form_id ) . ')';
335
+
336
  // Set new form ID
337
  $new_form_data['id'] = absint( $new_form_id );
338
 
430
 
431
  return isset( $field['meta'] ) ? $field['meta'] : false;
432
  }
433
+ }
includes/class-frontend.php CHANGED
@@ -413,7 +413,7 @@ class WPForms_Frontend {
413
 
414
  $field_atts = apply_filters( 'wpforms_field_atts', $field_atts, $field, $form_data );
415
 
416
- echo '<div class="' . implode( ' ', $field_atts['field_class'] ) . '" id="' . implode( ' ', $field_atts['field_id'] ) . '" style="' . esc_html( $field_atts['field_style'] ) . '">';
417
 
418
  // Display label if we have one
419
  if ( !empty( $field['label'] ) ) {
@@ -631,6 +631,8 @@ class WPForms_Frontend {
631
 
632
  echo '<input type="hidden" name="wpforms[id]" value="' . $form->ID . '">';
633
 
 
 
634
  printf(
635
  '<button type="submit" name="wpforms[submit]" class="wpforms-submit %s" id="wpforms-submit-%d" value="wpforms-submit" %s>%s</button>',
636
  implode( ' ', $submit_classes ),
@@ -698,7 +700,7 @@ class WPForms_Frontend {
698
  'wpforms-flatpickr',
699
  WPFORMS_PLUGIN_URL . 'assets/css/flatpickr.min.css',
700
  array(),
701
- '2.0.5'
702
  );
703
  endif;
704
 
413
 
414
  $field_atts = apply_filters( 'wpforms_field_atts', $field_atts, $field, $form_data );
415
 
416
+ echo '<div class="' . implode( ' ', $field_atts['field_class'] ) . '" id="' . implode( ' ', $field_atts['field_id'] ) . '" data-field-id="' .absint( $field['id'] ) . '" style="' . esc_html( $field_atts['field_style'] ) . '">';
417
 
418
  // Display label if we have one
419
  if ( !empty( $field['label'] ) ) {
631
 
632
  echo '<input type="hidden" name="wpforms[id]" value="' . $form->ID . '">';
633
 
634
+ echo '<input type="hidden" name="wpforms[author]" value="' . absint( get_the_author_meta( 'ID' ) ) . '">';
635
+
636
  printf(
637
  '<button type="submit" name="wpforms[submit]" class="wpforms-submit %s" id="wpforms-submit-%d" value="wpforms-submit" %s>%s</button>',
638
  implode( ' ', $submit_classes ),
700
  'wpforms-flatpickr',
701
  WPFORMS_PLUGIN_URL . 'assets/css/flatpickr.min.css',
702
  array(),
703
+ '2.3.4'
704
  );
705
  endif;
706
 
includes/class-smart-tags.php CHANGED
@@ -161,18 +161,29 @@ class WPForms_Smart_Tags {
161
  break;
162
 
163
  case 'author_id':
164
- $id = get_the_author_meta( 'ID' );
 
 
 
 
165
  $content = str_replace( '{'.$tag.'}', $id, $content );
166
  break;
167
 
168
  case 'author_display':
169
- $name = get_the_author();
 
 
 
170
  $name = !empty( $name ) ? sanitize_text_field( $name ) : '';
171
  $content = str_replace( '{'.$tag.'}', $name, $content );
172
  break;
173
 
174
  case 'author_email':
175
- $email = sanitize_email( get_the_author_meta( 'user_email' ) );
 
 
 
 
176
  $content = str_replace( '{'.$tag.'}', $email, $content );
177
  break;
178
 
161
  break;
162
 
163
  case 'author_id':
164
+ $id = get_the_author_meta( 'ID' );
165
+ if ( empty( $id ) && !empty( $_POST['wpforms']['author'] ) ) {
166
+ $id = get_the_author_meta( 'ID', absint( $_POST['wpforms']['author'] ) );
167
+ }
168
+ $id = absint( $id );
169
  $content = str_replace( '{'.$tag.'}', $id, $content );
170
  break;
171
 
172
  case 'author_display':
173
+ $name = get_the_author();
174
+ if ( empty( $name ) && !empty( $_POST['wpforms']['author'] ) ) {
175
+ $name = get_the_author_meta( 'display_name', absint( $_POST['wpforms']['author'] ) );
176
+ }
177
  $name = !empty( $name ) ? sanitize_text_field( $name ) : '';
178
  $content = str_replace( '{'.$tag.'}', $name, $content );
179
  break;
180
 
181
  case 'author_email':
182
+ $email = get_the_author_meta( 'user_email' );
183
+ if ( empty( $email ) && !empty( $_POST['wpforms']['author'] ) ) {
184
+ $email = get_the_author_meta( 'user_email', absint( $_POST['wpforms']['author'] ) );
185
+ }
186
+ $email = sanitize_email( $email );
187
  $content = str_replace( '{'.$tag.'}', $email, $content );
188
  break;
189
 
includes/functions.php CHANGED
@@ -39,6 +39,21 @@ function wpforms_decode( $data ) {
39
  return wp_unslash( json_decode( $data, true ) );
40
  }
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  /**
43
  * Check if a string is a valid URL.
44
  *
@@ -965,4 +980,4 @@ if ( ! function_exists( 'array_replace_recursive' ) ) :
965
  }
966
  return $base;
967
  }
968
- endif;
39
  return wp_unslash( json_decode( $data, true ) );
40
  }
41
 
42
+ /**
43
+ * Performs json_encode and wp_slash.
44
+ *
45
+ * @since 1.3.1.3
46
+ * @param array $data
47
+ * @return string
48
+ */
49
+ function wpforms_encode( $data = false ) {
50
+
51
+ if( empty( $data ) )
52
+ return false;
53
+
54
+ return wp_slash( json_encode( $data ) );
55
+ }
56
+
57
  /**
58
  * Check if a string is a valid URL.
59
  *
980
  }
981
  return $base;
982
  }
983
+ endif;
includes/templates/class-base.php CHANGED
@@ -130,7 +130,7 @@ abstract class WPForms_Template {
130
 
131
  if ( !empty( $data ) && !empty( $data['template'] ) ) {
132
  if ( $data['template'] == $this->slug ) {
133
- $args['post_content'] = wp_slash( json_encode( $this->data ) );
134
  }
135
  }
136
  return $args;
@@ -151,7 +151,7 @@ abstract class WPForms_Template {
151
  if ( $args['template'] == $this->slug ) {
152
  $new = $this->data;
153
  $new['settings'] = !empty( $form['post_content']['settings'] ) ? $form['post_content']['settings'] : array();
154
- $form['post_content'] = wp_slash( json_encode( $new ) );
155
  }
156
  }
157
  return $form;
@@ -187,7 +187,7 @@ abstract class WPForms_Template {
187
  'modal' => $this->modal,
188
  'modal_display' => $display,
189
  );
190
-
191
  return $template;
192
  }
193
 
@@ -203,4 +203,4 @@ abstract class WPForms_Template {
203
 
204
  return false;
205
  }
206
- }
130
 
131
  if ( !empty( $data ) && !empty( $data['template'] ) ) {
132
  if ( $data['template'] == $this->slug ) {
133
+ $args['post_content'] = wpforms_encode( $this->data );
134
  }
135
  }
136
  return $args;
151
  if ( $args['template'] == $this->slug ) {
152
  $new = $this->data;
153
  $new['settings'] = !empty( $form['post_content']['settings'] ) ? $form['post_content']['settings'] : array();
154
+ $form['post_content'] = wpforms_encode( $new );
155
  }
156
  }
157
  return $form;
187
  'modal' => $this->modal,
188
  'modal_display' => $display,
189
  );
190
+
191
  return $template;
192
  }
193
 
203
 
204
  return false;
205
  }
206
+ }
languages/wpforms.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2016 WPForms
2
  # This file is distributed under the same license as the WPForms package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WPForms 1.3.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wpforms\n"
7
- "POT-Creation-Date: 2016-12-07 22:26:51+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
@@ -212,12 +212,12 @@ msgstr ""
212
 
213
  #: includes/admin/builder/class-builder.php:301
214
  #: includes/fields/class-base.php:239 includes/fields/class-base.php:570
215
- #: lite/wpforms-lite.php:77 pro/wpforms-pro.php:260
216
  msgid "Off"
217
  msgstr ""
218
 
219
  #: includes/admin/builder/class-builder.php:302
220
- #: includes/fields/class-base.php:239 lite/wpforms-lite.php:76
221
  #: pro/wpforms-pro.php:259
222
  msgid "On"
223
  msgstr ""
@@ -344,7 +344,7 @@ msgid "Click to edit. Drag to reorder."
344
  msgstr ""
345
 
346
  #: includes/admin/builder/panels/class-settings.php:21
347
- #: includes/admin/class-menu.php:84 lite/includes/admin/class-settings.php:398
348
  #: pro/includes/admin/class-settings.php:706
349
  msgid "Settings"
350
  msgstr ""
@@ -356,8 +356,8 @@ msgstr ""
356
  msgid "General"
357
  msgstr ""
358
 
359
- #: includes/admin/builder/panels/class-settings.php:58 lite/wpforms-lite.php:62
360
- #: lite/wpforms-lite.php:72 pro/wpforms-pro.php:246 pro/wpforms-pro.php:255
361
  msgid "Notifications"
362
  msgstr ""
363
 
@@ -432,7 +432,7 @@ msgstr ""
432
 
433
  #: includes/admin/builder/panels/class-settings.php:187
434
  #: includes/templates/class-suggestion.php:74 lite/wpforms-lite.php:191
435
- #: pro/wpforms-pro.php:380
436
  msgid "Message"
437
  msgstr ""
438
 
@@ -529,59 +529,51 @@ msgid ""
529
  "a>?"
530
  msgstr ""
531
 
532
- #. #-#-#-#-# wpforms.pot (WPForms 1.3.1) #-#-#-#-#
533
  #. Plugin Name of the plugin/theme
534
- #. #-#-#-#-# wpforms.pot (WPForms 1.3.1) #-#-#-#-#
535
  #. Author of the plugin/theme
536
- #: includes/admin/class-menu.php:39 includes/admin/class-menu.php:40
537
- #: includes/admin/class-menu.php:51 includes/integrations.php:34
538
  msgid "WPForms"
539
  msgstr ""
540
 
541
- #: includes/admin/class-menu.php:52
542
  msgid "All Forms"
543
  msgstr ""
544
 
545
- #: includes/admin/class-menu.php:61
546
  msgid "WPForms Builder"
547
  msgstr ""
548
 
549
- #: includes/admin/class-menu.php:62
550
  #: includes/admin/overview/class-overview.php:148
551
  #: pro/includes/class-provider.php:1084
552
  msgid "Add New"
553
  msgstr ""
554
 
555
- #: includes/admin/class-menu.php:71
556
  msgid "Form Entries"
557
  msgstr ""
558
 
559
- #: includes/admin/class-menu.php:72
560
  #: includes/admin/overview/class-overview-table.php:152
561
  #: pro/includes/admin/entries/class-entries.php:410 pro/wpforms-pro.php:199
562
  msgid "Entries"
563
  msgstr ""
564
 
565
- #: includes/admin/class-menu.php:83
566
  msgid "WPForms Settings"
567
  msgstr ""
568
 
569
- #: includes/admin/class-menu.php:93
570
  msgid "WPForms Addons"
571
  msgstr ""
572
 
573
- #: includes/admin/class-menu.php:94
574
  msgid "Addons"
575
  msgstr ""
576
 
577
- #: includes/admin/class-menu.php:134
578
- msgid ""
579
- "Please rate <strong>WPForms</strong> <a href=\"%s\" target=\"_blank\" rel="
580
- "\"noopener\">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href=\"%s\" "
581
- "target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you "
582
- "from the WPForms team!"
583
- msgstr ""
584
-
585
  #: includes/admin/class-welcome.php:40 includes/admin/class-welcome.php:41
586
  msgid "Getting started with WPForms"
587
  msgstr ""
@@ -813,7 +805,7 @@ msgstr ""
813
  msgid "WPForms honeypot field triggered."
814
  msgstr ""
815
 
816
- #: includes/class-process.php:339 lite/wpforms-lite.php:54
817
  #: pro/wpforms-pro.php:239
818
  msgid "New %s Entry"
819
  msgstr ""
@@ -1429,6 +1421,42 @@ msgstr ""
1429
  msgid "Subject"
1430
  msgstr ""
1431
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1432
  #: lite/includes/admin/class-settings.php:132
1433
  #: pro/includes/admin/class-settings.php:136
1434
  msgid "Are you sure you want to disconnect this account?"
@@ -1556,7 +1584,7 @@ msgstr ""
1556
  #: lite/includes/admin/class-settings.php:287
1557
  #: pro/includes/admin/class-settings.php:352
1558
  msgid ""
1559
- "Check this is you would like to enable the ability to CC: email addresses in "
1560
  "the form notification settings."
1561
  msgstr ""
1562
 
@@ -1600,45 +1628,45 @@ msgstr ""
1600
  msgid "M j, Y @ g:ia"
1601
  msgstr ""
1602
 
1603
- #: lite/wpforms-lite.php:85 pro/wpforms-pro.php:267
1604
  msgid "Default Notification"
1605
  msgstr ""
1606
 
1607
- #: lite/wpforms-lite.php:93 pro/wpforms-pro.php:282
1608
  msgid "Send To Email Address"
1609
  msgstr ""
1610
 
1611
- #: lite/wpforms-lite.php:96 pro/wpforms-pro.php:285
1612
  msgid ""
1613
  "Enter the email address to receive form entry notifications. For multiple "
1614
  "notifications, separate email addresses with a comma."
1615
  msgstr ""
1616
 
1617
- #: lite/wpforms-lite.php:112 pro/wpforms-pro.php:301
1618
  msgid "CC"
1619
  msgstr ""
1620
 
1621
- #: lite/wpforms-lite.php:128 pro/wpforms-pro.php:317
1622
  msgid "Email Subject"
1623
  msgstr ""
1624
 
1625
- #: lite/wpforms-lite.php:130 pro/wpforms-pro.php:319
1626
  msgid "New Entry: "
1627
  msgstr ""
1628
 
1629
- #: lite/wpforms-lite.php:144 pro/wpforms-pro.php:333
1630
  msgid "From Name"
1631
  msgstr ""
1632
 
1633
- #: lite/wpforms-lite.php:160 pro/wpforms-pro.php:349
1634
  msgid "From Email"
1635
  msgstr ""
1636
 
1637
- #: lite/wpforms-lite.php:176 pro/wpforms-pro.php:365
1638
  msgid "Reply-To"
1639
  msgstr ""
1640
 
1641
- #: lite/wpforms-lite.php:201 pro/wpforms-pro.php:390
1642
  msgid ""
1643
  "To display all form fields, use the <code>{all_fields}</code> Smart Tag."
1644
  msgstr ""
@@ -1772,17 +1800,17 @@ msgid ""
1772
  msgstr ""
1773
 
1774
  #: pro/includes/admin/class-addons.php:85
1775
- #: pro/includes/admin/class-addons.php:242
1776
  msgid "Install Addon"
1777
  msgstr ""
1778
 
1779
  #: pro/includes/admin/class-addons.php:86
1780
- #: pro/includes/admin/class-addons.php:238
1781
  msgid "Deactivate"
1782
  msgstr ""
1783
 
1784
  #: pro/includes/admin/class-addons.php:87
1785
- #: pro/includes/admin/class-addons.php:240
1786
  msgid "Activate"
1787
  msgstr ""
1788
 
@@ -1818,33 +1846,23 @@ msgstr ""
1818
  msgid "Addons have successfully been refreshed."
1819
  msgstr ""
1820
 
1821
- #: pro/includes/admin/class-addons.php:144
1822
- msgid "No Addons Available for WPForms Basic License"
1823
- msgstr ""
1824
-
1825
- #: pro/includes/admin/class-addons.php:145
1826
- msgid ""
1827
- "WPForms Basic license does not come with premium extensions at this point. "
1828
- "Please upgrade your account to unlock the features below."
1829
- msgstr ""
1830
-
1831
- #: pro/includes/admin/class-addons.php:183
1832
  msgid "Unlock More Features..."
1833
  msgstr ""
1834
 
1835
- #: pro/includes/admin/class-addons.php:184
1836
  msgid ""
1837
  "Want to get even more features? Upgrade your WPForms account and unlock the "
1838
  "following extensions."
1839
  msgstr ""
1840
 
1841
- #: pro/includes/admin/class-addons.php:244
1842
  msgid "Upgrade Now"
1843
  msgstr ""
1844
 
1845
  #: pro/includes/admin/class-license.php:93
1846
- #: pro/includes/admin/class-license.php:163
1847
- #: pro/includes/admin/class-license.php:236
1848
  msgid ""
1849
  "There was an error connecting to the remote key API. Please try again later."
1850
  msgstr ""
@@ -1853,40 +1871,47 @@ msgstr ""
1853
  msgid "Congratulations! This site is now receiving automatic updates."
1854
  msgstr ""
1855
 
1856
- #: pro/includes/admin/class-license.php:205
1857
  msgid "Your key has been refreshed successfully."
1858
  msgstr ""
1859
 
1860
- #: pro/includes/admin/class-license.php:247
1861
  msgid "You have deactivated the key from this site successfully."
1862
  msgstr ""
1863
 
1864
- #: pro/includes/admin/class-license.php:279
1865
  msgid ""
1866
  "Please <a href=\"%s\">enter and activate</a> your license key for WPForms to "
1867
  "enable automatic updates."
1868
  msgstr ""
1869
 
1870
- #: pro/includes/admin/class-license.php:288
1871
  msgid ""
1872
  "Your license key for WPForms has expired. <a href=\"%s\" target=\"_blank\" "
1873
  "rel=\"noopener\">Please click here to renew your license key and continue "
1874
  "receiving automatic updates.</a>"
1875
  msgstr ""
1876
 
1877
- #: pro/includes/admin/class-license.php:297
1878
  msgid ""
1879
  "Your license key for WPForms has been disabled. Please use a different key "
1880
  "to continue receiving automatic updates."
1881
  msgstr ""
1882
 
1883
- #: pro/includes/admin/class-license.php:306
1884
  msgid ""
1885
  "Your license key for WPForms is invalid. The key no longer exists or the "
1886
  "user associated with the key has been deleted. Please use a different key to "
1887
  "continue receiving automatic updates."
1888
  msgstr ""
1889
 
 
 
 
 
 
 
 
1890
  #: pro/includes/admin/class-settings.php:158
1891
  msgid "Integrations"
1892
  msgstr ""
@@ -3112,23 +3137,23 @@ msgstr ""
3112
  msgid "Add New Notification"
3113
  msgstr ""
3114
 
3115
- #: pro/wpforms-pro.php:403
3116
  msgid "Send"
3117
  msgstr ""
3118
 
3119
- #: pro/wpforms-pro.php:404
3120
  msgid "Don't send"
3121
  msgstr ""
3122
 
3123
- #: pro/wpforms-pro.php:406
3124
  msgid "this notification if"
3125
  msgstr ""
3126
 
3127
- #: pro/wpforms-pro.php:407
3128
  msgid "Email notifications"
3129
  msgstr ""
3130
 
3131
- #: pro/wpforms-pro.php:410
3132
  msgid ""
3133
  "Install the <a href=\"%s\">Conditional Logic add-on</a> to enable "
3134
  "conditional logic for Email Notifications."
@@ -3138,9 +3163,9 @@ msgstr ""
3138
  msgid "Please deactivate WPForms Lite before activating WPForms"
3139
  msgstr ""
3140
 
3141
- #. #-#-#-#-# wpforms.pot (WPForms 1.3.1) #-#-#-#-#
3142
  #. Plugin URI of the plugin/theme
3143
- #. #-#-#-#-# wpforms.pot (WPForms 1.3.1) #-#-#-#-#
3144
  #. Author URI of the plugin/theme
3145
  msgid "https://wpforms.com"
3146
  msgstr ""
1
+ # Copyright (C) 2017 WPForms
2
  # This file is distributed under the same license as the WPForms package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WPForms 1.3.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wpforms\n"
7
+ "POT-Creation-Date: 2017-01-17 19:09:37+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
212
 
213
  #: includes/admin/builder/class-builder.php:301
214
  #: includes/fields/class-base.php:239 includes/fields/class-base.php:570
215
+ #: lite/wpforms-lite.php:78 pro/wpforms-pro.php:260
216
  msgid "Off"
217
  msgstr ""
218
 
219
  #: includes/admin/builder/class-builder.php:302
220
+ #: includes/fields/class-base.php:239 lite/wpforms-lite.php:77
221
  #: pro/wpforms-pro.php:259
222
  msgid "On"
223
  msgstr ""
344
  msgstr ""
345
 
346
  #: includes/admin/builder/panels/class-settings.php:21
347
+ #: includes/admin/class-menu.php:81 lite/includes/admin/class-settings.php:398
348
  #: pro/includes/admin/class-settings.php:706
349
  msgid "Settings"
350
  msgstr ""
356
  msgid "General"
357
  msgstr ""
358
 
359
+ #: includes/admin/builder/panels/class-settings.php:58 lite/wpforms-lite.php:63
360
+ #: lite/wpforms-lite.php:73 pro/wpforms-pro.php:246 pro/wpforms-pro.php:255
361
  msgid "Notifications"
362
  msgstr ""
363
 
432
 
433
  #: includes/admin/builder/panels/class-settings.php:187
434
  #: includes/templates/class-suggestion.php:74 lite/wpforms-lite.php:191
435
+ #: pro/wpforms-pro.php:379
436
  msgid "Message"
437
  msgstr ""
438
 
529
  "a>?"
530
  msgstr ""
531
 
532
+ #. #-#-#-#-# wpforms.pot (WPForms 1.3.2) #-#-#-#-#
533
  #. Plugin Name of the plugin/theme
534
+ #. #-#-#-#-# wpforms.pot (WPForms 1.3.2) #-#-#-#-#
535
  #. Author of the plugin/theme
536
+ #: includes/admin/class-menu.php:36 includes/admin/class-menu.php:37
537
+ #: includes/admin/class-menu.php:48 includes/integrations.php:34
538
  msgid "WPForms"
539
  msgstr ""
540
 
541
+ #: includes/admin/class-menu.php:49
542
  msgid "All Forms"
543
  msgstr ""
544
 
545
+ #: includes/admin/class-menu.php:58
546
  msgid "WPForms Builder"
547
  msgstr ""
548
 
549
+ #: includes/admin/class-menu.php:59
550
  #: includes/admin/overview/class-overview.php:148
551
  #: pro/includes/class-provider.php:1084
552
  msgid "Add New"
553
  msgstr ""
554
 
555
+ #: includes/admin/class-menu.php:68
556
  msgid "Form Entries"
557
  msgstr ""
558
 
559
+ #: includes/admin/class-menu.php:69
560
  #: includes/admin/overview/class-overview-table.php:152
561
  #: pro/includes/admin/entries/class-entries.php:410 pro/wpforms-pro.php:199
562
  msgid "Entries"
563
  msgstr ""
564
 
565
+ #: includes/admin/class-menu.php:80
566
  msgid "WPForms Settings"
567
  msgstr ""
568
 
569
+ #: includes/admin/class-menu.php:90
570
  msgid "WPForms Addons"
571
  msgstr ""
572
 
573
+ #: includes/admin/class-menu.php:91
574
  msgid "Addons"
575
  msgstr ""
576
 
 
 
 
 
 
 
 
 
577
  #: includes/admin/class-welcome.php:40 includes/admin/class-welcome.php:41
578
  msgid "Getting started with WPForms"
579
  msgstr ""
805
  msgid "WPForms honeypot field triggered."
806
  msgstr ""
807
 
808
+ #: includes/class-process.php:339 lite/wpforms-lite.php:55
809
  #: pro/wpforms-pro.php:239
810
  msgid "New %s Entry"
811
  msgstr ""
1421
  msgid "Subject"
1422
  msgstr ""
1423
 
1424
+ #: lite/includes/admin/class-review.php:79
1425
+ msgid ""
1426
+ "Hey, I noticed you a contact form WPForms - that’s awesome! Could you please "
1427
+ "do me a BIG favor and give it a 5-star rating on WordPress to help us spread "
1428
+ "the word and boost our motivation?"
1429
+ msgstr ""
1430
+
1431
+ #: lite/includes/admin/class-review.php:80
1432
+ #: pro/includes/admin/class-review.php:78
1433
+ msgid "~ Syed Balkhi<br>Co-Founder of WPForms"
1434
+ msgstr ""
1435
+
1436
+ #: lite/includes/admin/class-review.php:82
1437
+ #: pro/includes/admin/class-review.php:80
1438
+ msgid "Ok, you deserve it"
1439
+ msgstr ""
1440
+
1441
+ #: lite/includes/admin/class-review.php:83
1442
+ #: pro/includes/admin/class-review.php:81
1443
+ msgid "Nope, maybe later"
1444
+ msgstr ""
1445
+
1446
+ #: lite/includes/admin/class-review.php:84
1447
+ #: pro/includes/admin/class-review.php:82
1448
+ msgid "I already did"
1449
+ msgstr ""
1450
+
1451
+ #: lite/includes/admin/class-review.php:132
1452
+ #: pro/includes/admin/class-review.php:130
1453
+ msgid ""
1454
+ "Please rate <strong>WPForms</strong> <a href=\"%s\" target=\"_blank\" rel="
1455
+ "\"noopener\">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href=\"%s\" "
1456
+ "target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you "
1457
+ "from the WPForms team!"
1458
+ msgstr ""
1459
+
1460
  #: lite/includes/admin/class-settings.php:132
1461
  #: pro/includes/admin/class-settings.php:136
1462
  msgid "Are you sure you want to disconnect this account?"
1584
  #: lite/includes/admin/class-settings.php:287
1585
  #: pro/includes/admin/class-settings.php:352
1586
  msgid ""
1587
+ "Check this if you would like to enable the ability to CC: email addresses in "
1588
  "the form notification settings."
1589
  msgstr ""
1590
 
1628
  msgid "M j, Y @ g:ia"
1629
  msgstr ""
1630
 
1631
+ #: lite/wpforms-lite.php:86 pro/wpforms-pro.php:267
1632
  msgid "Default Notification"
1633
  msgstr ""
1634
 
1635
+ #: lite/wpforms-lite.php:94 pro/wpforms-pro.php:282
1636
  msgid "Send To Email Address"
1637
  msgstr ""
1638
 
1639
+ #: lite/wpforms-lite.php:97 pro/wpforms-pro.php:285
1640
  msgid ""
1641
  "Enter the email address to receive form entry notifications. For multiple "
1642
  "notifications, separate email addresses with a comma."
1643
  msgstr ""
1644
 
1645
+ #: lite/wpforms-lite.php:113 pro/wpforms-pro.php:301
1646
  msgid "CC"
1647
  msgstr ""
1648
 
1649
+ #: lite/wpforms-lite.php:129 pro/wpforms-pro.php:317
1650
  msgid "Email Subject"
1651
  msgstr ""
1652
 
1653
+ #: lite/wpforms-lite.php:131 pro/wpforms-pro.php:319
1654
  msgid "New Entry: "
1655
  msgstr ""
1656
 
1657
+ #: lite/wpforms-lite.php:144 pro/wpforms-pro.php:332
1658
  msgid "From Name"
1659
  msgstr ""
1660
 
1661
+ #: lite/wpforms-lite.php:160 pro/wpforms-pro.php:348
1662
  msgid "From Email"
1663
  msgstr ""
1664
 
1665
+ #: lite/wpforms-lite.php:176 pro/wpforms-pro.php:364
1666
  msgid "Reply-To"
1667
  msgstr ""
1668
 
1669
+ #: lite/wpforms-lite.php:201 pro/wpforms-pro.php:389
1670
  msgid ""
1671
  "To display all form fields, use the <code>{all_fields}</code> Smart Tag."
1672
  msgstr ""
1800
  msgstr ""
1801
 
1802
  #: pro/includes/admin/class-addons.php:85
1803
+ #: pro/includes/admin/class-addons.php:239
1804
  msgid "Install Addon"
1805
  msgstr ""
1806
 
1807
  #: pro/includes/admin/class-addons.php:86
1808
+ #: pro/includes/admin/class-addons.php:235
1809
  msgid "Deactivate"
1810
  msgstr ""
1811
 
1812
  #: pro/includes/admin/class-addons.php:87
1813
+ #: pro/includes/admin/class-addons.php:237
1814
  msgid "Activate"
1815
  msgstr ""
1816
 
1846
  msgid "Addons have successfully been refreshed."
1847
  msgstr ""
1848
 
1849
+ #: pro/includes/admin/class-addons.php:180
 
 
 
 
 
 
 
 
 
 
1850
  msgid "Unlock More Features..."
1851
  msgstr ""
1852
 
1853
+ #: pro/includes/admin/class-addons.php:181
1854
  msgid ""
1855
  "Want to get even more features? Upgrade your WPForms account and unlock the "
1856
  "following extensions."
1857
  msgstr ""
1858
 
1859
+ #: pro/includes/admin/class-addons.php:241
1860
  msgid "Upgrade Now"
1861
  msgstr ""
1862
 
1863
  #: pro/includes/admin/class-license.php:93
1864
+ #: pro/includes/admin/class-license.php:161
1865
+ #: pro/includes/admin/class-license.php:229
1866
  msgid ""
1867
  "There was an error connecting to the remote key API. Please try again later."
1868
  msgstr ""
1871
  msgid "Congratulations! This site is now receiving automatic updates."
1872
  msgstr ""
1873
 
1874
+ #: pro/includes/admin/class-license.php:199
1875
  msgid "Your key has been refreshed successfully."
1876
  msgstr ""
1877
 
1878
+ #: pro/includes/admin/class-license.php:240
1879
  msgid "You have deactivated the key from this site successfully."
1880
  msgstr ""
1881
 
1882
+ #: pro/includes/admin/class-license.php:272
1883
  msgid ""
1884
  "Please <a href=\"%s\">enter and activate</a> your license key for WPForms to "
1885
  "enable automatic updates."
1886
  msgstr ""
1887
 
1888
+ #: pro/includes/admin/class-license.php:281
1889
  msgid ""
1890
  "Your license key for WPForms has expired. <a href=\"%s\" target=\"_blank\" "
1891
  "rel=\"noopener\">Please click here to renew your license key and continue "
1892
  "receiving automatic updates.</a>"
1893
  msgstr ""
1894
 
1895
+ #: pro/includes/admin/class-license.php:290
1896
  msgid ""
1897
  "Your license key for WPForms has been disabled. Please use a different key "
1898
  "to continue receiving automatic updates."
1899
  msgstr ""
1900
 
1901
+ #: pro/includes/admin/class-license.php:299
1902
  msgid ""
1903
  "Your license key for WPForms is invalid. The key no longer exists or the "
1904
  "user associated with the key has been deleted. Please use a different key to "
1905
  "continue receiving automatic updates."
1906
  msgstr ""
1907
 
1908
+ #: pro/includes/admin/class-review.php:77
1909
+ msgid ""
1910
+ "Hey, I noticed you collected over 50 entries from WPForms - that’s awesome! "
1911
+ "Could you please do me a BIG favor and give it a 5-star rating on WordPress "
1912
+ "to help us spread the word and boost our motivation?"
1913
+ msgstr ""
1914
+
1915
  #: pro/includes/admin/class-settings.php:158
1916
  msgid "Integrations"
1917
  msgstr ""
3137
  msgid "Add New Notification"
3138
  msgstr ""
3139
 
3140
+ #: pro/wpforms-pro.php:402
3141
  msgid "Send"
3142
  msgstr ""
3143
 
3144
+ #: pro/wpforms-pro.php:403
3145
  msgid "Don't send"
3146
  msgstr ""
3147
 
3148
+ #: pro/wpforms-pro.php:405
3149
  msgid "this notification if"
3150
  msgstr ""
3151
 
3152
+ #: pro/wpforms-pro.php:406
3153
  msgid "Email notifications"
3154
  msgstr ""
3155
 
3156
+ #: pro/wpforms-pro.php:409
3157
  msgid ""
3158
  "Install the <a href=\"%s\">Conditional Logic add-on</a> to enable "
3159
  "conditional logic for Email Notifications."
3163
  msgid "Please deactivate WPForms Lite before activating WPForms"
3164
  msgstr ""
3165
 
3166
+ #. #-#-#-#-# wpforms.pot (WPForms 1.3.2) #-#-#-#-#
3167
  #. Plugin URI of the plugin/theme
3168
+ #. #-#-#-#-# wpforms.pot (WPForms 1.3.2) #-#-#-#-#
3169
  #. Author URI of the plugin/theme
3170
  msgid "https://wpforms.com"
3171
  msgstr ""
lite/includes/admin/class-review.php ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * License key fun.
4
+ *
5
+ * @package WPForms
6
+ * @author WPForms
7
+ * @since 1.3.2
8
+ * @license GPL-2.0+
9
+ * @copyright Copyright (c) 2017, WPForms LLC
10
+ */
11
+ class WPForms_Review {
12
+
13
+ /**
14
+ * Primary class constructor.
15
+ *
16
+ * @since 1.3.2
17
+ */
18
+ public function __construct() {
19
+
20
+ // Admin notice requesting review
21
+ add_action( 'admin_notices', array( $this, 'review_request' ) );
22
+ add_action( 'wp_ajax_wpforms_review_dismiss', array( $this, 'review_dismiss' ) );
23
+
24
+ // Admin footer text
25
+ add_filter( 'admin_footer_text', array( $this, 'admin_footer' ), 1, 2 );
26
+ }
27
+
28
+ /**
29
+ * Add admin notices as needed for reviews.
30
+ *
31
+ * @since 1.3.2
32
+ */
33
+ public function review_request() {
34
+
35
+ // Only consider showing the review request to admin users
36
+ if ( ! is_super_admin() ) {
37
+ return;
38
+ }
39
+
40
+ // Verify that we can do a check for reviews.
41
+ $review = get_option( 'wpforms_review' );
42
+ $time = time();
43
+ $load = false;
44
+
45
+ if ( ! $review ) {
46
+ $review = array(
47
+ 'time' => $time,
48
+ 'dismissed' => false
49
+ );
50
+ $load = true;
51
+ } else {
52
+ // Check if it has been dismissed or not.
53
+ if ( ( isset( $review['dismissed'] ) && ! $review['dismissed'] ) && ( isset( $review['time'] ) && ( ( $review['time'] + DAY_IN_SECONDS ) <= $time ) ) ) {
54
+ $load = true;
55
+ }
56
+ }
57
+
58
+ // If we cannot load, return early.
59
+ if ( ! $load ) {
60
+ return;
61
+ }
62
+
63
+ // Update the review option now.
64
+ update_option( 'wpforms_review', $review );
65
+
66
+ // Fetch when plugin was initially installed
67
+ $activated = get_option( 'wpforms_activated', array() );
68
+
69
+ if ( !empty( $activated['lite'] ) ) {
70
+ // Only continue if plugin has been installed for at least 7 days
71
+ if ( ( $activated['lite'] + ( DAY_IN_SECONDS * 7 ) ) > time() ) {
72
+ return;
73
+ }
74
+ }
75
+
76
+ // We have a candidate! Output a review message.
77
+ ?>
78
+ <div class="notice notice-info is-dismissible wpforms-review-notice">
79
+ <p><?php _e( 'Hey, I noticed you a contact form WPForms - that’s awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?', 'wpforms' ); ?></p>
80
+ <p><strong><?php _e( '~ Syed Balkhi<br>Co-Founder of WPForms', 'wpforms' ); ?></strong></p>
81
+ <p>
82
+ <a href="https://wordpress.org/support/plugin/wpforms-lite/reviews/?filter=5#new-post" class="wpforms-dismiss-review-notice wpforms-review-out" target="_blank" rel="noopener"><?php _e( 'Ok, you deserve it', 'wpforms' ); ?></a> &#8226;
83
+ <a href="#" class="wpforms-dismiss-review-notice" target="_blank" rel="noopener"><?php _e( 'Nope, maybe later', 'wpforms' ); ?></a> &#8226;
84
+ <a href="#" class="wpforms-dismiss-review-notice" target="_blank" rel="noopener"><?php _e( 'I already did', 'wpforms' ); ?></a>
85
+ </p>
86
+ </div>
87
+ <script type="text/javascript">
88
+ jQuery(document).ready( function($) {
89
+ $(document).on('click', '.wpforms-dismiss-review-notice, .wpforms-review-notice button', function( event ) {
90
+ if ( ! $(this).hasClass('wpforms-review-out') ) {
91
+ event.preventDefault();
92
+ }
93
+ $.post( ajaxurl, {
94
+ action: 'wpforms_review_dismiss'
95
+ });
96
+ $('.wpforms-review-notice').remove();
97
+ });
98
+ });
99
+ </script>
100
+ <?php
101
+ }
102
+
103
+ /**
104
+ * Dismiss the review admin notice
105
+ *
106
+ * @since 1.3.2
107
+ */
108
+ public function review_dismiss() {
109
+
110
+ $review = get_option( 'wpforms_review', array() );
111
+ $review['time'] = time();
112
+ $review['dismissed'] = true;
113
+
114
+ update_option( 'wpforms_review', $review );
115
+ die;
116
+ }
117
+
118
+ /**
119
+ * When user is on a WPForms related admin page, display footer text
120
+ * that graciously asks them to rate us.
121
+ *
122
+ * @since 1.3.2
123
+ * @param string $text
124
+ * @return string
125
+ */
126
+ public function admin_footer( $text ) {
127
+
128
+ global $current_screen;
129
+
130
+ if ( !empty( $current_screen->id ) && strpos( $current_screen->id, 'wpforms' ) !== false ) {
131
+ $url = 'https://wordpress.org/support/plugin/wpforms-lite/reviews/?filter=5#new-post';
132
+ $text = sprintf( __( 'Please rate <strong>WPForms</strong> <a href="%s" target="_blank" rel="noopener">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href="%s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the WPForms team!', 'wpforms' ), $url, $url );
133
+ }
134
+ return $text;
135
+ }
136
+
137
+ }
138
+ new WPForms_Review;
lite/includes/admin/class-settings.php CHANGED
@@ -284,7 +284,7 @@ class WPForms_Settings {
284
  </th>
285
  <td>
286
  <input type="checkbox" name="email-carbon-copy" id="wpforms-settings-general-email-carbon-copy" value="1" <?php checked( '1', $this->get( 'email-carbon-copy' ) ); ?>>
287
- <label for="wpforms-settings-general-email-carbon-copy"><?php _e( 'Check this is you would like to enable the ability to CC: email addresses in the form notification settings.', 'wpforms' ); ?></label>
288
  </td>
289
  </tr>
290
  <tr>
284
  </th>
285
  <td>
286
  <input type="checkbox" name="email-carbon-copy" id="wpforms-settings-general-email-carbon-copy" value="1" <?php checked( '1', $this->get( 'email-carbon-copy' ) ); ?>>
287
+ <label for="wpforms-settings-general-email-carbon-copy"><?php _e( 'Check this if you would like to enable the ability to CC: email addresses in the form notification settings.', 'wpforms' ); ?></label>
288
  </td>
289
  </tr>
290
  <tr>
lite/wpforms-lite.php CHANGED
@@ -35,6 +35,7 @@ class WPForms_Lite {
35
 
36
  if ( is_admin() ) {
37
  require_once WPFORMS_PLUGIN_DIR . 'lite/includes/admin/class-settings.php';
 
38
  }
39
  }
40
 
@@ -96,7 +97,7 @@ class WPForms_Lite {
96
  'tooltip' => __( 'Enter the email address to receive form entry notifications. For multiple notifications, separate email addresses with a comma.', 'wpforms' ),
97
  'smarttags' => array(
98
  'type' => 'fields',
99
- 'fields' => 'name,email,text',
100
  ),
101
  'parent' => 'settings',
102
  'subsection' => $id,
@@ -129,8 +130,7 @@ class WPForms_Lite {
129
  array(
130
  'default' => __( 'New Entry: ' , 'wpforms' ) . $settings->form->post_title,
131
  'smarttags' => array(
132
- 'type' => 'fields',
133
- 'fields' => 'name,email,text',
134
  ),
135
  'parent' => 'settings',
136
  'subsection' => $id
@@ -146,7 +146,7 @@ class WPForms_Lite {
146
  'default' => sanitize_text_field( get_option( 'blogname' ) ),
147
  'smarttags' => array(
148
  'type' => 'fields',
149
- 'fields' => 'name,email,text',
150
  ),
151
  'parent' => 'settings',
152
  'subsection' => $id
@@ -162,7 +162,7 @@ class WPForms_Lite {
162
  'default' => '{admin_email}',
163
  'smarttags' => array(
164
  'type' => 'fields',
165
- 'fields' => 'name,email,text',
166
  ),
167
  'parent' => 'settings',
168
  'subsection' => $id
@@ -177,7 +177,7 @@ class WPForms_Lite {
177
  array(
178
  'smarttags' => array(
179
  'type' => 'fields',
180
- 'fields' => 'name,email,text',
181
  ),
182
  'parent' => 'settings',
183
  'subsection' => $id
35
 
36
  if ( is_admin() ) {
37
  require_once WPFORMS_PLUGIN_DIR . 'lite/includes/admin/class-settings.php';
38
+ require_once WPFORMS_PLUGIN_DIR . 'lite/includes/admin/class-review.php';
39
  }
40
  }
41
 
97
  'tooltip' => __( 'Enter the email address to receive form entry notifications. For multiple notifications, separate email addresses with a comma.', 'wpforms' ),
98
  'smarttags' => array(
99
  'type' => 'fields',
100
+ 'fields' => 'email',
101
  ),
102
  'parent' => 'settings',
103
  'subsection' => $id,
130
  array(
131
  'default' => __( 'New Entry: ' , 'wpforms' ) . $settings->form->post_title,
132
  'smarttags' => array(
133
+ 'type' => 'all'
 
134
  ),
135
  'parent' => 'settings',
136
  'subsection' => $id
146
  'default' => sanitize_text_field( get_option( 'blogname' ) ),
147
  'smarttags' => array(
148
  'type' => 'fields',
149
+ 'fields' => 'name,text',
150
  ),
151
  'parent' => 'settings',
152
  'subsection' => $id
162
  'default' => '{admin_email}',
163
  'smarttags' => array(
164
  'type' => 'fields',
165
+ 'fields' => 'email',
166
  ),
167
  'parent' => 'settings',
168
  'subsection' => $id
177
  array(
178
  'smarttags' => array(
179
  'type' => 'fields',
180
+ 'fields' => 'email',
181
  ),
182
  'parent' => 'settings',
183
  'subsection' => $id
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: wpforms, jaredatch, smub
3
  Tags: contact form, contact form plugin, contact button, contact me, custom form, custom contact form, form builder, form manager, form, forms builder, forms creator, captcha, recaptcha, Akismet, email form, web form, feedback form, payment form, survey form, donation form, email submit form, message form, mailchimp, mailchimp form, aweber, aweber form, paypal, paypal form, stripe, stripe form, getresponse, getresponse form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form
4
  Requires at least: 4.5
5
- Tested up to: 4.7
6
  Stable tag: trunk
7
  License: GNU General Public License v2.0 or later
8
 
@@ -10,7 +10,7 @@ The best WordPress contact form plugin. Drag & Drop online form builder that hel
10
 
11
  == Description ==
12
 
13
- = WordPress Contact Form Plugin =
14
 
15
  We believe that you shouldn't have to hire a developer to create a WordPress contact form. That's why we built <a href="https://wpforms.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend" title="WPForms">WPForms</a>, a drag & drop WordPress form builder that's EASY and POWERFUL.
16
 
@@ -18,20 +18,20 @@ WPForms allow you to create beautiful contact forms, subscription forms, payment
18
 
19
  At WPForms, user experience is our #1 priority. Our pre-built form templates and workflows make WPForms the most beginner friendly contact form plugin in the market.
20
 
21
- WPForms is 100% mobile responsive, so your forms will always look great on all devices (mobile, tablet, laptop, and desktop).
22
 
23
- WPForms is also highly optimized for web and server performance because we understand the importance of speed when it comes to SEO and conversion. We can honestly say that WPForms is one of the fastest WordPress forms plugin available.
24
 
25
  > <strong>WPForms Pro</strong><br />
26
- > This plugin is the lite version of the WPForms Pro plugin that comes with all the form features you will ever need including email subscription forms, multi-page forms, file uploads, conditional logic, payment integrations, form templates, and tons more. <a href="https://wpforms.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend" title="WPForms">Click here to purchase the best premium WordPress contact form plugin now!</a>
27
 
28
- We took the pain out of creating online forms and made it easy. Here's why smart business owners, designers, and developers love WPForms, and you will too!
29
 
30
  https://www.youtube.com/watch?v=eiQ3viAGung&rel=0
31
 
32
- = Drag & Drop Online Form Builder =
33
 
34
- We were tired of the bloated and buggy contact form plugins. That's why we built WPForms to adapt to your workflow and allow you to create custom online forms in minutes. By using our easy to use <a href="https://wpforms.com/features/drag-drop-online-form-builder/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">drag and drop online form builder</a>, you can easy add custom form fields, rearrange them, and basically create a complete form in 5 minutes or less.
35
 
36
  But don't just take our word. See what one of the WordPress experts are saying:
37
 
@@ -40,62 +40,62 @@ But don't just take our word. See what one of the WordPress experts are saying:
40
 
41
  = Pre-built Form Templates =
42
 
43
- Building forms in WordPress can be time consuming. Why?
44
 
45
- Because every other WordPress contact form plugin requires you to build your form from scratch. The truth is it's often not necessary to create a form completely from scratch unless you really want to.
46
 
47
- Whether you’re looking to create a simple contact form, request a quote form, donation form, payment order form, or a subscription form, we have a form template for you.
48
 
49
  WPForms comes with <a href="https://wpforms.com/features/form-templates/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">pre-built form templates</a> to help you save time. You can add, remove, or re-arrange fields as necessary.
50
 
51
  = Mobile Ready, SEO Friendly and Optimized for Speed =
52
 
53
- WPForms is 100% responsive and mobile-friendly by default. We also optimized every query on the front-end and the back-end to ensure maximum speed - Yes, WPForms is one of the fastest WordPress contact form plugin.
54
 
55
- You can embed your forms on any page with optimized title and description. With the speed and proper formatting, WPForms is also one of the most SEO friendly forms plugin.
56
 
57
  = All the Fields & Features that You Need to Succeed =
58
 
59
- From radio buttons to file uploads to multi-page forms, we have all the fields you need.
60
 
61
- You can easily integrate your forms with an email marketing service or collect payments for bookings and orders. WPForms allows you to do it all.
62
 
63
  The best part is, you can do it all without hiring a developer.
64
 
65
- See what one business owner has to say about WPForms:
66
 
67
- >As a business owner, time is my most valuable asset. WPForms allow me to create smart online forms with just a few clicks. With their pre-built form templates and the drag & drop builder, I can create a new form that works in less than 2 minutes without writing a single line of code. Well worth the investment.<br>
68
  > David Henzel - Co-founder of MaxCDN
69
 
70
  = Easy to Customize and Extend =
71
 
72
- You can easily customize your WPForms with our section dividers, HTML blocks, an custom CSS.
73
 
74
- We also knew that our developer friends may want to extend it further. That's why WPForms come with tons of hooks and filters to create custom functionality.
75
 
76
  = Full WPForms Feature List =
77
 
78
- * <a href="https://wpforms.com/features/drag-drop-online-form-builder/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Online Form Builder</a> - Our powerful drag & drop online form builder allows you to easily create WordPress contact forms and other online forms in just a few minutes without writing any code.
79
- * 100% Responsive - Mobile Friendly
80
  * <a href="https://wpforms.com/features/form-templates/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Form Templates</a> - Use our pre-built form templates to save time. Never start from scratch again.
81
- * <a href="https://wpforms.com/features/spam-protection/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Spam Protection</a> - WPForms utilizes smart CAPTCHA and Honeypot method to stop spam form submissions.
82
- * <a href="https://wpforms.com/features/instant-notifications/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Instant Form Notification</a> - Quickly respond to incoming inquiries with our instant form notification system.
83
  * <a href="https://wpforms.com/features/form-confirmation/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Smart Form Confirmation</a> - Show a custom success message, or redirect users to a custom thank you page.
84
- * <a href="https://wpforms.com/features/file-uploads/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">File Uploads</a> - Collect files and media through your online forms with File Uploads.
85
  * <a href="https://wpforms.com/features/multi-page-forms/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Multi-Page Forms</a> - Split long forms into multiple pages to improve user experience.
86
- * <a href="https://wpforms.com/addons/mailchimp-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">MailChimp Forms</a> - Create MailChimp newsletter signup forms in WordPress to grow your email list.
87
- * <a href="https://wpforms.com/addons/aweber-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">AWeber Forms</a> - Create AWeber newsletter signup forms in WordPress to grow your email list.
88
- * <a href="https://wpforms.com/addons/campaign-monitor-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Campaign Monitor Forms</a> - Create Campaign Monitor newsletter signup forms in WordPress to grow your email list.
89
- * <a href="https://wpforms.com/addons/getresponse-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">GetResponse Forms</a> - Create GetResponse newsletter signup forms in WordPress to grow your email list.
90
  * <a href="https://wpforms.com/addons/paypal-standard-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">PayPal Payment Forms</a> - Create PayPal forms to easily collect payments, donations, and online orders.
91
  * <a href="https://wpforms.com/addons/stripe-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Stripe Forms</a> - Easily collect payments, donations, and online orders with our Stripe addon.
92
  * <a href="https://wpforms.com/addons/user-registration-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">User Registration Forms</a> - Create custom WordPress user registration form.
93
- * <a href="https://wpforms.com/addons/conditional-logic-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Smart Conditional Logic</a> - Show or hide fields and form sections based on user behavior.
94
  * <a href="https://wpforms.com/addons/geolocation-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Geolocation</a> - Display location information about your users.
95
- * <a href="https://wpforms.com/addons/custom-catpcha-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Custom Captchas</a> - Create custom captchas for your forms.
96
- * Want us to add something else? Suggest a feature and we'll get it added!
97
 
98
- After reading this feature list, you can probably imagine why WPForms is the best WordPress forms plugin in the market.
99
 
100
  Give WPForms a try.
101
 
@@ -163,6 +163,15 @@ Syed Balkhi
163
 
164
  == Changelog ==
165
 
 
 
 
 
 
 
 
 
 
166
  = 1.3.1.2 =
167
  - Fixed: Plugin name to correctly indicate Lite for Lite release
168
 
2
  Contributors: wpforms, jaredatch, smub
3
  Tags: contact form, contact form plugin, contact button, contact me, custom form, custom contact form, form builder, form manager, form, forms builder, forms creator, captcha, recaptcha, Akismet, email form, web form, feedback form, payment form, survey form, donation form, email submit form, message form, mailchimp, mailchimp form, aweber, aweber form, paypal, paypal form, stripe, stripe form, getresponse, getresponse form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form
4
  Requires at least: 4.5
5
+ Tested up to: 4.7.1
6
  Stable tag: trunk
7
  License: GNU General Public License v2.0 or later
8
 
10
 
11
  == Description ==
12
 
13
+ = WordPress Contact Form Builder Plugin =
14
 
15
  We believe that you shouldn't have to hire a developer to create a WordPress contact form. That's why we built <a href="https://wpforms.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend" title="WPForms">WPForms</a>, a drag & drop WordPress form builder that's EASY and POWERFUL.
16
 
18
 
19
  At WPForms, user experience is our #1 priority. Our pre-built form templates and workflows make WPForms the most beginner friendly contact form plugin in the market.
20
 
21
+ WPForms is a 100% mobile responsive contact form solution, so your contact forms will always look great on all devices (mobile, tablet, laptop, and desktop).
22
 
23
+ WPForms' contact forms are also highly optimized for web and server performance because we understand the importance of speed when it comes to SEO and conversion. We can honestly say that WPForms is one of the fastest WordPress contact form builder plugins in the market.
24
 
25
  > <strong>WPForms Pro</strong><br />
26
+ > This plugin is the lite version of the WPForms Pro plugin that comes with all the contact form features you will ever need including email subscription forms, multi-page contact forms, file uploads, conditional logic, payment integrations, form templates, and tons more. <a href="https://wpforms.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend" title="WPForms">Click here to purchase the best premium WordPress contact form plugin now!</a>
27
 
28
+ We took the pain out of creating contact forms and made it easy. Here's why smart business owners, designers, and developers love WPForms, and you will too!
29
 
30
  https://www.youtube.com/watch?v=eiQ3viAGung&rel=0
31
 
32
+ = Drag & Drop Contact Form Builder =
33
 
34
+ We were tired of the bloated and buggy contact form builder plugins. That's why we built WPForms to adapt to your workflow and allow you to create custom contact forms in minutes. By using our easy to use <a href="https://wpforms.com/features/drag-drop-online-form-builder/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">drag and drop online form builder</a>, you can easy add custom form fields, rearrange them, and basically create a complete contact form in 5 minutes or less.
35
 
36
  But don't just take our word. See what one of the WordPress experts are saying:
37
 
40
 
41
  = Pre-built Form Templates =
42
 
43
+ Building contact forms in WordPress can be time consuming. Why?
44
 
45
+ Because every other WordPress contact form builder plugin requires you to build your contact form from scratch. The truth is it's often not necessary to create a contact form completely from scratch unless you really want to.
46
 
47
+ Whether you’re looking to create a simple contact form, request a quote form, donation form, payment order form, or a subscription form, we have a form template for you inside our contact form builder.
48
 
49
  WPForms comes with <a href="https://wpforms.com/features/form-templates/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">pre-built form templates</a> to help you save time. You can add, remove, or re-arrange fields as necessary.
50
 
51
  = Mobile Ready, SEO Friendly and Optimized for Speed =
52
 
53
+ WPForms' contact forms are 100% responsive and mobile-friendly by default. We also optimized every query on the front-end and the back-end to ensure maximum speed - Yes, WPForms is one of the fastest WordPress contact form plugin.
54
 
55
+ You can embed your contact form on any page with optimized title and description. With the speed and proper formatting, WPForms is also one of the most SEO friendly contact form plugin.
56
 
57
  = All the Fields & Features that You Need to Succeed =
58
 
59
+ From radio buttons to file uploads to multi-page contact forms, we have all the fields you need.
60
 
61
+ You can easily integrate your contact forms with an email marketing service or collect payments for bookings and orders. WPForms allows you to do it all.
62
 
63
  The best part is, you can do it all without hiring a developer.
64
 
65
+ See what one business owner has to say about WPForms' contact form:
66
 
67
+ >As a business owner, time is my most valuable asset. WPForms allow me to create smart contact forms with just a few clicks. With their pre-built form templates and the drag & drop builder, I can create a new form that works in less than 2 minutes without writing a single line of code. Well worth the investment.<br>
68
  > David Henzel - Co-founder of MaxCDN
69
 
70
  = Easy to Customize and Extend =
71
 
72
+ You can easily customize your contact forms with our section dividers, HTML blocks, an custom CSS.
73
 
74
+ We also knew that our developer friends may want to extend contact forms further. That's why WPForms come with tons of hooks and filters to create custom functionality.
75
 
76
  = Full WPForms Feature List =
77
 
78
+ * <a href="https://wpforms.com/features/drag-drop-online-form-builder/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Online Form Builder</a> - Our powerful drag & drop contact form builder allows you to easily create WordPress contact forms and other online forms in just a few minutes without writing any code.
79
+ * 100% Responsive - Mobile Friendly contact forms
80
  * <a href="https://wpforms.com/features/form-templates/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Form Templates</a> - Use our pre-built form templates to save time. Never start from scratch again.
81
+ * <a href="https://wpforms.com/features/spam-protection/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Spam Protection</a> - WPForms utilizes smart CAPTCHA and Honeypot method to stop spam contact form submissions.
82
+ * <a href="https://wpforms.com/features/instant-notifications/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Instant Form Notification</a> - Quickly respond to incoming inquiries with our instant contact form notification system.
83
  * <a href="https://wpforms.com/features/form-confirmation/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Smart Form Confirmation</a> - Show a custom success message, or redirect users to a custom thank you page.
84
+ * <a href="https://wpforms.com/features/file-uploads/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">File Uploads</a> - Collect files and media through your contact forms with File Uploads.
85
  * <a href="https://wpforms.com/features/multi-page-forms/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Multi-Page Forms</a> - Split long forms into multiple pages to improve user experience.
86
+ * <a href="https://wpforms.com/addons/mailchimp-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">MailChimp Forms</a> - Create MailChimp newsletter signup forms in WordPress and connect with your contact form to grow your email list.
87
+ * <a href="https://wpforms.com/addons/aweber-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">AWeber Forms</a> - Create AWeber newsletter signup forms in WordPress and connect with your contact form to grow your email list.
88
+ * <a href="https://wpforms.com/addons/campaign-monitor-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Campaign Monitor Forms</a> - Create Campaign Monitor newsletter signup forms in WordPress and connect with your contact form to grow your email list.
89
+ * <a href="https://wpforms.com/addons/getresponse-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">GetResponse Forms</a> - Create GetResponse newsletter signup forms in WordPress and connect with your contact form to grow your email list.
90
  * <a href="https://wpforms.com/addons/paypal-standard-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">PayPal Payment Forms</a> - Create PayPal forms to easily collect payments, donations, and online orders.
91
  * <a href="https://wpforms.com/addons/stripe-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Stripe Forms</a> - Easily collect payments, donations, and online orders with our Stripe addon.
92
  * <a href="https://wpforms.com/addons/user-registration-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">User Registration Forms</a> - Create custom WordPress user registration form.
93
+ * <a href="https://wpforms.com/addons/conditional-logic-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Smart Conditional Logic</a> - Show or hide fields and contact form sections based on user behavior.
94
  * <a href="https://wpforms.com/addons/geolocation-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Geolocation</a> - Display location information about your users.
95
+ * <a href="https://wpforms.com/addons/custom-catpcha-addon/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">Custom Captchas</a> - Create custom captchas for your contact form.
96
+ * Want us to add something else? Suggest a contact form feature and we'll get it added!
97
 
98
+ After reading this feature list, you can probably imagine why WPForms is the best WordPress contact form plugin in the market.
99
 
100
  Give WPForms a try.
101
 
163
 
164
  == Changelog ==
165
 
166
+ = 1.3.2 =
167
+ - Added: WP.org review request
168
+ - Added: New form class, `.inline-fields`, to apply single line form layout
169
+ - Changed: All Smart Tags now available for Email Subject field in form notifications
170
+ - Fixed: Email addresses reporting as invalid of the domain contained capitalization
171
+ - Fixed: Author related Smart Tags not working in form notification fields
172
+ - Fixed: Typo on settings page related to Carbon Copy
173
+ - Fixed: PHP 7.1 warning messages inside the form builder
174
+
175
  = 1.3.1.2 =
176
  - Fixed: Plugin name to correctly indicate Lite for Lite release
177
 
wpforms.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Beginner friendly WordPress contact form plugin. Use our Drag & Drop form builder to create your WordPress forms.
6
  * Author: WPForms
7
  * Author URI: https://wpforms.com
8
- * Version: 1.3.1.2
9
  * Text Domain: wpforms
10
  * Domain Path: languages
11
  *
@@ -81,7 +81,7 @@ final class WPForms {
81
  * @since 1.0.0
82
  * @var sting
83
  */
84
- public $version = '1.3.1.2';
85
 
86
  /**
87
  * The form data handler instance.
5
  * Description: Beginner friendly WordPress contact form plugin. Use our Drag & Drop form builder to create your WordPress forms.
6
  * Author: WPForms
7
  * Author URI: https://wpforms.com
8
+ * Version: 1.3.2
9
  * Text Domain: wpforms
10
  * Domain Path: languages
11
  *
81
  * @since 1.0.0
82
  * @var sting
83
  */
84
+ public $version = '1.3.2';
85
 
86
  /**
87
  * The form data handler instance.