Issue #1238 fixed
This commit is contained in:
parent
de4b723b45
commit
1671fefc4b
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue