<?php

$form = $this->beginWidget('ext.PlGrid.PlActiveForm', array(
    'id' => 'call-group-form',
    'gridId' => 'call-group-grid',
    'autoRefreshGrid' => false,
    'afterSaveScript' => 'location.reload();',
    'action' => $model->isNewRecord ? array('create') : array()
        ));

$class = 'span3';
$maxlength = 40;

$this->widget('bootstrap.widgets.TbTabs', array(
    //'type' => 'tabs', // Menu type. Valid values are tabs, pills and list.
    'tabs' => $this->getTabularFormTabs($form, $model, $class, $maxlength),
    'htmlOptions' => array('data-translation-target' => 'QUEUE_TAB_MENU_HEADER_TRANSLATION'),
));

echo $form->errorSummary($model);

if (Yii::app()->user->translateMode) {
    echo '<i data-translation-target="TARGET_ON_TIMEOUT_DROPDOWN" data-translation-id="USERS"></i>';
    echo '<i data-translation-target="TARGET_ON_TIMEOUT_DROPDOWN" data-translation-id="GROUPS"></i>';
    echo '<i data-translation-target="TARGET_ON_TIMEOUT_DROPDOWN" data-translation-id="QUEUES"></i>';
    echo '<i data-translation-target="TARGET_ON_TIMEOUT_DROPDOWN" data-translation-id="IVRS"></i>';
    echo '<i data-translation-target="TARGET_ON_TIMEOUT_DROPDOWN" data-translation-id="CALL_GROUP"></i>';

    echo '<i data-translation-target="TARGET_ON_BUSY_DROPDOWN" data-translation-id="USERS"></i>';
    echo '<i data-translation-target="TARGET_ON_BUSY_DROPDOWN" data-translation-id="GROUPS"></i>';
    echo '<i data-translation-target="TARGET_ON_BUSY_DROPDOWN" data-translation-id="QUEUES"></i>';
    echo '<i data-translation-target="TARGET_ON_BUSY_DROPDOWN" data-translation-id="IVRS"></i>';
    echo '<i data-translation-target="TARGET_ON_BUSY_DROPDOWN" data-translation-id="CALL_GROUP"></i>';

    echo '<i data-translation-target="TARGET_ON_NIGHTCIRCUT_DROPDOWN" data-translation-id="USERS"></i>';
    echo '<i data-translation-target="TARGET_ON_NIGHTCIRCUT_DROPDOWN" data-translation-id="GROUPS"></i>';
    echo '<i data-translation-target="TARGET_ON_NIGHTCIRCUT_DROPDOWN" data-translation-id="QUEUES"></i>';
    echo '<i data-translation-target="TARGET_ON_NIGHTCIRCUT_DROPDOWN" data-translation-id="IVRS"></i>';
    echo '<i data-translation-target="TARGET_ON_NIGHTCIRCUT_DROPDOWN" data-translation-id="CALL_GROUP"></i>';
}

$this->endWidget();
