silverstripe-userforms/client/dist/js/userforms.js.map

1 line
50 KiB
Plaintext

{"version":3,"sources":["webpack:///webpack/bootstrap 12c490e16f467d30b10a","webpack:///external \"jQuery\"","webpack:///./client/src/bundles/FieldEditor.js","webpack:///./client/src/bundles/Recipient.js","webpack:///./client/src/bundles/UserForms.js","webpack:///./client/src/bundles/bundle.js"],"names":["$","entwine","stickyHeaderInterval","onmatch","i","thisLevel","depth","$buttonrow","addClass","navHeight","height","parseInt","css","fieldEditor","self","_super","find","each","data","toggleClass","setInterval","offsetTop","offset","top","width","removeClass","onunmatch","clearInterval","onclick","e","trigger","on","one","$newField","last","$groupEnd","attr","prev","focus","add","document","createElement","style","animationName","setTimeout","scrollTop","scrollHeight","onummatch","jQuery","ready","recipient","updateFormatSpecificFields","sendPlainChecked","is","onchange","userform","CONSTANTS","commonMixin","show","$el","hide","UserForm","element","steps","errorContainer","ErrorContainer","children","prevStep","nextStep","stepNumber","jumpToStep","fieldId","removeStepLink","validate","validationOptions","rules","required","prototype","ignore","errorClass","errorElement","errorPlacement","error","parents","length","insertAfter","closest","next","invalidHandler","event","validator","currentElements","filter","first","submitHandler","form","isValid","currentStep","valid","step","conditionallyHidden","addStepLink","submit","success","errorId","substr","indexOf","replace","remove","addStep","FormStep","id","push","setCurrentStep","viewed","direction","targetStep","forward","text","ss","i18n","_t","hasErrors","removeErrorMessage","itemID","$itemElement","stepID","stepTitle","preventDefault","append","updateErrorMessage","$input","message","inputID","anchor","elementID","messageElement","describedBy","html","location","pathname","search","match","RegExp","$elButton","prop","DISPLAY_ERROR_MESSAGES_AT_TOP","errorList","ProgressBar","$buttons","$jsAlign","stepButton","update","$visibleButtons","button","index","$button","leftPercent","buttonOffset","innerWidth","left","marginLeft","$newStepElement","barWidth","$element","$item","parent","removeAttr","siblings","FormActions","$prevButton","$nextButton","numberOfSteps","lastStep","main","progressBar","formActions","$userform","ENABLE_LIVE_VALIDATION","extend","onfocusout","HIDE_FIELD_LABELS","$label","ssDatepicker","datepicker","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KA,MAAI3F,OAAO/F,EAAE,eAAF,CAAX;AACA,MAAG,OAAO+F,KAAK4F,UAAZ,IAA0B,WAA7B,EAA0C;AACzC5F,QAAK4F,UAAL,CAAgB;AACfvD,aAASb,GAAGC,IAAH,CAAQC,EAAR,CAAW,8BAAX,EAA2C,2BAA3C;AADM,IAAhB;AAGA;AACD;;AAEDqD;AACA,CA9tBD,E;;;;;;;ACHA,mBAAAc,CAAQ,CAAR;AACA,mBAAAA,CAAQ,CAAR;AACA,mBAAAA,CAAQ,CAAR,E","file":"js/userforms.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 12c490e16f467d30b10a","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0","/**\n * form builder behaviour.\n */\n\n (function($) {\n\t$.entwine('ss', function($) {\n\t\tvar stickyHeaderInterval;\n\n\t\t$(\".uf-field-editor tbody\").entwine({\n\t\t\tonmatch: function() {\n\t\t\t\tvar i, \n\t\t\t\t\tthisLevel, \n\t\t\t\t\tdepth = 0,\n\t\t\t\t\t$buttonrow = $('.uf-field-editor .ss-gridfield-buttonrow').addClass('stickyButtons'),\n\t\t\t\t\tnavHeight = $('.cms-content-header.north').height() + parseInt($('.stickyButtons').css('padding-top'), 10),\n\t\t\t\t\tfieldEditor = $('.uf-field-editor'),\n\t\t\t\t\tself = this;\n\n\t\t\t\tthis._super();\n\t\t\t\t\n\t\t\t\t// Loop through all rows and set necessary styles\n\t\t\t\tthis.find('.ss-gridfield-item').each(function() {\n\t\t\t\t\tswitch($(this).data('class')) {\n\t\t\t\t\t\tcase 'EditableFormStep': {\n\t\t\t\t\t\t\tdepth = 0;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 'EditableFieldGroup': {\n\t\t\t\t\t\t\tthisLevel = ++depth;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 'EditableFieldGroupEnd': {\n\t\t\t\t\t\t\tthisLevel = depth--;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\tthisLevel = depth;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$(this).toggleClass('inFieldGroup', thisLevel > 0);\n\t\t\t\t\tfor(i = 1; i <= 5; i++) {\n\t\t\t\t\t\t$(this).toggleClass('inFieldGroup-level-'+i, thisLevel >= i);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Make sure gridfield buttons stick to top of page when user scrolls down\n\t\t\t\tstickyHeaderInterval = setInterval(function () {\n\t\t\t\t\tvar offsetTop = fieldEditor.offset().top;\n\t\t\t\t\t$buttonrow.width('100%');\n\t\t\t\t\tif (offsetTop > navHeight || offsetTop === 0) {\n\t\t\t\t\t\t$buttonrow.removeClass('stickyButtons');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$buttonrow.addClass('stickyButtons');\n\t\t\t\t\t};\n\t\t\t\t}, 300);\n\t\t\t},\n\t\t\tonunmatch: function () {\n\t\t\t\tthis._super();\n\n\t\t\t\tclearInterval(stickyHeaderInterval);\n\t\t\t}\n\t\t});\n\n\t\t// When new fields are added..\n\t\t$('.uf-field-editor .ss-gridfield-buttonrow .action').entwine({\n\t\t\tonclick: function (e) {\n\t\t\t\tthis._super(e);\n\n\t\t\t\tthis.trigger('addnewinline');\n\t\t\t}\n\t\t});\n\n\t\t$('.uf-field-editor').entwine({\n\t\t\tonmatch: function () {\n\t\t\t\tvar self = this;\n\n\t\t\t\tthis._super();\n\t\t\t\t\t\n\t\t\t\t// When the 'Add field' button is clicked set a one time listener.\n\t\t\t\t// When the GridField is reloaded focus on the newly added field.\n\t\t\t\tthis.on('addnewinline', function () {\n\t\t\t\t\tself.one('reload', function () {\n\t\t\t\t\t\t//If fieldgroup, focus on the start marker\n\t\t\t\t\t\tvar $newField = self.find('.ss-gridfield-item').last(), $groupEnd;\n\t\t\t\t\t\tif ($newField.attr('data-class') === 'EditableFieldGroupEnd') {\n\t\t\t\t\t\t\t$groupEnd = $newField;\n\t\t\t\t\t\t\t$groupEnd.prev().find('.col-Title input').focus();\n\t\t\t\t\t\t\t$newField = $groupEnd.add($groupEnd.prev());\n\t\t\t\t\t\t\t$groupEnd.css('visibility', 'hidden');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$newField.find('.col-Title input').focus();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// animate the row positioning (add the first class)\n\t\t\t\t\t\tif (document.createElement('div').style.animationName !== void 0) {\n\t\t\t\t\t\t\t$newField.addClass('newField');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Once the animation has completed\n\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t$newField.removeClass('newField').addClass('flashBackground');\n\t\t\t\t\t\t\t$(\".cms-content-fields\").scrollTop($(\".cms-content-fields\")[0].scrollHeight);\n\t\t\t\t\t\t\tif($groupEnd) {\n\t\t\t\t\t\t\t\t$groupEnd.css('visibility', 'visible');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 500);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t},\n\t\t\tonummatch: function () {\n\t\t\t\tthis._super();\n\t\t\t}\n\t\t});\n\t});\n}(jQuery));\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/bundles/FieldEditor.js","/**\n * Email recipient behaviour.\n */\n\n(function ($) {\n\t$(document).ready(function () {\n\n\t\tvar recipient = {\n\t\t\t// Some fields are only visible when HTML email are being sent.\n\t\t\tupdateFormatSpecificFields: function () {\n\t\t\t\tvar sendPlainChecked = $('#SendPlain')\n\t\t\t\t\t.find('input[type=\"checkbox\"]')\n\t\t\t\t\t.is(':checked');\n\n\t\t\t\t$(\".field.toggle-html-only\")[sendPlainChecked ? 'hide' : 'show']();\n\t\t\t\t$(\".field.toggle-plain-only\")[sendPlainChecked ? 'show' : 'hide']();\n\t\t\t}\n\t\t};\n\n\t\t$.entwine('udf.recipient', function ($) {\n\t\t\t$('#Form_ItemEditForm').entwine({\n\t\t\t\tonmatch: function () {\n\t\t\t\t\trecipient.updateFormatSpecificFields();\n\t\t\t\t},\n\t\t\t\tonunmatch: function () {\n\t\t\t\t\tthis._super();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$('#SendPlain').entwine({\n\t\t\t\tonchange: function () {\n\t\t\t\t\trecipient.updateFormatSpecificFields();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n}(jQuery));\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/bundles/Recipient.js","/**\n * @file Manages the multi-step navigation.\n */\njQuery(function ($) {\n\n\t// A reference to the UserForm instance.\n\tvar userform = null;\n\n\t// Settings that come from the CMS.\n\tvar CONSTANTS = {};\n\n\t// Common functions that extend multiple classes.\n\tvar commonMixin = {\n\t\t/**\n\t\t * @func show\n\t\t * @desc Show the form step. Looks after aria attributes too.\n\t\t */\n\t\tshow: function () {\n\t\t\tthis.$el.attr('aria-hidden', false).show();\n\t\t},\n\t\t/**\n\t\t * @func hide\n\t\t * @desc Hide the form step. Looks after aria attributes too.\n\t\t */\n\t\thide: function () {\n\t\t\tthis.$el.attr('aria-hidden', true).hide();\n\t\t}\n\t};\n\n\t/**\n\t * @func UserForm\n\t * @constructor\n\t * @param {object} element\n\t * @return {object} - The UserForm instance.\n\t * @desc The form\n\t */\n\tfunction UserForm(element) {\n\t\tvar self = this;\n\n\t\tthis.$el = element instanceof jQuery ? element : $(element);\n\t\tthis.steps = [];\n\n\t\t// Add an error container which displays a list of invalid steps on form submission.\n\t\tthis.errorContainer = new ErrorContainer(this.$el.children('.error-container'));\n\n\t\t// Listen for events triggered by form steps.\n\t\tthis.$el.on('userform.action.prev', function (e) {\n\t\t\tself.prevStep();\n\t\t});\n\t\tthis.$el.on('userform.action.next', function (e) {\n\t\t\tself.nextStep();\n\t\t});\n\n\t\t// Listen for events triggered by the progress bar.\n\t\t$('#userform-progress').on('userform.progress.changestep', function (e, stepNumber) {\n\t\t\tself.jumpToStep(stepNumber - 1);\n\t\t});\n\n\t\t// When a field becomes valid, remove errors from the error container.\n\t\tthis.$el.on('userform.form.valid', function (e, fieldId) {\n\t\t\tself.errorContainer.removeStepLink(fieldId);\n\t\t});\n\n\t\tthis.$el.validate(this.validationOptions);\n\n\t\t// Ensure checkbox groups are validated correctly\n\t\t$('.optionset.requiredField input').each(function() {\n\t\t $(this).rules('add', {\n\t\t required: true\n\t\t });\n\t\t});\n\n\t\treturn this;\n\t}\n\n\t/*\n\t * Default options for step validation. These get extended in main().\n\t */\n\tUserForm.prototype.validationOptions = {\n\t\tignore: ':hidden,ul',\n\t\terrorClass: 'error',\n\t\terrorElement: 'span',\n\t\terrorPlacement: function (error, element) {\n\t\t\terror.addClass('message');\n\n\t\t\tif (element.is(':radio') || element.parents('.checkboxset').length > 0) {\n\t\t\t\terror.insertAfter(element.closest('ul'));\n\t\t\t} else if (element.parents('.checkbox').length > 0) {\n\t\t\t\terror.insertAfter(element.next('label'));\n\t\t\t} else {\n\t\t\t\terror.insertAfter(element);\n\t\t\t}\n\t\t},\n\t\tinvalidHandler: function (event, validator) {\n\t\t\t//setTimeout 0 so it runs after errorPlacement\n\t\t\tsetTimeout(function () {\n\t\t\t\tvalidator.currentElements.filter('.error').first().focus();\n\t\t\t}, 0);\n\t\t},\n\t\t// Callback for handling the actual submit when the form is valid.\n\t\t// Submission in the jQuery.validate sence is handled at step level.\n\t\t// So when the final step is submitted we have to also check all previous steps are valid.\n\t\tsubmitHandler: function (form, e) {\n\t\t\tvar isValid = true;\n\n\t\t\t// validate the current step\n\t\t\tif(userform.currentStep) {\n\t\t\t\tuserform.currentStep.valid = $(form).valid();\n\t\t\t}\n\n\t\t\t// Check for invalid previous steps.\n\t\t\t$.each(userform.steps, function (i, step) {\n\t\t\t\tif (!step.valid && !step.conditionallyHidden()) {\n\t\t\t\t\tisValid = false;\n\t\t\t\t\tuserform.errorContainer.addStepLink(step);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (isValid) {\n\n\t\t\t\t// When using the \"are you sure?\" plugin, ensure the form immediately submits.\n\t\t\t\t$(form).removeClass('dirty');\n\n\t\t\t\tform.submit();\n\t\t\t} else {\n\t\t\t\tuserform.errorContainer.show();\n\t\t\t}\n\t\t},\n\t\t// When a field becomes valid.\n\t\tsuccess: function (error) {\n\t\t\tvar errorId = $(error).attr('id'),\n\t\t\t\tfieldId = errorId.substr(0, errorId.indexOf('-error')).replace(/[\\\\[\\\\]]/, '');\n\n\t\t\t// Remove square brackets since jQuery.validate.js uses idOrName,\n\t\t\t// which breaks further on when using a selector that end with\n\t\t\t// square brackets.\n\n\t\t\terror.remove();\n\n\t\t\t// Pass the field's ID with the event.\n\t\t\tuserform.$el.trigger('userform.form.valid', [fieldId]);\n\t\t}\n\t};\n\n\t/**\n\t * @func UserForm.addStep\n\t * @param {object} step - An instance of FormStep.\n\t * @desc Adds a step to the UserForm.\n\t */\n\tUserForm.prototype.addStep = function (step) {\n\t\t// Make sure we're dealing with a form step.\n\t\tif (!step instanceof FormStep) {\n\t\t\treturn;\n\t\t}\n\n\t\tstep.id = this.steps.length;\n\n\t\tthis.steps.push(step);\n\t};\n\n\t/**\n\t * @func UserForm.setCurrentStep\n\t * @param {object} step - An instance of FormStep.\n\t * @desc Sets the step the user is currently on.\n\t */\n\tUserForm.prototype.setCurrentStep = function (step) {\n\t\t// Make sure we're dealing with a form step.\n\t\tif (!(step instanceof FormStep)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.currentStep = step;\n\t\tthis.currentStep.show();\n\n\t\t// Record the user has viewed the step.\n\t\tstep.viewed = true;\n\t\tstep.$el.addClass('viewed');\n\t};\n\n\t/**\n\t * @func UserForm.jumpToStep\n\t * @param {number} stepNumber\n\t * @param {boolean} [direction] - Defaults to forward (true).\n\t * @desc Jumps to a specific form step.\n\t */\n\tUserForm.prototype.jumpToStep = function (stepNumber, direction) {\n\t\tvar targetStep = this.steps[stepNumber],\n\t\t\tisValid = false,\n\t\t\tforward = direction === void 0 ? true : direction;\n\n\t\t// Make sure the target step exists.\n\t\tif (targetStep === void 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure the step we're trying to set as current is not\n\t\t// hidden by custom display rules. If it is then jump to the next step.\n\t\tif (targetStep.conditionallyHidden()) {\n\t\t\tif (forward) {\n\t\t\t\tthis.jumpToStep(stepNumber + 1);\n\t\t\t} else {\n\t\t\t\tthis.jumpToStep(stepNumber - 1);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Validate the form.\n\t\t// This well effectivly validate the current step and not the entire form.\n\t\t// This is because hidden fields are excluded from validation, and all fields\n\t\t// on all other steps, are currently hidden.\n\t\tisValid = this.$el.valid();\n\n\t\t// Set the 'valid' property on the current step.\n\t\tthis.currentStep.valid = isValid;\n\n\t\t// Users can navigate to step's they've already viewed even if the current step is invalid.\n\t\tif (isValid === false && targetStep.viewed === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.currentStep.hide();\n\t\tthis.setCurrentStep(targetStep);\n\n\t\tthis.$el.trigger('userform.form.changestep', [targetStep.id]);\n\t};\n\n\t/**\n\t * @func UserForm.nextStep\n\t * @desc Advances the form to the next step.\n\t */\n\tUserForm.prototype.nextStep = function () {\n\t\tthis.jumpToStep(this.steps.indexOf(this.currentStep) + 1, true);\n\t};\n\n\t/**\n\t * @func UserForm.prevStep\n\t * @desc Goes back one step (not bound to browser history).\n\t */\n\tUserForm.prototype.prevStep = function () {\n\t\tthis.jumpToStep(this.steps.indexOf(this.currentStep) - 1, false);\n\t};\n\n\t/**\n\t * @func ErrorContainer\n\t * @constructor\n\t * @param {object} element - The error container element.\n\t * @return {object} - The ErrorContainer instance.\n\t * @desc Creates an error container. Used to display step error messages at the top.\n\t */\n\tfunction ErrorContainer(element) {\n\t\tthis.$el = element instanceof jQuery ? element : $(element);\n\n\t\t// Set the error container's heading.\n\t\tthis.$el.find('h4').text(ss.i18n._t('UserForms.ERROR_CONTAINER_HEADER', 'Please correct the following errors and try again:'));\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @func hasErrors\n\t * @return boolean\n\t * @desc Checks if the error container has any error messages.\n\t */\n\tErrorContainer.prototype.hasErrors = function () {\n\t\treturn this.$el.find('.error-list').children().length > 0;\n\t};\n\n\t/**\n\t * @func removeErrorMessage\n\t * @desc Removes an error message from the error container.\n\t */\n\tErrorContainer.prototype.removeErrorMessage = function (fieldId) {\n\t\tthis.$el.find('#' + fieldId + '-top-error').remove();\n\n\t\t// If there are no more error then hide the container.\n\t\tif (!this.hasErrors()) {\n\t\t\tthis.hide();\n\t\t}\n\t};\n\n\t/**\n\t * @func addStepLink\n\t * @param {object} step - FormStep instance.\n\t * @desc Adds a link to a form step as an error message.\n\t */\n\tErrorContainer.prototype.addStepLink = function (step) {\n\t\tvar self = this,\n\t\t\titemID = step.$el.attr('id') + '-error-link',\n\t\t\t$itemElement = this.$el.find('#' + itemID),\n\t\t\tstepID = step.$el.attr('id'),\n\t\t\tstepTitle = step.$el.data('title');\n\n\t\t// If the item already exists we don't need to do anything.\n\t\tif ($itemElement.length) {\n\t\t\treturn;\n\t\t}\n\n\t\t$itemElement = $('<li id=\"' + itemID + '\"><a href=\"#' + stepID + '\">' + stepTitle + '</a></li>');\n\n\t\t$itemElement.on('click', function (e) {\n\t\t\te.preventDefault();\n\t\t\tuserform.jumpToStep(step.id);\n\t\t});\n\n\t\tthis.$el.find('.error-list').append($itemElement);\n\t};\n\n\t/**\n\t * @func removeStepLink\n\t * @param {object} step - FormStep instance.\n\t * @desc Removes a step link from the error container.\n\t */\n\tErrorContainer.prototype.removeStepLink = function (fieldId) {\n\t\tvar stepID = $('#' + fieldId).closest('.form-step').attr('id');\n\n\t\tthis.$el.find('#' + stepID + '-error-link').remove();\n\n\t\t// Hide the error container if we've just removed the last error.\n\t\tif (this.$el.find('.error-list').is(':empty')) {\n\t\t\tthis.hide();\n\t\t}\n\t};\n\n\t/**\n\t * @func ErrorContainer.updateErrorMessage\n\t * @param {object} $input - The jQuery input object which contains the field to validate.\n\t * @param {object} message - The error message to display (html escaped).\n\t * @desc Update an error message (displayed at the top of the form).\n\t */\n\tErrorContainer.prototype.updateErrorMessage = function ($input, message) {\n\t\tvar inputID = $input.attr('id'),\n\t\t\tanchor = '#' + inputID,\n\t\t\telementID = inputID + '-top-error',\n\t\t\tmessageElement = $('#' + elementID),\n\t\t\tdescribedBy = $input.attr('aria-describedby');\n\n\t\t// The 'message' param will be an empty string if the field is valid.\n\t\tif (!message) {\n\t\t\t// Style issues as fixed if they already exist\n\t\t\tmessageElement.addClass('fixed');\n\t\t\treturn;\n\t\t}\n\n\t\tmessageElement.removeClass('fixed');\n\n\t\tthis.show();\n\n\t\tif (messageElement.length === 1) {\n\t\t\t// Update the existing error message.\n\t\t\tmessageElement.show().find('a').html(message);\n\t\t} else {\n\t\t\t// Generate better link to field\n\t\t\t$input.closest('.field[id]').each(function(){\n\t\t\t\tanchor = '#' + $(this).attr('id');\n\t\t\t});\n\n\t\t\t// Add a new error message\n\t\t\tmessageElement = $('<li><a></a></li>');\n\t\t\tmessageElement\n\t\t\t\t.attr('id', elementID)\n\t\t\t\t.find('a')\n\t\t\t\t\t.attr('href', location.pathname + location.search + anchor)\n\t\t\t\t\t.html(message);\n\n\t\t\tthis.$el.find('ul').append(messageElement);\n\n\t\t\t// link back to original input via aria\n\t\t\t// Respect existing non-error aria-describedby\n\t\t\tif (!describedBy) {\n\t\t\t\tdescribedBy = elementID;\n\t\t\t} else if (!describedBy.match(new RegExp('\\\\b' + elementID + '\\\\b'))) {\n\t\t\t\t// Add to end of list if not already present\n\t\t\t\tdescribedBy += \" \" + elementID;\n\t\t\t}\n\n\t\t\t$input.attr('aria-describedby', describedBy);\n\t\t}\n\t};\n\n\t/**\n\t * @func FormStep\n\t * @constructor\n\t * @param {object} element\n\t * @return {object} - The FormStep instance.\n\t * @desc Creates a form step.\n\t */\n\tfunction FormStep(element) {\n\t\tvar self = this;\n\n\t\tthis.$el = element instanceof jQuery ? element : $(element);\n\n\t\t// Find button for this step\n\t\tthis.$elButton = $(\".step-button-wrapper[data-for='\" + this.$el.prop('id') + \"']\");\n\n\t\t// Has the step been viewed by the user?\n\t\tthis.viewed = false;\n\n\t\t// Is the form step valid?\n\t\t// This value is used on form submission, which fails, if any of the steps are invalid.\n\t\tthis.valid = false;\n\n\t\t// The internal id of the step. Used for getting the step from the UserForm.steps array.\n\t\tthis.id = null;\n\n\t\tthis.hide();\n\n\t\tif (CONSTANTS.DISPLAY_ERROR_MESSAGES_AT_TOP) {\n\t\t\tthis.errorContainer = new ErrorContainer(this.$el.find('.error-container'));\n\n\t\t\t// Listen for errors on the UserForm.\n\t\t\tuserform.$el.on('userform.form.error', function (e, validator) {\n\t\t\t\t// The step only cares about errors if it's currently visible.\n\t\t\t\tif (!self.$el.is(':visible')) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Add or update each error in the list.\n\t\t\t\t$.each(validator.errorList, function (i, error) {\n\t\t\t\t\tself.errorContainer.updateErrorMessage($(error.element), error.message);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// Listen for fields becoming valid\n\t\t\tuserform.$el.on('userform.form.valid', function (e, fieldId) {\n\t\t\t\tself.errorContainer.removeErrorMessage(fieldId);\n\t\t\t});\n\t\t}\n\n\t\t// Ensure that page visibilty updates the step navigation\n\t\tthis\n\t\t\t.$elButton\n\t\t\t.on('userform.field.hide userform.field.show', function(){\n\t\t\t\tuserform.$el.trigger('userform.form.conditionalstep');\n\t\t\t});\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Determine if this step is conditionally disabled\n\t *\n\t * @returns {Boolean}\n\t */\n\tFormStep.prototype.conditionallyHidden = function(){\n\t\t// Because the element itself could be visible but 0 height, so check visibility of button\n\t\treturn ! this\n\t\t\t.$elButton\n\t\t\t.find('button')\n\t\t\t.is(':visible');\n\t};\n\n\t/**\n\t * @func ProgressBar\n\t * @constructor\n\t * @param {object} element\n\t * @return {object} - The Progress bar instance.\n\t * @desc Creates a progress bar.\n\t */\n\tfunction ProgressBar(element) {\n\t\tvar self = this;\n\n\t\tthis.$el = element instanceof jQuery ? element : $(element);\n\t\tthis.$buttons = this.$el.find('.step-button-jump');\n\t\tthis.$jsAlign = this.$el.find('.js-align');\n\n\t\t// Update the progress bar when 'step' buttons are clicked.\n\t\tthis.$buttons.each(function (i, stepButton) {\n\t\t\t$(stepButton).on('click', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tself.$el.trigger('userform.progress.changestep', [parseInt($(this).data('step'), 10)]);\n\t\t\t});\n\t\t});\n\n\t\t// Update the progress bar when 'prev' and 'next' buttons are clicked.\n\t\tuserform.$el.on('userform.form.changestep', function (e, stepID) {\n\t\t\tself.update(stepID);\n\t\t});\n\n\t\t// Listen for steps being conditionally shown / hidden by display rules.\n\t\t// We need to update step related UI like the number of step buttons\n\t\t// and any text that shows the total number of steps.\n\t\tuserform.$el.on('userform.form.conditionalstep', function () {\n\t\t\t// Update the step numbers on the buttons.\n\t\t\tvar $visibleButtons = self.$buttons.filter(':visible');\n\n\t\t\t$visibleButtons.each(function (i, button) {\n\t\t\t\t$(button).text(i + 1);\n\t\t\t});\n\n\t\t\t// Update the actual progress bar.\n\t\t\tself.$el.find('.progress-bar').attr('aria-valuemax', $visibleButtons.length);\n\n\t\t\t// Update any text that uses the total number of steps.\n\t\t\tself.$el.find('.total-step-number').text($visibleButtons.length);\n\t\t});\n\n\t\t// Spaces out the steps below progress bar evenly\n\t\tthis.$jsAlign.each(function (index, button) {\n\t\t\tvar $button = $(button),\n\t\t\t\tleftPercent = (100 / (self.$jsAlign.length - 1) * index + '%'),\n\t\t\t\tbuttonOffset = -1 * ($button.innerWidth() / 2);\n\n\t\t\t$button.css({left: leftPercent, marginLeft: buttonOffset});\n\n\t\t\t// First and last buttons are kept within userform-progress container\n\t\t\tif (index === self.$jsAlign.length - 1) {\n\t\t\t\t$button.css({marginLeft: buttonOffset * 2});\n\t\t\t} else if (index === 0) {\n\t\t\t\t$button.css({marginLeft: 0});\n\t\t\t}\n\t\t});\n\n\t\tthis.update(0);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @func ProgressBar.update\n\t * @param {number} stepID - Zero based index of the new step.\n\t * @desc Update the progress element to show a new step.\n\t */\n\tProgressBar.prototype.update = function (stepID) {\n\t\tvar $newStepElement = $($('.form-step')[stepID]),\n\t\t\tstepNumber = 0,\n\t\t\tbarWidth = stepID / (this.$buttons.length - 1) * 100;\n\n\t\t// Set the current step number.\n\t\tthis.$buttons.each(function (i, button) {\n\t\t\tif (i > stepID) {\n\t\t\t\treturn false; // break the loop\n\t\t\t}\n\n\t\t\tif ($(button).is(':visible')) {\n\t\t\t\tstepNumber += 1;\n\t\t\t}\n\t\t});\n\n\t\t// Update elements that contain the current step number.\n\t\tthis.$el.find('.current-step-number').each(function (i, element) {\n\t\t\t$(element).text(stepNumber);\n\t\t});\n\n\t\t// Update aria attributes.\n\t\tthis.$el.find('[aria-valuenow]').each(function (i, element) {\n\t\t\t$(element).attr('aria-valuenow', stepNumber);\n\t\t});\n\n\t\t// Update the CSS classes on step buttons.\n\t\tthis.$buttons.each(function (i, element) {\n\t\t\tvar $element = $(element),\n\t\t\t\t$item = $element.parent();\n\n\t\t\tif (parseInt($element.data('step'), 10) === stepNumber && $element.is(':visible')) {\n\t\t\t\t$item.addClass('current viewed');\n\t\t\t\t$element.removeAttr('disabled');\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$item.removeClass('current');\n\t\t});\n\n\t\t// Update the progress bar's title with the new step's title.\n\t\tthis.$el.siblings('.progress-title').text($newStepElement.data('title'));\n\n\t\t// Update the width of the progress bar.\n\t\tbarWidth = barWidth ? barWidth + '%' : '';\n\t\tthis.$el.find('.progress-bar').width(barWidth);\n\t};\n\n\t/**\n\t * @func FormActions\n\t * @constructor\n\t * @param {object} element\n\t * @desc Creates the navigation and actions (Prev, Next, Submit buttons).\n\t */\n\tfunction FormActions (element) {\n\t\tvar self = this;\n\n\t\tthis.$el = element instanceof jQuery ? element : $(element);\n\n\t\tthis.$prevButton = this.$el.find('.step-button-prev');\n\t\tthis.$nextButton = this.$el.find('.step-button-next');\n\n\t\t// Show the buttons.\n\t\tthis.$prevButton.parent().attr('aria-hidden', false).show();\n\t\tthis.$nextButton.parent().attr('aria-hidden', false).show();\n\n\t\t// Bind the step navigation event listeners.\n\t\tthis.$prevButton.on('click', function (e) {\n\t\t\te.preventDefault();\n\t\t\tself.$el.trigger('userform.action.prev');\n\t\t});\n\t\tthis.$nextButton.on('click', function (e) {\n\t\t\te.preventDefault();\n\t\t\tself.$el.trigger('userform.action.next');\n\t\t});\n\n\t\t// Listen for changes to the current form step, or conditional pages,\n\t\t// so we can show hide buttons appropriatly.\n\t\tuserform.$el.on('userform.form.changestep userform.form.conditionalstep', function () {\n\t\t\tself.update();\n\t\t});\n\n\t\tthis.update();\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @func FormAcrions.update\n\t * @param {number} stepID - Zero based ID of the current step.\n\t * @desc Updates the form actions element to reflect the current state of the page.\n\t */\n\tFormActions.prototype.update = function () {\n\t\tvar numberOfSteps = userform.steps.length,\n\t\t\tstepID = userform.currentStep ? userform.currentStep.id : 0,\n\t\t\ti, lastStep;\n\n\t\t// Update the \"Prev\" button.\n\t\tthis.$el.find('.step-button-prev')[stepID === 0 ? 'hide' : 'show']();\n\n\t\t// Find last step, skipping hidden ones\n\t\tfor(i = numberOfSteps - 1; i >= 0; i--) {\n\t\t\tlastStep = userform.steps[i];\n\n\t\t\t// Skip if step is hidden\n\t\t\tif(lastStep.conditionallyHidden()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Update the \"Next\" button.\n\t\t\tthis.$el.find('.step-button-next')[stepID >= i ? 'hide' : 'show']();\n\n\t\t\t// Update the \"Actions\".\n\t\t\tthis.$el.find('.Actions')[stepID >= i ? 'show' : 'hide']();\n\n\t\t\t// Stop processing last step\n\t\t\tbreak;\n\t\t}\n\t};\n\n\t/**\n\t * @func main\n\t * @desc Bootstraps the front-end.\n\t */\n\tfunction main() {\n\t\tvar progressBar = null,\n\t\t\tformActions = null,\n\t\t\t$userform = $('.userform');\n\n\t\t// If there's no userform, do nothing.\n\t\tif ($userform.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tCONSTANTS.ENABLE_LIVE_VALIDATION = $userform.data('livevalidation') !== void 0;\n\t\tCONSTANTS.DISPLAY_ERROR_MESSAGES_AT_TOP = $userform.data('toperrors') !== void 0;\n\n\t\t// Extend the default validation options with conditional options\n\t\t// that are set by the user in the CMS.\n\t\tif (CONSTANTS.ENABLE_LIVE_VALIDATION === false) {\n\t\t\t$.extend(UserForm.prototype.validationOptions, {\n\t\t\t\tonfocusout: false\n\t\t\t});\n\t\t}\n\n\t\tif (CONSTANTS.DISPLAY_ERROR_MESSAGES_AT_TOP) {\n\t\t\t$.extend(UserForm.prototype.validationOptions, {\n\t\t\t\t// Callback for custom code when an invalid form / step is submitted.\n\t\t\t\tinvalidHandler: function (event, validator) {\n\t\t\t\t\t$userform.trigger('userform.form.error', [validator]);\n\t\t\t\t},\n\t\t\t\tonfocusout: false\n\t\t\t});\n\t\t}\n\n\t\t// Display all the things that are hidden when JavaScript is disabled.\n\t\t$('.userform-progress, .step-navigation').attr('aria-hidden', false).show();\n\n\t\t// Extend classes with common functionality.\n\t\t$.extend(FormStep.prototype, commonMixin);\n\t\t$.extend(ErrorContainer.prototype, commonMixin);\n\n\t\tuserform = new UserForm($userform);\n\n\t\t// Conditionally hide field labels and use HTML5 placeholder instead.\n\t\tif (CONSTANTS.HIDE_FIELD_LABELS) {\n\t\t\t$userform.find('label.left').each(function () {\n\t\t\t\tvar $label = $(this);\n\n\t\t\t\t$('[name=\"' + $label.attr('for') + '\"]').attr('placeholder', $label.text());\n\t\t\t\t$label.remove();\n\t\t\t});\n\t\t}\n\n\t\t// Initialise the form steps.\n\t\tuserform.$el.find('.form-step').each(function (i, element) {\n\t\t\tvar step = new FormStep(element);\n\n\t\t\tuserform.addStep(step);\n\t\t});\n\n\t\tuserform.setCurrentStep(userform.steps[0]);\n\n\t\t// Initialise actions and progressbar\n\t\tprogressBar = new ProgressBar($('#userform-progress'));\n\t\tformActions = new FormActions($('#step-navigation'));\n\n\t\t// Enable jQuery UI datepickers\n\t\t$(document).on('click', 'input.text[data-showcalendar]', function() {\n\t\t\tvar $element = $(this);\n\n\t\t\t$element.ssDatepicker();\n\n\t\t\tif($element.data('datepicker')) {\n\t\t\t\t$element.datepicker('show');\n\t\t\t}\n\t\t});\n\n\t\t// Make sure the form doesn't expire on the user. Pings every 3 mins.\n\t\tsetInterval(function () {\n\t\t\t$.ajax({ url: 'UserDefinedForm_Controller/ping' });\n\t\t}, 180 * 1000);\n\n\t\t// Bind a confirmation message when navigating away from a partially completed form.\n\t\tvar form = $('form.userform');\n\t\tif(typeof form.areYouSure != 'undefined') {\n\t\t\tform.areYouSure({\n\t\t\t\tmessage: ss.i18n._t('UserForms.LEAVE_CONFIRMATION', 'You have unsaved changes!')\n\t\t\t});\n\t\t}\n\t}\n\n\tmain();\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/bundles/UserForms.js","require('./UserForms.js');\nrequire('./FieldEditor.js');\nrequire('./Recipient.js');\n// @todo lang translations\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/bundles/bundle.js"],"sourceRoot":""}