Refactor
This commit is contained in:
parent
e964537b78
commit
74e86e2e6a
1 changed files with 46 additions and 30 deletions
|
@ -380,36 +380,6 @@ $page->navigation();
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label><?= __('Advertisements') ?></label>
|
||||
|
||||
<div class="ui toggle checkbox advertisements">
|
||||
<?php
|
||||
$user = isset($_SESSION['user']->id) ? $_SESSION['user'] : new User();
|
||||
?>
|
||||
|
||||
<?php if (true === $user->advertisements) { ?>
|
||||
<input type="checkbox" name="enable-advertisements" checked="checked" />
|
||||
<?php } else { ?>
|
||||
<input type="checkbox" name="enable-advertisements" />
|
||||
<?php } ?>
|
||||
|
||||
<label><?= __('Enable advertisements') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/** TRANSLATORS: %s: sponsor me */
|
||||
__('Time spent on wishthis is time not doing for-profit work. If you would like to support me but either can\'t or don\'t want to %s, consider selling your body to Google and becoming its product.'),
|
||||
'<a href="https://github.com/sponsors/grandeljay" target="_blank">' . __('sponsor me') . '</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p><?= __('Please remember to add an exception to your ad-blocker and browser.') ?></p>
|
||||
</div>
|
||||
|
||||
<div class="ui error message"></div>
|
||||
|
||||
<input class="ui primary button"
|
||||
|
@ -519,6 +489,52 @@ $page->navigation();
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div class="ui segment">
|
||||
<form class="ui form" method="POST">
|
||||
<input type="hidden" name="user-id" value="<?= $_SESSION['user']->id ?>" />
|
||||
<input type="hidden" name="section" value="preferences" />
|
||||
|
||||
<div class="field">
|
||||
<label><?= __('Advertisements') ?></label>
|
||||
|
||||
<div class="ui toggle checkbox advertisements">
|
||||
<?php
|
||||
$user = isset($_SESSION['user']->id) ? $_SESSION['user'] : new User();
|
||||
?>
|
||||
|
||||
<?php if (true === $user->advertisements) { ?>
|
||||
<input type="checkbox" name="enable-advertisements" checked="checked" />
|
||||
<?php } else { ?>
|
||||
<input type="checkbox" name="enable-advertisements" />
|
||||
<?php } ?>
|
||||
|
||||
<label><?= __('Enable advertisements') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/** TRANSLATORS: %s: sponsor me */
|
||||
__('Time spent on wishthis is time not doing for-profit work. If you would like to support me but either can\'t or don\'t want to %s, consider selling your body to Google and becoming its product.'),
|
||||
'<a href="https://github.com/sponsors/grandeljay" target="_blank">' . __('sponsor me') . '</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p><?= __('Please remember to add an exception to your ad-blocker and browser.') ?></p>
|
||||
</div>
|
||||
|
||||
<div class="ui error message"></div>
|
||||
|
||||
<input class="ui primary button"
|
||||
type="submit"
|
||||
value="<?= __('Save') ?>"
|
||||
title="<?= __('Save') ?>"
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue