#3553 Ad post contact - Options Design

This commit is contained in:
diashalabi 2021-04-23 15:13:54 +03:00
parent 92961ea4d6
commit a89707a04a
3 changed files with 89 additions and 110 deletions

View File

@ -23,7 +23,7 @@
}
#reachInfo {
font-family: Poppins;
font-family: 'Poppins', sans-serif;
margin-bottom: 2rem;
p {
@ -42,7 +42,7 @@
}
#contactSummary {
font-family: Poppins;
font-family: 'Poppins', sans-serif;
margin-bottom: 2rem;
label {
@ -89,7 +89,7 @@
}
label {
font-family: Poppins;
font-family: 'Poppins', sans-serif;
font-size: 14px;
color: #4A4A4A;
font-weight: 500;
@ -159,11 +159,7 @@
width: 47.5%;
input {
&:first-child {
width: 83%;
}
&:last-child {
&.decimal-price {
width: 17%;
}
}
@ -178,6 +174,33 @@
select {
width: 17%;
padding: 1.1rem 1rem;
}
}
}
}
#simpleOptionsInput {
.select2-selection {
box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
font-size: 17px;
padding: 1.1rem 1.5rem;
color: #707070;
border: 0;
margin-top: 1rem;
.select2-selection__rendered {
padding: 0;
display: flex;
margin: 0;
flex-wrap: wrap;
.select2-selection__choice {
float: none;
}
.select2-search__field {
padding: 0;
}
}
}

View File

@ -1,6 +1,9 @@
{% extends layout('new-create') %}
{% block styles %}
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<style>
{{ asset_inline("visiosoft.module.advs::css/new-create.css") }}
{{ asset_inline("visiosoft.module.advs::css/new-create-new.scss") }}
@ -79,12 +82,26 @@
{% endif %}
<div id="priceInput" class="d-flex justify-content-between mb-4">
<div>
<label>Fiyat</label>
<div class="select-price{{ hidePrice ? ' hidden' }}">
<label>
{{ form.fields.price.label|raw }}
<span class="required">*</span>
</label>
<div class="col-12 priceHidden d-none">
{{ form.fields.price.setAttributes({
'required' :true
}).input|raw }}
</div>
<div class="d-flex">
<input type="text" class="mt-3 border-0 text-right" placeholder="0">
<input type="text" class="mt-3 border-0 ml-2 text-center"
placeholder="00">
{% set PriceValue = form.fields.price.value|split('.') %}
<input type="text" class="mt-3 border-0 text-right priceField whole-price flex-fill"
placeholder="0" value="{{ PriceValue|first }}">
{% if setting_value('visiosoft.field_type.decimal::showDecimal') %}
<input class="mt-3 border-0 ml-2 text-center priceDecimalField decimal-price"
placeholder="00" type="text" value="{{ PriceValue[1] }}">
{% endif %}
</div>
</div>
<div class="{{ setting_value('visiosoft.module.advs::hide_standard_price_field') or setting_value('visiosoft.module.advs::market_place') != true ? 'd-none' }}">
@ -93,107 +110,56 @@
<span class="required">*</span>
</label>
<div class="d-flex">
{# TODO add decimal input to standard price#}
{# {% set standardPriceValue = form.fields.standard_price.value|split('.') %}#}
{# <div class="col-8 pr-0 col-md-3">#}
{# <input class="form-control standard-price-field whole-price"#}
{# value="{{ standardPriceValue|first }}">#}
{# </div>#}
{# <div class="col-4 col-md-1">#}
{# <input class="form-control standard-price-decimal-field decimal-price"#}
{# placeholder="00" maxlength="2"#}
{# value="{{ standardPriceValue[1] }}">#}
{# </div>#}
{{ form.fields.standard_price.setAttributes({
'class': 'mt-3 border-0',
'required': true,
'class': 'mt-3 border-0',
}).input|raw }}
<select name="currency" class="mt-3 border-0 ml-2" id="currency" required>
<option value="tl">TL</option>
{% for currency in config_get('streams::currencies.enabled') %}
<option value="{{ currency }}">
{{ currency == "TRY" ? currency_symbol(currency) : currency }}
</option>
{% endfor %}
</select>
{% for currency in config_get('streams::currencies.enabled') %}
<option value="{{ currency }}">
{% if currency == "TRY" %}
{{ currency_symbol(currency) }}
{% else %}
{{ currency }}
{% endif %}
</option>
{% endfor %}
</select>
</div>
</div>
</div>
</div>
<label class="w-100">
Opsiyonlar
<input type="text" class="d-block mt-3 w-100 border-0">
</label>
</div>
{% set standardPriceValue = form.fields.standard_price.value|split('.') %}
<div class="col-8 pr-0 col-md-3">
<input class="form-control standard-price-field whole-price"
value="{{ standardPriceValue|first }}">
</div>
<div class="col-4 col-md-1">
<input class="form-control standard-price-decimal-field decimal-price"
placeholder="00" maxlength="2"
value="{{ standardPriceValue[1] }}">
</div>
</div>
<div class="row form-group select-price{{ hidePrice ? ' hidden' }}">
<label class="col-sm-2 col-xs-12">
{{ form.fields.price.label|raw }}
<span class="required">*</span>
</label>
<div class="col-12 priceHidden d-none">
{{ form.fields.price.setAttributes({
'required' :true
}).input|raw }}
</div>
{% set PriceValue = form.fields.price.value|split('.') %}
<div class="col-6 col-sm-7 pr-0 col-md-3">
<input class="form-control priceField whole-price"
value="{{ PriceValue|first }}">
</div>
{% if setting_value('visiosoft.field_type.decimal::showDecimal') %}
<div class="col-4 col-md-1">
<input class="form-control priceDecimalField decimal-price" placeholder="00"
maxlength="2"
value="{{ PriceValue[1] }}">
</div>
{% endif %}
</div>
{% if not setting_value('visiosoft.module.advs::hide_options_field') %}
{% if not setting_value('visiosoft.module.advs::detailed_product_options') %}
<div class="row form-group select-options">
<label for="selectOptions" class="col-sm-2">
<div id="simpleOptionsInput" class="w-100 select-options">
<label for="selectOptions">
{{ trans('visiosoft.module.advs::field.options') }}
</label>
<div class="col-sm-10">
<select id="selectOptions" class="form-control options-tags"
multiple="multiple"
name="options[]">
{% if count(options) %}
{% for option in options %}
<option id="advOption{{ option.id }}"
selected="selected">{{ option.name }}</option>
{% endfor %}
{% endif %}
</select>
</div>
{% if auth_check() and auth_user().hasRole('admin') %}
<div class="col-12 text-right py-2">
<p class="text-muted">
<i class="fa fa-exclamation-triangle"></i>
{{ trans('visiosoft.module.advs::message.disabled_detailed_options_for_admin_role') }}
</p>
</div>
{% endif %}
<select id="selectOptions" type="text" multiple="multiple" name="options[]"
class="d-block mt-3 w-100 border-0 options-tags">
{% if count(options) %}
{% for option in options %}
<option id="advOption{{ option.id }}"
selected="selected">{{ option.name }}</option>
{% endfor %}
{% endif %}
</select>
</div>
{% if auth_check() and auth_user().hasRole('admin') %}
<div class="col-12 text-right py-2">
<p class="text-muted d-flex align-items-center justify-content-end">
<i class="fa fa-exclamation-triangle mr-2"></i>
{{ trans('visiosoft.module.advs::message.disabled_detailed_options_for_admin_role') }}
</p>
</div>
{% endif %}
{% else %}
<div class="row form-group product-options">
<label for="productOptions" class="col-sm-2">

View File

@ -9,24 +9,14 @@ class AdvFormBuilder extends FormBuilder
protected $category = null;
protected $rules = [];
protected $skips = [
'slug'
];
protected $actions = [];
protected $buttons = [
'cancel',
];
protected $options = [];
protected $sections = [];
protected $assets = [];
public function __construct(Form $form)
{
parent::__construct($form);