| 1 |
import Component from './component'; |
| 2 |
import FieldsMapControl from './fields-map-control'; |
| 3 |
import FieldsRepeaterControl from './fields-repeater-control'; |
| 4 |
|
| 5 |
export default class FormsModule extends elementorModules.editor.utils.Module { |
| 6 |
onElementorInit() { |
| 7 |
const ReplyToField = require( './reply-to-field' ); |
| 8 |
|
| 9 |
this.replyToField = new ReplyToField(); |
| 10 |
|
| 11 |
// Form fields |
| 12 |
const AcceptanceField = require( './fields/acceptance' ), |
| 13 |
TelField = require( './fields/tel' ); |
| 14 |
|
| 15 |
this.Fields = { |
| 16 |
tel: new TelField( 'ehp-form' ), |
| 17 |
acceptance: new AcceptanceField( 'ehp-form' ), |
| 18 |
}; |
| 19 |
|
| 20 |
elementor.addControlView( 'Fields_map', FieldsMapControl ); |
| 21 |
elementor.addControlView( 'form-fields-repeater', FieldsRepeaterControl ); |
| 22 |
|
| 23 |
elementorPromotionsData.collect_submit = window.ehpFormsPromotionData; |
| 24 |
} |
| 25 |
|
| 26 |
onElementorInitComponents() { |
| 27 |
$e.components.register( new Component( { manager: this } ) ); |
| 28 |
} |
| 29 |
} |
| 30 |
|