[TASK] EXT:form - Set proper default values in form wizard
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Resources / Public / JavaScript / Wizard / Elements / Predefined / Email.js
1 Ext.namespace('TYPO3.Form.Wizard.Elements.Predefined');
2
3 /**
4 * The predefined EMAIL element
5 *
6 * @class TYPO3.Form.Wizard.Elements.Predefined.Email
7 * @extends TYPO3.Form.Wizard.Elements.Basic.Textline
8 */
9 TYPO3.Form.Wizard.Elements.Predefined.Email = Ext.extend(TYPO3.Form.Wizard.Elements.Basic.Textline, {
10 /**
11 * Initialize the component
12 */
13 initComponent: function() {
14 var config = {
15 configuration: {
16 attributes: {
17 name: 'email',
18 type: 'email'
19 },
20 label: {
21 value: TYPO3.l10n.localize('elements_label_email')
22 },
23 validation: {
24 required: {
25 breakOnError: 0,
26 showMessage: 1,
27 message: TYPO3.l10n.localize('tx_form_system_validate_required.message'),
28 error: TYPO3.l10n.localize('tx_form_system_validate_required.error')
29 },
30 email: {
31 breakOnError: 0,
32 showMessage: 1,
33 message: TYPO3.l10n.localize('tx_form_system_validate_email.message'),
34 error: TYPO3.l10n.localize('tx_form_system_validate_email.error')
35 }
36 }
37 }
38 };
39
40 // MERGE config
41 Ext.merge(this, config);
42
43 // call parent
44 TYPO3.Form.Wizard.Elements.Predefined.Email.superclass.initComponent.apply(this, arguments);
45 }
46 });
47
48 Ext.reg('typo3-form-wizard-elements-predefined-email', TYPO3.Form.Wizard.Elements.Predefined.Email);