ZwiiCMS/core/module/theme/view/fontEdit/fontEdit.php

99 lines
2.8 KiB
PHP
Raw Normal View History

2022-03-12 12:28:28 +01:00
<?php echo template::formOpen('fontEditForm'); ?>
2022-03-11 16:09:43 +01:00
<div class="row">
<div class="col2">
2022-03-12 12:28:28 +01:00
<?php echo template::button('fontEditBack', [
2022-03-11 16:09:43 +01:00
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme/fonts',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2">
2022-03-12 12:28:28 +01:00
<?php echo template::button('fontEditHelp', [
2022-03-11 16:09:43 +01:00
'href' => 'https://doc.zwiicms.fr/fontes#add',
'target' => '_blank',
'ico' => 'help',
'value' => 'Aide',
'class' => 'buttonHelp'
]); ?>
</div>
<div class="col2 offset6">
2022-03-12 12:28:28 +01:00
<?php echo template::submit('fontEditPublish', [
2022-03-11 16:09:43 +01:00
'value' => 'Valider',
'uniqueSubmission' => true
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Identité de la fonte</h4>
<div class="row">
<div class="col6">
2022-03-12 12:28:28 +01:00
<?php switch ($this->getUrl(2)) {
case 'imported':
echo template::checkbox('fontEditFontImported', true, 'Fonte en ligne',[
'checked' => true
]);
break;
case 'files':
echo template::checkbox('fontEditFontFile', true,'Fonte installée', [
'checked' => true
]);
break;
}
?>
2022-03-11 16:09:43 +01:00
</div>
</div>
<div class="row">
<div class="col6">
2022-03-12 12:28:28 +01:00
<?php echo template::text('fontEditFontId', [
2022-03-11 16:09:43 +01:00
'autocomplete' => 'off',
'label' => 'Identifiant (sans espace ni majuscule)',
2022-03-12 12:28:28 +01:00
'value' => $this->getUrl(3)
2022-03-11 16:09:43 +01:00
]); ?>
</div>
<div class="col6">
2022-03-12 12:28:28 +01:00
<?php echo template::text('fontEditFontName', [
2022-03-11 16:09:43 +01:00
'autocomplete' => 'off',
'label' => 'Nom',
2022-03-12 12:28:28 +01:00
'value' => $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'name'])
2022-03-11 16:09:43 +01:00
]); ?>
</div>
2022-03-12 12:28:28 +01:00
2022-03-11 16:09:43 +01:00
</div>
<div class="row">
<div class="col12">
2022-03-12 12:28:28 +01:00
<?php echo template::text('fontEditFontFamilyName', [
2022-03-11 16:09:43 +01:00
'autocomplete' => 'off',
'label' => 'Famille',
2022-03-12 12:28:28 +01:00
'value' => $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'font-family'])
2022-03-11 16:09:43 +01:00
]); ?>
</div>
</div>
2022-03-12 12:28:28 +01:00
<div class="row" id="containerfontEditFile">
2022-03-11 16:09:43 +01:00
<div class="col12">
2022-03-12 12:28:28 +01:00
<?php switch ($this->getUrl(2)) {
case 'imported':
echo template::text('fontEditUrl', [
'label' => 'Url du fichier de fonte',
'value' => $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'ressource']),
'class' => $this->getUrl(2) === 'imported' ? '' : 'noDisplay'
]);
break;
case 'files':
echo template::file('fontEditFile', [
'label' => 'Fichier de fonte (Format WOFF)',
'value' => $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'ressource']),
'class' => $this->getUrl(2) === 'file' ? '' : 'noDisplay'
]);
break;
}
?>
2022-03-11 16:09:43 +01:00
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>