Yii::app()->clientScript->registerScript('gii.crud', "\n\$('#{$class}_controller').change(function(){\n\t\$(this).data('changed',\$(this).val()!='');\n});\n\$('#{$class}_model').bind('keyup change', function(){\n\tvar controller=\$('#{$class}_controller');\n\tif(!controller.data('changed')) {\n\t\tvar id=new String(\$(this).val().match(/\\w*\$/));\n\t\tif(id.length>0)\n\t\t\tid=id.substring(0,1).toLowerCase()+id.substring(1);\n\t\tcontroller.val(id);\n\t}\n});\n"); ?> <h1>giix Crud Generator</h1> <p>This generator generates a controller and views that implement CRUD operations for the specified data model. </p> <?php $form = $this->beginWidget('CCodeForm', array('model' => $model)); ?> <div class="row sticky"> <?php echo $form->labelEx($model, 'moduleName'); ?> <?php echo $form->dropDownList($model, 'moduleName', GxCoreHelper::getModuleList(), array('options' => array($model->moduleName => array('selected' => true)))); ?> <div class="tooltip"> This refers to the module name that will contain the model. Setting this property mainly affects where model classes are generated. For example, a module name <code>Comments</code> will generate the model in the path <code>application.modules.comments.models</code>. <br/> Leave this field empty if your model does not belong to any module.. </div> <?php echo $form->error($model, 'moduleName'); ?> </div> <div class="row">