actioncomplete: function(f, act) {
_this.dialog.el.unmask();
if (act.type == 'load') {
+
_this.data = act.result.data;
-
}
var data = _this.data;
// we dont have a form where company name is sent in - and is editable..
//this.form.findField('office_id')
+ if(!data.countries && _this.form.findField('countries')){
+ _this.form.findField('countries').setValue();// set empty array by default...
+ }
if (_this.form.findField('company_id') && _this.form.findField('company_id').setFromData) {
_this.form.findField('company_id').setFromData( data.company_id ? {
}
}
+
+
return;
}
this.loadItemTypes();
Roo.each(this.itemList, function(il) {
if (typeof(il) != 'object') {
+ // no permission for Core offices.. - can not show department...
+ if (il == 'office_id_name' && !Pman.hasPerm('Core.Offices','S')) {
+ return true;
+ }
+
_this.form.addxtype(_this.itemTypes[il]);
return true;
}
_this.form.addxtype(Roo.apply(il, _this.itemTypes[il.name]));
+ return true;
});
var ef = this.dialog.getLayout().getEl().createChild({tag: 'div'});
// load using HTTP
proxy:{
xtype: 'HttpProxy',
- url: baseURL + '/Roo/Companies.html',
+ url: baseURL + '/Roo/core_company',
method: 'GET'
},
- reader: Pman.Readers.Companies,
+ reader: new Roo.data.JsonReader({}, []), //Pman.Readers.Companies,
listeners : {
beforeload : function(st,o)
{
'<b>{name}</b> {address}',
'</div>'
),
- queryParam: 'query[name]',
+ queryParam: 'search[name_starts]',
loadingText: "Searching...",
listWidth: 400,
// load using HTTP
proxy: {
xtype : 'HttpProxy',
- url: baseURL + '/Roo/Office.html',
+ url: baseURL + '/Roo/Core_office.html',
method: 'GET'
},
- reader: Pman.Readers.Office,
+ reader: new Roo.data.JsonReader({}, []), //Pman.Readers.Office,
listeners : {
beforeload : function(st,o)
{
xtype : 'TextField',
width : 300
},
- country : {
+ countries : {
xtype: 'ComboBoxArray',
xns: Roo.form,
fieldLabel : 'Country',
- hiddenName : 'country_id',
- name : 'country',
+ hiddenName : 'countries',
+ name : 'countries_name',
width : 300,
combo : {
xtype: 'ComboBox',
displayField : 'title',
editable : false,
emptyText : "Select Country",
- fieldLabel : 'Journalist',
forceSelection : true,
idField : 'id',
triggerAction : 'all',
xtype : 'TextField',
width : 220
},
+ secure_password : {
+ name : 'secure_password',
+ fieldLabel : "Secure passwords",
+ inputValue : 1,
+ valueOff : 0,
+ checked : true,
+ xtype : 'Checkbox',
+ xns : Roo.form,
+ width : 220,
+ listeners : {
+ check : function (_self, checked) {
+ this.form.findField('passwd1').insecure = false;
+
+ if(!checked){
+ this.form.findField('passwd1').insecure = true;
+ }
+ }
+ }
+ },
project_id_fs : {
xtype : 'FieldSetEx',
name: 'project_id_fs',
}
this.dialog.el.mask("Sending");
this.form.doAction('submit', {
- url: baseURL + '/Roo/Person.html',
+ url: baseURL + '/Roo/core_person',
method: 'POST',
params: {
_id: this._id ,
this.dialog.show();
this.dialog.el.mask("Loading");
this.form.doAction('load', {
- url: baseURL + '/Roo/Person.html',
+ url: baseURL + '/Roo/core_person',
method: 'GET',
params: {
_id: this._id ,