summaryrefslogtreecommitdiff
path: root/protected/views/verein/_form.php
blob: 5b6bf46f023ede4cb2a79f9be0e9f6be6b9788a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'verein-form',
	'enableAjaxValidation'=>false,
	"htmlOptions"=>array('enctype'=>'multipart/form-data'),
)); ?>

	<?php $this->renderPartial('/common/_required_fields_text'); ?>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'slug'); ?>
		<?php
		if (Yii::app()->user->isAdmin) {
			echo $form->dropDownList($model, "slug", CHtml::listData($slugs, "username", "username"), array('empty' => '-- Bitte Benutzer wählen --'));
		} else {
			echo CHtml::encode($model->slug);
		}
		?>
		<?php echo $form->error($model,'slug'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'url'); ?>
		<?php echo $form->textField($model,'url',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'url'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'bild'); ?>
		<?php echo CHtml::image($model->bild); ?><br/>
		<?php echo $form->fileField($model,'uploadedImage', array('size'=>60)); ?>
		<?php echo $form->error($model,'bild'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'email'); ?>
		<?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'kontaktdaten'); ?>
		<?php /* $this->widget('application.extensions.tinymce.ETinyMce',
                array(
                    'name'=>'kontaktdaten',
                	"value"=>$model->kontaktdaten,
                    'useSwitch' => false,
                    'editorTemplate'=>'simple',
                	"language"=>"de",
                	"height"=>"150px",
                    )
                );
		*/?> 
		<?php /*echo $form->textArea($model,'kontaktdaten',array('rows'=>6, 'cols'=>50));*/ ?>
		<?php $this->widget('application.extensions.extckeditor.ExtCKEditor', array(
'model'=>$model,
'attribute'=>'kontaktdaten', // model atribute
'language'=>'DE', /* default lang, If not declared the language of the project will be used in case of using multiple languages */
'editorTemplate'=>'basic', // Toolbar settings (full, basic, advanced)
)); ?>
		<?php echo $form->error($model,'kontaktdaten'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'beschreibung'); ?>
		<?php $this->widget('application.extensions.extckeditor.ExtCKEditor', array(
'model'=>$model,
'attribute'=>'beschreibung', // model atribute
'language'=>'DE', /* default lang, If not declared the language of the project will be used in case of using multiple languages */
'editorTemplate'=>'basic', // Toolbar settings (full, basic, advanced)
)); ?>
		<?php /*$this->widget('application.extensions.tinymce.ETinyMce',
                array(
                    'name'=>'beschreibung',
                	"value"=>$model->beschreibung,
                    'useSwitch' => false,
                    'editorTemplate'=>'simple',
                	"language"=>"de",
                	"height"=>"200px",
                    )
                );*/
		?>
		<?php /*echo $form->textArea($model,'beschreibung',array('rows'=>6, 'cols'=>50)); */?>
		<?php echo $form->error($model,'beschreibung'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'standort'); ?>
		<?php
		if (Yii::app()->user->isAdmin) {
			echo $form->dropDownList($model, "standort_id", CHtml::listData($standorte, "id", "name"), array('empty' => '-- Bitte Standort wählen --'));
		} else {
			echo CHtml::encode($model->standort->name);
		}
		?>
		<?php echo $form->error($model,'standort_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'published'); ?>
		<?php
		if (Yii::app()->user->isAdmin) {
			echo $form->checkbox($model,'published');
		} else {
			echo CHtml::image($model->published ? "images/ok.png" : "images/nok.png", $model->published ? "ok.png" : "nok.png");
		}
		?>
		<?php echo $form->error($model,'published'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Speichern'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->