
kerio.waw.ui.userEditor = {
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_1wv = ('x_c1' === x_n);
var x_1ww = x_r.x_1c4;
var x_br = x_1b.x_a1(
{	x_a2: 105,
es: 155,
fr: 140,
ja: 165,
nl: 125,
pt: 135,
ru: 145
});
var x_11u = {
x_1e: [
{
x_1f: 'x_1g',
x_1j: 'x_1wx',
x_br: x_br,
x_1e: [
{
x_1j: 'x_1j',
x_1m: true
},
{
x_1j: 'x_cx',
x_23: x_x('Username:', 'common'),
x_93: 127,
x_ge: true,
x_b6: {
x_b7: false,
x_nv: 'x_1jy'
}
}, {
x_1j: 'x_f7',
x_23: x_x('Full name:', 'userEditor'),
x_93: 127,
x_ge: true
}, {
x_1j: 'x_f8',
x_23: x_x('Description:', 'common'),
x_93: 255,
x_ge: true
}, {
x_1j: 'x_1wy',
x_23: x_x('Email address:', 'userEditor'),
x_93: 127,
x_b6: {
x_b7: true,
x_nv: 'x_1wz'
}
}, {
x_1f: 'x_9u',
x_1j: 'x_1x0',
x_23: x_x('Authentication:', 'userEditor'),
x_5z: [{
x_1o: x_1ww.x_1c5,
x_23: x_x('Internal user database', 'userEditor')
}, {
x_1o: x_1ww.x_1x1,
x_23: x_x('Active Directory®', 'userEditor')
}],
x_a5: 'x_23',
x_a7: 'x_1o',
x_1o: x_1ww.x_1c5,

x_9t: function(x_1c, x_9u, x_1o){
if (!x_1c) {
return;
}
var x_1c5 = x_r.x_1c4.x_1c5;
var x_1x2 = x_1c.x_1x2;
var x_1x3 = (x_1c5 === x_1o);
x_1c.x_84(['x_ns', 'x_1x4'], !x_1x3);
if (!x_1x2 && x_1x3) {
x_1c.x_84(['x_1x4'], true);
}
var x_1x5 = (	!x_1x3 || !x_1x2 ||
x_1c.x_ns.x_2t() === x_1c.x_1x4.x_2t());
x_1c.x_1x4.x_1g4(!x_1x5);
}}, {
x_1j: 'x_ns',
x_23: x_x('Password:', 'common'),
x_1jz: true,
x_1u: '100%',
x_1k0: '**********',
x_93: 24,
x_ge: true,

x_9t: function(x_1c, x_ax, x_1o) {
if (x_1o && !x_1c.x_1x2) {
x_1c.x_1x2 = true;
}
x_1c.x_84(['x_1x4'], '' === x_1o && !x_1c.x_1x2);
x_1c.x_16.x_1x6();
}}, {
x_1j: 'x_1x4',
x_23: x_x('Confirm password:', 'userEdit'),
x_1jz: true,
x_1u: '100%',
x_31: true,
x_93: 24,
x_ge: true,
x_1x7: true,

x_9t: function(x_1c) {
x_1c.x_16.x_1x6();
}
}]
},{
x_1f: 'x_5x',
x_1j: 'x_1x8',
x_1e: [
{
x_1f: 'x_1q',
x_1j: 'x_1wu',
x_1s: x_x('Account is enabled', 'userEditor'),
x_1l: true,
x_7d: true
},
{
x_1f: 'x_1i',
x_1j: 'x_1x9',
x_1o: x_x('(is disabled in Active Directory domain)', 'userEdit'),x_1m: true
}
]
},
{
x_1f: 'x_79',
x_1j: 'x_1xa',
x_23: x_x('Domain Template', 'userEditor'),
x_1e: [
{	x_1f: 'x_7a',
x_7b: 'x_1xb',
x_1s: x_x('This user\'s configuration is defined by the domain template', 'userEditor'),
x_1o: 1,
x_7d: true,
x_1l: true,

x_9t: function(x_1c, x_1q, x_7d) {
var x_16 = x_1c.x_16;
x_16.x_1xc(x_16.x_sw, x_7d);
}},
{	x_1f: 'x_7a',
x_7b: 'x_1xb',
x_1s: x_x('This user has a separate configuration', 'userEditor'),
x_1o: 0,
x_7d: false,
x_1l: true
}
]
},
{
x_1f: 'x_1i',
x_1j: 'x_1xd',
x_1l: true,
x_kp: '<b>' + x_x('This user must have full-access rights for administration at any time. For that reason some values can\'t be changed.', 'userEditor') + '</b>',
x_1m: true }
]
};var x_1d4 = {
x_1j: x_2w + 'x_d5',
x_n: x_n
};
var x_1xe = new x_17.x_bw(x_1d4);
var x_1xf = {
x_1e: [
{x_1f: 'x_79',
x_23: x_x('Automatic login', 'userEditor'),
x_1e: [
{
x_1f: 'x_1i',
x_1l: true,
x_1o: x_x('Assume that the user works on the following hosts:', 'userEdit')
},
{
x_1f: 'x_1q',
x_1j: 'x_1t0',
x_1s: x_x('Firewall', 'common'),
x_1l: true
},
{
x_1f: 'x_1q',
x_1j: 'x_1xg',
x_1s: x_x('Specific host IP addresses', 'userEditor'),
x_1l: true,

x_9t: function(x_1c, x_ax, x_bg) {
x_1c.x_16.x_1xh.call(x_1c, ['x_1xi', 'x_1xj'], x_bg);
} },
{
x_1j: 'x_1xi',
x_31: true,
x_b2: 1,
x_1u: 323,x_1l: true,
x_93: 511,
x_b6: {
x_b7: false,
x_nv: 'x_11d'
}
},
{
x_1f: 'x_1i',
x_1j: 'x_1xj',
x_1l: true,
x_b2: 1,
x_1o: x_x('Use semicolons (;) to separate individual entries', 'userEdit'),
x_31: true
},
{
x_1f: 'x_b3',
x_1e: [
{
x_1f: 'x_1q',
x_1j: 'x_1xk',
x_1s: x_x('Address group', 'userEdit'),
x_1l: true,

x_9t: function(x_1c, x_ax, x_bg) {
x_1c.x_16.x_1xh.call(x_1c, 'x_1xl', x_bg);
} },
{
x_1f: 'x_9u',
x_1j: 'x_1xl',
x_5z: [],
x_a5: 'x_a6',
x_a7: 'x_1j',
x_31: true
}
]
}
]
},{x_1f: 'x_79',
x_23: x_x('VPN client address', 'userEditor'),
x_1e: [
{
x_1f: 'x_1q',
x_1j: 'x_1xm',
x_1s: x_x('Assign a static IP address to VPN client', 'userEditor'),
x_1l: true,

x_9t: function(x_1c, x_ax, x_bg) {
x_1c.x_16.x_1xh.call(x_1c, 'x_1xn', x_bg);
}},
{
x_1j: 'x_1xn',
x_31: true,
x_1l: true,
x_b2: 1,
x_1u: 200,
x_93: 15,
x_b6: {
x_b7: false,
x_nv: 'x_t2'
},

x_94: kerio.waw.shared.x_3e.x_1ka
}
]
}]
};var x_11z     = new x_1b.x_1t(x_2w + 'x_12p'    , x_11u);
var x_1xo      = x_1xe;
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_1xu   = new x_1b.x_1t(x_2w + 'x_1xv'  , x_1xf);
var x_sx = {
x_1e: [
{
x_1x: x_11z,
x_23: x_x('General', 'common'),
x_1j: 'x_16s'
},
{
x_1x: x_1xo,
x_23: x_x('Groups', 'userList'),
x_1j: 'x_1xw'
},
{
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'
},
{
x_1x: x_1xu,
x_23: x_x('IP Addresses', 'userList'),
x_1j: 'x_1y0'
}
]
};
var x_sw;
x_sw = new x_1b.x_py(x_2w + 'x_pz'    , x_sx);
var x_ja = x_1b.x_a1(
{	x_a2: 400,
de: 450,
es: 425,
fr: 430,
hr: 435,
ja: 430,
nl: 440,
pl: 430,
pt: 430,
ru: 500,
sv: 415
});
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_1wv)
? x_x('Add User', 'userEditor')
: (x_o)
? x_x('View User', 'userEditor')
: x_x('Edit User', 'userEditor')
,
x_1x: x_sw,
x_1z: [
{	x_20: true,
x_1j: 'x_1y1',
x_23: x_x('OK', 'common'),
x_1m: x_o,
x_24: {
x_1n: x_x('Saving data…', 'common')
},

x_25: function(x_32) {
x_32.x_16.x_iy.call(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);
var x_p6 = x_fi.x_q0(x_sx.x_1e, 'x_1x', 'x_q1');
x_16.x_p6 = new kerio.lib.x_q2(x_2w + 'x_q3', x_p6);
x_16.x_q4 = x_fi.x_q0(x_sx.x_1e, 'x_1j', 'string');
if (x_o) {
x_16.x_p6.x_7f();
}
this.x_2a(x_16);
x_16.x_27(
{	x_n: x_n,
x_o: x_o,
x_1wv: x_1wv,
x_sw: x_sw,
x_11z: x_11z,
x_1xp: x_1xp,
x_1xu: x_1xu,
x_1xr: x_1xr,
x_1xs: x_1xs,
x_1xe: x_1xe,
x_8e: '',
x_5d: {}
}
);x_11z.x_27(
{	x_1x2: false,
x_1x4: x_11z.x_29('x_1x4'),
x_ns: x_11z.x_29('x_ns'),
x_cx: x_11z.x_29('x_cx'),
x_1wu: x_11z.x_29('x_1wu'),
x_1y3: x_11z.x_29('x_1x0').x_2t(),
x_16: x_16
}
);x_1xu.x_27(
{	x_1xl: x_1xu.x_29('x_1xl'),
x_1xi: x_1xu.x_29('x_1xi'),
x_1xn: x_1xu.x_29('x_1xn'),
x_16: x_16
}
);x_1xr.x_27(
{	x_16: x_16
}
);return x_16;
},
x_2a: function(x_2b) {

x_2b.x_2c = function(x_28) {
var x_47 = x_28.x_47;
var x_1y4 = x_r.x_3s.x_77;
var x_5d = x_28.x_5d;
this.x_5d = x_5d;
var x_11z = this.x_11z;
var x_1xu = this.x_1xu;
var x_1xp = this.x_1xp;
var x_1xr = this.x_1xr;
var x_1xs = this.x_1xs;
var x_1wv = this.x_1wv;
var x_1xe = this.x_1xe;
var x_1y5; x_11z.x_cx.x_1g4(false);
this.x_8e = x_5d.x_5n.x_8c;
var x_8e = this.x_8e;
var x_1y6 = ((x_1wv || (x_47 && x_47.useTemplate)) ? x_5d.x_al : x_47.data);
x_1xp.x_7j(x_1y6.rights);
x_1xr.x_bn(x_1y6.quota);
x_1xs.x_bu(x_1y6);

var x_j4 = {
x_6a: '/admin/stub/dataMiner.php',
x_6p: 'post',
x_68: 'groups',
x_28: {
'object': 'IpAddressGroupManager',
'method': 'getGroupList',
'params': kerio.lib.x_6r({})
},
x_2e: this.x_1y7,
x_2q: this
};
kerio.lib.x_6t.x_6u(x_j4);
if (x_1wv) {
x_11z.x_1d3('x_cx');
x_11z.x_29('x_1xb').x_9w(1);
return;
}
else if (x_r.x_3s.x_3t === x_r.x_3s.x_3u && !this.x_o) {
x_1y5 = ('admin' === x_47.credentials.userName.toLowerCase());
x_11z.x_85(['x_1xa', 'x_1wu'], x_1y5);
x_11z.x_2k(['x_1xd'], x_1y5);
this.x_1xp.x_7f(x_1y5);
}

var x_1x0 = x_47.authType;
var x_1y8 = (x_1x0 === x_r.x_1c4.x_1c5);
var x_172 = x_47.credentials;
x_7h = {
x_1j: x_47.id,
x_cx: x_172.userName,
x_f7: x_47.fullName,
x_1wy:  x_47.email,
x_f8: x_47.description,
x_1x0: x_1x0,
x_1wu: x_47.localEnabled,
x_1xb: x_47.useTemplate
};x_11z.x_7k(x_7h);
x_11z.x_cx.x_84(true);
x_11z.x_1wu.x_84(!x_47.adEnabled);
x_11z.x_29('x_1x9').x_2k(!x_47.adEnabled);
var x_o6 = x_172.passwordChanged;
x_11z.x_1x2 = x_o6;
x_11z.x_1x4.x_84(!x_o6);
var x_87 = x_47.groups;
var x_88 = [];
var x_42 = x_87.length;
if (x_42 > 0) {
for (var x_41 = 0; x_41 < x_42; x_41++) {
x_88[x_41] = x_87[x_41].id;
}
}
x_1xe.x_d4(x_87, x_8e);
var x_1y9 = x_47.autoLogin;
var x_ve = x_1y9.addressGroup;
x_1xu.x_1ya = x_ve.id;
var x_1xn = x_47.vpnAddress;
var x_1kh = x_1y9.addresses;
x_7h = {};
x_7h = {
'x_1t0': x_1y9.firewall,
'x_1xg': x_1kh.enabled,
'x_1xi': x_1kh.value.join(';'),
'x_1xk': x_ve.enabled,
'x_1xm': x_1xn.enabled,
'x_1xn': x_1xn.value
};
x_1xu.x_7k(x_7h);
if (x_8e !== x_1y4) {
x_11z.x_85(['x_1wx'], true);
x_11z.x_85(['x_1x8', 'x_1xa'], false);
}
};
x_2b.x_1y7 = function(x_6v) {
var x_dg = x_6v.x_ac;
if (!x_dg) {
return;
}
var x_47 = x_dg.groups;
var x_7c = x_r.x_7c;
var x_5z = [{'x_a6': kerio.lib.x_x('None', 'userEditor'), 'x_1j': x_7c}];
var x_1yb;
for (var x_41 = 0, x_42 = x_47.length; x_41 < x_42; x_41++) {
x_1yb = x_47[x_41];
x_5z.push({
'x_a6': x_1yb.name,
'x_1j': x_1yb.id
});
}
var x_1xl = this.x_1xu.x_1xl;
x_1xl.x_8f();
x_1xl.x_an(x_5z);
x_1xl.x_9w(x_1xl.x_1c.x_1ya ? x_1xl.x_1c.x_1ya : x_7c);
};
x_2b.x_1xc = function(x_sw, x_1xc) {
x_sw.x_16z(['x_1xx', 'x_1xy', 'x_1xz'], x_1xc);
};
x_2b.x_jk = function(x_6v) {
this.x_24(false);
if (!x_6v.x_6x) {
return;
}
this.x_5d.x_6y();
this.x_2r();
};
x_2b.x_1xh = function(x_8d, x_bg) {
if (!x_8d) {
return;
}
if (Array !== x_8d.constructor) {
x_8d = [x_8d];
}
this.x_84(x_8d, !x_bg);
};
x_2b.x_iy = function() {
var x_47 = {data: {}};
var x_16 = this;
var x_8e = this.x_8e;

if (!x_16.x_1x6()) {
kerio.lib.x_48(
kerio.lib.x_x('Password mismatch', 'common'), kerio.lib.x_x('Password and password confirmation do not match.', 'userEditor')
);
x_16.x_sw.x_lf('x_16s');
x_16.x_24(false);
return;
}
var x_11z = x_16.x_11z;
x_11z.x_84(['x_cx'], false);
var x_1yc = x_11z.x_7i();
x_47.credentials = {
'userName': x_1yc.x_cx,
'password': x_1yc.x_ns,
'passwordChanged': x_11z.x_1x2
};
x_47.fullName = x_1yc.x_f7;
x_47.description = x_1yc.x_f8;
x_47.email = x_1yc.x_1wy;
x_47.authType = x_1yc.x_1x0;
x_47.useTemplate = (x_1yc.x_1xb === 1 ? true : false);
var x_1yd = x_11z.x_1wu;
x_47.adEnabled = true;
x_47.localEnabled = x_1yc.x_1wu;
if (x_1yd.x_31()) {
x_47.adEnabled = false;
x_1yd.x_84(false);
x_47.localEnabled = x_1yd.x_2t();
}
var x_88 = this.x_1xe.x_dd();
x_47.groups = [];
for (var x_41 = 0, x_42 = x_88.length; x_41 < x_42; x_41++) {
x_47.groups[x_41] = {
"id": x_88[x_41]
};
}
x_47.data.rights = x_16.x_1xp.x_7g();
x_47.data.quota = x_16.x_1xr.x_bj();
var x_1ye = x_16.x_1xs.x_bv();
x_47.data.wwwFilter = x_1ye.wwwFilter;
x_47.data.language = x_1ye.language;
var x_1yf =x_16.x_1xu.x_7i();
var x_1xg = x_1yf.x_1xg;
var x_1xk = x_1yf.x_1xk;
var x_1xm = x_1yf.x_1xm;
var x_1yg = null;
if (x_1xg) {
x_1yg = kerio.waw.shared.x_3e.x_1kg(x_1yf.x_1xi);
}
var x_1yh = (x_1xk && x_1yf.x_1xl !== x_r.x_7c);
x_47.autoLogin = {
"firewall": x_1yf.x_1t0,
"addresses": {
"enabled": x_1xg,
"value": x_1yg
},
"addressGroup": {
"enabled": x_1yh,
"id": (x_1yh ? x_1yf.x_1xl : null)
}
};
x_47.vpnAddress = {
"enabled": x_1xm,
"value": (x_1xm ? x_1yf.x_1xn : null)
};
var x_6p;
if ('x_c1' === x_16.x_n) {
x_6p = 'add';
x_47 = {
"users": [x_47],
"domainId": x_8e
};
} else {
x_6p = 'update';
x_47 = {
"userIds": [x_1yc.x_1j],
"details": x_47,
"domainId": x_8e
};
}
var x_j4 = {
x_6a: '/admin/stub/dataMiner.php',
x_6p: 'post',
x_28: {
object: 'UserManager',
method: x_6p,
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_1x6 = function() {
var x_11z = this.x_11z;
var x_1yi = x_11z.x_ns;
var x_ns = x_1yi.x_2t();
var x_1yj = x_11z.x_1x4;
var x_1x4 = x_1yj.x_2t();
var x_o4 = true;
if (!x_1yj.x_31()) {
var x_1yk = (x_ns === x_1x4);
x_o4 = x_1yk;
if (x_11z.x_1y3 === x_r.x_1c4.x_1c5) {
x_1yj.x_1g4(!x_1yk);
} else {
x_1yj.x_1g4(false);
}
}return x_o4;
};
x_2b.x_jo = function() {
var x_11z = this.x_11z;
var x_1wv = this.x_1wv;
x_11z.x_1x2 = false;
x_11z.x_2h();
this.x_1xp.x_2h();
this.x_1xr.x_2h();
this.x_1xs.x_2h();
this.x_1xu.x_2h();
if (x_1wv) {
this.x_1xe.x_d4();x_11z.x_1x4.x_84(true);
}this.x_sw.x_lf('x_16s');
};}}; 