xns: Roo,
closable : false,
collapsible : false,
- height : 300,
+ height : 200,
modal : true,
resizable : false,
- title : "Edit / Create Groups",
- width : 400,
+ title : "Edit / Create Currency",
+ width : 500,
items : [
{
xtype: 'ContentPanel',
actioncomplete : function(_self,action)
{
if (action.type == 'setdata') {
- //_this.dialog.el.mask("Loading");
- //this.load({ method: 'GET', params: { '_id' : _this.data.id }});
- return;
+ if(_this.data.curr_id){
+ _this.dialog.el.mask("Loading");
+ this.load({ method: 'GET', params: { '_id' : _this.data.curr_id }});
+ return;
+ }
+ return;
}
if (action.type == 'load') {
_this.dialog.el.unmask();
},
method : 'POST',
style : 'margin:10px;',
- url : baseURL + '/Roo/Groups.php',
+ url : baseURL + '/Roo/Curr_symbol.php',
items : [
{
xtype: 'TextField',
xns: Roo.form,
+ allowBlank : false,
fieldLabel : 'Name',
- name : 'name',
+ name : 'curr_name',
width : 200
},
{
xtype: 'TextField',
xns: Roo.form,
- fieldLabel : 'Type',
- name : 'type',
- width : 75
+ allowBlank : false,
+ fieldLabel : 'Symbol',
+ name : 'curr_symbol',
+ width : 200
},
{
- xtype: 'ComboBox',
+ xtype: 'TextField',
xns: Roo.form,
allowBlank : false,
- editable : false,
- emptyText : "Select Person",
- forceSelection : true,
- listWidth : 400,
- loadingText : "Searching...",
- minChars : 2,
- pageSize : 20,
- qtip : "Select Person",
- selectOnFocus : true,
- triggerAction : 'all',
- typeAhead : true,
- width : 300,
- tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
- queryParam : 'query[name]',
- fieldLabel : 'Leader',
- valueField : 'id',
- displayField : 'name',
- hiddenName : 'leader',
- name : 'leader_name',
- store : {
- xtype: 'Store',
- xns: Roo.data,
- remoteSort : true,
- sortInfo : { direction : 'ASC', field: 'id' },
- listeners : {
- beforeload : function (_self, o){
- o.params = o.params || {};
- // set more here
- }
- },
- proxy : {
- xtype: 'HttpProxy',
- xns: Roo.data,
- method : 'GET',
- url : baseURL + '/Roo/Person.php'
- },
- reader : {
- xtype: 'JsonReader',
- xns: Roo.data,
- id : 'id',
- root : 'data',
- totalProperty : 'total',
- fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
- }
- }
+ fieldLabel : 'Abbr.',
+ name : 'curr_abbr',
+ width : 200
+ },
+ {
+ xtype: 'Checkbox',
+ xns: Roo.form,
+ boxLabel : 'Yes / No',
+ fieldLabel : 'Base',
+ inputValue : 'true',
+ name : 'curr_base',
+ valueOff : 0
},
{
xtype: 'Hidden',
xns: Roo.form,
- name : 'id'
+ name : 'curr_id'
}
]
}
listeners : {
click : function (_self, e)
{
- // do some checks?
-
-
- _this.dialog.el.mask("Saving");
_this.form.doAction("submit");
}