<?php
$this->beginWidget(
	'zii.widgets.jui.CJuiDialog',
	array(
		'id'=>'dialog',
		'options'=>array(
			'title'=>'新增标签',
			'autoOpen'=>false
		),
	)
);
?>
<div id="dialog" title="Create new user">
	<?php echo CHtml::form();?>
	<fieldset>
		<label for="name"><?php echo Label::model()->getAttributeLabel('name');?></label>
		<?php echo CHtml::textField('Label[name]', '', array('class'=>'text ui-widget-content ui-corner-all'));?>
		<br/>
		<br/>
		<label for="email"><?php echo Label::model()->getAttributeLabel('item');?></label>
		<?php echo CHtml::textField('Label[item]', '', array('class'=>'text ui-widget-content ui-corner-all'));?>
		<br/>
		<br/>
		<label for="sort"><?php echo Label::model()->getAttributeLabel('sort');?></label>
		<?php echo CHtml::textField('Label[sort]', '', array('class'=>'text ui-widget-content ui-corner-all','size'=>5));?>
		<br/>
		<?php echo CHtml::ajaxSubmitButton('提交', array('/admin/label/create'), array('success'=>'function(msg){if(msg != "") {alert(msg);return false;} else {jQuery("#dialog").dialog("close");location.reload();}}'));?>
	</fieldset>
	<?php echo CHtml::endForm();?>
</div>
<?php $this->endWidget('zii.widgets.jui.CJuiDialog');?>