настройки формы выведены в админку
This commit is contained in:
parent
04d84174ae
commit
5e38619c05
@ -81,11 +81,44 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
|
<div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
|
||||||
<label for="phone_description" class="form-label m-0 w-25">Подпись телефона</label>
|
<label for="phone_description" class="form-label m-0 w-25">Подпись телефона</label>
|
||||||
<input type="text" class="form-control" id="phone_description" name="phone_description" value="{{ ($parameters['phone_description'] ?? '') }}">
|
<input type="text" class="form-control" id="phone_description" name="phone_description"
|
||||||
|
value="{{ ($parameters['phone_description'] ?? '') }}">
|
||||||
</div>
|
</div>
|
||||||
<div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
|
<div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
|
||||||
<label for="copyright" class="form-label m-0 w-25">Copyright</label>
|
<label for="copyright" class="form-label m-0 w-25">Copyright</label>
|
||||||
<input type="text" class="form-control" id="copyright" name="copyright" value="{{ ($parameters['copyright'] ?? '') }}">
|
<input type="text" class="form-control" id="copyright" name="copyright"
|
||||||
|
value="{{ ($parameters['copyright'] ?? '') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h5 class="mt-3">Прочее</h5>
|
||||||
|
<h6 class="mt-3">Форма создания контактов</h6>
|
||||||
|
<div class="d-flex gap-3">
|
||||||
|
<div class="col-6 d-flex flex-column justify-content-start align-items-start gap-2 bg-light rounded p-2">
|
||||||
|
<label for="contact_form_count" class="form-label m-0">Количество вкладок по-умолчанию</label>
|
||||||
|
<input type="number" class="form-control" id="contact_form_count" name="contact_form_count"
|
||||||
|
value="{{ ($parameters['contact_form_count'] ?? '') }}">
|
||||||
|
</div>
|
||||||
|
<div class="col-6 d-flex flex-column justify-content-start align-items-start gap-2 bg-light rounded p-2">
|
||||||
|
<label for="contact_form_count_max" class="form-label m-0">Максимальное количество вкладок в одной
|
||||||
|
форме</label>
|
||||||
|
<input type="number" class="form-control" id="contact_form_count_max" name="contact_form_count_max"
|
||||||
|
value="{{ ($parameters['contact_form_count_max'] ?? '') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h6 class="mt-3">Главное меню</h6>
|
||||||
|
<div class="d-flex flex-column gap-3">
|
||||||
|
<div class="col-6 d-flex flex-column justify-content-start align-items-start gap-2 bg-light rounded p-2">
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" value="yes" name="enable_orders_module" id="enable_orders_module">
|
||||||
|
<label class="form-check-label" for="enable_orders_module">
|
||||||
|
Включить модуль "Договоры и вознараждения"
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
|
||||||
|
<label for="plan7_iframe" class="form-label m-0 w-25">Ссылка на iframe Plan7</label>
|
||||||
|
<input type="text" class="form-control" id="plan7_iframe" name="plan7_iframe"
|
||||||
|
value="{{ ($parameters['plan7_iframe'] ?? '') }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="submit" class="btn btn-primary mt-3" value="Сохранить" />
|
<input type="submit" class="btn btn-primary mt-3" value="Сохранить" />
|
||||||
|
|||||||
@ -55,16 +55,31 @@ public function mount()
|
|||||||
$this->status = FormStatus::NEW;
|
$this->status = FormStatus::NEW;
|
||||||
$this->complexes = GetAvailableComplexes();
|
$this->complexes = GetAvailableComplexes();
|
||||||
$this->availableAgents = GetAvailableAgents();
|
$this->availableAgents = GetAvailableAgents();
|
||||||
$this->maxContactsCount = 2;
|
|
||||||
$this->maxContactPhonesCount = 1;
|
$this->maxContactPhonesCount = 1;
|
||||||
|
$this->contacts = [];
|
||||||
|
|
||||||
|
if( array_key_exists('contact_form_count_max', DESIGN_PARAMETERS) && (int)DESIGN_PARAMETERS['contact_form_count_max'] > 0) {
|
||||||
|
$this->maxContactsCount = (int)DESIGN_PARAMETERS['contact_form_count_max'];
|
||||||
|
} else {
|
||||||
|
$this->maxContactsCount = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
if( array_key_exists('contact_form_count', DESIGN_PARAMETERS) && (int)DESIGN_PARAMETERS['contact_form_count'] > 0) {
|
||||||
|
for ($tabsCount = 1; $tabsCount <= (int)DESIGN_PARAMETERS['contact_form_count']; $tabsCount++) {
|
||||||
|
$this->addContact();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$this->addContact();
|
||||||
|
$this->addContact();//по-умолчанию сразу выводить супруга
|
||||||
|
};
|
||||||
|
|
||||||
$this->contactLabels = ['Основной контакт', 'Супруг/супруга'];
|
$this->contactLabels = ['Основной контакт', 'Супруг/супруга'];
|
||||||
if (count($this->availableAgents) == 1) //чтобы не выводить в форму
|
if (count($this->availableAgents) == 1) //чтобы не выводить в форму
|
||||||
{ //и не заставлять пользователя указывать вручную
|
{ //и не заставлять пользователя указывать вручную
|
||||||
$this->agentId = $this->availableAgents[0]['id'];
|
$this->agentId = $this->availableAgents[0]['id'];
|
||||||
}
|
}
|
||||||
$this->contacts = [];
|
|
||||||
$this->addContact();
|
|
||||||
$this->addContact();//по-умолчанию сразу выводить супруга
|
|
||||||
$this->setCurrentContactIndex(0);
|
$this->setCurrentContactIndex(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,14 +25,14 @@
|
|||||||
@if($availableAgents && $complexes)
|
@if($availableAgents && $complexes)
|
||||||
<div class="w-100" wire:loading.remove wire:target="save, resetData, back">
|
<div class="w-100" wire:loading.remove wire:target="save, resetData, back">
|
||||||
@if ($status == FormStatus::NEW || $status == FormStatus::IN_PROCESS || $status == FormStatus::READY)
|
@if ($status == FormStatus::NEW || $status == FormStatus::IN_PROCESS || $status == FormStatus::READY)
|
||||||
<ul class="nav nav-tabs d-flex align-items-end border-0 pb-0">
|
<ul class="nav nav-tabs border-0 pb-0">
|
||||||
@foreach ($contacts as $contactIndex => $contactItem)
|
@foreach ($contacts as $contactIndex => $contactItem)
|
||||||
<li
|
<li
|
||||||
class="nav-item overflow-hidden @if ($contactIndex == $currentContactIndex) rounded-top border-top border-end border-start bg-light @else m-1 bg-secondary-subtle rounded rouded-5 @endif">
|
class="nav-item col overflow-hidden @if ($contactIndex == $currentContactIndex) rounded-top border-top border-end border-start bg-light @else m-1 bg-secondary-subtle rounded rouded-5 @endif">
|
||||||
<a class="nav-link me-1 border-0 @if ($contactIndex == $currentContactIndex) active text-primary @else py-1 text-dark @endif"
|
<a class="nav-link d-flex flex-row me-1 border-0 @if ($contactIndex == $currentContactIndex) active text-primary @else py-1 text-dark @endif"
|
||||||
aria-current="page" href="#" wire:click="setCurrentContactIndex({{ $contactIndex }})">
|
aria-current="page" href="#" wire:click="setCurrentContactIndex({{ $contactIndex }})">
|
||||||
<i class="bi bi-person-standing"></i>
|
<i class="bi bi-person-standing"></i>
|
||||||
<span class="d-none d-xl-inline">
|
<span class="d-none d-xl-inline text-truncate">
|
||||||
@if (array_key_exists($contactIndex, $contactLabels))
|
@if (array_key_exists($contactIndex, $contactLabels))
|
||||||
{{ $contactLabels[$contactIndex] }}
|
{{ $contactLabels[$contactIndex] }}
|
||||||
@else
|
@else
|
||||||
@ -43,10 +43,10 @@ class="nav-item overflow-hidden @if ($contactIndex == $currentContactIndex) roun
|
|||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
@if ($maxContactsCount > count($contacts))
|
@if ($maxContactsCount > count($contacts))
|
||||||
<li class="align-middle ps-2 mb-2">
|
<li class="col align-middle ps-2 mb-2">
|
||||||
<a class="text-light " href="#" wire:click="addContact">
|
<a class="text-light " href="#" wire:click="addContact" id="ClientFormAddTabBtn">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor"
|
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25"
|
||||||
class="bi bi-person-fill-add" viewBox="0 0 16 16">
|
class="bi bi-person-fill-add mt-1" viewBox="0 0 16 16">
|
||||||
<path
|
<path
|
||||||
d="M12.5 16a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7m.5-5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0m-2-6a3 3 0 1 1-6 0 3 3 0 0 1 6 0" />
|
d="M12.5 16a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7m.5-5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0m-2-6a3 3 0 1 1-6 0 3 3 0 0 1 6 0" />
|
||||||
<path
|
<path
|
||||||
|
|||||||
@ -27,7 +27,11 @@ class Design extends Model
|
|||||||
'menu_btn_color',
|
'menu_btn_color',
|
||||||
'menu_btn_hover_color',
|
'menu_btn_hover_color',
|
||||||
'menu_btn_text_color',
|
'menu_btn_text_color',
|
||||||
'menu_btn_hover_text_color'
|
'menu_btn_hover_text_color',
|
||||||
|
'contact_form_count',
|
||||||
|
'contact_form_count_max',
|
||||||
|
'plan7_iframe',
|
||||||
|
'enable_orders_module'
|
||||||
];
|
];
|
||||||
|
|
||||||
public static function getParameters() {
|
public static function getParameters() {
|
||||||
|
|||||||
@ -92,6 +92,11 @@
|
|||||||
{{ DESIGN_PARAMETERS['secondary_color'] }}
|
{{ DESIGN_PARAMETERS['secondary_color'] }}
|
||||||
!important;
|
!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ClientFormAddTabBtn {
|
||||||
|
fill: {{ DESIGN_PARAMETERS['secondary_color'] }}
|
||||||
|
!important;
|
||||||
|
}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if(array_key_exists('menu_btn_color', DESIGN_PARAMETERS))
|
@if(array_key_exists('menu_btn_color', DESIGN_PARAMETERS))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user