Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form not displayed in modal #2

Open
loveorigami opened this issue Jan 3, 2016 · 5 comments · May be fixed by #3
Open

Form not displayed in modal #2

loveorigami opened this issue Jan 3, 2016 · 5 comments · May be fixed by #3

Comments

@loveorigami
Copy link

I am create view as

use yii\helpers\Url;
use lo\core\widgets\admin\Form;
use karnbrockgmbh\modal\Modal;

/**
 * @var common\models\Page $model модель
 */


Modal::begin([
    'id' => 'createAuthor',
    'url' => Url::to(['/love/author/create']), // Ajax view with form to load
    'ajaxSubmit' => true, // Submit the contained form as ajax, true by default
    // ... any other yii2 bootstrap modal option you need
    'header' => 'Add Author',
    'toggleButton' => [
        'label' => 'click me',
        'data-target' => '#createAuthor',
    ],
]);
Modal::end();

After clicking on button, I have author form in console, but not find it in modal

0001

@loveorigami
Copy link
Author

I am replaced here
https://github.com/karnbrockgmbh/yii2-modal-ajax/blob/master/assets/js/kb-modal-ajax.js#L57

jQuery(this.element).find('.modal-body').html(data);

and form is shown...

@loveorigami
Copy link
Author

and next i find mistake ))
here
https://github.com/karnbrockgmbh/yii2-modal-ajax/blob/master/assets/js/kb-modal-ajax.js#L79
need
jQuery(this.element).find('.modal-body').html(html);

@loveorigami loveorigami linked a pull request Jan 3, 2016 that will close this issue
@nazakar
Copy link

nazakar commented Jan 22, 2016

Unfortunately after changing code, modal is empty

@loveorigami
Copy link
Author

@nazakar clear assets?
for me - worked fine with #3

@nazakar
Copy link

nazakar commented Jan 23, 2016

Thanks, everything is OK!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants