FreshRSS-Extensions/xExtension-CustomJS/configure.phtml
Alexandre Alapetite b49596818c
Add PHPStan and other quality checks
Similar to FreshRSS core
Contributes to https://github.com/FreshRSS/Extensions/issues/184
2023-11-23 22:41:09 +01:00

24 lines
952 B
PHTML

<?php
declare(strict_types=1);
/** @var CustomJSExtension $this */
?>
<form action="<?= _url('extension', 'configure', 'e', urlencode($this->getName())) ?>" method="post">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
<div class="form-group">
<label class="group-name" for="js-rules"><?= _t('ext.custom_js.write_js') ?></label>
<div class="group-controls">
<textarea name="js-rules" id="js-rules"><?= $this->js_rules ?></textarea>
</div>
</div>
<div class="form-group form-actions">
<?php if (isset($this->permission_problem)) { ?>
<p class="alert alert-error"><?= _t('ext.custom_js.permission_problem', $this->permission_problem) ?></p>
<?php } else { ?>
<div class="group-controls">
<button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
<button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
</div>
<?php } ?>
</div>
</form>