parent
a21f3f2bb4
commit
e7176b6371
17 changed files with 189 additions and 25 deletions
|
|
@ -47,6 +47,11 @@
|
|||
name="rooms[<?= (int)$room['id'] ?>][bulk_validation]"
|
||||
<?= $room['bulk_validation'] ? 'checked' : '' ?>><span
|
||||
class="form-check-label"><?= h(t('rooms.bulk_validation')) ?></span></label></div>
|
||||
<div class="col-12"><hr><div class="form-label"><?= h(t('rooms.admission_rules')) ?></div></div>
|
||||
<div class="col-md-4"><label class="form-label"><?= h(t('animal.species')) ?></label><select class="form-select" name="rooms[<?= (int)$room['id'] ?>][allowed_species]"><option value=""><?= h(t('common.all')) ?></option><?php foreach ($species as $option): ?><option value="<?= h($option['code']) ?>" <?= ($room['allowed_species'] ?? '') === $option['code'] ? 'selected' : '' ?>><?= h($option['name']) ?></option><?php endforeach; ?></select></div>
|
||||
<div class="col-md-4"><label class="form-label"><?= h(t('animal.sex')) ?></label><select class="form-select" name="rooms[<?= (int)$room['id'] ?>][allowed_sex]"><option value=""><?= h(t('common.all')) ?></option><option value="M" <?= ($room['allowed_sex'] ?? '') === 'M' ? 'selected' : '' ?>><?= h(t('sex.male')) ?></option><option value="F" <?= ($room['allowed_sex'] ?? '') === 'F' ? 'selected' : '' ?>><?= h(t('sex.female')) ?></option></select></div>
|
||||
<div class="col-md-4"><label class="form-label">FIV</label><select class="form-select" name="rooms[<?= (int)$room['id'] ?>][required_fiv]"><option value="any"><?= h(t('common.all')) ?></option><option value="positive" <?= ($room['required_fiv'] ?? 'any') === 'positive' ? 'selected' : '' ?>><?= h(t('animals.test_positive')) ?></option><option value="negative" <?= ($room['required_fiv'] ?? 'any') === 'negative' ? 'selected' : '' ?>><?= h(t('animals.test_negative')) ?></option></select></div>
|
||||
<div class="col-12"><label class="form-label"><?= h(t('rooms.care_periods')) ?></label><div class="d-flex flex-wrap gap-3"><?php foreach (ShelterRoomService::PERIODS as $period): ?><label class="form-check"><input class="form-check-input" type="checkbox" name="rooms[<?= (int)$room['id'] ?>][care_periods][]" value="<?= h($period) ?>" <?= in_array($period, ShelterRoomService::periods($room), true) ? 'checked' : '' ?>><span class="form-check-label"><?= h(t('care.' . $period)) ?></span></label><?php endforeach; ?></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><?php endforeach; ?>
|
||||
|
|
@ -78,6 +83,10 @@
|
|||
<div class="col-12"><label class="form-check"><input class="form-check-input" type="checkbox"
|
||||
name="new_room[bulk_validation]"><span
|
||||
class="form-check-label"><?= h(t('rooms.bulk_validation')) ?></span></label></div>
|
||||
<div class="col-md-4"><label class="form-label"><?= h(t('animal.species')) ?></label><select class="form-select" name="new_room[allowed_species]"><option value=""><?= h(t('common.all')) ?></option><?php foreach ($species as $option): ?><option value="<?= h($option['code']) ?>"><?= h($option['name']) ?></option><?php endforeach; ?></select></div>
|
||||
<div class="col-md-4"><label class="form-label"><?= h(t('animal.sex')) ?></label><select class="form-select" name="new_room[allowed_sex]"><option value=""><?= h(t('common.all')) ?></option><option value="M"><?= h(t('sex.male')) ?></option><option value="F"><?= h(t('sex.female')) ?></option></select></div>
|
||||
<div class="col-md-4"><label class="form-label">FIV</label><select class="form-select" name="new_room[required_fiv]"><option value="any"><?= h(t('common.all')) ?></option><option value="positive"><?= h(t('animals.test_positive')) ?></option><option value="negative"><?= h(t('animals.test_negative')) ?></option></select></div>
|
||||
<div class="col-12"><label class="form-label"><?= h(t('rooms.care_periods')) ?></label><div class="d-flex flex-wrap gap-3"><?php foreach (ShelterRoomService::PERIODS as $period): ?><label class="form-check"><input class="form-check-input" type="checkbox" name="new_room[care_periods][]" value="<?= h($period) ?>" <?= in_array($period, ['morning','evening'], true) ? 'checked' : '' ?>><span class="form-check-label"><?= h(t('care.' . $period)) ?></span></label><?php endforeach; ?></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue