E
E
EVOSandru62014-11-21 11:59:30
Yii
EVOSandru6, 2014-11-21 11:59:30

What is the reason for conflict of 2 widgets in Yii?

Good afternoon!
Such a problem, on all actions - oh, in my layouts / column2.php in the first column there is a button, by clicking on which, a jquery ui dialog opens with a form. In the contact action of the site controller , I have another form - a contact one, and it is in this action that the dialog form is not hidden by default, but open and not wrapped in :

<div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable" tabindex="-1" role="dialog" aria-labelledby="ui-id-1" style="display: none; outline: 0px; z-index: 1000;">

Also there is no sibling tag next to it:
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">

If I remove the guts of the contact form and leave only :
<?php $form=$this->beginWidget('CActiveForm', array(
                    'id'=>'contact-form',
                    'enableClientValidation'=>true,
                    'clientOptions'=>array(
                        'validateOnSubmit'=>true,
                    ),
)); ?>

and Then the dialog form is hidden and everything is opened by clicking on the desired button. For the organization of the dialogue form I use CJuiDialog Where the dog is buried?
<?php $this->endWidget(); ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
EVOSandru6, 2014-11-25
@EVOSandru6

For some reason, the white screen doesn't die without a hard redirect in actionQuick to the controller's action . For example(' product/all '). Strange property - $current_url , as if it is empty, how to check?
Even if I send a message and get into " product/all " , then the most unpleasant sore occurs - a form with fields is displayed on the screen on the main page, and below is a message about successful submission. After refreshing the page, the form disappears. I would kill this form using jquery , but I have a button "Request price list" on the current page and when clicked, the dialog should open.
If it makes things clear, I use a theme in the user part, in the admin part I use a module ( sadmin ). It's strange, in the admin module, when you click on the cross, the modal window closes humanly, but in the user module, I had to do a trick using jquery, clinging to the id-shnik "mydialog" when the button was clicked

$('.get_price').click(function(){
        
$('#mydialog').siblings().children('a').attr('id', 'exit_go');
        $('#mydialog').siblings().children('a').children('span').attr('id', 'close_pooom');
        $('#close_pooom, #exit_go').click(function(){
            $('.ui-widget-overlay, .ui-dialog').css({'display':'none'});
        });
   });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question