<?php

/**
 * ContactForm class.
 * ContactForm is the data structure for keeping
 * contact form data. It is used by the 'contact' action of 'SiteController'.
 */
class UserProfile extends CFormModel {

	public $isTenfinger;

	public function rules() {
		return array(
			array('isTenfinger', 'required'),
			array('isTenfinger', 'numerical', 'integerOnly' => true, 'min' => 0, 'max' => 1, 'allowEmpty' => false)
		);
	}

	public function getForm() {
		return new CForm(array(
			'showErrorSummary'=>true,
			'attributes' => array('id' => 'keyWizard'),
			'elements'=>array(
				'isTenfinger'=>array(
					'type' => 'radio',
					'items' => array('Jah' => '1', 'Ei' => '0'),
//					'layout' => '{label}<br/>{input}<br/>{error}'
				),
			),
			'buttons'=>array(
				'submit'=>array(
					'type'=>'submit',
					'label'=>'Edasi'
				),
			)
		), $this);
	}
}
