fixed HTML: <fieldset> + <legend> (#6202)

* legend tags cleaned

* formgroup -> fieldset tag

* add bookmarklet class

* Update logs.phtml

* Update logs.phtml

* fixed log table text alignment
This commit is contained in:
maTh 2024-03-17 22:49:12 +01:00 committed by GitHub
parent d7bc70e3fb
commit 6bd6494ad4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
31 changed files with 1024 additions and 996 deletions

View File

@ -385,8 +385,8 @@ function printStep0(): void {
</div>
</div>
<h2><?= _t('install.language.choose') ?></h2>
<form action="index.php?step=0" method="post">
<legend><?= _t('install.language.choose') ?></legend>
<div class="form-group">
<label class="group-name" for="language"><?= _t('install.language') ?></label>
<div class="group-controls">
@ -522,8 +522,8 @@ function printStep2(): void {
(empty($_SESSION['bd_error']) ? '' : ' : ' . $_SESSION['bd_error']) ?></p>
<?php } ?>
<h2><?= _t('install.bdd.conf') ?></h2>
<form action="index.php?step=2" method="post" autocomplete="off">
<legend><?= _t('install.bdd.conf') ?></legend>
<div class="form-group">
<label class="group-name" for="type"><?= _t('install.bdd.type') ?></label>
<div class="group-controls">
@ -622,9 +622,8 @@ function printStep3(): void {
<p class="alert alert-error"><?= _t('install.fix_errors_before') ?></p>
<?php } ?>
<h2><?= _t('install.conf') ?></h2>
<form action="index.php?step=3" method="post">
<legend><?= _t('install.conf') ?></legend>
<div class="form-group">
<label class="group-name" for="default_user"><?= _t('install.default_user') ?></label>
<div class="group-controls">

View File

@ -13,7 +13,7 @@
<form method="post" action="<?= _url('configure', 'integration') ?>" class="draggableList">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
<template id="simple-share">
<formgroup class="group-share dragbox">
<fieldset class="group-share dragbox">
<legend draggable="true">##label##</legend>
<input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" data-leave-validation="" />
<div class="form-group" id="group-share-##key##">
@ -27,10 +27,10 @@
<button type="button" class="remove btn btn-attention" title="<?= _t('conf.sharing.remove') ?>"><?= _t('gen.action.remove') ?></button>
</div>
</div>
</formgroup>
</fieldset>
</template>
<template id="advanced-share">
<formgroup class="group-share dragbox">
<fieldset class="group-share dragbox">
<legend draggable="true">##label##</legend>
<input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" data-leave-validation="" />
<input type="hidden" id="share_##key##_method" name="share[##key##][method]" value="##method##" />
@ -53,7 +53,7 @@
<button type="button" class="remove btn btn-attention" title="<?= _t('conf.sharing.remove') ?>"><?= _t('gen.action.remove') ?></button>
</div>
</div>
</formgroup>
</fieldset>
</template>
<?php
@ -64,7 +64,7 @@
}
$share->update($share_options);
?>
<formgroup class="group-share dragbox" id="group-share-<?= $key ?>">
<fieldset class="group-share dragbox" id="group-share-<?= $key ?>">
<legend draggable="true"><?= $share->name(true) ?></legend>
<input type="hidden" id="share_<?= $key ?>_type" name="share[<?= $key ?>][type]" value="<?= $share->type() ?>" />
<input type="hidden" id="share_<?= $key ?>_method" name="share[<?= $key ?>][method]" value="<?= $share->method() ?>" />
@ -110,13 +110,11 @@
</div>
</formgroup>
</fieldset>
<?php } ?>
<formgroup>
<legend>
<?= _t('conf.sharing.add') ?>
</legend>
<fieldset>
<legend><?= _t('conf.sharing.add') ?></legend>
<div class="form-group">
<div class="group-controls">
<div class="stick">
@ -132,7 +130,7 @@
</div>
</div>
</div>
</formgroup>
</fieldset>
<div class="form-group form-actions">
<div class="group-controls">

View File

@ -74,7 +74,7 @@
</div>
</div>
<legend><?= _t('admin.system.registration.title') ?></legend>
<h2><?= _t('admin.system.registration.title') ?></h2>
<div class="form-group">
<label class="group-name" for="max-registrations-select"><?= _t('admin.system.registration.select.label') ?></label>

View File

