
kerio.waw.ui.sslCertificateImport = {

x_m: function(x_n) {
var
x_1d,
x_1c,
x_10,
x_16,
x_2w,
x_1oy,
x_1b = kerio.lib,
x_x = x_1b.x_x;
this.x_ga = x_n; x_2w = x_n + '_';

x_1oy = function() {
this.x_1oz.x_2h();
this.x_1p0.x_2h();
this.x_1p1.x_2h();
this.x_1p2.x_2h();
};x_1d = {
x_1e: [
{	x_1f: 'x_79',
x_23: x_x('Key file', 'sslCertificate'),
x_1e: [
{	x_1f: 'x_b3',
x_1e: [
{	x_1j: 'x_1oz',
x_1l: true,
x_5p: true,
x_1u: (kerio.lib.x_1p3) ? 150 : '100%' },
{	x_1f: 'x_kq',
x_1j: 'keyFileUpload',
x_23: x_x('Select…', 'common'),
x_65: {
x_kr: false,
x_66: {
object: 'CertificateManager',
method: 'importPrivateKey'
}
},

x_9t: function(x_1c, x_g6, x_1o) {
x_1c.x_1oz.x_9w(x_1o);
},

x_1p4: function (x_1c, x_g6, x_6v) {
var
x_ac = x_6v.x_ac;
if (x_ac.returnValue) {
x_1c.x_16.x_1o5 = x_ac.id;
x_1c.x_1p2.x_1p5({id: x_ac.id});
x_1c.x_1p2.x_lk();
} else {
x_1c.x_1oy();
x_1c.x_16.x_24(false);
}
}}
]},
{	x_1f: 'x_1i',
x_1l: true,
x_1o: x_x('E.g. *.key file', 'sslCertificate')
}
]},
{	x_1f: 'x_79',
x_23: x_x('Certificate file', 'sslCertificate'),
x_1p: 'formLastContainer',
x_1e: [
{	x_1f: 'x_b3',
x_1e: [
{	x_1j: 'x_1p1',
x_1l: true,
x_5p: true,
x_1u: (kerio.lib.x_1p3) ? 150 : '100%' },
{	x_1f: 'x_kq',
x_1j: 'certificateFileUpload',
x_23: x_x('Select…', 'common'),
x_65: {
x_kr: false,
x_66: {
object: 'CertificateManager',
method: 'importCertificate'
}
},

x_9t: function(x_1c, x_g6, x_1o) {
x_1c.x_1p1.x_9w(x_1o);
},

x_1p4: function (x_1c, x_g6, x_6v) {
var
x_ac,
x_16 = x_1c.x_16;
x_ac = x_6v.x_ac;
x_16.x_24(false);
if (false === x_ac.returnValue) {
x_1c.x_1oy();
} else {
x_16.x_2r();
kerio.lib.x_5l.x_5m({
x_5g: 'sslCertificateDetails',
x_n: 'x_19g',
x_28: {
x_9d: x_16,
x_47: {
x_150: x_ac.certificate,
x_1o5: x_16.x_1o5,
x_19l: kerio.lib.x_x('SSL Certificate has been imported successfully.', 'sslCertificate')
}
}
});
}
}}
]},
{	x_1f: 'x_1i',
x_1l: true,
x_1o: x_x('E.g. *.crt file', 'sslCertificate')
}
]
}			]
};x_1c = new x_1b.x_1t(x_2w + 'x_1c', x_1d);
x_10 = {
x_1u: 300,
x_l0: 300,
x_1v: 280,
x_l1: 280,
x_1y: x_x('Import Certificate', 'sslCertificate'),
x_1x: x_1c,
x_1z: [
{	x_1j: 'x_1o3',
x_23: x_x('Import…', 'common'),

x_25: function(x_32) {
x_16.x_ly(x_x('Importing certificate…', 'sslCertificate'));
x_32.x_16.x_iy();
}},
{	x_1j: 'x_ji',
x_23: x_x('Cancel', 'common'),
x_21: true
}
]};x_16 = new x_1b.x_26(this.x_ga, x_10);
x_1c.x_27(
{	x_1oz: x_1c.x_29('x_1oz'),
x_1p0: x_1c.x_29('keyFileUpload'),
x_1p1: x_1c.x_29('x_1p1'),
x_1p2: x_1c.x_29('certificateFileUpload'),
x_16: x_16,
x_1oy: x_1oy,
x_oo: undefined
}
);x_16.x_27(
{	x_1c: x_1c,
x_1o5: undefined,
x_vr: {
x_1p6: x_x('It is necessary that you select the key and the certificate files.', 'sslCertificate')
}
});
this.x_2a(x_16);
return x_16;
}, 
x_2a: function(x_2b) {

x_2b.x_2c = function(x_28){
this.x_oo = x_28.x_9d;
};
x_2b.x_iy = function() {
var
x_1c = this.x_1c;
if ('' === x_1c.x_1oz.x_2t() || '' === x_1c.x_1p1.x_2t()) {
x_fi.x_j2(this.x_vr.x_1p6);
this.x_24(false);
return;
}
x_1c.x_1p0.x_lk();
};
x_2b.x_jo = function() {
this.x_1c.x_2h();
};
}
}; 