1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
var employee_data = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url: '../../../PHP/get_list_metier.php'}),
reader: new Ext.data.JsonReader({root: 'metier'
},[ 'id', 'cpt_libelle_fr']),
remoteSort: false
});
employee_data.on('load', function() {
// data loaded, do something with it here...
var employee_name = new Ext.form.RadioGroup({
xtype: 'radiogroup',
fieldLabel: "test",
name: "test",
columns: 2,
items: [
{boxLabel: 'Oui', name: 'cpt1',inputValue: "test"},
{boxLabel: 'Non', name: 'cpt1', inputValue:" " }
]
});
// create_fiche.add(
// employee_name
// );
create_fiche.render(document.body);
});
/*
* ================ création d'une fiche =======================
*/
var create_fiche = new Ext.form.FormPanel({
labelAlign: 'top',
title: 'Création d\'une fiche',
bodyStyle:'padding:5px',
width: 600,
items: [{
layout:'column',
border:false,
items:[{
columnWidth:.5,
layout: 'form',
border:false,
items: [{
xtype:'textfield',
fieldLabel: 'ID',
value: id_user,
name: 'UID',
anchor:'95%'
}, {
xtype:'textfield',
fieldLabel: 'Mail',
name: 'Mail',
value:mail_user,
vtype:'email',
anchor:'95%'
}]
},{
columnWidth:.5,
layout: 'form',
border:false,
items: [{
xtype:'textfield',
fieldLabel: 'Nom',
value: nom_user,
name: 'Nom',
anchor:'95%'
},{
xtype:'textfield',
fieldLabel: 'Prénom',
value: prenom_user,
name: 'Prénom',
anchor:'95%'
}]
}]
},{
xtype:'tabpanel',
plain:true,
activeTab: 0,
height:235,
/*
By turning off deferred rendering we are guaranteeing that the
form fields within tabs that are not activated will still be rendered.
This is often important when creating multi-tabbed forms.
*/
deferredRender: false,
defaults:{bodyStyle:'padding:10px'},
items:[{
title:'Métiers informatiques',
layout:'form',
defaults: {width: 230},
//defaultType: 'radiogroup',
items: [
employee_data.load()
]
},{
title:'Technologies études',
layout:'form',
defaults: {width: 230},
defaultType: 'textfield',
items: [{
fieldLabel: 'Home',
name: 'home',
value: ' '
}]
}]
}],
buttons: [{
text: 'Save',
handler:fct_create_fiche
},{
text: 'Cancel'
}]
});
var creer_fiche = {
title: 'Mon espace',
id: 'create_fiche-panel',
layout: 'fit',
bodyStyle: 'padding:15px;',
items: create_fiche
}; |
Partager