Selaa lähdekoodia

Revert "Added ActiveForm::mfield()."

This reverts commit 9a5ca9951318447d050e5d53b05c0c281667b1a5.
Qiang Xue 12 vuotta sitten
vanhempi
commit
3aa964dfba
2 muutettua tiedostoa jossa 9 lisäystä ja 13 poistoa
  1. 5 6
      views/site/contact.php
  2. 4 7
      views/site/login.php

+ 5 - 6
views/site/contact.php

@@ -24,15 +24,14 @@ $this->params['breadcrumbs'][] = $this->title;
 </p>
 
 <?php $form = ActiveForm::begin(array(
-	'model' => $model,
 	'options' => array('class' => 'form-horizontal'),
 	'fieldConfig' => array('inputOptions' => array('class' => 'input-xlarge')),
 )); ?>
-	<?php echo $form->field('name')->textInput(); ?>
-	<?php echo $form->field('email')->textInput(); ?>
-	<?php echo $form->field('subject')->textInput(); ?>
-	<?php echo $form->field('body')->textArea(array('rows' => 6)); ?>
-	<?php echo $form->field('verifyCode')->widget(Captcha::className(), array(
+	<?php echo $form->field($model, 'name')->textInput(); ?>
+	<?php echo $form->field($model, 'email')->textInput(); ?>
+	<?php echo $form->field($model, 'subject')->textInput(); ?>
+	<?php echo $form->field($model, 'body')->textArea(array('rows' => 6)); ?>
+	<?php echo $form->field($model, 'verifyCode')->widget(Captcha::className(), array(
 		'options' => array('class' => 'input-medium'),
 	)); ?>
 	<div class="form-actions">

+ 4 - 7
views/site/login.php

@@ -14,13 +14,10 @@ $this->params['breadcrumbs'][] = $this->title;
 
 <p>Please fill out the following fields to login:</p>
 
-<?php $form = ActiveForm::begin(array(
-	'model' => $model,
-	'options' => array('class' => 'form-horizontal'),
-)); ?>
-	<?php echo $form->field('username')->textInput(); ?>
-	<?php echo $form->field('password')->passwordInput(); ?>
-	<?php echo $form->field('rememberMe')->checkbox(); ?>
+<?php $form = ActiveForm::begin(array('options' => array('class' => 'form-horizontal'))); ?>
+	<?php echo $form->field($model, 'username')->textInput(); ?>
+	<?php echo $form->field($model, 'password')->passwordInput(); ?>
+	<?php echo $form->field($model, 'rememberMe')->checkbox(); ?>
 	<div class="form-actions">
 		<?php echo Html::submitButton('Login', array('class' => 'btn btn-primary')); ?>
 	</div>