mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -07:00
WEB / MAIL. Updated mail acc options for different IMAP and SMTP configurations
This commit is contained in:
parent
45d5e885a4
commit
5c30f7c2d2
5 changed files with 194 additions and 130 deletions
24
web/css/styles.min.css
vendored
24
web/css/styles.min.css
vendored
|
@ -2475,7 +2475,7 @@ label {
|
|||
-moz-appearance:none;
|
||||
-webkit-appearance:none;
|
||||
text-shadow: 0 0 0 #555;
|
||||
/*color: transparent !important;*/
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.vst-list.long-2 {
|
||||
|
@ -2493,6 +2493,17 @@ label {
|
|||
color: #333;
|
||||
}
|
||||
|
||||
.vst-list.flat {
|
||||
border: 1px solid #fff;
|
||||
color: #2c9491;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
margin-left: -14px;
|
||||
background-position: -210px -604px;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
a.vst-text,
|
||||
a.vst-text b{
|
||||
color: #2c9491;
|
||||
|
@ -2808,18 +2819,23 @@ a.button.cancel {
|
|||
vertical-align: top;
|
||||
}
|
||||
.mail-infoblock {
|
||||
padding-top: 80px;
|
||||
margin-left: -100px;
|
||||
margin-left: -110px;
|
||||
font-size: 12px;
|
||||
color: #777;
|
||||
border: 1px solid #d9d9d9;
|
||||
padding: 7px 5px 12px 20px;
|
||||
margin-top: 17px;
|
||||
width: 334px;
|
||||
}
|
||||
.mail-infoblock td {
|
||||
color: #777;
|
||||
font-size: 14px;
|
||||
height: 18px;
|
||||
padding-right: 25px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.mail-infoblock td:first-child{
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.additional-info {
|
||||
margin-left: 30px;
|
||||
|
|
|
@ -24,7 +24,6 @@ App.Actions.MAIL_ACC.disable_unlimited = function(elm, source_elm) {
|
|||
$(source_elm).css('opacity', '0.5');
|
||||
}
|
||||
|
||||
//
|
||||
App.Actions.MAIL_ACC.toggle_unlimited_feature = function(evt) {
|
||||
var elm = $(evt.target);
|
||||
var ref = elm.prev('.vst-input');
|
||||
|
@ -93,33 +92,6 @@ randomString = function() {
|
|||
$('#v_password').text(Array(randomstring.length+1).join('*'));
|
||||
}
|
||||
|
||||
use_hostname = function(domain) {
|
||||
$('#td_imap_hostname').html(domain);
|
||||
$('#td_smtp_hostname').html(domain);
|
||||
}
|
||||
|
||||
use_starttls = function() {
|
||||
$('#td_imap_port').html('143');
|
||||
$('#td_imap_encryption').html('STARTTLS');
|
||||
$('#td_smtp_port').html('587');
|
||||
$('#td_smtp_encryption').html('STARTTLS');
|
||||
}
|
||||
|
||||
use_ssl = function() {
|
||||
$('#td_imap_port').html('993');
|
||||
$('#td_imap_encryption').html('SSL');
|
||||
$('#td_smtp_port').html('465');
|
||||
$('#td_smtp_encryption').html('SSL');
|
||||
}
|
||||
|
||||
use_no_encryption = function(domain, no_encryption) {
|
||||
use_hostname(domain);
|
||||
$('#td_imap_port').html('143');
|
||||
$('#td_imap_encryption').html(no_encryption);
|
||||
$('#td_smtp_port').html('25');
|
||||
$('#td_smtp_encryption').html(no_encryption);
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#v_account').text($('input[name=v_account]').val());
|
||||
$('#v_password').text($('input[name=v_password]').val());
|
||||
|
@ -141,4 +113,36 @@ $(document).ready(function() {
|
|||
else
|
||||
$('#v_password').text(Array($('input[name=v_password]').val().length+1).join('*'));
|
||||
});
|
||||
|
||||
$('#mail_configuration').change(function(evt){
|
||||
var opt = $(evt.target).find('option:selected');
|
||||
|
||||
switch(opt.attr('v_type')){
|
||||
case 'hostname':
|
||||
$('#td_imap_hostname').html(opt.attr('domain'));
|
||||
$('#td_smtp_hostname').html(opt.attr('domain'));
|
||||
break;
|
||||
case 'starttls':
|
||||
$('#td_imap_port').html('143');
|
||||
$('#td_imap_encryption').html('STARTTLS');
|
||||
$('#td_smtp_port').html('587');
|
||||
$('#td_smtp_encryption').html('STARTTLS');
|
||||
break;
|
||||
case 'ssl':
|
||||
$('#td_imap_port').html('993');
|
||||
$('#td_imap_encryption').html('SSL');
|
||||
$('#td_smtp_port').html('465');
|
||||
$('#td_smtp_encryption').html('SSL');
|
||||
break;
|
||||
case 'no_encription':
|
||||
$('#td_imap_hostname').html(opt.attr('domain'));
|
||||
$('#td_smtp_hostname').html(opt.attr('domain'));
|
||||
|
||||
$('#td_imap_port').html('143');
|
||||
$('#td_imap_encryption').html(opt.attr('no_encription'));
|
||||
$('#td_smtp_port').html('25');
|
||||
$('#td_smtp_encryption').html(opt.attr('no_encription'));
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -114,4 +114,36 @@ $(document).ready(function() {
|
|||
else
|
||||
$('#v_password').text(Array($('input[name=v_password]').val().length+1).join('*'));
|
||||
});
|
||||
|
||||
$('#mail_configuration').change(function(evt){
|
||||
var opt = $(evt.target).find('option:selected');
|
||||
|
||||
switch(opt.attr('v_type')){
|
||||
case 'hostname':
|
||||
$('#td_imap_hostname').html(opt.attr('domain'));
|
||||
$('#td_smtp_hostname').html(opt.attr('domain'));
|
||||
break;
|
||||
case 'starttls':
|
||||
$('#td_imap_port').html('143');
|
||||
$('#td_imap_encryption').html('STARTTLS');
|
||||
$('#td_smtp_port').html('587');
|
||||
$('#td_smtp_encryption').html('STARTTLS');
|
||||
break;
|
||||
case 'ssl':
|
||||
$('#td_imap_port').html('993');
|
||||
$('#td_imap_encryption').html('SSL');
|
||||
$('#td_smtp_port').html('465');
|
||||
$('#td_smtp_encryption').html('SSL');
|
||||
break;
|
||||
case 'no_encription':
|
||||
$('#td_imap_hostname').html(opt.attr('domain'));
|
||||
$('#td_smtp_hostname').html(opt.attr('domain'));
|
||||
|
||||
$('#td_imap_port').html('143');
|
||||
$('#td_imap_encryption').html(opt.attr('no_encription'));
|
||||
$('#td_smtp_port').html('25');
|
||||
$('#td_smtp_encryption').html(opt.attr('no_encription'));
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -133,6 +133,17 @@
|
|||
<div class="mail-infoblock">
|
||||
<table>
|
||||
<?php $uname_arr=posix_uname(); $hostname=$uname_arr['nodename']; ?>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<select id="mail_configuration" class="vst-list flat">
|
||||
<option v_type="hostname" domain="<?=$hostname?>"><?=__('Use server hostname')?></option>
|
||||
<option v_type="hostname" domain="<?=$v_domain?>"><?=__('Use domain hostname')?></option>
|
||||
<option v_type="starttls"><?=__('Use STARTTLS')?></option>
|
||||
<option v_type="ssl"><?=__('Use SSL')?></option>
|
||||
<option v_type="no_encription" domain="<?=$v_domain?>" encription="<?=__('No encryption')?>"><?=__('No encryption')?></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?=__('Username')?>:</td>
|
||||
<td><span id="v_account">william.cage</span>@<?=htmlentities($v_domain)?></td>
|
||||
|
@ -174,17 +185,8 @@
|
|||
<td><?=__('Normal password')?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table>
|
||||
<tr><td>• <a href="javascript:use_hostname('<?=$hostname?>');" class="generate"><?php print __('Use server hostname');?></a></td></tr>
|
||||
<tr><td>• <a href="javascript:use_hostname('<?=$v_domain?>');" class="generate"><?php print __('Use domain hostname');?></a></td></tr>
|
||||
<tr><td>• <a href="javascript:use_starttls();" class="generate"><?php print __('Use STARTTLS');?></a></td></tr>
|
||||
<tr><td>• <a href="javascript:use_ssl();" class="generate"><?php print __('Use SSL');?></a></td></tr>
|
||||
<tr><td>• <a href="javascript:use_no_encryption('<?=$v_domain?>', '<?php print __('No encryption');?>');" class="generate"><?php print __('Do not use encryption');?></a></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
|
|
@ -142,6 +142,17 @@
|
|||
<div class="mail-infoblock">
|
||||
<table>
|
||||
<?php $uname_arr=posix_uname(); $hostname=$uname_arr['nodename']; ?>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<select id="mail_configuration" class="vst-list flat">
|
||||
<option v_type="hostname" domain="<?=$hostname?>"><?=__('Use server hostname')?></option>
|
||||
<option v_type="hostname" domain="<?=$v_domain?>"><?=__('Use domain hostname')?></option>
|
||||
<option v_type="starttls"><?=__('Use STARTTLS')?></option>
|
||||
<option v_type="ssl"><?=__('Use SSL')?></option>
|
||||
<option v_type="no_encription" domain="<?=$v_domain?>" encription="<?=__('No encryption')?>"><?=__('No encryption')?></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?=__('Username')?>:</td>
|
||||
<td><span id="v_account">william.cage</span>@<?=htmlentities($v_domain)?></td>
|
||||
|
@ -185,7 +196,6 @@
|
|||
</table>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue