Line 107... |
Line 107... |
107 |
<input type="text" name="titre" id="titre" class="form-control" value="<?php echo isset( $widget['titre'] ) ? $widget['titre'] : ''; ?>">
|
107 |
<input type="text" name="titre" id="titre" class="form-control" value="<?php echo isset( $widget['titre'] ) ? $widget['titre'] : ''; ?>">
|
108 |
</div>
|
108 |
</div>
|
Line 109... |
Line 109... |
109 |
|
109 |
|
110 |
<div class="input-file-row row">
|
110 |
<div class="input-file-row row">
|
- |
|
111 |
<div class="input-file-container col-sm-10">
|
- |
|
112 |
|
- |
|
113 |
<?php
|
- |
|
114 |
if( isset( $widget['info'] ) ) :
|
- |
|
115 |
$info_file_name = 'info.' . preg_replace( '/(?:imag)?e\/?/','',$widget['info']);
|
- |
|
116 |
$info_src = $chemin_images . $widget['projet'] . '/' . $info_file_name;
|
- |
|
117 |
$info_img =
|
- |
|
118 |
'<img id="pre-existent-info" src="' . $info_src . '" width="50%"><br>Pour changer, télécharger un nouveau fichier.';
|
- |
|
119 |
$info_hidden = '';
|
- |
|
120 |
else :
|
- |
|
121 |
$info_file_name = [];
|
- |
|
122 |
$info_src = '';
|
- |
|
123 |
$info_img = '';
|
- |
|
124 |
$info_hidden = ' hidden';
|
- |
|
125 |
endif;
|
- |
|
126 |
?>
|
111 |
<div class="input-file-container col-sm-10">
|
127 |
|
112 |
<input type="file" class="input-file" name="info" id="info" value="<?= $widget['titre']; ?>" accept="image/*">
|
128 |
<input type="file" class="input-file" name="info" id="info" value="<?= $widget['titre']; ?>" accept="image/*">
|
113 |
<label for="info" class="label-file "><i class="fas fa-download"></i> Aide dans le titre</label>
|
129 |
<label for="info" class="label-file "><i class="fas fa-download"></i> Aide dans le titre</label>
|
114 |
</div>
|
130 |
</div>
|
115 |
<div class="btn btn-danger btn-sm remove-file" name="remove-file" title="Supprimer le fichier"><i class="fas fa-times" aria-hidden="true"></i></div>
|
131 |
<div class="btn btn-danger btn-sm remove-file" name="remove-file" title="Supprimer le fichier"><i class="fas fa-times" aria-hidden="true"></i></div>
|
- |
|
132 |
<div class="file-return info <?php echo $info_hidden; ?>">
|
- |
|
133 |
<?php echo $info_file_name; ?>
|
- |
|
134 |
<?php echo $info_img; ?>
|
116 |
<div class="file-return info hidden"></div>
|
135 |
</div>
|
Line 117... |
Line 136... |
117 |
</div>
|
136 |
</div>
|
118 |
|
137 |
|
119 |
<div class="col-sm-12 mb-3">
|
138 |
<div class="col-sm-12 mb-3">
|
Line 124... |
Line 143... |
124 |
<div class="input-file-row row">
|
143 |
<div class="input-file-row row">
|
125 |
<div class="input-file-container col-sm-10">
|
144 |
<div class="input-file-container col-sm-10">
|
Line 126... |
Line 145... |
126 |
|
145 |
|
127 |
<?php
|
146 |
<?php
|
- |
|
147 |
if( isset( $widget['logo'] ) ) :
|
128 |
if( isset( $widget['logo'] ) ) :
|
148 |
$logo_file_name = 'logo.' . preg_replace( '/(?:imag)?e\/?/','',$widget['logo']);
|
129 |
$logo_src = $widget['logo'];
|
149 |
$logo_src = $chemin_images . $widget['projet'] . '/' . $logo_file_name;
|
130 |
$logo_img =
|
150 |
$logo_img =
|
131 |
'<img id="pre-existent-logo" src="' . $logo_src . '"><br>Pour changer, télécharger un nouveau fichier.';
|
151 |
'<img id="pre-existent-logo" src="' . $logo_src . '" width="50%"><br>Pour changer, télécharger un nouveau fichier.';
|
132 |
$logo_hidden = '';
|
- |
|
133 |
$logo_file_name = array_reverse( explode( '/', $logo_src ) );
|
152 |
$logo_hidden = '';
|
134 |
else :
|
- |
|
135 |
$logo_src = '';
|
- |
|
136 |
$logo_img = '';
|
- |
|
137 |
$logo_hidden = ' hidden';
|
153 |
else :
|
- |
|
154 |
$logo_file_name = [];
|
- |
|
155 |
$logo_src = '';
|
- |
|
156 |
$logo_img = '';
|
138 |
$logo_file_name = [];
|
157 |
$logo_hidden = ' hidden';
|
139 |
endif;
|
158 |
endif;
|
Line 140... |
Line 159... |
140 |
?>
|
159 |
?>
|
141 |
|
160 |
|
142 |
<input type="file" class="input-file" name="logo" id="logo" accept="image/*" value="">
|
161 |
<input type="file" class="input-file" name="logo" id="logo" accept="image/*" value="">
|
143 |
<label for="logo" class="label-file"><i class="fas fa-download"></i> Logo</label>
|
162 |
<label for="logo" class="label-file"><i class="fas fa-download"></i> Logo</label>
|
144 |
</div>
|
163 |
</div>
|
145 |
<div class="btn btn-danger btn-sm remove-file" name="remove-file" title="Supprimer le fichier">
|
164 |
<div class="btn btn-danger btn-sm remove-file" name="remove-file" title="Supprimer le fichier">
|
146 |
<i class="fas fa-times" aria-hidden="true"></i>
|
165 |
<i class="fas fa-times" aria-hidden="true"></i>
|
147 |
</div>
|
166 |
</div>
|
148 |
<div class="file-return logo<?= $logo_hidden; ?>">
|
167 |
<div class="file-return logo<?php echo $logo_hidden; ?>">
|
149 |
<?= $logo_file_name[0]; ?>
|
168 |
<?php echo $logo_file_name; ?>
|
150 |
<?= $logo_img; ?>
|
169 |
<?php echo $logo_img; ?>
|
Line 151... |
Line 170... |
151 |
</div>
|
170 |
</div>
|
152 |
</div>
|
171 |
</div>
|
- |
|
172 |
|
- |
|
173 |
<div class="input-file-row row">
|
- |
|
174 |
<div class="input-file-container col-sm-10">
|
- |
|
175 |
|
- |
|
176 |
<?php
|
- |
|
177 |
if( isset( $widget['image_fond'] ) ) :
|
- |
|
178 |
$image_fond_file_name = 'image_fond.' . preg_replace( '/(?:imag)?e\/?/','',$widget['image_fond']);
|
- |
|
179 |
$image_fond_src = $chemin_images . $widget['projet'] . '/' . $image_fond_file_name;
|
- |
|
180 |
$image_fond_img =
|
- |
|
181 |
'<img id="pre-existent-image_fond" src="' . $image_fond_src . '" width="50%"><br>Pour changer, télécharger un nouveau fichier.';
|
- |
|
182 |
$image_fond_hidden = '';
|
- |
|
183 |
else :
|
- |
|
184 |
$image_fond_file_name = [];
|
- |
|
185 |
$image_fond_src = '';
|
- |
|
186 |
$image_fond_img = '';
|
- |
|
187 |
$image_fond_hidden = ' hidden';
|
153 |
|
188 |
endif;
|
154 |
<div class="input-file-row row">
|
189 |
?>
|
155 |
<div class="input-file-container col-sm-10">
|
190 |
|
156 |
<input type="file" class="input-file" name="image_fond" id="image_fond" value="<?= $widget['titre']; ?>" accept="image/*">
|
191 |
<input type="file" class="input-file" name="image_fond" id="image_fond" value="<?= $widget['titre']; ?>" accept="image/*">
|
157 |
<label for="image_fond" class="label-file"><i class="fas fa-download"></i> Image de fond</label>
|
192 |
<label for="image_fond" class="label-file"><i class="fas fa-download"></i> Image de fond</label>
|
- |
|
193 |
</div>
|
- |
|
194 |
<div class="btn btn-danger btn-sm remove-file" name="remove-file" title="Supprimer le fichier"><i class="fas fa-times" aria-hidden="true"></i></div>
|
- |
|
195 |
<div class="file-return image_fond <?php echo $image_fond_hidden; ?>">
|
158 |
</div>
|
196 |
<?php echo $image_fond_file_name; ?>
|
Line 159... |
Line 197... |
159 |
<div class="btn btn-danger btn-sm remove-file" name="remove-file" title="Supprimer le fichier"><i class="fas fa-times" aria-hidden="true"></i></div>
|
197 |
<?php echo $image_fond_img; ?>
|
Line 160... |
Line 198... |
160 |
<div class="file-return image_fond hidden"></div>
|
198 |
</div>
|