<?php
echo $form->checkBoxRow($model, 'hasAdditionalData', array(
    'data-translation-id' => 'GATEWAY_MODEL_CALLER_ID_IN_FROM',
    )
);

echo $form->checkBoxRow($model, 'register', array(
    'data-translation-id' => 'GATEWAY_MODEL_REGISTER',
    'data-translation-target' => 'REGISTER_ATTRIBUTE',
    "data-default-tab" => $tabIndex
));

echo $form->textFieldRow($model, 'name', array(
        'class' => 'span3',
        'maxlength' => 255,
        'data-translation-target' => 'GATEWAY_FORM_NAME',
        "data-default-tab" => $tabIndex,
    )
);


echo $form->textFieldRow($model, 'host', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_HOST',
    'data-translation-target' => 'HOST_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->textFieldRow($model, 'authname', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_AUTHNAME',
    'data-translation-target' => 'AUTHNAME_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->textFieldRow($model, 'authusername', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_AUTHUSERNAME',
    'data-translation-target' => 'AUTHUSERNAME_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);


echo $form->textFieldRow($model, 'secret', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_SECRET',
    'data-translation-target' => 'SECRET_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->checkBoxRow($model, 'dialOutToggle', array(
    'data-translation-id' => 'GATEWAY_MODEL_DIAL_OUT_TOGGLE',
    'data-translation-target' => 'DIAL_OUT_TOGGLE_ATTRIBUTE',
    "data-default-tab" => $tabIndex
));

echo $form->textFieldRow($model, 'std_prefix', array(
    'data-translation-id' => 'GATEWAY_MODEL_STD_PREFIX',
    'data-translation-target' => 'STD_PREFIX_ATTRIBUTE',
    "data-default-tab" => $tabIndex
));

echo $form->checkBoxRow($model, 'caller_id_in_from', array(
    'data-translation-id' => 'GATEWAY_MODEL_CALLER_ID_IN_FROM',
    'data-translation-target' => 'CALLER_ID_IN_FROM_ATTRIBUTE',
    "data-default-tab" => $tabIndex
    )
);

echo $form->checkBoxRow($model, 'did_in_to', array(
    'data-translation-id' => 'GATEWAY_MODEL_DID_IN_TO',
    'data-translation-target' => 'DID_IN_TO_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->textFieldRow($model, 'expire_seconds', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_EXPIRE_SECONDS',
    'data-translation-target' => 'EXPIRE_SECONDS_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->textFieldRow($model, 'realm', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_REALM',
    'data-translation-target' => 'REALM_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->textFieldRow($model, 'from_user', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_FROM_USER',
    'data-translation-target' => 'FROM_USER_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->textFieldRow($model, 'from_domain', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_FROM_DOMAIN',
    'data-translation-target' => 'FROM_DOMAIN_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->textFieldRow($model, 'proxy', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_PROXY',
    'data-translation-target' => 'PROXY_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->textFieldRow($model, 'register_proxy', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_REGISTER_PROXY',
    'data-translation-target' => 'REGISTER_PROXY_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->textFieldRow($model, 'contact_params', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_CONTACT_PARAMS',
    'data-translation-target' => 'CONTACT_PARAMS_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->checkBoxRow($model, 'tcp_transport', array(
    'data-translation-id' => 'GATEWAY_MODEL_TCP_TRANSPORT',
    'data-translation-target' => 'TCP_TRANSPORT_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->checkBoxRow($model, 'tls_transport', array(
        'data-translation-id' => 'GATEWAY_MODEL_TLS_TRANSPORT',
        'data-translation-target' => 'TLS_TRANSPORT_ATTRIBUTE',
        "data-default-tab" => $tabIndex
    )
);

echo $form->checkBoxRow($model, 'force_srtp', array(
        'data-translation-id' => 'GATEWAY_MODEL_FORCE_SRTP',
        'data-translation-target' => 'FORCE_SRTP_ATTRIBUTE',
        "data-default-tab" => $tabIndex
    )
);

