57 lines
No EOL
2.3 KiB
Smarty
57 lines
No EOL
2.3 KiB
Smarty
{extends file="views/layout.tpl"}
|
|
|
|
{block name="content"}
|
|
<section class="container mt-4">
|
|
{if isset($smarty.session.user)}
|
|
<form class="m-2" method="POST" enctype="multipart/form-data" onsubmit="return confirm('Êtes-vous certain de vouloir poster votre projet ?')">
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label">Titre</label>
|
|
<input type="text" name="titleProject" class="form-control {if (isset($arrError['title'])) } is-invalid {/if} " value="" required>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label">Description (courte)</label>
|
|
<textarea name="descProject" class="form-control {if (isset($arrError['descProject'])) } is-invalid {/if} " rows="2"></textarea>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label">Texte complet du Portfolio</label>
|
|
<textarea name="textProject" class="form-control {if (isset($arrError['content'])) } is-invalid {/if}" rows="5"></textarea>
|
|
</div>
|
|
|
|
<div class="col-6 mb-3">
|
|
<fieldset class="border p-2 rounded">
|
|
<legend class="form-label h6">Catégorie</legend>
|
|
<select class="form-select" id="category" name="category">
|
|
<option value="0" {if $intCategory == 0}selected{/if}>Toutes les catégories</option>
|
|
{foreach $arrCategory as $arrDetCategory}
|
|
<option value="{$arrDetCategory['category_id']}" {if $intCategory == $arrDetCategory['category_id']}selected{/if}>
|
|
{$arrDetCategory['category_name']}
|
|
</option>
|
|
{/foreach}
|
|
</select>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="h5">Miniature de votre projet</label>
|
|
<input name="imageThumbnail" class="form-control" type="file">
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="h5">Images de votre projet</label>
|
|
<input name="imageProject" class="form-control" type="file">
|
|
</div>
|
|
|
|
<div class="mt-4">
|
|
<button type="submit" class="btn btn-primary btn-md" name="sendProject">Envoyer</button>
|
|
</div>
|
|
</form>
|
|
{else}
|
|
<div class="alert alert-danger mt-5">
|
|
<p class="mb-0">Vous devez vous connecter pour accéder à cette fonctionnalité</p>
|
|
</div>
|
|
{/if}
|
|
</section>
|
|
{/block} |