LaravelRUS / SleepingOwlAdmin

🦉 Administrative interface builder for Laravel (Laravel admin)
http://sleepingowladmin.ru/
MIT License
805 stars 217 forks source link

hasMany textarea, ckeditor conrols have wrong name #1194

Closed eugenem closed 4 years ago

eugenem commented 4 years ago
AdminFormElement::hasMany('translations', [
      AdminFormElement::text('order_notes', 'הערות למסח הזמנה'),

gives us this:

<input class="form-control" type="text" id="order_notes" name="translations[1][order_notes]" value="">

but

AdminFormElement::hasMany('translations', [
     AdminFormElement::textarea('order_notes', 'הערות למסח הזמנה'),

after clicking 'add row':

<textarea class="form-control" rows="10" id="order_notes" name="order_notes"></textarea>

existing rows look like this:

<textarea class="form-control" rows="10" id="order_notes" name="translations[1][order_notes]"></textarea>

with ckeditor it's the same: new rows have wrong name (and ckedit doesn't even start), but existing rows work fine...

eugenem commented 4 years ago

laravel 6.18, but I assume that issue is in JS

btw, having the same id for controls is a bad idea

daaner commented 4 years ago

Not sure for sure, but corrected in the DEV version. Check it

eugenem commented 4 years ago

how do I run DEV?

vkn999 commented 4 years ago

how do I run DEV?

In composer.json "laravelrus/sleepingowl": "dev-development"

daaner commented 4 years ago

or "laravelrus/sleepingowl": "~7.0"