Пример #1
0
	
	<div class="l-row">
		<?php 
echo $form->textFieldControlGroup($model, 'emails', array('rows' => 6, 'cols' => 50));
?>
		<p  class = "l-hint">The separator between emails - comma (,)</p>
	</div>
	<div class="l-row">
		<?php 
echo $form->textFieldControlGroup($model, 'theme', array('size' => 60, 'maxlength' => 255));
?>
	</div>

	<div class="l-row">
		<?php 
echo Fields::editor($model, $form, 'message');
?>
		<p class = "l-hint">You can use the following templates:</p>
		<ul class = "l-hint">
			<li>{DATE} - The current date (dd.mm.yyyy)</li>
			<li>{NAME} - Contact name (your login)</li>
		</ul>
	</div>
	
	<div class="row">
	<?php 
echo $form->labelEx($model, 'files');
?>
	<?php 
$this->widget('CMultiFileUpload', array('model' => $model, 'attribute' => 'files', 'accept' => 'jpg,jpeg,gif,png,doc,docx,pdf,txt', 'denied' => 'Only: jpg,jpeg,gif,png,doc,docx,pdf,txt', 'max' => 4, 'remove' => '[x]', 'duplicate' => 'You have to attach a file with the same name', 'options' => array('afterFileSelect' => 'function(e ,v ,m){
				var fileSize = e.files[0].size;
Пример #2
0
 protected function getField($type, $model, $form, $attribute = 'value')
 {
     switch ($type) {
         case 'input':
             return $form->textFieldControlGroup($model, $attribute);
         case 'textarea':
             return $form->textAreaControlGroup($model, $attribute);
         case 'editor':
             return Fields::editor($model, $form, $attribute);
         default:
             return $form->textFieldControlGroup($model, $attribute);
     }
 }