HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
registration.php
Go to the documentation of this file.
1 <?php $this->pageTitle = Yii::app()->name.' - '.UserModule::t("Registration");
2 $this->breadcrumbs = array(
3  UserModule::t("Registration"),
4 );
5 ?>
6 
7 <h1><?php echo UserModule::t("Registration"); ?></h1>
8 
9 <?php if (Yii::app()->user->hasFlash('registration')): ?>
10 <div class="success">
11 <?php echo Yii::app()->user->getFlash('registration'); ?>
12 </div>
13 <?php else: ?>
14 
15 <div class="form">
16 <?php $form = $this->beginWidget('UActiveForm', array(
17  'id' => 'registration-form',
18  'enableAjaxValidation' => true,
19  'disableAjaxValidationAttributes' => array('RegistrationForm_verifyCode'),
20  'clientOptions' => array(
21  'validateOnSubmit' => true,
22  ),
23  'htmlOptions' => array('enctype' => 'multipart/form-data'),
24 )); ?>
25 
26  <p class="note"><?php echo UserModule::t('Fields with <span class="required">*</span> are required.'); ?></p>
27 
28  <?php echo $form->errorSummary(array($model, $profile)); ?>
29 
30  <div class="row">
31  <?php echo $form->labelEx($model, 'username'); ?>
32  <?php echo $form->textField($model, 'username'); ?>
33  <?php echo $form->error($model, 'username'); ?>
34  </div>
35 
36  <div class="row">
37  <?php echo $form->labelEx($model, 'password'); ?>
38  <?php echo $form->passwordField($model, 'password'); ?>
39  <?php echo $form->error($model, 'password'); ?>
40  <p class="hint">
41  <?php echo UserModule::t("Minimal password length 4 symbols."); ?>
42  </p>
43  </div>
44 
45  <div class="row">
46  <?php echo $form->labelEx($model, 'verifyPassword'); ?>
47  <?php echo $form->passwordField($model, 'verifyPassword'); ?>
48  <?php echo $form->error($model, 'verifyPassword'); ?>
49  </div>
50 
51  <div class="row">
52  <?php echo $form->labelEx($model, 'email'); ?>
53  <?php echo $form->textField($model, 'email'); ?>
54  <?php echo $form->error($model, 'email'); ?>
55  </div>
56 
57 <?php
58  $profileFields = $profile->getFields();
59  if ($profileFields) {
60  foreach ($profileFields as $field) {
61  ?>
62  <div class="row">
63  <?php echo $form->labelEx($profile, $field->varname);
64  ?>
65  <?php
66  if ($widgetEdit = $field->widgetEdit($profile)) {
67  echo $widgetEdit;
68  } elseif ($field->range) {
69  echo $form->dropDownList($profile, $field->varname, Profile::range($field->range));
70  } elseif ($field->field_type == "TEXT") {
71  echo$form->textArea($profile, $field->varname, array('rows' => 6, 'cols' => 50));
72  } else {
73  echo $form->textField($profile, $field->varname, array('size' => 60, 'maxlength' => (($field->field_size) ? $field->field_size : 255)));
74  }
75  ?>
76  <?php echo $form->error($profile, $field->varname);
77  ?>
78  </div>
79  <?php
80 
81  }
82  }
83 ?>
84  <?php if (UserModule::doCaptcha('registration')): ?>
85  <div class="row">
86  <?php echo $form->labelEx($model, 'verifyCode'); ?>
87 
88  <?php $this->widget('CCaptcha'); ?>
89  <?php echo $form->textField($model, 'verifyCode'); ?>
90  <?php echo $form->error($model, 'verifyCode'); ?>
91 
92  <p class="hint"><?php echo UserModule::t("Please enter the letters as they are shown in the image above."); ?>
93  <br/><?php echo UserModule::t("Letters are not case-sensitive."); ?></p>
94  </div>
95  <?php endif; ?>
96 
97  <div class="row submit">
98  <?php echo CHtml::submitButton(UserModule::t("Register")); ?>
99  </div>
100 
101 <?php $this->endWidget(); ?>
102 </div><!-- form -->
103 <?php endif; ?>