@ -3,7 +3,7 @@
/** @var FreshRSS_View $this */
if ($this->feed !== null) {
?>
<main class="post">
<main class="post bookmarklet">
<h1><?= _t('sub.feed.add') ?></h1>
<?php if (!$this->load_ok) { ?>
@ -12,76 +12,82 @@
<form method="post" action="<?= _url('feed', 'add') ?>" autocomplete="off">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
<legend><?= _t('sub.feed.information') ?></legend>
<?php if ($this->load_ok) { ?>
<div class="form-group">
<label class="group-name"><?= _t('sub.feed.title') ?></label>
<div class="group-controls">
<label><?= $this->feed->name() ?></label>
</div>
</div>
<?php $desc = $this->feed->description(); if ($desc != '') { ?>
<div class="form-group">
<label class="group-name"><?= _t('sub.feed.description') ?></label>
<div class="group-controls">
<label><?= htmlspecialchars($desc, ENT_NOQUOTES, 'UTF-8') ?></label>
</div>
</div>
<?php } ?>
<div class="form-group">
<label class="group-name"><?= _t('sub.feed.website') ?></label>
<div class="group-controls">
<div class="stick">
<input type="text" value="<?= $this->feed->website() ?>" disabled="disabled" />
<a class="btn" target="_blank" rel="noreferrer" href="<?= $this->feed->website() ?>"><?= _i('link') ?></a>
<fieldset>
<legend><?= _t('sub.feed.information') ?></legend>
<?php if ($this->load_ok) { ?>
<div class="form-group">
<label class="group-name"><?= _t('sub.feed.title') ?></label>
<div class="group-controls">
<label><?= $this->feed->name() ?></label>
</div>
</div>
</div>
<?php } ?>
<div class="form-group">
<label class="group-name" for="url"><?= _t('sub.feed.url') ?></label>
<div class="group-controls">
<div class="stick">
<input type="text" name="url_rss" id="url" value="<?= $this->feed->url() ?>" />
<a class="btn open-url" target="_blank" rel="noreferrer" href="<?= $this->feed->url() ?>" data-input="url" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
</div>
<br />
<a class="btn" target="_blank" rel="noreferrer" href="https://validator.w3.org/feed/check.cgi?url=<?= $this->feed->url() ?>"><?= _t('sub.feed.validator') ?></a>
</div>
</div>
<div class="form-group">
<label class="group-name" for="category"><?= _t('sub.category') ?></label>
<div class="group-controls">
<select name="category" id="category">
<?php foreach ($this->categories as $cat) { ?>
<option value="<?= $cat->id() ?>"<?= $cat->id() == 1 ? ' selected="selected"' : '' ?>>
<?= $cat->name() ?>
</option>
<?php } ?>
</select>
</div>
</div>
<legend><?= _t('sub.feed.auth.http') ?></legend>
<?php $auth = $this->feed->httpAuth(false); ?>
<div class="form-group">
<label class="group-name" for="http_user"><?= _t('sub.feed.auth.username') ?></label>
<div class="group-controls">
<input type="text" name="http_user" id="http_user" value="<?= $auth['username'] ?>" autocomplete="off" />
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.auth.help') ?></p>
</div>
<label class="group-name" for="http_pass"><?= _t('sub.feed.auth.password') ?></label>
<div class="group-controls">
<div class="stick">
<input type="password" name="http_pass" id="http_pass" value="<?= $auth['password'] ?>" autocomplete="new-password" />
<button type="button" class="btn toggle-password" data-toggle="http_pass"><?= _i('key') ?></button>
<?php $desc = $this->feed->description(); if ($desc != '') { ?>
<div class="form-group">
<label class="group-name"><?= _t('sub.feed.description') ?></label>
<div class="group-controls">
<label><?= htmlspecialchars($desc, ENT_NOQUOTES, 'UTF-8') ?></label>
</div>
</div>
</div>
<?php } ?>
<div class="form-group">
<label class="group-name"><?= _t('sub.feed.website') ?></label>
<div class="group-controls">
<div class="stick">
<input type="text" value="<?= $this->feed->website() ?>" disabled="disabled" />
<a class="btn" target="_blank" rel="noreferrer" href="<?= $this->feed->website() ?>"><?= _i('link') ?></a>
</div>
</div>
</div>
<?php } ?>
<div class="form-group">
<label class="group-name" for="url"><?= _t('sub.feed.url') ?></label>
<div class="group-controls">
<div class="stick">
<input type="text" name="url_rss" id="url" value="<?= $this->feed->url() ?>" />
<a class="btn open-url" target="_blank" rel="noreferrer" href="<?= $this->feed->url() ?>" data-input="url" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
</div>
<br />
<a class="btn" target="_blank" rel="noreferrer" href="https://validator.w3.org/feed/check.cgi?url=<?= $this->feed->url() ?>"><?= _t('sub.feed.validator') ?></a>
</div>
</div>
<div class="form-group">
<label class="group-name" for="category"><?= _t('sub.category') ?></label>
<div class="group-controls">
<select name="category" id="category">
<?php foreach ($this->categories as $cat) { ?>
<option value="<?= $cat->id() ?>"<?= $cat->id() == 1 ? ' selected="selected"' : '' ?>>
<?= $cat->name() ?>
</option>
<?php } ?>
</select>
</div>
</div>
</fieldset>
<fieldset>
<legend><?= _t('sub.feed.auth.http') ?></legend>
<?php $auth = $this->feed->httpAuth(false); ?>
<div class="form-group">
<label class="group-name" for="http_user"><?= _t('sub.feed.auth.username') ?></label>
<div class="group-controls">
<input type="text" name="http_user" id="http_user" value="<?= $auth['username'] ?>" autocomplete="off" />
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.auth.help') ?></p>
</div>
</div>
<div class="form-group">
<label class="group-name" for="http_pass"><?= _t('sub.feed.auth.password') ?></label>
<div class="group-controls">
<div class="stick">
<input type="password" name="http_pass" id="http_pass" value="<?= $auth['password'] ?>" autocomplete="new-password" />
<button type="button" class="btn toggle-password" data-toggle="http_pass"><?= _i('key') ?></button>
</div>
</div>
</div>
</fieldset>
<div class="form-group form-actions">
<div class="group-controls">

View File

@ -17,224 +17,231 @@
<form method="post" action="<?= _url('category', 'update', 'id', $this->category->id(), '#', 'slider') ?>" autocomplete="off">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
<fieldset>
<legend><?= _t('sub.category.information') ?></legend>
<div class="form-group">
<label class="group-name" for="name"><?= _t('sub.category.title') ?></label>
<div class="group-controls">
<input type="text" name="name" id="name" value="<?= $this->category->name() ?>" <?=
//Disallow changing the name of the default category
$this->category->id() === FreshRSS_CategoryDAO::DEFAULTCATEGORYID ? 'readonly="readonly"' : ''
?> />
</div>
</div>
<div class="form-group">
<label class="group-name" for="position"><?= _t('sub.category.position') ?></label>
<div class="group-controls">
<input type="number" name="position" id="position" min="1" value="<?= $this->category->attributeInt('position') ?>" />
<p class="help"><?= _i('help') ?> <?= _t('sub.category.position_help') ?></p>
</div>
</div>
<legend><?= _t('sub.category.information') ?></legend>
<div class="form-group">
<label class="group-name" for="name"><?= _t('sub.category.title') ?></label>
<div class="group-controls">
<input type="text" name="name" id="name" value="<?= $this->category->name() ?>" <?=
//Disallow changing the name of the default category
$this->category->id() === FreshRSS_CategoryDAO::DEFAULTCATEGORYID ? 'readonly="readonly"' : ''
?> />
<div class="form-group form-actions">
<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>
</div>
</div>
<div class="form-group">
<label class="group-name" for="position"><?= _t('sub.category.position') ?></label>
<div class="group-controls">
<input type="number" name="position" id="position" min="1" value="<?= $this->category->attributeInt('position') ?>" />
<p class="help"><?= _i('help') ?> <?= _t('sub.category.position_help') ?></p>
</div>
</div>
<div class="form-group form-actions">
<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>
</div>
</fieldset>
<?php if (!$this->category->isDefault()): ?>
<legend><?= _t('sub.category.dynamic_opml') ?> <?= _i('opml-dyn') ?></legend>
<div class="form-group">
<label class="group-name" for="opml_url"><?= _t('sub.category.opml_url') ?></label>
<div class="group-controls">
<div class="stick">
<input id="opml_url" name="opml_url" type="url" autocomplete="off" class="long" data-disable-update="refreshOpml" value="<?= $this->category->attributeString('opml_url') ?>" />
<button type="submit" class="btn" id="refreshOpml" formmethod="post" formaction="<?= _url('category', 'refreshOpml', 'id', $this->category->id()) ?>">
<?= _i('refresh') ?> <?= _t('gen.action.refresh_opml') ?>
</button>
<a class="btn open-url" target="_blank" rel="noreferrer" href="" data-input="opml_url" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
<fieldset>
<legend><?= _t('sub.category.dynamic_opml') ?> <?= _i('opml-dyn') ?></legend>
<div class="form-group">
<label class="group-name" for="opml_url"><?= _t('sub.category.opml_url') ?></label>
<div class="group-controls">
<div class="stick">
<input id="opml_url" name="opml_url" type="url" autocomplete="off" class="long" data-disable-update="refreshOpml" value="<?= $this->category->attributeString('opml_url') ?>" />
<button type="submit" class="btn" id="refreshOpml" formmethod="post" formaction="<?= _url('category', 'refreshOpml', 'id', $this->category->id()) ?>">
<?= _i('refresh') ?> <?= _t('gen.action.refresh_opml') ?>
</button>
<a class="btn open-url" target="_blank" rel="noreferrer" href="" data-input="opml_url" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
</div>
<p class="help"><?= _i('help') ?> <?= _t('gen.short.blank_to_disable') ?></p>
<p class="help"><?= _i('help') ?> <?= _t('sub.category.dynamic_opml.help') ?></p>
</div>
</div>
<p class="help"><?= _i('help') ?> <?= _t('gen.short.blank_to_disable') ?></p>
<p class="help"><?= _i('help') ?> <?= _t('sub.category.dynamic_opml.help') ?></p>
</div>
</div>
<div class="form-group form-actions">
<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>
<button type="submit" class="btn btn-attention confirm"
data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
formaction="<?= _url('category', 'empty', 'id', $this->category->id(), 'muted', 1) ?>"
formmethod="post"><?= _t('gen.action.delete_muted_feeds') ?></button>
</div>
</div>
<div class="form-group form-actions">
<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>
<button type="submit" class="btn btn-attention confirm"
data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
formaction="<?= _url('category', 'empty', 'id', $this->category->id(), 'muted', 1) ?>"
formmethod="post"><?= _t('gen.action.delete_muted_feeds') ?></button>
</div>
</div>
</fieldset>
<?php endif; ?>
<legend><?= _t('sub.feed.filteractions') ?></legend>
<div class="form-group">
<label class="group-name" for="filteractions_read"><?= _t('conf.reading.read.when') ?></label>
<div class="group-controls">
<textarea name="filteractions_read" id="filteractions_read" class="w100"><?php
foreach ($this->category->filtersAction('read') as $filterRead) {
echo $filterRead->getRawInput(), PHP_EOL;
}
?></textarea>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
<fieldset>
<legend><?= _t('sub.feed.filteractions') ?></legend>
<div class="form-group">
<label class="group-name" for="filteractions_read"><?= _t('conf.reading.read.when') ?></label>
<div class="group-controls">
<textarea name="filteractions_read" id="filteractions_read" class="w100"><?php
foreach ($this->category->filtersAction('read') as $filterRead) {
echo $filterRead->getRawInput(), PHP_EOL;
}
?></textarea>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
</div>
</div>
</div>
<div class="form-group form-actions">
<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 class="form-group form-actions">
<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>
</div>
</div>
</fieldset>
<legend><?= _t('sub.category.archiving') ?></legend>
<?php
$archiving = $this->category->attributeArray('archiving');
/** @var array<'default'?:bool,'keep_period'?:string,'keep_max'?:int,'keep_min'?:int,'keep_favourites'?:bool,'keep_labels'?:bool,'keep_unreads'?:bool>|null $archiving */
if (empty($archiving)) {
$archiving = [ 'default' => true ];
} else {
$archiving['default'] = false;
}
$volatile = [
'enable_keep_period' => false,
'keep_period_count' => '3',
'keep_period_unit' => 'P1M',
];
if (!empty($archiving['keep_period']) && is_string($archiving['keep_period'])) {
if (preg_match('/^PT?(?P<count>\d+)[YMWDH]$/', $archiving['keep_period'], $matches)) {
$volatile['enable_keep_period'] = true;
$volatile['keep_period_count'] = $matches['count'];
$volatile['keep_period_unit'] = str_replace($matches['count'], '1', $archiving['keep_period']);
<fieldset>
<legend><?= _t('sub.category.archiving') ?></legend>
<?php
$archiving = $this->category->attributeArray('archiving');
/** @var array<'default'?:bool,'keep_period'?:string,'keep_max'?:int,'keep_min'?:int,'keep_favourites'?:bool,'keep_labels'?:bool,'keep_unreads'?:bool>|null $archiving */
if (empty($archiving)) {
$archiving = [ 'default' => true ];
} else {
$archiving['default'] = false;
}
}
//Defaults
if (!isset($archiving['keep_max']) || !is_int($archiving['keep_max'])) {
$archiving['keep_max'] = 0;
}
if (!isset($archiving['keep_min']) || !is_int($archiving['keep_min'])) {
$archiving['keep_min'] = 50;
}
if (!isset($archiving['keep_favourites']) || !is_bool($archiving['keep_favourites'])) {
$archiving['keep_favourites'] = true;
}
if (!isset($archiving['keep_labels']) || !is_bool($archiving['keep_labels'])) {
$archiving['keep_labels'] = true;
}
if (!isset($archiving['keep_unreads']) || !is_bool($archiving['keep_unreads'])) {
$archiving['keep_unreads'] = false;
}
?>
$volatile = [
'enable_keep_period' => false,
'keep_period_count' => '3',
'keep_period_unit' => 'P1M',
];
if (!empty($archiving['keep_period']) && is_string($archiving['keep_period'])) {
if (preg_match('/^PT?(?P<count>\d+)[YMWDH]$/', $archiving['keep_period'], $matches)) {
$volatile['enable_keep_period'] = true;
$volatile['keep_period_count'] = $matches['count'];
$volatile['keep_period_unit'] = str_replace($matches['count'], '1', $archiving['keep_period']);
}
}
//Defaults
if (!isset($archiving['keep_max']) || !is_int($archiving['keep_max'])) {
$archiving['keep_max'] = 0;
}
if (!isset($archiving['keep_min']) || !is_int($archiving['keep_min'])) {
$archiving['keep_min'] = 50;
}
if (!isset($archiving['keep_favourites']) || !is_bool($archiving['keep_favourites'])) {
$archiving['keep_favourites'] = true;
}
if (!isset($archiving['keep_labels']) || !is_bool($archiving['keep_labels'])) {
$archiving['keep_labels'] = true;
}
if (!isset($archiving['keep_unreads']) || !is_bool($archiving['keep_unreads'])) {
$archiving['keep_unreads'] = false;
}
?>
<p class="alert alert-warn">
<?= _t('conf.archiving.policy_warning') ?>
</p>
<p class="alert alert-warn">
<?= _t('conf.archiving.policy_warning') ?>
</p>
<div class="form-group">
<label class="group-name" for="use_default_purge_options"><?= _t('conf.archiving.policy') ?></label>
<div class="group-controls">
<label class="checkbox">
<input type="checkbox" name="use_default_purge_options" id="use_default_purge_options" value="1"<?= $archiving['default'] ? ' checked="checked"' : '' ?>
data-leave-validation="<?= $archiving['default'] ? 1 : 0 ?>" />
<?= _t('gen.short.by_default') ?>
</label>
<div class="form-group">
<label class="group-name" for="use_default_purge_options"><?= _t('conf.archiving.policy') ?></label>
<div class="group-controls">
<label class="checkbox">
<input type="checkbox" name="use_default_purge_options" id="use_default_purge_options" value="1"<?= $archiving['default'] ? ' checked="checked"' : '' ?>
data-leave-validation="<?= $archiving['default'] ? 1 : 0 ?>" />
<?= _t('gen.short.by_default') ?>
</label>
</div>
</div>
</div>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="enable_keep_max">
<input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty($archiving['keep_max']) ? '' : ' checked="checked"' ?>
data-leave-validation="<?= empty($archiving['keep_max']) ? 0 : 1 ?>"/>
<?= _t('conf.archiving.keep_max') ?>
<input type="number" id="keep_max" name="keep_max" min="0" value="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"
data-leave-validation="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"/>
</label>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="enable_keep_max">
<input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty($archiving['keep_max']) ? '' : ' checked="checked"' ?>
data-leave-validation="<?= empty($archiving['keep_max']) ? 0 : 1 ?>"/>
<?= _t('conf.archiving.keep_max') ?>
<input type="number" id="keep_max" name="keep_max" min="0" value="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"
data-leave-validation="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"/>
</label>
</div>
</div>
</div>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="enable_keep_period">
<input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= $volatile['enable_keep_period'] ? ' checked="checked"' : '' ?>
data-leave-validation="<?= $volatile['enable_keep_period'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_period') ?>
<input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= $volatile['keep_period_count'] ?>"
data-leave-validation="<?= $volatile['keep_period_count'] ?>"/>
<select class="number" name="keep_period_unit" id="keep_period_unit" data-leave-validation="<?= $volatile['keep_period_unit'] ?>">
<option></option>
<option value="P1Y" <?= 'P1Y' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.years') ?></option>
<option value="P1M" <?= 'P1M' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.months') ?></option>
<option value="P1W" <?= 'P1W' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.weeks') ?></option>
<option value="P1D" <?= 'P1D' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.days') ?></option>
<option value="PT1H" <?= 'PT1H' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.hours') ?></option>
</select>
</label>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="enable_keep_period">
<input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= $volatile['enable_keep_period'] ? ' checked="checked"' : '' ?>
data-leave-validation="<?= $volatile['enable_keep_period'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_period') ?>
<input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= $volatile['keep_period_count'] ?>"
data-leave-validation="<?= $volatile['keep_period_count'] ?>"/>
<select class="number" name="keep_period_unit" id="keep_period_unit" data-leave-validation="<?= $volatile['keep_period_unit'] ?>">
<option></option>
<option value="P1Y" <?= 'P1Y' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.years') ?></option>
<option value="P1M" <?= 'P1M' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.months') ?></option>
<option value="P1W" <?= 'P1W' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.weeks') ?></option>
<option value="P1D" <?= 'P1D' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.days') ?></option>
<option value="PT1H" <?= 'PT1H' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.hours') ?></option>
</select>
</label>
</div>
</div>
</div>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-name"><?= _t('conf.archiving.exception') ?></div>
<div class="group-controls">
<label class="checkbox" for="keep_favourites">
<input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= $archiving['keep_favourites'] ? ' checked="checked"' : '' ?>
data-leave-validation="<?= $archiving['keep_favourites'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_favourites') ?>
</label>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-name"><?= _t('conf.archiving.exception') ?></div>
<div class="group-controls">
<label class="checkbox" for="keep_favourites">
<input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= $archiving['keep_favourites'] ? ' checked="checked"' : '' ?>
data-leave-validation="<?= $archiving['keep_favourites'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_favourites') ?>
</label>
</div>
</div>
</div>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="keep_labels">
<input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= $archiving['keep_labels'] ? ' checked="checked"' : '' ?>
data-leave-validation="<?= $archiving['keep_labels'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_labels') ?>
</label>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="keep_labels">
<input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= $archiving['keep_labels'] ? ' checked="checked"' : '' ?>
data-leave-validation="<?= $archiving['keep_labels'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_labels') ?>
</label>
</div>
</div>
</div>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="keep_unreads">
<input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= $archiving['keep_unreads'] ? ' checked="checked"' : '' ?>
data-leave-validation="<?= $archiving['keep_unreads'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_unreads') ?>
</label>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="keep_unreads">
<input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= $archiving['keep_unreads'] ? ' checked="checked"' : '' ?>
data-leave-validation="<?= $archiving['keep_unreads'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_unreads') ?>
</label>
</div>
</div>
</div>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label for="keep_min"><?= _t('sub.feed.keep_min') ?>
<input type="number" id="keep_min" name="keep_min" min="0" value="<?= $archiving['keep_min'] ?>"
data-leave-validation="<?= $archiving['keep_min'] ?>">
</label>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label for="keep_min"><?= _t('sub.feed.keep_min') ?>
<input type="number" id="keep_min" name="keep_min" min="0" value="<?= $archiving['keep_min'] ?>"
data-leave-validation="<?= $archiving['keep_min'] ?>">
</label>
</div>
</div>
</div>
<div class="form-group form-actions">
<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 class="form-group form-actions">
<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>
</div>
</div>
<?php if (!$this->category->isDefault()): ?>
<p class="alert alert-warn">
<?= _t('sub.feed.moved_category_deleted', _t('gen.short.default_category')) ?>
</p>
<?php endif;?>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-attention confirm"
data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
formaction="<?= _url('category', 'empty', 'id', $this->category->id()) ?>"
formmethod="post"><?= _t('gen.action.empty') ?></button>
<?php if (!$this->category->isDefault()): ?>
<button type="submit" class="btn btn-attention confirm"
data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
formaction="<?= _url('category', 'delete', 'id', $this->category->id()) ?>"
formmethod="post"><?= _t('gen.action.remove') ?></button>
<?php endif;?>
<?php if (!$this->category->isDefault()): ?>
<p class="alert alert-warn">
<?= _t('sub.feed.moved_category_deleted', _t('gen.short.default_category')) ?>
</p>
<?php endif;?>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-attention confirm"
data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
formaction="<?= _url('category', 'empty', 'id', $this->category->id()) ?>"
formmethod="post"><?= _t('gen.action.empty') ?></button>
<?php if (!$this->category->isDefault()): ?>
<button type="submit" class="btn btn-attention confirm"
data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
formaction="<?= _url('category', 'delete', 'id', $this->category->id()) ?>"
formmethod="post"><?= _t('gen.action.remove') ?></button>
<?php endif;?>
</div>
</div>
</div>
</fieldset>
</form>
</div>

View File

@ -22,120 +22,124 @@
</div>
</div>
<legend><?= _t('conf.query.share') ?></legend>
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="shareRss">
<input type="checkbox" name="query[shareRss]" id="shareRss" value="1" <?= $this->query->shareRss() ? 'checked="checked"' : ''?> />
<?= _t('conf.query.filter.shareRss') ?>
</label>
<?php if ($this->query->sharedUrlRss() !== ''): ?>
<ul>
<li><a href="<?= $this->query->sharedUrlHtml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.html') ?></a></li>
<li><a href="<?= $this->query->sharedUrlRss() ?>"><?= _i('link') ?> <?= _t('conf.query.share.rss') ?></a></li>
</ul>
<?php endif; ?>
<fieldset>
<legend><?= _t('conf.query.share') ?></legend>
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="shareRss">
<input type="checkbox" name="query[shareRss]" id="shareRss" value="1" <?= $this->query->shareRss() ? 'checked="checked"' : ''?> />
<?= _t('conf.query.filter.shareRss') ?>
</label>
<?php if ($this->query->sharedUrlRss() !== ''): ?>
<ul>
<li><a href="<?= $this->query->sharedUrlHtml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.html') ?></a></li>
<li><a href="<?= $this->query->sharedUrlRss() ?>"><?= _i('link') ?> <?= _t('conf.query.share.rss') ?></a></li>
</ul>
<?php endif; ?>
</div>
<div class="group-controls">
<label class="checkbox" for="shareOpml">
<input type="checkbox" name="query[shareOpml]" id="shareOpml" value="1" <?= $this->query->shareOpml() && $this->query->safeForOpml() ? 'checked="checked"' : '' ?>
<?= $this->query->safeForOpml() ? '' : 'disabled="disabled"' ?> />
<?= _t('conf.query.filter.shareOpml') ?>
</label>
<?php if ($this->query->sharedUrlOpml() !== ''): ?>
<ul>
<li><a href="<?= $this->query->sharedUrlOpml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.opml') ?></a></li>
</ul>
<?php endif; ?>
</div>
<p class="help"><?= _i('help') ?> <?= _t('conf.query.share.help') ?></a></p>
<p class="help"><?= _i('help') ?> <?= _t('conf.query.help') ?></a></p>
</div>
<div class="group-controls">
<label class="checkbox" for="shareOpml">
<input type="checkbox" name="query[shareOpml]" id="shareOpml" value="1" <?= $this->query->shareOpml() && $this->query->safeForOpml() ? 'checked="checked"' : '' ?>
<?= $this->query->safeForOpml() ? '' : 'disabled="disabled"' ?> />
<?= _t('conf.query.filter.shareOpml') ?>
</label>
<?php if ($this->query->sharedUrlOpml() !== ''): ?>
<ul>
<li><a href="<?= $this->query->sharedUrlOpml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.opml') ?></a></li>
</ul>
<?php endif; ?>
</div>
<p class="help"><?= _i('help') ?> <?= _t('conf.query.share.help') ?></a></p>
<p class="help"><?= _i('help') ?> <?= _t('conf.query.help') ?></a></p>
</div>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
</div>
</div>
</div>
</fieldset>
<legend><?= _t('conf.query.filter') ?></legend>
<div class="form-group">
<label class="group-name" for=""><?= _t('conf.query.filter.search') ?></label>
<div class="group-controls">
<input type="text" id="query_search" name="query[search]" value="<?= htmlspecialchars($this->query->getSearch()->getRawInput(), ENT_COMPAT, 'UTF-8') ?>"/>
<p class="help"><?= _i('help') ?> <?= _t('gen.menu.search_help') ?></a></p>
<fieldset>
<legend><?= _t('conf.query.filter') ?></legend>
<div class="form-group">
<label class="group-name" for=""><?= _t('conf.query.filter.search') ?></label>
<div class="group-controls">
<input type="text" id="query_search" name="query[search]" value="<?= htmlspecialchars($this->query->getSearch()->getRawInput(), ENT_COMPAT, 'UTF-8') ?>"/>
<p class="help"><?= _i('help') ?> <?= _t('gen.menu.search_help') ?></a></p>
</div>
</div>
</div>
<div class="form-group">
<label class="group-name" for=""><?= _t('conf.query.filter.state') ?></label>
<div class="group-controls">
<label class="checkbox" for="show_read">
<input type="checkbox" name="query[state][]" id="show_read"
value="<?= FreshRSS_Entry::STATE_READ ?>" <?= FreshRSS_Entry::STATE_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.read') ?>
</label>
<label class="checkbox" for="show_not_read">
<input type="checkbox" name="query[state][]" id="show_not_read"
value="<?= FreshRSS_Entry::STATE_NOT_READ ?>" <?= FreshRSS_Entry::STATE_NOT_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.unread') ?>
</label>
<label class="checkbox" for="show_favorite">
<input type="checkbox" name="query[state][]" id="show_favorite"
value="<?= FreshRSS_Entry::STATE_FAVORITE ?>" <?= FreshRSS_Entry::STATE_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.starred') ?>
</label>
<label class="checkbox" for="show_not_favorite">
<input type="checkbox" name="query[state][]" id="show_not_favorite"
value="<?= FreshRSS_Entry::STATE_NOT_FAVORITE ?>" <?= FreshRSS_Entry::STATE_NOT_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.non-starred') ?>
</label>
<div class="form-group">
<label class="group-name" for=""><?= _t('conf.query.filter.state') ?></label>
<div class="group-controls">
<label class="checkbox" for="show_read">
<input type="checkbox" name="query[state][]" id="show_read"
value="<?= FreshRSS_Entry::STATE_READ ?>" <?= FreshRSS_Entry::STATE_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.read') ?>
</label>
<label class="checkbox" for="show_not_read">
<input type="checkbox" name="query[state][]" id="show_not_read"
value="<?= FreshRSS_Entry::STATE_NOT_READ ?>" <?= FreshRSS_Entry::STATE_NOT_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.unread') ?>
</label>
<label class="checkbox" for="show_favorite">
<input type="checkbox" name="query[state][]" id="show_favorite"
value="<?= FreshRSS_Entry::STATE_FAVORITE ?>" <?= FreshRSS_Entry::STATE_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.starred') ?>
</label>
<label class="checkbox" for="show_not_favorite">
<input type="checkbox" name="query[state][]" id="show_not_favorite"
value="<?= FreshRSS_Entry::STATE_NOT_FAVORITE ?>" <?= FreshRSS_Entry::STATE_NOT_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.non-starred') ?>
</label>
</div>
</div>
</div>
<div class="form-group">
<label class="group-name" for="query_get"><?= _t('conf.query.filter.type') ?></label>
<div class="group-controls">
<select name="query[get]" id="query_get" size="10">
<option value="a" <?= in_array($this->query->getGet(), ['', 'a'], true) ? 'selected="selected"' : '' ?>><?= _t('index.feed.title') ?></option>
<option value="i" <?= 'i' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.menu.important') ?></option>
<option value="s" <?= 's' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.feed.title_fav') ?></option>
<option value="T" <?= 'T' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.menu.tags') ?></option>
<optgroup label="<?= _t('conf.query.filter.tags') ?>">
<?php foreach ($this->tags as $tag): ?>
<option value="t_<?= $tag->id() ?>" <?= "t_{$tag->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $tag->name() ?></option>
<?php endforeach?>
</optgroup>
<optgroup label="<?= _t('conf.query.filter.categories') ?>">
<?php foreach ($this->categories as $category): ?>
<option value="c_<?= $category->id() ?>" <?= "c_{$category->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $category->name() ?></option>
<?php endforeach?>
</optgroup>
<optgroup label="<?= _t('conf.query.filter.feeds') ?>">
<?php foreach ($this->feeds as $feed): ?>
<option value="f_<?= $feed->id() ?>" <?= "f_{$feed->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $feed->name() ?></option>
<?php endforeach?>
</optgroup>
</select>
<div class="form-group">
<label class="group-name" for="query_get"><?= _t('conf.query.filter.type') ?></label>
<div class="group-controls">
<select name="query[get]" id="query_get" size="10">
<option value="a" <?= in_array($this->query->getGet(), ['', 'a'], true) ? 'selected="selected"' : '' ?>><?= _t('index.feed.title') ?></option>
<option value="i" <?= 'i' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.menu.important') ?></option>
<option value="s" <?= 's' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.feed.title_fav') ?></option>
<option value="T" <?= 'T' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.menu.tags') ?></option>
<optgroup label="<?= _t('conf.query.filter.tags') ?>">
<?php foreach ($this->tags as $tag): ?>
<option value="t_<?= $tag->id() ?>" <?= "t_{$tag->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $tag->name() ?></option>
<?php endforeach?>
</optgroup>
<optgroup label="<?= _t('conf.query.filter.categories') ?>">
<?php foreach ($this->categories as $category): ?>
<option value="c_<?= $category->id() ?>" <?= "c_{$category->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $category->name() ?></option>
<?php endforeach?>
</optgroup>
<optgroup label="<?= _t('conf.query.filter.feeds') ?>">
<?php foreach ($this->feeds as $feed): ?>
<option value="f_<?= $feed->id() ?>" <?= "f_{$feed->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $feed->name() ?></option>
<?php endforeach?>
</optgroup>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="group-name" for=""><?= _t('conf.query.filter.order') ?></label>
<div class="group-controls">
<select name="query[order]" id="query_order">
<option value=""></option>
<option value="DESC" <?= 'DESC' === $this->query->getOrder() ? 'selected="selected"' : '' ?>><?= _t('conf.query.order_desc') ?></option>
<option value="ASC" <?= 'ASC' === $this->query->getOrder() ? 'selected="selected"' : '' ?>><?= _t('conf.query.order_asc') ?></option>
</select>
<div class="form-group">
<label class="group-name" for=""><?= _t('conf.query.filter.order') ?></label>
<div class="group-controls">
<select name="query[order]" id="query_order">
<option value=""></option>
<option value="DESC" <?= 'DESC' === $this->query->getOrder() ? 'selected="selected"' : '' ?>><?= _t('conf.query.order_desc') ?></option>
<option value="ASC" <?= 'ASC' === $this->query->getOrder() ? 'selected="selected"' : '' ?>><?= _t('conf.query.order_asc') ?></option>
</select>
</div>
</div>
</div>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
<button type="submit" class="btn btn-attention confirm"
data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
formaction="<?= _url('configure', 'deleteQuery', 'id', $this->queryId) ?>"
formmethod="post"><?= _t('gen.action.remove') ?></button>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
<button type="submit" class="btn btn-attention confirm"
data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
formaction="<?= _url('configure', 'deleteQuery', 'id', $this->queryId) ?>"
formmethod="post"><?= _t('gen.action.remove') ?></button>
</div>
</div>
</div>
</fieldset>
</form>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -10,56 +10,54 @@
<h1><?= _t('index.log') ?></h1>
<?php
/** @var array<FreshRSS_Log> $items */
$items = $this->logsPaginator->items();
?>
<?php if (!empty($items)) { ?>
<?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
<div id="loglist-wrapper" class="table-wrapper scrollbar-thin">
<table id="loglist">
<thead>
<th><?= _t('conf.logs.loglist.level') ?></th>
<th><?= _t('conf.logs.loglist.timestamp') ?></th>
<th><?= _t('conf.logs.loglist.message') ?></th>
</thead>
<tbody>
<?php foreach ($items as $log) { ?>
<tr class="log-item log-<?= $log->level() ?>">
<td class="log-level">
<?= _i($log->level()) ?>
</td>
<td class="log-date">
<time datetime="<?= date('Y-m-d H:i:s', @strtotime($log->date()) ?: 0) ?>">
<?= date('Y-m-d H:i:s', @strtotime($log->date()) ?: 0) ?>
</time>
</td>
<td class="log-message">
<?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
<form method="post" action="<?= _url('index', 'logs') ?>">
<?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
<div id="loglist-wrapper" class="table-wrapper scrollbar-thin">
<table id="loglist">
<thead>
<th><?= _t('conf.logs.loglist.level') ?></th>
<th><?= _t('conf.logs.loglist.timestamp') ?></th>
<th><?= _t('conf.logs.loglist.message') ?></th>
</thead>
<tbody>
<?php foreach ($items as $log) { ?>
<tr class="log-item log-<?= $log->level() ?>">
<td class="log-level">
<?= _i($log->level()) ?>
</td>
<td class="log-date">
<time datetime="<?= date('Y-m-d H:i:s', @strtotime($log->date()) ?: 0) ?>">
<?= date('Y-m-d H:i:s', @strtotime($log->date()) ?: 0) ?>
</time>
</td>
<td class="log-message">
<?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
<div class="form-group form-actions">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
<input type="hidden" name="clearLogs" />
<div class="group-controls">
<button type="submit" class="btn btn-attention"><?= _t('index.log.clear') ?></button>
</div>
</div>
</form>
<form method="post" action="<?= _url('index', 'logs') ?>">
<div class="form-group form-actions">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
<input type="hidden" name="clearLogs" />
<div class="group-controls">
<button type="submit" class="btn btn-attention"><?= _t('index.log.clear') ?></button>
</div>
</div>
</form>
<?php } else { ?>
<p class="alert alert-warn"><?= _t('index.log.empty') ?></p>
<?php
} else { ?>
<p class="alert alert-warn"><?= _t('index.log.empty') ?></p>
<?php } ?>
</main>

View File

@ -21,33 +21,37 @@
<form method="post" action="<?= _url('tag', 'update', 'id', $this->tag->id(), '#', 'slider') ?>" autocomplete="off">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
<legend><?= _t('sub.category.information') ?></legend>
<div class="form-group">
<label class="group-name" for="name"><?= _t('sub.tag.name') ?></label>
<div class="group-controls">
<input type="text" name="name" id="name" value="<?= $this->tag->name() ?>" />
<fieldset>
<legend><?= _t('sub.category.information') ?></legend>
<div class="form-group">
<label class="group-name" for="name"><?= _t('sub.tag.name') ?></label>
<div class="group-controls">
<input type="text" name="name" id="name" value="<?= $this->tag->name() ?>" />
</div>
</div>
</div>
<div class="form-group form-actions">
<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 class="form-group form-actions">
<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>
</div>
</div>
</fieldset>
<legend><?= _t('sub.feed.filteractions') ?></legend>
<div class="form-group">
<label class="group-name" for="filteractions_label"><?= _t('sub.tag.auto_label') ?></label>
<div class="group-controls">
<textarea name="filteractions_label" id="filteractions_label" class="w100"><?php
foreach ($this->tag->filtersAction('label') as $filterRead) {
echo $filterRead->getRawInput(), PHP_EOL;
}
?></textarea>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
<fieldset>
<legend><?= _t('sub.feed.filteractions') ?></legend>
<div class="form-group">
<label class="group-name" for="filteractions_label"><?= _t('sub.tag.auto_label') ?></label>
<div class="group-controls">
<textarea name="filteractions_label" id="filteractions_label" class="w100"><?php
foreach ($this->tag->filtersAction('label') as $filterRead) {
echo $filterRead->getRawInput(), PHP_EOL;
}
?></textarea>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
</div>
</div>
</div>
</fieldset>
<div class="form-group form-actions">
<div class="group-controls">

View File

@ -75,10 +75,10 @@
</div>
</form>
<h2><?= _t('conf.profile.api') ?></h2>
<?php if (FreshRSS_Context::systemConf()->api_enabled) { ?>
<form method="post" action="<?= _url('api', 'updatePassword') ?>">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
<legend><?= _t('conf.profile.api') ?></legend>
<div class="form-group">
<label class="group-name" for="apiPasswordPlain"><?= _t('conf.profile.password_api') ?></label>

View File

@ -15,7 +15,7 @@ const init_integration = function () {
const shareTypes = event.target.closest('.group-controls').querySelector('select');
const shareType = shareTypes.options[shareTypes.selectedIndex];
const template = document.getElementById(shareType.getAttribute('data-form') + '-share');
let newShare = template.content.cloneNode(true).querySelector('formgroup').outerHTML;
let newShare = template.content.cloneNode(true).querySelector('fieldset').outerHTML;
newShare = newShare.replace(/##label##/g, shareType.text);
newShare = newShare.replace(/##type##/g, shareType.value);
@ -23,7 +23,7 @@ const init_integration = function () {
newShare = newShare.replace(/##key##/g, shares);
newShare = newShare.replace(/##method##/g, shareType.getAttribute('data-method'));
newShare = newShare.replace(/##field##/g, shareType.getAttribute('data-field'));
event.target.closest('formgroup').insertAdjacentHTML('beforebegin', newShare);
event.target.closest('fieldset').insertAdjacentHTML('beforebegin', newShare);
shares++;
});

View File

@ -129,8 +129,8 @@ th {
background: var(--background-color-light);
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -129,8 +129,8 @@ th {
background: var(--background-color-light);
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -13,8 +13,8 @@ th {
background: variables.$grey-lighter;
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -195,8 +195,8 @@ th {
background: #fcfaf8;
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -195,8 +195,8 @@ th {
background: #fcfaf8;
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -83,8 +83,8 @@ th {
background: #f6f6f6;
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -83,8 +83,8 @@ th {
background: #f6f6f6;
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -13,8 +13,8 @@ th {
background: variables.$grey-lighter;
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -194,8 +194,8 @@ th {
background: #f9fafb;
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -194,8 +194,8 @@ th {
background: #f9fafb;
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -171,8 +171,8 @@ button.as-link[disabled] {
}
/*=== Tables */
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
}

View File

@ -171,8 +171,8 @@ button.as-link[disabled] {
}
/*=== Tables */
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
}

View File

@ -165,8 +165,8 @@ th {
background-color: var(--background-color-light-shadowed);
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -165,8 +165,8 @@ th {
background-color: var(--background-color-light-shadowed);
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -153,8 +153,8 @@ th {
background-color: var(--background-color-grey);
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -153,8 +153,8 @@ th {
background-color: var(--background-color-grey);
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -157,8 +157,8 @@ th {
background-color: var(--color-background-light);
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -157,8 +157,8 @@ th {
background-color: var(--color-background-light);
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -63,8 +63,8 @@ th, td {
th {
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}

View File

@ -63,8 +63,8 @@ th, td {
th {
}
form td,
form th {
.config-articleicons td,
.config-articleicons th {
font-weight: normal;
text-align: center;
}