commit
90e0ddb306
|
|
@ -611,6 +611,7 @@ return [
|
|||
'type' => 'الصفة نوع',
|
||||
'text' => 'نص',
|
||||
'textarea' => 'تيكستاريا',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'السعر',
|
||||
'boolean' => 'قيمة منطقية',
|
||||
'select' => 'يختار',
|
||||
|
|
|
|||
|
|
@ -602,6 +602,7 @@ return [
|
|||
'type' => 'Attribut-Typ',
|
||||
'text' => 'Text',
|
||||
'textarea' => 'Textarea',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'Preis',
|
||||
'boolean' => 'Boolean',
|
||||
'select' => 'Select',
|
||||
|
|
|
|||
|
|
@ -622,6 +622,7 @@ return [
|
|||
'type' => 'Attribute Type',
|
||||
'text' => 'Text',
|
||||
'textarea' => 'Textarea',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'Price',
|
||||
'boolean' => 'Boolean',
|
||||
'select' => 'Select',
|
||||
|
|
|
|||
|
|
@ -623,6 +623,7 @@ return [
|
|||
'type' => 'Tipo de atributo',
|
||||
'text' => 'Texto',
|
||||
'textarea' => 'Área de texto',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'Precio',
|
||||
'boolean' => 'Booleano',
|
||||
'select' => 'Lista de selección',
|
||||
|
|
|
|||
|
|
@ -600,6 +600,7 @@ return [
|
|||
'type' => 'نوع ویژگی',
|
||||
'text' => 'Text',
|
||||
'textarea' => 'Textarea',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'قیمت',
|
||||
'boolean' => 'Boolean',
|
||||
'select' => 'Select',
|
||||
|
|
|
|||
|
|
@ -622,6 +622,7 @@ return [
|
|||
'type' => 'Type d\'attribut',
|
||||
'text' => 'Texte',
|
||||
'textarea' => 'Zone de texte',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'Prix',
|
||||
'boolean' => 'booléen',
|
||||
'select' => 'Sélectionner',
|
||||
|
|
|
|||
|
|
@ -622,6 +622,7 @@ return [
|
|||
'type' => 'विशेषता प्रकार',
|
||||
'text' => 'मूलपाठ',
|
||||
'textarea' => 'टेक्सटेरिया',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'कीमत',
|
||||
'boolean' => 'बूलियन',
|
||||
'select' => 'चुनते हैं',
|
||||
|
|
|
|||
|
|
@ -600,6 +600,7 @@ return [
|
|||
'type' => 'Attribute Tipo',
|
||||
'text' => 'Text',
|
||||
'textarea' => 'Textarea',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'Prezzo',
|
||||
'boolean' => 'Boolean',
|
||||
'select' => 'Select',
|
||||
|
|
|
|||
|
|
@ -598,6 +598,7 @@ return [
|
|||
'type' => 'Attribute Type',
|
||||
'text' => 'Text',
|
||||
'textarea' => 'Textarea',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'Prijs',
|
||||
'boolean' => 'Boolean',
|
||||
'select' => 'Select',
|
||||
|
|
|
|||
|
|
@ -598,6 +598,7 @@ return [
|
|||
'type' => 'Rodzaj atrybutu',
|
||||
'text' => 'Tekst',
|
||||
'textarea' => 'Pole tekstowe',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'Cena',
|
||||
'boolean' => 'Boolean',
|
||||
'select' => 'Wybierz',
|
||||
|
|
|
|||
|
|
@ -597,6 +597,7 @@ return [
|
|||
'type' => 'Tipo do Atributo',
|
||||
'text' => 'Texto',
|
||||
'textarea' => 'Área de Texto',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'Preço',
|
||||
'boolean' => 'Boleano',
|
||||
'select' => 'Caixa de Seleção',
|
||||
|
|
|
|||
|
|
@ -605,6 +605,7 @@ return [
|
|||
'type' => 'Nitelik Tipi',
|
||||
'text' => 'Text',
|
||||
'textarea' => 'Textarea',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => 'Fiyat',
|
||||
'boolean' => 'Boolean',
|
||||
'select' => 'Seçim',
|
||||
|
|
|
|||
|
|
@ -607,6 +607,7 @@ return [
|
|||
'type' => '属性类型',
|
||||
'text' => '文本',
|
||||
'textarea' => '文本框',
|
||||
'enable-wysiwyg' => 'Enable Wysiwyg Editor',
|
||||
'price' => '价格',
|
||||
'boolean' => '布尔值',
|
||||
'select' => '选择',
|
||||
|
|
|
|||
|
|
@ -58,6 +58,15 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
<div class="control-group hide">
|
||||
<label for="enable_wysiwyg">{{ __('admin::app.catalog.attributes.enable-wysiwyg') }}</label>
|
||||
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="enable_wysiwyg" name="enable_wysiwyg" value="1" {{ old('enable_wysiwyg') ? 'checked' : '' }}>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.attribute.create_form_accordian.general.controls.after') !!}
|
||||
|
||||
</div>
|
||||
|
|
@ -347,6 +356,12 @@
|
|||
} else {
|
||||
$('#options').parent().removeClass('hide')
|
||||
}
|
||||
|
||||
if (['textarea'].indexOf($(e.target).val()) > -1) {
|
||||
$('#enable_wysiwyg').parents('.control-group').removeClass('hide')
|
||||
} else {
|
||||
$('#enable_wysiwyg').parents('.control-group').addClass('hide')
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,18 @@
|
|||
<input type="hidden" name="type" value="{{ $attribute->type }}"/>
|
||||
</div>
|
||||
|
||||
|
||||
@if ($attribute->type == 'textarea')
|
||||
<div class="control-group">
|
||||
<label for="enable_wysiwyg">{{ __('admin::app.catalog.attributes.enable-wysiwyg') }}</label>
|
||||
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="enable_wysiwyg" name="enable_wysiwyg" value="1" {{ (old('enable_wysiwyg') ?: $attribute->enable_wysiwyg) ? 'checked' : '' }}>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.attribute.edit_form_accordian.general.controls.after', ['attribute' => $attribute]) !!}
|
||||
</div>
|
||||
</accordian>
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@
|
|||
});
|
||||
|
||||
tinyMCEHelper.initTinyMCE({
|
||||
selector: 'textarea#description, textarea#short_description',
|
||||
selector: 'textarea.enable-wysiwyg, textarea.enable-wysiwyg',
|
||||
height: 200,
|
||||
width: "100%",
|
||||
plugins: 'image imagetools media wordcount save fullscreen code table lists link hr',
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<textarea v-validate="'{{$validations}}'" class="control" id="{{ $attribute->code }}" name="{{ $attribute->code }}" data-vv-as=""{{ $attribute->admin_name }}"">{{ old($attribute->code) ?: $product[$attribute->code]}}</textarea>
|
||||
<textarea v-validate="'{{$validations}}'" class="control {{ $attribute->enable_wysiwyg ? 'enable-wysiwyg' : '' }}" id="{{ $attribute->code }}" name="{{ $attribute->code }}" data-vv-as=""{{ $attribute->admin_name }}"">{{ old($attribute->code) ?: $product[$attribute->code]}}</textarea>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddEnableWysiwygColumnInAttributesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('attributes', function (Blueprint $table) {
|
||||
$table->boolean('enable_wysiwyg')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('attributes', function (Blueprint $table) {
|
||||
$table->dropColumn('enable_wysiwyg');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -20,6 +20,7 @@ class Attribute extends TranslatableModel implements AttributeContract
|
|||
'code',
|
||||
'admin_name',
|
||||
'type',
|
||||
'enable_wysiwyg',
|
||||
'position',
|
||||
'is_required',
|
||||
'is_unique',
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ class AttributeRepository extends Repository
|
|||
|
||||
Event::dispatch('catalog.attribute.update.before', $id);
|
||||
|
||||
$data['enable_wysiwyg'] = ! isset($data['enable_wysiwyg']) ? 0 : 1;
|
||||
|
||||
$attribute->update($data);
|
||||
|
||||
if (in_array($attribute->type, ['select', 'multiselect', 'checkbox'])) {
|
||||
|
|
|
|||
|
|
@ -203,6 +203,7 @@ class Booking extends Virtual
|
|||
|
||||
$data['quantity'] = $qty;
|
||||
$data['booking']['ticket_id'] = $ticketId;
|
||||
$data['booking']['slot'] = implode('-', [$bookingProduct->available_from->timestamp, $bookingProduct->available_to->timestamp]);
|
||||
$cartProducts = parent::prepareForCart($data);
|
||||
|
||||
if (is_string($cartProducts)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue