Skip to content

Commit

Permalink
Consider ajaxform again
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed May 22, 2024
1 parent b8d9f22 commit b393adb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions contao/templates/forms/form_inline.html5
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
$this->attributes = str_contains($this->attributes, 'class="') ? str_replace('class="', 'class="grid gtr-f ', $this->attributes) : $this->attributes . 'class="grid gtr-f"';
?>

<form<?php if ($this->action): ?> action="<?= $this->action ?>"<?php endif; ?> method="<?= $this->method ?>" enctype="<?= $this->enctype ?>"<?= $this->attributes ?><?= $this->novalidate ?><?php if ($this->ajax): ?> data-ajax-form="<?= $this->id ?>"<?php endif; ?>>
<div class="formbody inside">
<?php if ($this->errors): ?>
<?php foreach ($this->errors as $error): ?>
<p class="error"><?= $error ?></p>
<?php endforeach; ?>
<?php endif; ?>
<?php if ('get' != $this->method): ?>
<input type="hidden" name="FORM_SUBMIT" value="<?= $this->formSubmit ?>">
<input type="hidden" name="REQUEST_TOKEN" value="<?= $this->requestToken ?>">
<?php if ($this->maxFileSize): ?>
<input type="hidden" name="MAX_FILE_SIZE" value="<?= $this->maxFileSize ?>">
<?php endif; ?>
<?php endif; ?>
<?= $this->hidden ?>
<?= $this->fields ?>
</div>
</form>

0 comments on commit b393adb

Please sign in to comment.