<?php
$this->pageTitle=Yii::app()->name . ' - Error';
$this->breadcrumbs=array(
	'Error',
);
?>

<h2>Error <?php echo $code; ?></h2>

<div class="error">
<?php 

echo CHtml::encode($message); 
echo CHtml::submitButton("prevButton", array(
                    'type' => 'htmlSubmit',
                    'value' => 'prev',
                    'label' => __('WIZARD_PREV_BTN'),
                    'name' => 'WizardForm[prev]',
                    'class' => 'btn',
                    'data-translation-id' => 'WIZARD_PREV_BTN',
                    'id' => 'originalPrevBtn',
                    'style' => 'display:none',
                    "disabled" => "disabled"
                    
));

echo CHtml::submitButton("next", array(
                    'type' => 'htmlSubmit',
                    'value' => 'next',
                    'label' => __('WIZARD_NEXT_BTN'),
                    'name' => 'WizardForm[next]',
                    'class' => 'btn btn-primary',
                    'id' => 'originalNextBtn',
                    'data-translation-id' => 'WIZARD_SKIP_BTN',
                    'style' => 'display:none',
                    "disabled" => "disabled"
                ));

echo CHtml::submitButton("skip", array(
                    'type' => 'htmlSubmit',
                    'value' => 'skip',
                    'label' => __('WIZARD_NEXT_BTN'),
                    'name' => 'WizardForm[skip]',
                    'class' => 'btn btn-primary',
                    'id' => 'originalSkipBtn',
                    'data-translation-id' => 'WIZARD_SKIP_BTN',
                    'style' => 'display:none',
                    "disabled" => "disabled"
                ));

?>
</div>
<script>
    $(function () {
        // Handler for .ready() called.
        $('#nextBtn').attr('disabled', $('#originalNextBtn').attr('disabled'));
        $('#prevBtn').attr('disabled', $('#originalPrevBtn').attr('disabled'));
        $('#skipBtn').attr('disabled', $('#originalSkipBtn').attr('disabled'));

        $('#skipBtn').click(function () {
            $('#originalSkipBtn').click();
        });

        $('#nextBtn').click(function () {
            $('#originalNextBtn').click();
        });

        $('#prevBtn').click(function () {
            $('#originalPrevBtn').click();
        });
    });

</script>