
kerio.waw.ui.userTemplateEditor = {

x_m: function(x_n) {
this.x_ga = x_n;
var x_2w = this.x_ga + '_';
var x_1b = kerio.lib;
var x_x = x_1b.x_x;
var x_17 = kerio.waw.shared.x_17;
var x_o = (kerio.waw.status.x_p.x_q === x_r.x_s.x_t);
var x_1xp      = new x_17.x_78(x_2w + 'x_1xq', { x_o: x_o });
var x_1xr       = new x_17.x_as(x_2w + 'x_aw', { x_o: x_o });
var x_1xs = new x_17.x_bq(x_2w + 'x_1xt', { x_o: x_o });
var x_sx = {
x_1e: [
{
x_1x: x_1xp,
x_23: x_x('Rights', 'common'),
x_1j: 'x_1xx'
},
{
x_1x: x_1xr,
x_23: x_x('Quota', 'userList'),
x_1j: 'x_1xy'
},
{
x_1x: x_1xs,
x_23: x_x('Preferences', 'userList'),
x_1j: 'x_1xz'
}
]
};
var x_sw = new x_1b.x_py(x_2w + 'x_pz'    , x_sx);
var x_ja = x_1b.x_a1(
{	x_a2: 400,
en: 400,
cs: 415,
sk: 415,
es: 415,
hr: 435,
pt: 435,
de: 450,
ru: 450,
hu: 470
});
var x_jb = x_1b.x_a1(
{	x_a2: 530,
en: 520,
hr: 520,
zh: 520,
ja: 520
});
var x_10 = {
x_1u: x_ja,
x_l0: x_ja,
x_1v: x_jb,
x_l1: x_jb,
x_1w: true,
x_1y: x_x('User Template for Current Domain' , 'templateEditor'),
x_1x: x_sw,
x_1z: [
{	x_20: true,
x_1j: 'x_1y1',
x_23: x_x('OK', 'common'),
x_24: {
x_1n: x_x('Saving data…', 'common')
},
x_1m: x_o,

x_25: function(x_32) {
x_32.x_16.x_iy.call(x_32.x_16);
}
},
{	x_21: true,
x_1j: 'x_1y2',
x_23: (x_o)
? x_x('Close', 'common')
: x_x('Cancel', 'common')
}
]
};
var x_16 = new x_1b.x_26(this.x_ga, x_10);
this.x_2a(x_16);
x_16.x_27(
{
x_1xp: x_1xp,
x_1xr: x_1xr,
x_1xs: x_1xs,
x_sw: x_sw,
x_8e: '',
x_5d: {}
}
);
return x_16;
},
x_2a: function(x_2b) {

x_2b.x_2c = function(x_28){
this.x_8e = x_28.x_8e;
this.x_5d = x_28.x_5d;
this.x_sw.x_lf('x_1xx');
var x_9j = {'query': {
'conditions': [{
'firstOperand': {
'operandValue': this.x_8e,
'isColumnName': false
},
'comparator': x_r.x_3s.x_8i,
'secondOperand': {
'operandValue': 'id',
'isColumnName': true
}
}],
'start': 0,
'limit': 100
}};
var x_66 = {
x_6a: '/admin/stub/dataMiner.php',
x_6p: 'post',
x_68: 'domainList',
x_28: {'object': 'DomainManager', 'method': 'get', 'params': kerio.lib.x_6r(x_9j)},
x_2e: this.x_ez,
x_2q: this
};
kerio.lib.x_6t.x_6u(x_66);
};
x_2b.x_ez = function(x_6v){
var x_dg = x_6v.x_ac;
var x_16 = this;
if (!x_dg) {
return;
}
var x_x = kerio.lib.x_x;
var x_om = x_dg.domainList[0];
var x_f3 = x_om.name;
var x_al = x_om.templateData;
x_16.x_om = x_om;
if (x_om.id === x_r.x_3s.x_77) {
x_f3 = x_x('Local User Database', 'common');
}
x_16.x_2m(x_x(	'User Template for \'%1\' Domain', 'templateEditor',
{x_49 : [x_f3]}));
var x_1xp = x_16.x_1xp;
var x_1xr = x_16.x_1xr;
var x_1xs = x_16.x_1xs;
x_1xp.x_7j(x_al.rights);
x_1xr.x_bn(x_al.quota);
x_1xs.x_bu(x_al);
};
x_2b.x_jo = function() {
this.x_1xp.x_2h();
this.x_1xr.x_2h();
this.x_1xs.x_2h();
};

x_2b.x_iy = function(){
var x_16 = this;
var x_1xp = x_16.x_1xp;
var x_1xr = x_16.x_1xr;
var x_1xs = x_16.x_1xs;
var x_al = x_16.x_1xs.x_bv();
x_al.rights = x_16.x_1xp.x_7g();
x_al.quota = x_16.x_1xr.x_bj();
x_16.x_5d.x_al = x_al;
var x_47 = x_16.x_om;
x_47.templateData = x_al;
x_47 = {
"domainIds": [x_16.x_8e],
"details": x_47
};
var x_j4 = {
x_6a: '/admin/stub/dataMiner.php',
x_6p: 'post',
x_28: {
object: 'DomainManager',
method: 'set',
params: kerio.lib.x_6r(x_47)
},
x_2q: this,
x_2e: x_16.x_jk
};
kerio.lib.x_6t.x_6u(x_j4);
};
x_2b.x_jk = function(x_6v) {
var x_dg = x_6v.x_ac;
if (!x_dg) {
return;
}
var x_1kv = {
x_28: {
object: 'DomainManager',
method: '',
params: kerio.lib.x_6r({})
}
};
if (!x_6v.x_6x) {
x_1kv.x_28.method = 'reset';
} else {
x_1kv.x_28.method = 'apply';
this.x_2r();
}
kerio.lib.x_6t.x_6u(x_1kv);
};}}; 