contact.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /* @var $this SiteController */
  3. /* @var $model ContactForm */
  4. /* @var $form CActiveForm */
  5. $this->pageTitle=Yii::app()->name . ' - Contact Us';
  6. $this->breadcrumbs=array(
  7. 'Contact',
  8. );
  9. ?>
  10. <h1>Contact Us</h1>
  11. <?php if(Yii::app()->user->hasFlash('contact')): ?>
  12. <div class="flash-success">
  13. <?php echo Yii::app()->user->getFlash('contact'); ?>
  14. </div>
  15. <?php else: ?>
  16. <p>
  17. If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.
  18. </p>
  19. <div class="form">
  20. <?php $form=$this->beginWidget('CActiveForm', array(
  21. 'id'=>'contact-form',
  22. 'enableClientValidation'=>true,
  23. 'clientOptions'=>array(
  24. 'validateOnSubmit'=>true,
  25. ),
  26. )); ?>
  27. <p class="note">Fields with <span class="required">*</span> are required.</p>
  28. <?php echo $form->errorSummary($model); ?>
  29. <div class="row">
  30. <?php echo $form->labelEx($model,'name'); ?>
  31. <?php echo $form->textField($model,'name'); ?>
  32. <?php echo $form->error($model,'name'); ?>
  33. </div>
  34. <div class="row">
  35. <?php echo $form->labelEx($model,'email'); ?>
  36. <?php echo $form->textField($model,'email'); ?>
  37. <?php echo $form->error($model,'email'); ?>
  38. </div>
  39. <div class="row">
  40. <?php echo $form->labelEx($model,'subject'); ?>
  41. <?php echo $form->textField($model,'subject',array('size'=>60,'maxlength'=>128)); ?>
  42. <?php echo $form->error($model,'subject'); ?>
  43. </div>
  44. <div class="row">
  45. <?php echo $form->labelEx($model,'body'); ?>
  46. <?php echo $form->textArea($model,'body',array('rows'=>6, 'cols'=>50)); ?>
  47. <?php echo $form->error($model,'body'); ?>
  48. </div>
  49. <?php if(CCaptcha::checkRequirements()): ?>
  50. <div class="row">
  51. <?php echo $form->labelEx($model,'verifyCode'); ?>
  52. <div>
  53. <?php $this->widget('CCaptcha'); ?>
  54. <?php echo $form->textField($model,'verifyCode'); ?>
  55. </div>
  56. <div class="hint">Please enter the letters as they are shown in the image above.
  57. <br/>Letters are not case-sensitive.</div>
  58. <?php echo $form->error($model,'verifyCode'); ?>
  59. </div>
  60. <?php endif; ?>
  61. <div class="row buttons">
  62. <?php echo CHtml::submitButton('Submit'); ?>
  63. </div>
  64. <?php $this->endWidget(); ?>
  65. </div><!-- form -->
  66. <?php endif; ?>