title: 'Edit Contact Details',
modal: true,
width: 530,
- height: 300,
+ height: 400,
shadow:true,
minWidth:200,
minHeight:180,
beforeload : function(st,o)
{
- o.params.isOwner = 0;
+ o.params['!comptype'] = 'OWNER';
},
loadexception : Pman.loadException
adderclick : function()
{
var cb = this;
- Pman.Dialog.Companies.show( { id: 0 }, function(data) {
+ Pman.Dialog.CoreCompanies.show( { id: 0 }, function(data) {
cb.setFromData(data);
});
}
xtype : 'TextField',
width : 300
},
+ country : {
+ xtype: 'ComboBoxArray',
+ xns: Roo.form,
+ fieldLabel : 'Country',
+ hiddenName : 'country_id',
+ name : 'country',
+ width : 300,
+ combo : {
+ xtype: 'ComboBox',
+ xns: Roo.form,
+ listeners : {
+ add : function (combo)
+ {
+ Pman.Dialog.ClippingJournalist.show({
+ id:0,
+ _clipping_id : _this.form.findField('id').getValue(),
+ publication : _this.data.media_name,
+ country : _this.data.country,
+ campaign_id : _this.data.project_id,
+ campaign_name : _this.data.project_id_name
+
+ });
+ }
+ },
+ allowBlank : true,
+ alwaysQuery : true,
+ displayField : 'name',
+ editable : false,
+ emptyText : "Select News",
+ fieldLabel : 'Journalist',
+ forceSelection : true,
+ idField : 'id',
+ loadingText : "Searching...",
+ minChars : 2,
+ pageSize : 20,
+ tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b>, {publication}, {country_tr}</div>',
+ triggerAction : 'all',
+ typeAhead : true,
+ valueField : 'id',
+ width : 480,
+ store : {
+ xtype: 'Store',
+ xns: Roo.data,
+ listeners : {
+ beforeload : function (_self, o){
+ o.params = o.params || {};
+ o.params.campaign_id = _this.data.project_id;
+ }
+ },
+ isLocal : false,
+ proxy : {
+ xtype: 'HttpProxy',
+ xns: Roo.data,
+ method : 'GET',
+ url : baseURL + '/Roo/Clipping_journalist.php'
+ },
+ reader : {
+ xtype: 'JsonReader',
+ xns: Roo.data,
+ id : 'id',
+ root : 'data',
+ totalProperty : 'total',
+ fields : [
+ {"name":"id","type":"int"},
+ {"name":"name","type":"string"}
+ ]
+ }
+ }
+ }
+ },
passwd1 : {
name : 'passwd1',
fieldLabel : "New Password ",
value : '',
allowBlank : true, // must be filled in as we rely on it for login details..
- inputType: 'password',
+ inputType: 'password', // << if comment out this input type, it should be ok
xtype : 'SecurePass',
width : 220,
imageRoot : rootURL + '/Pman/templates/images'
fieldLabel : "Password (type again to confirm)",
value : '',
allowBlank : true, // must be filled in as we rely on it for login details..
- inputType: 'password',
+ inputType: 'password', // << if comment out this input type, it should be ok
xtype : 'TextField',
width : 220
},
return;
}
- if (!this.form.findField('company_id').getValue()) {
+ if (this.form.findField('company_id') && !this.form.findField('company_id').getValue()) {
Ext.MessageBox.alert("Error", "Select a Company");
return;
}
this.data = data;
this.create();
this.form.reset();
- if (data._fetch) {
+ if ( this._id) {
this.dialog.show();
this.dialog.el.mask("Loading");
this.form.doAction('load', {
});
// this.fireEvent('show');
return;
- } else {
- this.form.setValues(data);
}
+ //} else {
+ this.form.setValues(data);
+ //}
this.form.fireEvent('actioncomplete', this.form,{
type : 'setdata',
data: data
var c = ar[i];
i++;
- Pman.request({
+ new Pman.Request({
url : baseURL+'/Core/SendIntro.html',
method : 'POST',
params: c,