11.6.00-dev001 configuration du proxy au démarrage

This commit is contained in:
Fred Tempez 2022-08-22 21:01:01 +02:00
parent 2f44aceac5
commit fabd739896
3 changed files with 102 additions and 52 deletions

View File

@ -47,7 +47,7 @@ class common {
// Numéro de version
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';
const ZWII_VERSION = '11.6.00-dev';
const ZWII_VERSION = '11.6.00-dev001';
const ZWII_UPDATE_CHANNEL = "test";
public static $actions = [];

View File

@ -22,6 +22,12 @@ class install extends common {
'update' => self::GROUP_ADMIN
];
// Type de proxy
public static $proxyType = [
'tcp://' => 'TCP',
'http://' => 'HTTP'
];
// Thèmes proposés à l'installation
public static $themes = [];
@ -98,6 +104,12 @@ class install extends common {
$this->setData(['module', 'blog', 'posts', 'mon-deuxieme-article', 'userId', $userId]);
$this->setData(['module', 'blog', 'posts', 'mon-troisieme-article', 'userId', $userId]);
}
// Sauvegarder la configuration du Proxy
$this->setData(['config', 'proxyType', $this->getInput('installProxyType') ]);
$this->setData(['config', 'proxyUrl', $this->getInput('installProxyUrl') ]);
$this->setData(['config', 'proxyPort', $this->getInput('installProxyPort', helper::FILTER_INT)]);
// Images exemples livrées dans tous les cas
try {
// Décompression dans le dossier de fichier temporaires

View File

@ -1,56 +1,94 @@
<p>Renseignez les champs ci-dessous pour finaliser l'installation.</p>
<?php echo template::formOpen('installForm'); ?>
<?php echo template::text('installId', [
'autocomplete' => 'off',
'label' => 'Identifiant'
]); ?>
<div class="row">
<div class="col6">
<?php echo template::password('installPassword', [
'autocomplete' => 'off',
'label' => 'Mot de passe'
]); ?>
</div>
<div class="col6">
<?php echo template::password('installConfirmPassword', [
'autocomplete' => 'off',
'label' => 'Confirmation'
]); ?>
</div>
</div>
<?php echo template::mail('installMail', [
'autocomplete' => 'off',
'label' => 'Adresse mail'
]); ?>
<div class="row">
<div class="col6">
<?php echo template::text('installFirstname', [
'autocomplete' => 'off',
'label' => 'Prénom'
]); ?>
</div>
<div class="col6">
<?php echo template::text('installLastname', [
'autocomplete' => 'off',
'label' => 'Nom'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::select('installTheme', $module::$themes, [
'label' => 'Thème'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('installDefaultData',true , 'Ne pas charger l\'exemple de site (utilisateurs avancés)', [
'checked' => false
]);
?>
</div>
</div>
<ul class="accordion" data-speed="150">
<li class="accordion-item active">
<h3 class="accordion-title">Compte administrateur</h3>
<div class="accordion-content">
<div class="row">
<div class="col12">
<?php echo template::text('installId', [
'autocomplete' => 'off',
'label' => 'Identifiant'
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::password('installPassword', [
'autocomplete' => 'off',
'label' => 'Mot de passe'
]); ?>
</div>
<div class="col6">
<?php echo template::password('installConfirmPassword', [
'autocomplete' => 'off',
'label' => 'Confirmation'
]); ?>
</div>
</div>
<?php echo template::mail('installMail', [
'autocomplete' => 'off',
'label' => 'Adresse mail'
]); ?>
<div class="row">
<div class="col6">
<?php echo template::text('installFirstname', [
'autocomplete' => 'off',
'label' => 'Prénom'
]); ?>
</div>
<div class="col6">
<?php echo template::text('installLastname', [
'autocomplete' => 'off',
'label' => 'Nom'
]); ?>
</div>
</div>
</div>
</li>
<li class="accordion-item">
<h3 class="accordion-title">Options avancées</h3>
<div class="accordion-content">
<div class="row">
<div class="col12">
<?php echo template::checkbox('installDefaultData',true , 'Ne pas charger l\'exemple de site (utilisateurs avancés)', [
'checked' => false
]);
?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::select('installProxyType', $module::$proxyType, [
'label' => 'Type de proxy',
'selected' => $this->getData(['config', 'proxyType'])
]); ?>
</div>
<div class="col6">
<?php echo template::text('installProxyUrl', [
'label' => 'Adresse du proxy',
'placeholder' => 'cache.proxy.fr',
'value' => $this->getData(['config', 'proxyUrl'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('installProxyPort', [
'label' => 'Port du proxy',
'placeholder' => '6060',
'value' => $this->getData(['config', 'proxyPort'])
]); ?>
</div>
<div class="row">
<div class="col12">
<?php echo template::select('installTheme', $module::$themes, [
'label' => 'Thème'
]); ?>
</div>
</div>
</div>
</div>
</li>
</ul>
<div class="row">
<div class="col3 offset9">
<?php echo template::submit('installSubmit', [