yii2-gallery-manager
yii2-gallery-manager copied to clipboard
Use gallery-manager widget in bootstrap modal window
I use renderAjax to load form in modal window. Gallery widget render view (buttons etc..) but not works (don't upload files). It working OK without modal... Please help.
Controller:
public function actionAddAnnounce(){ $announce = new Announces(); return $this->renderAjax('add_announce', compact('announce')); }
View (add_announce)
$form = ActiveForm::begin(['action' => '/user/add-announce', 'id' => 'new_announce']); echo GalleryManager::widget( [ 'model' => $announce, 'behaviorName' => 'galleryBehavior', 'apiRoute' => 'user/galleryApi' ]); ActiveForm::end();
Just need to add id of ActiveForm parameter in widget...