echo $form->textFieldRow($model, 'allowed_codecs', array(
    'data-translation-id' => 'GATEWAY_MODEL_ALLOWED_CODECS',
    'data-translation-target' => 'FORCE_SRTP_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->dropDownListRow(
            $model, 't38Mode', $model->t38ModeListData(), array(
            'class' => 'span3',
            'data-translation-id' => 'GATEWAY_MODEL_T_38_MODE',
            'data-translation-target' => 'T_38_MODE_ATTRIBUTE',
            "data-default-tab" => $tabIndex
        )
    );

echo $form->dropDownListRow(
    $model, 'sip_cid_type', $model->cidTypeListData(), array(
        'class' => 'span3',
        'data-translation-id' => 'GATEWAY_MODEL_SIP_CID_TYPE',
        'data-translation-target' => 'GATEWAY_MODEL_SIP_CID_TYPE_TRANSLATION_TARGET',
        "data-default-tab" => $tabIndex
    )
);

if (PhonalisaLicenseManager::routingScriptExtensionMax() !== 0) {
    echo $form->dropDownListRow(
            $model, 'scriptExtension', ScriptExtension::model()->listData, array(
        'class' => 'span3',
        'data-translation-id' => 'USER_MODEL_SCRIPT_EXTENSION',
        'data-translation-target' => 'SCRIPT_EXTENSION_ATTRIBUTE',
        "data-default-tab" => $tabIndex
            )
    );
}

echo $form->textFieldRow($model, 'ping', array(
    'class' => 'span3',
    'maxlength' => 255,
    'data-translation-id' => 'GATEWAY_MODEL_PING',
    'data-translation-target' => 'PING_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->checkBoxRow($model, 'calldeflect_support', array(
    'data-translation-id' => 'GATEWAY_MODEL_CALLDEFLECT_SUPPORT',
    'data-translation-target' => 'CALLDEFLECT_SUPPORT_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->checkBoxRow($model, 'answer_on_outbound_dial', array(
    'data-translation-id' => 'GATEWAY_MODEL_ANSWER_ON_OUTBOUND_DIAL',
    'data-translation-target' => 'ANSWER_ON_OUTBOUND_DIAL_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->checkBoxRow($model, 'extension_in_contact', array(
    'data-translation-id' => 'GATEWAY_MODEL_EXTENSION_IN_CONTACT',
    'data-translation-target' => 'EXTENSION_IN_CONTACT_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->checkBoxRow($model, 'clip_no_screening', array(
    'data-translation-id' => 'GATEWAY_MODEL_CLIP_NO_SCREENING',
    'data-translation-target' => 'CLIP_NO_SCREENING_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->dropDownListRow(
    $model, 'number_format_cid', $model->numberFormatListData(), array(
        'class' => 'span3',
        'data-translation-id' => 'GATEWAY_MODEL_NUMBER_FORMAT_CID',
        'data-translation-target' => 'GATEWAY_MODEL_NUMBER_FORMAT_CID_TRANSLATION_TARGET',
        "data-default-tab" => $tabIndex
    )
);

echo $form->dropDownListRow(
    $model, 'number_format_cid_inbound', $model->numberFormatListData(), array(
        'class' => 'span3',
        'data-translation-id' => 'GATEWAY_MODEL_NUMBER_FORMAT_CID_INBOUND',
        'data-translation-target' => 'GATEWAY_MODEL_NUMBER_FORMAT_CID_INBOUND_TRANSLATION_TARGET',
        "data-default-tab" => $tabIndex
    )
);

echo $form->dropDownListRow(
    $model, 'number_format_target', $model->numberFormatListData(), array(
        'class' => 'span3',
        'data-translation-id' => 'GATEWAY_MODEL_NUMBER_FORMAT_TARGET',
        'data-translation-target' => "GATEWAY_MODEL_NUMBER_FORMAT_TARGET_TRANSLATION_TARGET",
        "data-default-tab" => $tabIndex
    )
);

echo $form->dropDownListRow(
    $model, 'number_format_target_emergency', $model->emergencyNumberFormatListData(), array(
        'class' => 'span3',
        'data-translation-id' => 'GATEWAY_MODEL_NUMBER_FORMAT_TARGET_EMERGENCY',
        'data-translation-target' => "GATEWAY_MODEL_NUMBER_FORMAT_TARGET_TRANSLATION_TARGET",
        "data-default-tab" => $tabIndex
    )
);

echo $form->dropDownListRow(
    $model, 'number_format_target_inbound', $model->numberFormatListData(), array(
        'class' => 'span3',
        'data-translation-id' => 'GATEWAY_MODEL_NUMBER_FORMAT_TARGET_INBOUND',
        'data-translation-target' => "GATEWAY_MODEL_NUMBER_FORMAT_TARGET_TRANSLATION_TARGET_INBOUND",
        "data-default-tab" => $tabIndex
    )
);

echo $form->dropDownListRow(
    $model, 'clir_mode', $model->clirModeListData(), array(
        'class' => 'span3',
        'data-translation-id' => 'GATEWAY_MODEL_CLIR_MODE',
        'data-translation-target' => 'GATEWAY_MODEL_CLIR_MODE_TRANSLATION_TARGET',
        "data-default-tab" => $tabIndex
    )
);

echo $form->checkBoxRow($model, 'answer_on_outbound_dial_on_call_forward', array(
    'data-translation-id' => 'GATEWAY_MODEL_ANSWER_ON_OUTBOUND_DIAL_ON_CALL_FORWARD',
    'data-translation-target' => 'ANSWER_ON_OUTBOUND_DIAL_ON_CALL_FORWARD_ATTRIBUTE',
    "data-default-tab" => $tabIndex
        )
);

echo $form->textFieldRow($model, 'unset_sip_headers', array(
        'class' => 'span3',
        'maxlength' => 255,
        'data-translation-id' => 'GATEWAY_MODEL_UNSET_SIP_HEADERS',
        'data-translation-target' => 'UNSET_SIP_HEADERS_ATTRIBUTE',
        "data-default-tab" => $tabIndex
    )
);

echo $form->textAreaRow($model, 'set_sip_headers', array(
        'class' => 'span3',
        'maxlength' => 255,
        'data-translation-id' => 'GATEWAY_MODEL_SET_SIP_HEADERS',
        "data-default-tab" => $tabIndex
    )
);

echo $form->dropDownListRow(
    $model, 'did_header', $model->didHeaderListData(), array(
        'class' => 'span3',
        'data-translation-id' => 'GATEWAY_MODEL_DID_HEADER',
        'data-translation-target' => 'GATEWAY_MODEL_DID_HEADER_TRANSLATION_TARGET',
        "data-default-tab" => $tabIndex
    )
);

echo $form->textFieldRow($model, 'did_header_regex', array(
        'class' => 'span3',
        'maxlength' => 255,
        'data-translation-id' => 'GATEWAY_MODEL_DID_HEADER_REGEX',
        'data-translation-target' => 'DID_HEADER_REGEX_ATTRIBUTE',
        "data-default-tab" => $tabIndex
    )
);

echo $form->dropDownListRow(
    $model, 'cid_header_inbound', $model->cidHeaderListData(), array(
        'class' => 'span3',
        'data-translation-id' => 'GATEWAY_MODEL_CID_HEADER_INBOUND',
        'data-translation-target' => 'GATEWAY_MODEL_CID_HEADER_INBOUND_TRANSLATION_TARGET',
        "data-default-tab" => $tabIndex
    )
);


echo $form->textFieldRow($model, 'cid_header_regex_inbound', array(
        'class' => 'span3',
        'maxlength' => 255,
        'data-translation-id' => 'GATEWAY_MODEL_CID_HEADER_REGEX_INBOUND',
        'data-translation-target' => 'CID_HEADER_REGEX_INBOUND_ATTRIBUTE',
        "data-default-tab" => $tabIndex
    )
);

echo $form->textFieldRow($model, 'meta1', array(
        'class' => 'span3',
        'maxlength' => 255,
        'data-translation-id' => 'GATEWAY_MODEL_META1',
        'data-translation-target' => 'GATEWAY_MODEL_META1',
        "data-default-tab" => $tabIndex
    )
);


echo $form->checkBoxRow($model, 'debug', array(
        'data-translation-id' => 'GATEWAY_MODEL_DUMP_DEBUG_VARS',
        'data-translation-target' => 'DUMP_DEBUG_VARS_ATTRIBUTE',
        "data-default-tab" => $tabIndex
    )
);

echo $form->checkBoxRow($model, 'allow_unauth_calls_from_this_host', array(
        'data-translation-id' => 'GATEWAY_ALLOW_UNAUTH_CALLS_FROM_THIS_HOST',
        "data-default-tab" => $tabIndex
    )
);

echo $this->renderPartial("_locationInput", array("model" => $model, "form" => $form, 'label' => $model->getAttributeLabel('intl_prefix'), "tabIndex" => $tabIndex));
