1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.AdminPerson = {
10 'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email",
11 '7573b7fd7836c9118dbfb69f3abf3858' :"Change / Set Password",
12 'abb1d799e06329cb0c38276ea918300b' :"Secure passwords",
13 '2b0d7f748b64304e6657207cb03cd8f2' :"Edit / Create Staff Details",
14 '7e17f8478e121357b78646ca5b5d5ac9' :"Displaying Settings {0} - {1} of {2}",
15 'bcc254b55c4a1babdf1dcb82c207506b' :"Phone",
16 '1243daf593fa297e07ab03bf06d925af' :"Searching...",
17 '3544848f820b9d94a3f3871a382cf138' :"New password",
18 '689202409e48743b914713f96d93947c' :"Value",
19 '8a25a3ae30ab6e8ceb5b8c4009a3336f' :"Role / Position",
20 'be5f40c0d2692cf4e9f8be8d389737a5' :"Department / Office",
21 '315fce99b77b7f392bf68d5eb14f88c7' :"Password (type again to confirm)",
22 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
23 'e4709a73a287a5f033f5b1b5142cb74d' :"System Settings",
24 '49ee3087348e8d44e1feda1917443987' :"Name",
25 'a5da1d5de4f3a80e2acf5227283c630d' :"Staff Details",
26 'c373dd4bd4ba0b5d3e0c7522c5629880' :"Select Office",
27 '662de0725ac8055bff7edae51fbf3c78' :"No Settings Found",
28 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
29 'e55f75a29310d7b60f7ac1d390c8ae42' :"Module",
30 'b5a7adde1af5c87d7fd797b6245c2a39' :"Description",
31 'c9cc8cce247e49bae79f15173ce97354' :"Save"
34 'secure_password_fieldLabel' : 'abb1d799e06329cb0c38276ea918300b' /* Secure passwords */ ,
35 'role_fieldLabel' : '8a25a3ae30ab6e8ceb5b8c4009a3336f' /* Role / Position */ ,
36 'name_fieldLabel' : '49ee3087348e8d44e1feda1917443987' /* Name */ ,
37 'office_id_name_emptyText' : 'be5f40c0d2692cf4e9f8be8d389737a5' /* Department / Office */ ,
38 'passwd2_fieldLabel' : '315fce99b77b7f392bf68d5eb14f88c7' /* Password (type again to confirm) */ ,
39 'phone_fieldLabel' : 'bcc254b55c4a1babdf1dcb82c207506b' /* Phone */ ,
40 'passwd1_fieldLabel' : '3544848f820b9d94a3f3871a382cf138' /* New password */ ,
41 'office_id_name_fieldLabel' : 'be5f40c0d2692cf4e9f8be8d389737a5' /* Department / Office */ ,
42 'office_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
43 'email_fieldLabel' : 'ce8ae9da5b7cd6c3df2929543a9af92d' /* Email */ ,
44 'office_id_name_qtip' : 'c373dd4bd4ba0b5d3e0c7522c5629880' /* Select Office */
50 show : function(data, cb)
58 this.dialog.show.apply(this.dialog, Array.prototype.slice.call(arguments).slice(2));
61 this.form.setValues(data);
62 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
70 this.dialog = Roo.factory({
71 xtype : 'LayoutDialog',
77 title : _this._strings['2b0d7f748b64304e6657207cb03cd8f2'] /* Edit / Create Staff Details */,
82 xtype : 'LayoutRegion',
89 text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
91 click : function (_self, e)
101 text : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
103 click : function (_self, e)
106 if (_this.form.findField('passwd1')) {
108 var p1 = _this.form.findField('passwd1').getValue();
109 var p2 = _this.form.findField('passwd2').getValue();
111 if (_this.sendAfterSave && !p1.length) {
112 Roo.MessageBox.alert("Error", "You must create a password to send introduction mail");
116 if (Pman.Login.authUser.id < 0 && !p1.length) {
117 Roo.MessageBox.alert("Error", "You must create a password for the admin account");
122 if (p1.length || p2.length) {
124 Roo.MessageBox.alert("Error", "Passwords do not match");
133 _this.form.doAction("submit");
143 xtype : 'ContentPanel',
145 title : _this._strings['a5da1d5de4f3a80e2acf5227283c630d'] /* Staff Details */,
153 style : 'margin:10px;',
154 url : baseURL + '/Roo/core_person',
156 actioncomplete : function(_self,action)
158 if (action.type == 'setdata') {
159 _this.dialog.layout.getRegion('center').showPanel(0);
160 //_this.dialog.el.mask("Loading");
161 if ( _this.data.id* 1 > 0) {
162 this.load({ method: 'GET', params: { '_id' : _this.data.id }});
165 this.findField('company_id').setValue(Pman.Login.authUser.company_id);
168 if (action.type == 'load') {
169 _this.dialog.el.unmask();
172 if (action.type =='submit') {
174 _this.dialog.el.unmask();
177 if (_this.callback) {
178 _this.callback.call(_this, _this.form.getValues());
184 rendered : function (form)
195 fieldLabel : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
204 fieldLabel : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
212 fieldLabel : _this._strings['8a25a3ae30ab6e8ceb5b8c4009a3336f'] /* Role / Position */,
220 fieldLabel : _this._strings['bcc254b55c4a1babdf1dcb82c207506b'] /* Phone */,
235 displayField : 'name',
237 emptyText : _this._strings['be5f40c0d2692cf4e9f8be8d389737a5'] /* Department / Office */,
238 fieldLabel : _this._strings['be5f40c0d2692cf4e9f8be8d389737a5'] /* Department / Office */,
239 forceSelection : true,
240 hiddenName : 'office_id',
242 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
244 name : 'office_id_name',
246 qtip : _this._strings['c373dd4bd4ba0b5d3e0c7522c5629880'] /* Select Office */,
247 queryParam : 'query[name]',
248 selectOnFocus : true,
249 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
250 triggerAction : 'all',
255 beforequery : function (combo, query, forceAll, cancel, e)
257 var coid = _this.form.findField('company_id').getValue();
259 Ext.MessageBox.alert("Error", "Select An Company First");
269 sortInfo : { direction : 'ASC', field: 'id' },
271 beforeload : function (_self, o){
272 o.params = o.params || {};
273 var coid = _this.form.findField('company_id').getValue();
274 o.params.company_id = coid;
282 url : baseURL + '/Roo/core_office',
287 xtype : 'JsonReader',
288 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
291 totalProperty : 'total',
306 legend : _this._strings['7573b7fd7836c9118dbfb69f3abf3858'] /* Change / Set Password */,
307 style : 'width:370px',
312 xtype : 'SecurePass',
313 fieldLabel : _this._strings['3544848f820b9d94a3f3871a382cf138'] /* New password */,
314 inputType : 'password',
323 fieldLabel : _this._strings['315fce99b77b7f392bf68d5eb14f88c7'] /* Password (type again to confirm) */,
324 inputType : 'password',
333 fieldLabel : _this._strings['abb1d799e06329cb0c38276ea918300b'] /* Secure passwords */,
335 name : 'secure_password',
338 check : function (_self, checked)
340 this.form.findField('passwd1').insecure = false;
343 this.form.findField('passwd1').insecure = true;
362 title : _this._strings['e4709a73a287a5f033f5b1b5142cb74d'] /* System Settings */,
364 activate : function() {
368 _this.grid.footer.onClick('first');
376 autoExpandColumn : 'data',
382 //_this.dialog = Pman.Dialog.FILL_IN
383 if (_this.panel.active) {
384 this.footer.onClick('first');
387 rowdblclick : function (_self, rowIndex, e)
392 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
393 _this.grid.footer.onClick('refresh');
400 xtype : 'PagingToolbar',
402 displayMsg : _this._strings['7e17f8478e121357b78646ca5b5d5ac9'] /* Displaying Settings {0} - {1} of {2} */,
403 emptyMsg : _this._strings['662de0725ac8055bff7edae51fbf3c78'] /* No Settings Found */,
416 '|xns' : 'Roo.Toolbar'
420 cls : 'x-btn-text-icon',
421 icon : rootURL + '/Pman/templates/images/trash.gif',
422 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
426 Pman.genericDelete(_this, 'core_person_settings');
430 '|xns' : 'Roo.Toolbar'
437 sortInfo : { field : 'name', direction: 'ASC' },
439 beforeload : function (_self, o)
442 o.params = o.params ? o.params : {};
443 o.params.person_id = _this.form.findField('id').getValue();
453 url : baseURL + '/Roo/core_person_settings',
458 xtype : 'JsonReader',
461 totalProperty : 'total',
467 xtype : 'RowSelectionModel',
470 afterselectionchange : function (_self)
472 // load project members.
480 xtype : 'ColumnModel',
482 header : _this._strings['e55f75a29310d7b60f7ac1d390c8ae42'] /* Module */,
489 xtype : 'ColumnModel',
490 dataIndex : 'description',
491 header : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
492 renderer : function(v) { return String.format('{0}', v); },
499 xtype : 'ColumnModel',
501 header : _this._strings['689202409e48743b914713f96d93947c'] /* Value */,
502 renderer : function(v) { return String.format('{0}', v); },