<?php //echo $form->textFieldRow($model->workshop,'workshop_image',array('class'=>'span12','maxlength'=>100)); ?> <div class="form-actions"> <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->workshop->isNewRecord ? $isEmp ? 'Request' : 'Create' : 'Update')); ?> </div> <?php $this->endWidget(); PostItemHelper::registerExcerptScripts('workshop-form'); /* Yii::app()->clientScript->registerScript(__FILE__.'#'.$this->getAction()->getId(), <<<EOD jQuery(document).on('submit','#workshop-form', function(e){ var excerpt=''; $('p',$('<div>'+$('#PostItem_description').getCode()+'</div>')).each(function(idx,value){excerpt+=$(value).text()+" ";}); if(excerpt.length>500) excerpt=excerpt.substring(0,450); $('#PostItem_excerpt').val(excerpt); }); EOD , CClientScript::POS_READY); ?> */ ?>
</fieldset> <div class="clearfix"></div> </div> <div class="clearfix"></div> <div class="form-actions"> <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->event->isNewRecord ? 'Create' : 'Save')); ?> </div> <?php $this->endWidget(); PostItemHelper::registerExcerptScripts('event-form'); /* Yii::app()->clientScript->registerScript(__FILE__.'#'.$this->getAction()->getId(), <<<EOD jQuery(document).on('submit','#event-form', function(e){ var excerpt=''; $('p',$('<div>'+$('#PostItem_description').getCode()+'</div>')).each(function(idx,value){excerpt+=$(value).text()+" ";}); if(excerpt.length>500) excerpt=excerpt.substring(0,450); $('#PostItem_excerpt').val(excerpt); }); EOD , CClientScript::POS_READY); */ ?>
<?php if (!$model->certification->isNewRecord) { ?> <div class="control-group "> <div class="controls"><span class="label label-info"><i class="icon-info"></i> This is the current image.</span><br/><br/><a class="thumbnail"><?php echo chtml::image($model->certification->getCertImageUrl(), 'certification image'); ?> </a></div> </div> <?php } ?> <div class="form-actions"> <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->certification->isNewRecord ? 'Create' : 'Save')); ?> </div> <?php $this->endWidget(); PostItemHelper::registerExcerptScripts('certification-form'); Yii::app()->clientScript->registerScript(__FILE__ . '#' . $this->getAction()->getId(), <<<EOD \t\tjQuery(document).on('change','#Certification_provider_id',function(e){ \t\t\tvar selectedProvider=\$(this).find('option:selected'); \t\t\tif(\$(this).val()!='')\$('#Certification_provider').val(selectedProvider.text()); \t\t}); EOD , CClientScript::POS_READY);