<?php

$regexPattern = CHtml::checkBox(
                $data['id'], !empty($data['regEx'][0]) && !empty($data['regEx'][1]), [
            'class' => 'toggleRegExField',
            'onchange' => "toogleRegExField(this)"
        ]);
$regexPattern .= '<div class = regEx>s/ ';
$regexPattern .= CHtml::textField(
                $data['id'], $data['regEx'][0], [
            'class' => 'regExSearchField',
            'style' => 'width:60px;',
            'placeholder' => __('ADMIN_LDAP_INTERFACE_REGEX_PLACEHOLDER'),
            'disabled' => empty($data['regEx'][0]) && empty($data['regEx'][1])
                ]
);
$regexPattern .= ' / ' . CHtml::textField(
                $data['id'], $data['regEx'][1], [
            'class' => 'regExReplaceField',
            'style' => 'width:60px;',
            'placeholder' => __('ADMIN_LDAP_INTERFACE_REGEX_PLACEHOLDER'),
            'disabled' => empty($data['regEx'][0]) && empty($data['regEx'][1])
                ]
);
$regexPattern .= ' /g</div>';

echo $regexPattern;
