<?php Yii::import('ext.bootstrap.form.*'); ?>
<?php
class AccountDetails extends User {
public $verifyPassword;
public function rules() {
$this->scenario = 'register';
$rules = parent::rules();
return $rules;
}
public function getForm() {
return new TbForm(array(
'showErrorSummary' => false,
'activeForm' => array(
'class' => 'bootstrap.widgets.TbActiveForm',
'id' => 'accountdetails-form',
'layout' => TbHtml::FORM_LAYOUT_HORIZONTAL,
'enableClientValidation' => true,
),
'elements' => array(
'username' => array(
'class' => 'input-xlarge',
'type' => 'textField',
'data-html' => true,
'data-content' => 'Insert an username <code> Ex: johndeer </code>',
'data-toggle' => 'popover',
'data-trigger' => 'focus'
),
'password' => array(
'class' => 'input-xlarge',
'type' => 'passwordField',
'layout' => '{label}<div class="pull-left">{input}</div>{error}',
'data-html' => true,
'data-content' => 'Enter a password that you can remember easily <hr>',
'data-toggle' => 'popover',
'data-trigger' => 'focus'
),
'verifyPassword' => array(
'class' => 'input-xlarge',
'type' => 'passwordField',
'label' => Jpt::t('Verify Password'),
'data-content' => 'Repeat the previously entered password',
'data-toggle' => 'popover',
'data-trigger' => 'focus'
),
),
'buttons' => array(
'submit' => array(
'type' => TbHtml::BUTTON_TYPE_SUBMIT,
'label' => Jpt::t('Next') . ' <i class="icon-chevron-right"></i>',
'size' => TbHtml::BUTTON_SIZE_LARGE,
'class' => 'pull-right',
),
),
), $this);
}
}
In the code above, I made the transition from the Yiibooster to YiiStrap
Problems occur when I submit the form. With Yii-Booster work great but with Yiistrap form refresh when i click Submit button. Validation and popover not working.
Please help, tell me where I’m wrong. Thanks!
P.S. I use this form in wizard-behavior extension.