mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
formulaire: default interne, unpublished, contact toggle, settings section
This commit is contained in:
@@ -63,6 +63,16 @@ function wasSelected($key, $value) {
|
||||
<?php $name = 'auteurice'; $label = 'Auteur·ice(s) :'; $value = old('auteurice'); $required = true; $attrs = withAutofocus('auteurice', ['autocomplete' => 'name']); include APP_ROOT . '/templates/partials/form/text-field.php'; ?>
|
||||
<?php $name = 'mail'; $label = 'Contact(s) (optionnel) [mail/site/insta/etc.] :'; $value = old('mail'); $attrs = ['autocomplete' => 'email']; include APP_ROOT . '/templates/partials/form/text-field.php'; ?>
|
||||
|
||||
<!-- Contact visibility -->
|
||||
<div class="admin-form-group">
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="contact_public" value="1"
|
||||
<?= isset($formData['contact_public']) ? 'checked' : '' ?>>
|
||||
Je veux que mon contact soit accessible à toustes depuis la plateforme xamxam
|
||||
</label>
|
||||
<small>Si cette case est cochée, votre contact apparaîtra sur la page publique de votre TFE.</small>
|
||||
</div>
|
||||
|
||||
<?php require APP_ROOT . '/templates/partials/form/jury-fieldset.php'; ?>
|
||||
|
||||
<?php
|
||||
@@ -105,6 +115,26 @@ function wasSelected($key, $value) {
|
||||
|
||||
<?php $name = 'files'; $label = 'Fichiers du TFE :'; $accept = '.pdf,.jpg,.jpeg,.png,.mp4,.zip,.vtt'; $hint = 'PDF, JPG, PNG, MP4, ZIP. Max 50 MB par fichier. Pour les vidéos, un fichier .vtt de sous-titres peut être joint (il sera associé automatiquement à la vidéo correspondante).'; $multiple = true; include APP_ROOT . '/templates/partials/form/file-field.php'; ?>
|
||||
|
||||
<?php
|
||||
// Visibility select — only show options enabled in settings
|
||||
$accessOptions = array_map(function($at) {
|
||||
return ['id' => $at['id'], 'name' => $at['name']];
|
||||
}, $enabledAccessTypes);
|
||||
// Default: Interne (id=2)
|
||||
$defaultAccessType = 2;
|
||||
$selectedAccessType = isset($formData['access_type_id'])
|
||||
? (int)$formData['access_type_id']
|
||||
: $defaultAccessType;
|
||||
$name = 'access_type_id';
|
||||
$label = 'Visibilité / Accès :';
|
||||
$options = $accessOptions;
|
||||
$selected = $selectedAccessType;
|
||||
$placeholder = null;
|
||||
$required = true;
|
||||
$attrs = [];
|
||||
include APP_ROOT . '/templates/partials/form/select-field.php';
|
||||
?>
|
||||
|
||||
<div class="admin-form-footer">
|
||||
<button type="submit" name="go" class="admin-btn">Soumettre</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user