Deltacms/core/module/config/view/network/network.php

147 lines
4.3 KiB
PHP
Raw Normal View History

2022-03-06 13:35:21 +01:00
<?php
// Lexique
$text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Paramètres';
$text[1] = 'Type de proxy';
$text[2] = 'Adresse du proxy';
$text[3] = 'Port du proxy';
$text[4] = 'SMTP';
$text[5] = 'Activer SMTP';
$text[6] = 'Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d\'envoi de mail.';
$text[7] = 'Adresse SMTP';
$text[8] = 'Port SMTP';
$text[9] = 'Authentification';
$text[10] = 'Nom utilisateur';
$text[11] = 'Mot de passe';
$text[12] = 'Sécurité';
$SMTPauth = $module::$SMTPauth;
$SMTPEnc = $module::$SMTPEnc;
break;
case 'en' :
$text[0] = 'Settings';
$text[1] = 'Proxy type';
$text[2] = 'Proxy address';
$text[3] = 'Proxy port';
$text[4] = 'SMTP';
$text[5] = 'Enable SMTP';
$text[6] = 'Settings to be used when your webhost does not offer mail sending functionality';
$text[7] = 'SMTP address';
$text[8] = 'SMTP port';
$text[9] = 'Authentication';
$text[10] = 'User name';
$text[11] = 'Password';
$text[12] = 'Security';
$SMTPauth = $module::$SMTPauth_en;
$SMTPEnc = $module::$SMTPEnc_en;
break;
}
?>
2022-01-31 09:10:49 +01:00
<div id="networkContainer">
<div class="row">
<div class="col12">
<div class="block">
2022-03-06 13:35:21 +01:00
<h4><?php echo $text[0]; ?>
2022-01-31 09:10:49 +01:00
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/reseau" target="_blank">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col2">
<?php echo template::select('configProxyType', $module::$proxyType, [
2022-03-06 13:35:21 +01:00
'label' => $text[1],
2022-01-31 09:10:49 +01:00
'selected' => $this->getData(['config', 'proxyType'])
]); ?>
</div>
<div class="col8">
<?php echo template::text('configProxyUrl', [
2022-03-06 13:35:21 +01:00
'label' => $text[2],
2022-01-31 09:10:49 +01:00
'placeholder' => 'cache.proxy.fr',
'value' => $this->getData(['config', 'proxyUrl'])
]); ?>
</div>
<div class="col2">
<?php echo template::text('configProxyPort', [
2022-03-06 13:35:21 +01:00
'label' => $text[3],
2022-01-31 09:10:49 +01:00
'placeholder' => '6060',
'value' => $this->getData(['config', 'proxyPort'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
2022-03-06 13:35:21 +01:00
<h4><?php echo $text[4]; ?>
2022-01-31 09:10:49 +01:00
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/reseau#smtp" target="_blank">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col12">
2022-03-06 13:35:21 +01:00
<?php echo template::checkbox('smtpEnable', true, $text[5], [
2022-01-31 09:10:49 +01:00
'checked' => $this->getData(['config', 'smtp','enable']),
2022-03-06 13:35:21 +01:00
'help' => $text[6]
2022-01-31 09:10:49 +01:00
]); ?>
</div>
</div>
<div id="smtpParam">
<div class="row">
<div class="col8">
<?php echo template::text('smtpHost', [
2022-03-06 13:35:21 +01:00
'label' => $text[7],
2022-01-31 09:10:49 +01:00
'placeholder' => 'smtp.fr',
'value' => $this->getData(['config', 'smtp','host'])
]); ?>
</div>
<div class="col2">
<?php echo template::text('smtpPort', [
2022-03-06 13:35:21 +01:00
'label' => $text[8],
2022-01-31 09:10:49 +01:00
'placeholder' => '589',
'value' => $this->getData(['config', 'smtp','port'])
]); ?>
</div>
<div class="col2">
2022-03-06 13:35:21 +01:00
<?php echo template::select('smtpAuth', $SMTPauth, [
'label' => $text[9],
2022-01-31 09:10:49 +01:00
'selected' => $this->getData(['config', 'smtp','auth'])
]); ?>
</div>
</div>
<div id="smtpAuthParam">
<div class="row">
<div class="col5">
<?php echo template::text('smtpUsername', [
2022-03-06 13:35:21 +01:00
'label' => $text[10],
2022-01-31 09:10:49 +01:00
'value' => $this->getData(['config', 'smtp','username' ])
]); ?>
</div>
<div class="col5">
<?php echo template::password('smtpPassword', [
2022-03-06 13:35:21 +01:00
'label' => $text[11],
2022-01-31 09:10:49 +01:00
'autocomplete' => 'off',
'value' => $this->getData(['config', 'smtp','username' ]) ? helper::decrypt ($this->getData(['config', 'smtp','username' ]),$this->getData(['config','smtp','password'])) : ''
]); ?>
</div>
<div class="col2">
2022-03-06 13:35:21 +01:00
<?php echo template::select('smtpSecure', $SMTPEnc , [
'label' => $text[12],
2022-01-31 09:10:49 +01:00
'selected' => $this->getData(['config', 'smtp','secure'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>