Safety list in /upload is resolved automatically

This commit is contained in:
Marcin Kurczewski 2013-10-21 23:27:47 +02:00
parent 70f931b921
commit ce302c438d

View file

@ -62,9 +62,14 @@
<div class="safety"> <div class="safety">
<label class="left">Safety:</label> <label class="left">Safety:</label>
<label><input type="radio" name="safety" value="<?php echo PostSafety::Safe ?>" checked="checked"/> Safe for work</label> <?php $checked = false ?>
<label><input type="radio" name="safety" value="<?php echo PostSafety::Sketchy ?>"/> Sketchy</label> <?php foreach (PostSafety::getAll() as $safety): ?>
<label><input type="radio" name="safety" value="<?php echo PostSafety::Unsafe ?>"/> Not safe for work</label> <label>
<input type="radio" name="safety" value="<?php echo PostSafety::Safe ?>"<?php if (!$checked) echo ' checked="checked"' ?>/>
<?php echo TextHelper::camelCaseToHumanCase(PostSafety::toString($safety), true) ?>
<?php $checked = true ?>
</label>
<?php endforeach ?>
</div> </div>
<div class="tags"> <div class="tags">