Less home code more F3
This commit is contained in:
1
app/Views/partials/csrf_field.html
Normal file
1
app/Views/partials/csrf_field.html
Normal file
@@ -0,0 +1 @@
|
||||
<input type="hidden" name="csrf_token" value="{{ @FORM_CSRF }}">
|
||||
@@ -4,7 +4,7 @@
|
||||
<p class="meta-text">{{ @item.width }} × {{ @item.height }}<br>{{ @item.created_at | date_fr }}</p>
|
||||
|
||||
<form class="stack" method="post" action="{{ 'media_update_alt', 'id='.@item.id | alias }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ @CSRF }}">
|
||||
<include href="partials/csrf_field.html" />
|
||||
<label class="field">
|
||||
<span class="field-label">Texte alternatif</span>
|
||||
<input class="control" type="text" name="alt" value="{{ @item.alt }}" placeholder="Description de l'image" data-alt-input>
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="card-actions">
|
||||
<button class="button button--ghost" type="button" data-copy-text="{{ @item.markdown }}" data-markdown-template="">Copier le Markdown</button>
|
||||
<form method="post" action="{{ 'media_delete', 'id='.@item.id | alias }}" data-confirm="Supprimer cette image ?">
|
||||
<input type="hidden" name="csrf_token" value="{{ @CSRF }}">
|
||||
<include href="partials/csrf_field.html" />
|
||||
<button class="button button--danger" type="submit">Supprimer</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</li>
|
||||
<li class="nav-items__item">
|
||||
<form class="nav-items__form" method="post" action="{{ 'logout' | alias }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ @CSRF }}">
|
||||
<include href="partials/csrf_field.html" />
|
||||
<button class="nav-items__button" type="submit">Déconnexion</button>
|
||||
</form>
|
||||
</li>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="card-actions">
|
||||
<a class="button button--ghost" href="{{ 'post_edit', 'id='.@post.id | alias }}">Modifier</a>
|
||||
<form method="post" action="{{ 'post_delete', 'id='.@post.id | alias }}" data-confirm="Supprimer cet article ?">
|
||||
<input type="hidden" name="csrf_token" value="{{ @CSRF }}">
|
||||
<include href="partials/csrf_field.html" />
|
||||
<button class="button button--danger" type="submit">Supprimer</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user