Ejemplo n.º 1
0
    private function registerAssets()
    {
        $this->getView()->registerJs('
            function changeValueStatusPayment(element){
                var status = $(element).val();

                if (status == "' . self::STATUS_TRANSFER . '") {
                    $(".status_payment").hide();
                    $("#status_payment_" + status).show();
                } else {
                    $(".status_payment").hide();
                }
            }
        ', View::POS_END);
        $this->getView()->registerJs('
            var status = "' . Html::getAttributeValue($this->model, $this->attribute . '[status]') . '";
            $("#status_payment_" + status).show();
        ', View::POS_READY);
    }
Ejemplo n.º 2
0
 /**
  * Function render infomation basic for image
  * @return null|string
  */
 protected function renderInfomation()
 {
     $template = null;
     $galleries = Html::getAttributeValue($this->model, $this->attribute);
     if (!empty($galleries)) {
         $template .= $this->generateGalleryTemplate($galleries, $this->columns, $this->moduleName, $this->attribute, $this->infomationImage, $this->infomationImageDetail);
     }
     return $template;
 }
Ejemplo n.º 3
0
<?php

use hipanel\helpers\StringHelper;
use yii\helpers\ArrayHelper;
use yii\bootstrap\Html;
?>
<div class="input-group">
    <div class="input-group-btn">
        <button type="button" class="btn btn-default iwd-label dropdown-toggle" data-toggle="dropdown">
            <?php 
echo StringHelper::getCurrencySymbol(Html::getAttributeValue($model, $currencyAttributeName));
?>
        </button>
        <button type=button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
            <span class="caret"></span> <span class="sr-only"><?php 
echo Yii::t('hipanel', 'Toggle dropdown');
?>
</span>
        </button>
        <ul class="dropdown-menu">
            <?php 
foreach (ArrayHelper::remove($currencyAttributeOptions, 'items', []) as $k => $v) {
    ?>
                <li>
                    <?php 
    echo Html::a(StringHelper::getCurrencySymbol($k), '#', ['data-value' => $k, 'data-label' => StringHelper::getCurrencySymbol($k)]);
    ?>
                </li>
            <?php 
}
?>
Ejemplo n.º 4
0
 public function run()
 {
     $galleries = Html::getAttributeValue($this->model, $this->attribute);
     return $this->render('gallery', ['moduleName' => $this->moduleName, 'columns' => $this->columns, 'galleries' => $galleries]);
 }