vue-giveworks-form
Version:
This plugin provides Vue.js component for the open [http://giveworks.net](Giveworks Platform).
2 lines • 7.69 kB
JavaScript
(("undefined"!==typeof self?self:this)["webpackJsonpGiveworksForm"]=("undefined"!==typeof self?self:this)["webpackJsonpGiveworksForm"]||[]).push([[6],{4898:function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("fieldset",[o("legend",[e._v("Your information")]),e._m(0),o("input-field",{attrs:{id:"first",label:"First Name*",placeholder:"First Name*",errors:e.errors,custom:""},model:{value:e.form.first,callback:function(t){e.$set(e.form,"first",t)},expression:"form.first"}}),o("input-field",{attrs:{id:"last",label:"Last Name*",placeholder:"Last Name*",errors:e.errors,custom:""},model:{value:e.form.last,callback:function(t){e.$set(e.form,"last",t)},expression:"form.last"}}),o("input-field",{attrs:{id:"email",label:"Email*",placeholder:"Email*",errors:e.errors,custom:""},model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}}),e.page.options.show_source?o("input-field",{attrs:{id:"source",label:"Source",placeholder:"Source",errors:e.errors,custom:""},model:{value:e.form.source,callback:function(t){e.$set(e.form,"source",t)},expression:"form.source"}}):e._e(),e.address||e.page.options.show_address?o("input-field",{attrs:{name:"address",label:"Address",placeholder:"Address",errors:e.errors,custom:""},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}}):e._e(),e.page.options.show_city?o("input-field",{attrs:{id:"city",label:"City",placeholder:"City",errors:e.errors,custom:""},model:{value:e.form.city,callback:function(t){e.$set(e.form,"city",t)},expression:"form.city"}}):e._e(),e.page.options.show_state?o("input-field",{attrs:{id:"state",label:"State",placeholder:"State",errors:e.errors,custom:""},model:{value:e.form.state,callback:function(t){e.$set(e.form,"state",t)},expression:"form.state"}}):e._e(),e.page.options.show_zip?o("input-field",{attrs:{id:"zip_code",label:"Zip Code",placeholder:"Zip Code",errors:e.errors,custom:""},model:{value:e.form.zip_code,callback:function(t){e.$set(e.form,"zip_code",t)},expression:"form.zip_code"}}):e._e(),e.page.options.show_country?o("input-field",{attrs:{id:"country",label:"Country",placeholder:"Country",errors:e.errors,custom:""},model:{value:e.form.country,callback:function(t){e.$set(e.form,"country",t)},expression:"form.country"}}):e._e(),e.page.options.show_phone?o("input-field",{attrs:{id:"phone",label:"Phone",placeholder:"Phone",errors:e.errors,custom:""},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",t)},expression:"form.phone"}}):e._e(),e.page.options.show_organization?o("input-field",{attrs:{id:"organization",label:"Organization",placeholder:"Organization",errors:e.errors,custom:""},model:{value:e.form.organization,callback:function(t){e.$set(e.form,"organization",t)},expression:"form.organization"}}):e._e(),e.page.options.show_job_title?o("input-field",{attrs:{id:"job_title",label:"Job Title",placeholder:"Job Title",errors:e.errors,custom:""},model:{value:e.form.job_title,callback:function(t){e.$set(e.form,"job_title",t)},expression:"form.job_title"}}):e._e(),e.page.options.show_questions?o("textarea-field",{directives:[{name:"autogrow",rawName:"v-autogrow"}],attrs:{id:"questions_comments",label:"Questions and Comments",placeholder:"Questions and Comments",errors:e.errors,custom:""},model:{value:e.form.questions_comments,callback:function(t){e.$set(e.form,"questions_comments",t)},expression:"form.questions_comments"}}):e._e(),e.page.options.show_industry?o("input-field",{attrs:{id:"industry",label:"Industry",placeholder:"Industry",errors:e.errors,custom:""},model:{value:e.form.industry,callback:function(t){e.$set(e.form,"industry",t)},expression:"form.industry"}}):e._e(),e.page.options.show_employees?o("input-field",{attrs:{id:"number_employees",label:"Number of Employees",placeholder:"Number of Employees",errors:e.errors,custom:""},model:{value:e.form.number_employees,callback:function(t){e.$set(e.form,"number_employees",t)},expression:"form.number_employees"}}):e._e(),e.page.options.show_timeframe?o("input-field",{attrs:{id:"purchasing_timeframe",label:"Purchasing Timeframe",placeholder:"Purchasing Timeframe",errors:e.errors,custom:""},model:{value:e.form.purchasing_timeframe,callback:function(t){e.$set(e.form,"purchasing_timeframe",t)},expression:"form.purchasing_timeframe"}}):e._e(),e.page.options.show_role?o("input-field",{attrs:{id:"purchasing_role",label:"Purchasing Role",placeholder:"Purchasing Role",errors:e.errors,custom:""},model:{value:e.form.purchasing_role,callback:function(t){e.$set(e.form,"purchasing_role",t)},expression:"form.purchasing_role"}}):e._e(),o("btn-activity",{attrs:{size:"lg",type:"submit",orientation:"right",activity:e.submitting,block:!0,label:e.buttonLabel||e.page.site.config.giveworks.button.signup}})],1)},i=[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("p",[o("em",[e._v("* Indicates required fields")])])}],n=o("bb4b"),s=o("ee92"),a={name:"GoToWebinar",components:{InputField:()=>Promise.all([o.e(0),o.e(1),o.e(12)]).then(o.bind(null,"46d8")),BtnActivity:()=>Promise.all([o.e(0),o.e(1),o.e(12)]).then(o.bind(null,"9863")),TextareaField:()=>Promise.all([o.e(0),o.e(1),o.e(12)]).then(o.bind(null,"31e0"))},directives:{Autogrow:s["a"]},mixins:[n["a"]],props:{submitting:Boolean},computed:{orientation(){return this.$parent.$parent.orientation}}},l=a,c=o("2877"),u=Object(c["a"])(l,r,i,!1,null,null,null);t["default"]=u.exports},bb4b:function(e,t,o){"use strict";var r=o("b236");t["a"]={props:{page:{type:Object,required:!0},form:{type:Object},errors:{type:[Boolean,Object],required:!0}},mixins:[r["a"]],computed:{commentMessage(){return this.page.options.comment_message||this.page.site.config.giveworks.comment_mess},optinMessage(){return this.page.options.optin_message||this.page.site.config.giveworks.optin_mess},buttonLabel(){return this.page.options.button}}}},ee92:function(e,t,o){"use strict";const r=["font","fontFamily","fontKerning","fontSize","fontStretch","fontStyle","fontVariant","fontVariantLigatures","fontVariantCaps","fontVariantNumeric","fontVariantEastAsian","fontWeight","lineHeight","letterSpacing","padding","margin","textAlign","textAlignLast","textDecoration","textDecorationLine","textDecorationStyle","textDecorationColor","textDecorationSkipInk","textDecorationPosition","textIndent","textRendering","textShadow","textSizeAdjust","textOverflow","textTransform","width","wordBreak","wordSpacing","wordWrap"];function i(e){const t=document.createElement("textarea");return t.textContent=e,t.innerHTML}function n(e){return"number"===typeof e?e:e&&e.replace&&parseInt(e.replace(/[^\d.]+/g,""))||0}function s(e,t,o,r){e.innerHTML=i(t.value).replace(/(?:\r\n|\r|\n)/g,"<br />")+" ";let s=Math.max(o,a(e));e.innerHTML.match(/(<br\s?\/?\>)+/)&&(s+=n(l(t,"lineHeight"))),t.style.height=(!r||s<r?s:r)+"px"}function a(e){return n(l(e,"height"))}function l(e,t){return window.getComputedStyle(e)[t]}function c(e,t){const o=document.createElement("div"),i=window.getComputedStyle(e);return o.style.position="absolute",o.style.zIndex=-1,o.style.visibility="hidden",e.parentNode.insertBefore(o,e.nextSibling),r.forEach(e=>o.style[e]=i[e]),o}function u(e,t,o){const r=a(e),i=c(e,r),n=!0!==t.value?t.value:0;e.addEventListener("input",e=>{s(i,e.target,r,n)}),s(i,e,r,n)}var m={inserted(e,t,o){if(!1!==t.value){if("TEXTAREA"!==e.tagName&&(e=e.querySelector("textarea")),!e)throw new Error("A textarea is required for the v-autogrow directive.");u(e,t,o),e.resize=function(){o.context.$nextTick(()=>{e.dispatchEvent(new Event("input"))})}}}};t["a"]=m}}]);
//# sourceMappingURL=GiveworksForm.umd.min.go-to-webinar.js.map