Исправление отображения иконок, а так же ошибки с заголовком referrer

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2021-07-28 10:39:50 +10:00
parent a6d8ee5e59
commit 49ed9bf59e
3 changed files with 28 additions and 12 deletions

View File

@ -66,11 +66,21 @@ class OrderController extends Controller
// Инициализация cookie // Инициализация cookie
$cookies = yii::$app->response->cookies; $cookies = yii::$app->response->cookies;
// Инициализация данных из HTTP-заголовка referrer if (isset(yii::$app->request->referrer)) {
$referrer = trim(parse_url(yii::$app->request->referrer, PHP_URL_PATH) . '?' . parse_url(yii::$app->request->referrer, PHP_URL_QUERY), '/'); // Найден HTTP-заголовок REFERRER
// Инициализация адреса переадресации из HTTP-заголовка referrer
$redirect = $referrer = trim(parse_url(yii::$app->request->referrer, PHP_URL_PATH) . '?' . parse_url(yii::$app->request->referrer, PHP_URL_QUERY), '/');
} else {
// Не найден HTTP-заголовок REFERRER
// Инициализация адреса переадресации из текущего URI
$redirect = yii::$app->request->pathInfo;
}
// Реинициализация с фильтрацией
$redirect = match (yii::$app->request->pathInfo) { $redirect = match (yii::$app->request->pathInfo) {
'order/write' => $referrer, 'order/write' => $redirect,
'order/delete', 'order/amount-update', 'order/request' => 'cart', 'order/delete', 'order/amount-update', 'order/request' => 'cart',
'order/accept', 'order/supply-read', 'order/supply-write-stts', 'order/supply-edit-time', 'order/supply-edit-cost', 'order/supply-edit-comm' => 'orders', 'order/accept', 'order/supply-read', 'order/supply-write-stts', 'order/supply-edit-time', 'order/supply-edit-cost', 'order/supply-edit-comm' => 'orders',
default => yii::$app->request->pathInfo default => yii::$app->request->pathInfo

View File

@ -189,14 +189,14 @@ if (
</small> </small>
<div class="ml-2 mr-3 d-flex"> <div class="ml-2 mr-3 d-flex">
<div class="form-control form-control-sm form_control_clean px-1 py-0 d-flex"> <div class="form-control form-control-sm form_control_clean px-1 py-0 d-flex">
<input id="orders_period_calendar_from" class="" type="date" value="<?= $from ?? date('Y-m-d', time() - 604800) ?>" onchange="return orders_read('last', moment(this.value, 'YYYY-MM-DD').unix(), moment(document.getElementById('orders_period_calendar_to').value, 'YYYY-MM-DD').unix());" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" /> <input id="orders_period_calendar_from" class="ml-auto" type="date" value="<?= $from ?? date('Y-m-d', time() - 604800) ?>" onchange="return orders_read('last', moment(this.value, 'YYYY-MM-DD').unix(), moment(document.getElementById('orders_period_calendar_to').value, 'YYYY-MM-DD').unix());" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" />
<i class="far fa-calendar-alt my-auto"></i> <i class="far fa-calendar-alt my-auto mr-auto"></i>
</div> </div>
<p class="mx-2 p-0">-</p> <p class="mx-2 p-0">-</p>
<div class="form-control form-control-sm form_control_clean px-1 py-0 d-flex"> <div class="form-control form-control-sm form_control_clean px-1 py-0 d-flex">
<input id="orders_period_calendar_to" class="f" type="date" value="<?= $to ?? date('Y-m-d', time()) ?>" onchange="return orders_read('last', moment(document.getElementById('orders_period_calendar_from').value, 'YYYY-MM-DD').unix(), moment(this.value, 'YYYY-MM-DD').unix());" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" /> <input id="orders_period_calendar_to" class="ml-auto" type="date" value="<?= $to ?? date('Y-m-d', time()) ?>" onchange="return orders_read('last', moment(document.getElementById('orders_period_calendar_from').value, 'YYYY-MM-DD').unix(), moment(this.value, 'YYYY-MM-DD').unix());" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" />
<i class="far fa-calendar-alt my-auto"></i> <i class="far fa-calendar-alt my-auto mr-auto"></i>
</div> </div>
</div> </div>
</div> </div>

View File

@ -42,11 +42,17 @@
} }
#page_orders article input[type="date"] { #page_orders article input[type="date"] {
left: 5%; margin-right: -10%;
margin-right: -5%;
clip-path: inset(0 16% 0 2%);
position: relative;
font-size: 1rem; font-size: 1rem;
outline: none; outline: none;
border: none; border: none;
} }
#page_orders article input[type="date"]+i {
z-index: 1;
pointer-events: none;
background: #fff;
-webkit-box-shadow: 0px 0px 0px 10px rgb(255 255 255);
-moz-box-shadow: 0px 0px 0px 10px rgba(255, 255, 255, 1);
box-shadow: 0px 0px 0px 7px rgb(255 255 255);
}