Paramètrage du champ INPUT

This commit is contained in:
Fred Tempez 2020-08-12 17:39:43 +02:00
parent b89314610b
commit b3cdc71b8d
4 changed files with 26 additions and 21 deletions

View File

@ -244,7 +244,7 @@ class template {
'value' => $attributes['value'] 'value' => $attributes['value']
]); ]);
// Champ d'upload // Champ d'upload
$html .= '<div class="inputFileWrapper">'; $html .= '<div class="inputFileManagerWrapper">';
$html .= sprintf( $html .= sprintf(
'<a '<a
href="' . href="' .
@ -252,7 +252,6 @@ class template {
'?relative_url=1' . '?relative_url=1' .
'&field_id=' . $attributes['id'] . '&field_id=' . $attributes['id'] .
'&type=' . $attributes['type'] . '&type=' . $attributes['type'] .
//'&akey=' . md5_file('site/data/'.'core.json') .
'&akey=' . md5_file(core::DATA_DIR.'core.json') . '&akey=' . md5_file(core::DATA_DIR.'core.json') .
($attributes['extensions'] ? '&extensions=' . $attributes['extensions'] : '') ($attributes['extensions'] ? '&extensions=' . $attributes['extensions'] : '')
. '" . '"

View File

@ -448,12 +448,12 @@ header .container {
height: 100%; height: 100%;
} }
/* Element du header */ /* Element du header
#themeHeaderImage { #themeHeaderImage {
font-style: italic; font-style: italic;
font-size: 0.9em; font-size: 0.9em;
} }*/
/* Menu /* Menu
body > nav { body > nav {
@ -1020,10 +1020,10 @@ label {
} }
/* Empêche le débordement et les sauts de ligne */ /* Empêche le débordement et les sauts de ligne */
.inputFileWrapper { .inputFileManagerWrapper {
display: inline; display: inline;
} }
.inputFileWrapper > .inputFile { .inputFileManagerWrapper > .inputFile {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;

View File

@ -49,13 +49,18 @@
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4>Image</h4> <h4>Image</h4>
<?php <div class="row">
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : ""; <div class="col12">
echo template::file('themeBodyImage', [ <?php
'label' => 'Fond', $imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : "";
'type' => 1, echo template::file('themeBodyImage', [
'value' => $imageFile 'help' => 'Sélectionner une image',
]); ?> 'label' => 'Fond',
'type' => 1,
'value' => $imageFile
]); ?>
</div>
</div>
<div id="themeBodyImageOptions" class="displayNone"> <div id="themeBodyImageOptions" class="displayNone">
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">

View File

@ -47,6 +47,7 @@
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'header', 'image'])) ? $imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'header', 'image'])) ?
$this->getData(['theme', 'header', 'image']) : ""; $this->getData(['theme', 'header', 'image']) : "";
echo template::file('themeHeaderImage', [ echo template::file('themeHeaderImage', [
'help' => 'Sélectionner une image aux dimensions recommandées ci-dessous :',
'label' => 'Fond', 'label' => 'Fond',
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile