Exemplo n.º 1
0
if ($boxtype->shape) {
    ?>
					<tr>
						<td><?php 
    echo $boxtypeModel->getAttributeLabel('shape');
    ?>
</td>
						<td>
							<?php 
    if ($boxtype->shape == Boxtypes::BOX_SHAPE_OTHER) {
        ?>
								<?php 
        echo Html::encode($boxtype->shape_other);
        ?>
							<?php 
    } elseif (in_array($boxtype->shape, Boxtypes::getChamberBoxtypeModels())) {
        ?>
								<?php 
        echo Boxtypes::getBoxShape($boxtype->shape) . " (" . $boxtype->chamber_count . " " . Yii::t('app', 'kamers') . ")";
        ?>
							<?php 
    } else {
        ?>
								<?php 
        echo Boxtypes::getBoxShape($boxtype->shape);
        ?>
							<?php 
    }
    ?>
						</td>
					</tr>
Exemplo n.º 2
0
			/* Boxtype shape other */
			$(document).on('change', '.boxtype-form #boxtypes-shape', function() {
				if(<?php 
echo Boxtypes::BOX_SHAPE_OTHER;
?>
 == $(this).val()) {
					$('#shape_other_container').show();
				} else {
					$('#shape_other_container').hide();
				}
			});

			/* Boxtype chamber count */
			$(document).on('change', '.boxtype-form #boxtypes-shape', function() {
				var boxtypesWithChambers = <?php 
echo json_encode(Boxtypes::getChamberBoxtypeModels());
?>
;
				if(boxtypesWithChambers.indexOf(parseInt($(this).val())) !== -1) {
					$('#chamber_count_container').show();
				} else {
					$('#chamber_count_container').hide();
				}
			});

			/* Boxtype material other */
			$(document).on('change', '.boxtype-form #boxtypes-material', function() {
				if(<?php 
echo Boxtypes::BOX_MATERIAL_OTHER;
?>
 == $(this).val()) {