Code:
Ext.application({ name: 'Filariane',
launch: function() {
Ext.regModel('villes', {
fields: [
{name: 'text', type: 'string'},
{name: 'value', type: 'integer'},
]
});
Ext.create('Ext.form.Panel', {
requires: [
'Ext.field.DatePicker',
'Ext.field.Password',
'Ext.field.Select'
],
fullscreen: true,
url: 'hello.html',
method: 'get',
layout: 'vbox',
standardSubmit: 'true',
items: [
{
xtype: 'titlebar',
dock: 'top',
title: 'Ajout d\'un voyage'
},
{
xtype: 'fieldset',
title: 'Ajoutez un voyage',
id: 'formajoutVoyage',
items: [
{
xtype: 'selectfield',
id : 'typevoyage',
label: 'Type de voyage',
options:[
{
text:'option1',
value:'1'
},
{
text:'option2',
value:'2'
}
]
},
{
xtype: 'textfield',
name : 'Id',
label: 'Identifiant',
placeHolder:'Compris entre 3 et 20 caractères'
},
{
xtype: 'datepickerfield',
name : 'DateNaissance',
label: 'Date de naissance',
destroyPickerOnHide:true,
dateFormat: 'd/m/Y',
value:new Date(),
picker:{
yearFrom:1900
}
}
]
},
{
xtype:'panel',
defaults: {
xtype: 'button',
style: 'margin: 1em',
flex: 1
},
layout: {
type: 'hbox'
},
items: [
{
text: 'Valider',
ui: 'confirm',
handler: function() {
this.up('formpanel').submit();
}
}
]
}
]
});
}
});
Can you help me please