2024-05-02 15:32:27 +00:00
|
|
|
<form method="POST" action="<?= $action ?>" class="flex flex-col max-w-sm gap-4" >
|
|
|
|
<?= csrf_field() ?>
|
2024-05-06 16:00:47 +00:00
|
|
|
<?php foreach ($plugin->getSettingsFields($type) as $field): ?>
|
2024-05-02 15:32:27 +00:00
|
|
|
<Forms.Field
|
2024-05-06 16:00:47 +00:00
|
|
|
name="<?= esc($field->key) ?>"
|
|
|
|
label="<?= esc($field->label) ?>"
|
|
|
|
hint="<?= esc($field->hint) ?>"
|
|
|
|
helper="<?= esc($field->helper) ?>"
|
|
|
|
required="<?= $field->optional ? 'false' : 'true' ?>"
|
|
|
|
value="<?= get_plugin_option($plugin->getKey(), $field->key, $context) ?>"
|
2024-05-02 15:32:27 +00:00
|
|
|
/>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<Button class="self-end mt-4" variant="primary" type="submit"><?= lang('Common.forms.save') ?></Button>
|
|
|
|
</form>
|