From 1b94eff5d8a56cfd524bb08cc2413def323f1998 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Wed, 29 May 2013 07:47:33 -0400 Subject: [PATCH] Refactored the widget usage with ActiveField. --- views/site/contact.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/views/site/contact.php b/views/site/contact.php index e740d0f..14a82bc 100644 --- a/views/site/contact.php +++ b/views/site/contact.php @@ -31,15 +31,9 @@ $this->params['breadcrumbs'][] = $this->title; field($model, 'email')->textInput(); ?> field($model, 'subject')->textInput(); ?> field($model, 'body')->textArea(array('rows' => 6)); ?> - field($model, 'verifyCode'); - echo $field->begin() - . $field->label() - . Captcha::widget() - . Html::activeTextInput($model, 'verifyCode', array('class' => 'input-medium')) - . $field->error() - . $field->end(); - ?> + field($model, 'verifyCode')->widget(Captcha::className(), array( + 'options' => array('class' => 'input-medium'), + )); ?>
'btn btn-primary')); ?>