mirror of
https://github.com/claradex/nativegallery.git
synced 2025-02-13 09:43:14 +03:00
set comment & new reason for decline
This commit is contained in:
parent
1caedf698b
commit
a57d779caf
4 changed files with 19 additions and 0 deletions
|
@ -18,6 +18,9 @@ class SetVisibility
|
||||||
if (!array_key_exists('declineReason', $data)) {
|
if (!array_key_exists('declineReason', $data)) {
|
||||||
$data['declineReason'] = null;
|
$data['declineReason'] = null;
|
||||||
}
|
}
|
||||||
|
if ($_POST['comment'] != null) {
|
||||||
|
$data['declineComment'] = $_POST['comment'];
|
||||||
|
}
|
||||||
$data['declineReason'] = $_GET['decline_reason'];
|
$data['declineReason'] = $_GET['decline_reason'];
|
||||||
|
|
||||||
$updatedJsonString = json_encode($data);
|
$updatedJsonString = json_encode($data);
|
||||||
|
|
|
@ -37,6 +37,9 @@ class Photo {
|
||||||
case 5:
|
case 5:
|
||||||
return 'Расчленёнка';
|
return 'Расчленёнка';
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
return 'Файл сломан';
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return 'Не подходит для сайта';
|
return 'Не подходит для сайта';
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -123,7 +123,17 @@ use \App\Models\User;
|
||||||
Расчленёнка
|
Расчленёнка
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input name="decline'.$p['id'].'" value="6" class="form-check-input" type="radio" name="flexRadioDefault" id="declineReason6">
|
||||||
|
<label class="form-check-label" for="declineReason6">
|
||||||
|
Файл сломан
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="exampleFormControlTextarea1" class="form-label">Дополнительный комментарий</label>
|
||||||
|
<textarea class="form-control" id="exampleFormControlTextarea1" name="comment" rows="3"></textarea>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</a>'; ?>
|
<a type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</a>'; ?>
|
||||||
|
|
|
@ -69,6 +69,9 @@ use \App\Models\{User, Photo};
|
||||||
if ($p['moderated'] === 2) {
|
if ($p['moderated'] === 2) {
|
||||||
echo '<p class="sm"><b>Причина отклонения: '.$photo->declineReason((int)$photo->content('declineReason')).'</b></p>';
|
echo '<p class="sm"><b>Причина отклонения: '.$photo->declineReason((int)$photo->content('declineReason')).'</b></p>';
|
||||||
}
|
}
|
||||||
|
if ($photo->content('declineComment') != null) {
|
||||||
|
echo '<p class="sm"><b>Комментарий: </b> '.$photo->content('declineComment').'</p>';
|
||||||
|
}
|
||||||
echo '
|
echo '
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in a new issue