Пример #1
0
?>
    
    <?php 
echo $form->field($model, 'old_price')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'currency')->textInput(['maxlength' => true, 'placeholder' => 'По умолчанию грн.']);
?>

    <?php 
echo $form->field($model, 'vendor')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'rating')->widget(StarRating::classname(), ['pluginOptions' => ['size' => 'lg']]);
?>

    <?php 
echo $form->field($model, 'brand')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'user_id')->dropdownList($model::getUserList());
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
	<label class="control-label" for="endorsement-decisiveness">Creativity</label>
	</td>
	<td>
	<?php 
echo $form->field($endorsementmodel, 'creativity')->widget(StarRating::classname(), ['pluginOptions' => ['size' => 'xs', 'showCaption' => false, 'readonly' => true]])->label(false);
?>
	</td>
	</tr>
	
	<tr>
	<td style="padding: 5px;">
	<label class="control-label" for="endorsement-decisiveness">Decisiveness</label>
	</td>
	<td>
	<?php 
echo $form->field($endorsementmodel, 'decisiveness')->widget(StarRating::classname(), ['pluginOptions' => ['size' => 'xs', 'showCaption' => false, 'readonly' => true]])->label(false);
?>
	</td>
	</tr>
	</table>
	</div>
	</div>
	
	<label class="control-label">My Post</label>
	<a href="#" id="profilepost"><pre style="width:85%"><h5 id="mypost"><?php 
echo $about;
?>
</h5></pre></a>
	
	<div id="profileupdatepost">
	<?php 
Пример #3
0
$this->params['breadcrumbs'][] = $this->title;
?>
<style type="text/css" scoped="scoped">
    .rating-xs {font-size: 150%}
</style>
<div style='position: relative'>  
    <?php 
echo Html::img($model->getImageUrl(), ['class' => 'center-block img-responsive image', 'alt' => $model->name]);
?>
    <div class='center-block' style="width: 10%; position: absolute;  bottom: -5%; left: 42%">
        <?php 
$form_rate = ActiveForm::begin(['id' => 'rate-form', 'action' => ['languecenter/rate'], 'options' => ['method' => 'post']]);
?>

        <?php 
echo $form_rate->field($rate, 'value')->widget(StarRating::classname(), ['pluginOptions' => ['step' => 1, 'showClear' => false, 'showCaption' => false, 'showLabel' => false, 'size' => 'xs'], 'pluginEvents' => ['rating.change' => 'function(event, value) {
                    var a= getId();
                    $.ajax({
                    type: "POST",
                    url: "/languecenter/rate",
                    data: { rate: value,idlang: a},
                });}']])->label('');
?>
        <?php 
ActiveForm::end();
?>
    </div>
    <script>
        function getId(){
            return <?php 
echo $model->ID;
Пример #4
0
?>

        <?php 
echo $form->field($model, 'q07')->widget(StarRating::classname(), ['pluginOptions' => ['showClear' => false, 'showCaption' => false, 'step' => 1]]);
?>

        <?php 
echo $form->field($model, 'q08')->widget(StarRating::classname(), ['pluginOptions' => ['showClear' => false, 'showCaption' => false, 'step' => 1]]);
?>

        <?php 
echo $form->field($model, 'q09')->widget(StarRating::classname(), ['pluginOptions' => ['showClear' => false, 'showCaption' => false, 'step' => 1]]);
?>

        <?php 
echo $form->field($model, 'q10')->widget(StarRating::classname(), ['pluginOptions' => ['showClear' => false, 'showCaption' => false, 'step' => 1]]);
?>

        <?php 
echo $form->field($model, 'comment')->textarea(['rows' => 6]);
?>

        <div class="form-group">
            <?php 
echo Html::submitButton(Yii::t('backend', 'Submit'), ['class' => 'btn btn-success']);
?>
        </div>

        <?php 
ActiveForm::end();
?>
    echo round($endorsement->creativity, 1);
    ?>
</b></center>
	</td>
	</tr>
	
	<tr>
	<td style="padding: 5px;">
	<label class="control-label" for="endorsement-decisiveness">Decisiveness</label>
	</td>
	<?php 
    if ($canRate) {
        ?>
	<td>
	<?php 
        echo $form->field($endorsementmodel, 'decisiveness')->widget(StarRating::classname(), ['pluginOptions' => ['size' => 'xs', 'showCaption' => true], 'pluginEvents' => ["rating.change" => "function() \n\t{ \n\tvar rating = document.getElementById('endorsement-decisiveness').value;\n\tvar friendun = document.getElementById('sofhidid').value;\n\t\$.ajax({\n\t\t\ttype:'POST',\t            \n\t        url:'index.php?r=profile/default/updateendorsement',\n\t\t\tdata:'rating='+rating+'&friendun='+friendun+'&ratefield=decisiveness',\n\t        success:function(data) {\n\t\t\t},\n\t\t\terror:function(jqXHR, textStatus, errorThrown){\n\t\t\talert('error::'+errorThrown);}\n\t        });\n\t}\n\t"]])->label(false);
        ?>
	</td>
	<?php 
    }
    ?>
	<td background="uploads/siteimages/star1.jpg" style="height:55px;width:80px">
	<center><b><?php 
    echo round($endorsement->decisiveness, 1);
    ?>
</b></center>
	</td>
	</tr>
	</table>
	<?php 
    ActiveForm::end();