Initial import

This commit is contained in:
Admin Nasledstvo
2026-05-01 20:52:04 +03:00
commit ac168868ee
10028 changed files with 2337954 additions and 0 deletions
@@ -0,0 +1,107 @@
<?php
use app\models\Events;
use app\widgets\services\Includes;
/**
* @var Events $model
*/
?>
<div class="inner-content p10">
<?php if(empty($model->id)): ?>
<p style="color: darkorange; font-weight: bold">* Формата ще бъде активна след попълването на "Основни данни"</p>
<?php endif; ?>
<form autocomplete="off" class="<?= empty($model->id) ? 'disabled' : '' ?>">
<?php if ($model->getEventType()): ?>
<input name="type" type="hidden" value="<?= $model->getEventType() ?>">
<?php endif; ?>
<div class="row top15" style="width: 300px">
<label class="require">Време на излъчване</label>
<input data-min-h="0" data-max-h="23" type="hidden" name="daily_open_time" id="daily_open_time"
value="<?= $model->daily_open_time ?>">
</div>
<div class="row c9 top15 flex">
<div class="c9 right10">
<label class="require">Стрийминг линк</label>
<input onkeyup="updateLabelRequire(this, '#sta')" name="stream_url"
placeholder="Въведи линк на стрийминг"
value="<?= $model->stream_url ?>"/>
</div>
<div class="left10">
<label id="sta">Достъп</label>
<div class="flex top-page-panel"
style="width: 200px; height: 14px; border-radius: 3px; border-color: var(--base-background-dark)">
<?php foreach ([1 => 'Частен', 2 => 'Публичен'] as $v => $t): ?>
<label onclick="updateStreamAccess(this)" style="margin-top: -3px" class="right10 radio-error"><input
style="width: 14px; height: 14px;" type="radio"
name="stream_access" <?= $model->get_stream_access() == $v ? 'checked' : '' ?>
value="<?= $v ?>"/> <?= $t ?>
</label>
<?php endforeach; ?>
</div>
</div>
</div>
<div id="price_selection" class="row c4 top15 <?= $model->get_stream_access() == 2 ? 'disabled' : '' ?>" >
<label id="price_module" class="<?= $model->get_stream_access() == 1 ? 'require' : '' ?>">Цена</label>
<div class="flex top-page-panel"
style="height: 30px; border-radius: 3px; border-color: var(--base-background-super-bright); width: 400px">
<input id="individual_price" <?= $model->get_stream_purchase_type() != 'individual_price' ? 'readonly class="disabled"' : '' ?>
data-format="money" style="height: 20px; width: 60px; margin-top: -3px; margin-right: 10px"
name="stream_price"
value="<?= $model->stream_purchase_type == 'individual_price' ? $model->stream_price : '' ?>">
<?php foreach (['individual_price' => 'Индивидуална цена', 'subscription' => 'С абонамент'] as $v => $t): ?>
<label style="margin-top: 7px;" onclick="updateIndividualPrice(this)" class="right10 radio-error">
<input style="width: 14px; height: 14px;" type="radio"
name="stream_purchase_type" <?= $model->get_stream_purchase_type() == $v ? 'checked' : '' ?>
value="<?= $v ?>"/> <?= $t ?>
</label>
<?php endforeach; ?>
</div>
</div>
<div class="row c9 top15 flex">
<?= Includes::formButtons('website/events') ?>
</div>
</form>
</div>
<script>
timeRange('#daily_open_time')
function updateIndividualPrice(e) {
let ip = one('#individual_price')
let check = e.querySelector('input')
if(check.checked && check.value === 'individual_price') {
ip.removeAttribute('readonly')
ip.removeClass('disabled')
} else {
ip.setAttribute('readonly', true)
ip.addClass('disabled')
ip.value = ''
e.parentNode.removeClass('form-error')
}
}
function updateStreamAccess(e) {
let ps = one('#price_selection')
let ip = one('#individual_price')
let price_module = one('#price_module')
let check = e.querySelector('input')
let stream_purchase_type = all('[name="stream_purchase_type"]')
if(check.checked && check.value === '1') {
ps.removeClass('disabled')
price_module.addClass('require');
stream_purchase_type[0].checked = true
stream_purchase_type[1].checked = false
} else {
ps.addClass('disabled')
ip.value = ''
stream_purchase_type[0].checked = false
stream_purchase_type[1].checked = false
ip.removeAttribute('readonly')
ip.removeClass('disabled')
price_module.removeClass('require')
ip.parentNode.removeClass('form-error')
}
}
</script>