2014-04-29 21:35:29 +02:00
|
|
|
<form action="<?= \Chibi\Router::linkTo(['UserController', 'settingsAction'], ['name' => $this->context->transport->user->name]) ?>" method="post" class="settings">
|
2014-02-16 16:03:13 +01:00
|
|
|
<div class="form-row safety">
|
|
|
|
<label>Safety:</label>
|
2013-10-22 00:17:06 +02:00
|
|
|
<div class="input-wrapper">
|
|
|
|
<?php foreach (PostSafety::getAll() as $safety): ?>
|
2014-04-29 23:52:17 +02:00
|
|
|
<?php if (Access::check(Privilege::ListPosts, PostSafety::toString($safety))): ?>
|
2013-12-05 22:19:21 +01:00
|
|
|
<label>
|
|
|
|
<?php
|
|
|
|
$attrs = [];
|
|
|
|
$attrs['type'] = 'checkbox';
|
|
|
|
$attrs['name'] = 'safety[]';
|
|
|
|
$attrs['value'] = $safety;
|
|
|
|
if ($this->context->transport->user->hasEnabledSafety($safety))
|
|
|
|
$attrs['checked'] = 'checked';
|
|
|
|
|
|
|
|
echo TextHelper::htmlTag('input', TextHelper::HTML_LEAF, $attrs);
|
|
|
|
?>
|
2014-04-27 14:44:06 +02:00
|
|
|
<?= ucfirst(PostSafety::toDisplayString($safety)) ?>
|
2013-12-05 22:19:21 +01:00
|
|
|
</label>
|
2013-10-22 00:17:06 +02:00
|
|
|
<?php endif ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-02-16 16:03:13 +01:00
|
|
|
<div class="form-row endless-scrolling">
|
|
|
|
<label for="endless-scrolling">Endless scrolling:</label>
|
2013-10-22 00:17:06 +02:00
|
|
|
<div class="input-wrapper">
|
|
|
|
<label>
|
2013-12-05 22:19:21 +01:00
|
|
|
<?php
|
|
|
|
$attrs = [];
|
|
|
|
$attrs['type'] = 'checkbox';
|
|
|
|
$attrs['id'] = 'endless-scrolling';
|
|
|
|
$attrs['name'] = 'endless-scrolling';
|
|
|
|
if ($this->context->transport->user->hasEnabledEndlessScrolling())
|
|
|
|
$attrs['checked'] = 'checked';
|
|
|
|
|
|
|
|
echo TextHelper::htmlTag('input', TextHelper::HTML_LEAF, $attrs);
|
|
|
|
?>
|
2013-10-22 00:17:06 +02:00
|
|
|
Enabled
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-02-16 16:03:13 +01:00
|
|
|
<div class="form-row post-tag-titles">
|
|
|
|
<label for="post-tag-titles">Tags in thumbs:</label>
|
2013-11-25 12:07:50 +01:00
|
|
|
<div class="input-wrapper">
|
|
|
|
<label>
|
2013-12-05 22:19:21 +01:00
|
|
|
<?php
|
|
|
|
$attrs = [];
|
|
|
|
$attrs['type'] = 'checkbox';
|
|
|
|
$attrs['id'] = 'post-tag-titles';
|
|
|
|
$attrs['name'] = 'post-tag-titles';
|
|
|
|
if ($this->context->transport->user->hasEnabledPostTagTitles())
|
|
|
|
$attrs['checked'] = 'checked';
|
|
|
|
|
|
|
|
echo TextHelper::htmlTag('input', TextHelper::HTML_LEAF, $attrs);
|
|
|
|
?>
|
|
|
|
Enabled
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-02-16 16:03:13 +01:00
|
|
|
<div class="form-row hide-disliked-posts">
|
|
|
|
<label for="hide-disliked-posts">Hide down-voted:</label>
|
2013-12-05 22:19:21 +01:00
|
|
|
<div class="input-wrapper">
|
|
|
|
<label>
|
|
|
|
<?php
|
|
|
|
$attrs = [];
|
|
|
|
$attrs['type'] = 'checkbox';
|
|
|
|
$attrs['id'] = 'hide-disliked-posts';
|
|
|
|
$attrs['name'] = 'hide-disliked-posts';
|
|
|
|
if ($this->context->transport->user->hasEnabledHidingDislikedPosts())
|
|
|
|
$attrs['checked'] = 'checked';
|
|
|
|
|
|
|
|
echo TextHelper::htmlTag('input', TextHelper::HTML_LEAF, $attrs);
|
|
|
|
?>
|
2013-11-25 12:07:50 +01:00
|
|
|
Enabled
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2013-10-22 00:17:06 +02:00
|
|
|
<input type="hidden" name="submit" value="1"/>
|
|
|
|
|
2014-04-29 21:35:29 +02:00
|
|
|
<?php \Chibi\View::render('message', $this->context) ?>
|
2013-10-22 00:17:06 +02:00
|
|
|
|
2014-02-16 16:03:13 +01:00
|
|
|
<div class="form-row">
|
|
|
|
<label></label>
|
2013-11-30 14:22:49 +01:00
|
|
|
<button class="submit" type="submit">Update settings</button>
|
2013-10-22 00:17:06 +02:00
|
|
|
</div>
|
|
|
|
</form>
|