<?php

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

    public $name;
    public $email;
    public $phone;
    public $body;
//    public $verifyCode;
    public $link;
    /**
     * Declares the validation rules.
     */
    public function rules()
    {
        return array(
            // name, email, subject and body are required
            array('name, email, phone, body', 'required'),
            // email has to be a valid email address
            array('email', 'email'),
            array('link','safe'),
            // verifyCode needs to be entered correctly
//            array('verifyCode', 'captcha', 'allowEmpty' => !CCaptcha::checkRequirements()),
        );
    }

    /**
     * Declares customized attribute labels.
     * If not declared here, an attribute would have a label that is
     * the same as its name with the first letter in upper case.
     */
    public function attributeLabels()
    {
        return array(
            'name'=>Yii::t('site','ФИО'),
            'phone'=>Yii::t('site','Телефон'),
            'email'=>Yii::t('site','E-mail'),
            'body'=>Yii::t('site','Сообщение'),
//            'verifyCode' => 'Verification Code',
        );
    }
}