Issue #1167 fixed
This commit is contained in:
parent
30e2a743e8
commit
19b8de0ffb
|
|
@ -1,12 +1,6 @@
|
|||
<select v-validate="'{{$validations}}'" class="control" id="{{ $attribute->code }}" name="{{ $attribute->code }}" data-vv-as=""{{ $attribute->admin_name }}"">
|
||||
<?php $selectedOption = old($attribute->code) ?: $product[$attribute->code] ?>
|
||||
|
||||
<?php $selectedOption = old($attribute->code) ?: $product[$attribute->code] ?>
|
||||
|
||||
<option value="0" {{ $selectedOption ? '' : 'selected'}}>
|
||||
{{ $attribute->code == 'status' ? __('admin::app.catalog.products.disabled') : __('admin::app.catalog.products.no') }}
|
||||
</option>
|
||||
<option value="1" {{ $selectedOption ? 'selected' : ''}}>
|
||||
{{ $attribute->code == 'status' ? __('admin::app.catalog.products.enabled') : __('admin::app.catalog.products.yes') }}
|
||||
</option>
|
||||
|
||||
</select>
|
||||
<label class="switch">
|
||||
<input type="checkbox" v-validate="'{{$validations}}'" class="control" id="{{ $attribute->code }}" name="{{ $attribute->code }}" data-vv-as=""{{ $attribute->admin_name }}"" {{ $selectedOption ? 'checked' : ''}}>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
|
|
@ -159,6 +159,10 @@ abstract class AbstractType
|
|||
$product->update($data);
|
||||
|
||||
foreach ($product->attribute_family->custom_attributes as $attribute) {
|
||||
if ($attribute->type == 'boolean') {
|
||||
$data[$attribute->code] = isset($data[$attribute->code]) ? 1 : 0;
|
||||
}
|
||||
|
||||
if (! isset($data[$attribute->code]) || (in_array($attribute->type, ['date', 'datetime']) && ! $data[$attribute->code]))
|
||||
continue;
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/ui.js": "/js/ui.js?id=1eae825cea6916507733",
|
||||
"/css/ui.css": "/css/ui.css?id=b61e212bdad67ef040f5"
|
||||
"/js/ui.js": "/js/ui.js?id=62a1f3ccf04e55a10ae8",
|
||||
"/css/ui.css": "/css/ui.css?id=dec1ede3219df6514109"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -685,6 +685,8 @@ h5 {
|
|||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 34px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
|
|
|
|||
Loading…
Reference in New Issue