<?php
/* Smarty version 3.1.30, created on 2018-01-25 03:09:02
  from "C:\xampp\htdocs\decydownik\ajax\proces\newkryterium.tpl" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.30',
  'unifunc' => 'content_5a693c3e581978_37095208',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '8f2cd8695a9ebf9698a788dba9d3c39d5bd86e2f' => 
    array (
      0 => 'C:\\xampp\\htdocs\\decydownik\\ajax\\proces\\newkryterium.tpl',
      1 => 1516460666,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5a693c3e581978_37095208 (Smarty_Internal_Template $_smarty_tpl) {
echo '<script'; ?>
 type="text/javascript">
$(document).on('change','[name=typ_id]',function(){

    switch( $(this).val() )
    {
        case '2':
            $('#kryterium_type2').show();
            $('#kryterium_type3').hide();
        break;
        
        case '3':
            $('#kryterium_type3').show();
            $('#kryterium_type2').hide();
        break;
        
        case '1':
        default:
            $('#kryterium_type2, #kryterium_type3').hide();
        break;
    }
    
});
<?php echo '</script'; ?>
>
<div class="DynamicForms">
        <div class="col-md-8 col-md-offset-2">
            <div class="DecsisionFrame">
                <form action="javascript:;">
                    <input type="hidden" name="mode" value="proces" />
                    <input type="hidden" name="function" value="newkryterium" />
                    <input type="hidden" name="method" value="save" />
                    <input type="hidden" name="temat_id" value="<?php echo $_smarty_tpl->tpl_vars['temat_id']->value;?>
" />
                    <input type="hidden" name="proces_id" value="<?php echo $_smarty_tpl->tpl_vars['ProcesId']->value;?>
" />
                    <div class="AlternativeGroup">
                        <div class="AlternativeQuestion">
                            <div class="form-group">
                                <label>Nazwa</label>
                                <input type="text" name="nazwa" class="form-control" />
                            </div>
                            <div class="form-group">
                                <label>Typ</label>
                                <select name="typ_id" class="form-control">
                                    <option value="">- wybierz -</option>
                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['Typy']->value->Items, 'Typ');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['Typ']->value) {
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['Typ']->value->id;?>
"><?php echo $_smarty_tpl->tpl_vars['Typ']->value->nazwa;?>
</option>
                                    <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
?>

                                </select>
                            </div>
                            <div id="kryterium_type3" class="form-group none">
                                <label>Obrazy</form-group>
                                <select name="Images" class="form-control">
                                    <option value="">- wybierz grupę -</option>
                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['Images']->value->Items, 'Typ');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['Typ']->value) {
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['Typ']->value->nazwa;?>
"><?php echo $_smarty_tpl->tpl_vars['Typ']->value->nazwa;?>
</option>
                                    <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
?>

                                </select>
                            </div> 
                            <div id="kryterium_type2" class="form-group none">
                                <label>Zmienne lingwistyczne</label>
                                <select name="Lingwistyczne" class="form-control">
                                    <option value="">- wybierz grupę -</option>
                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['Lingwistyczne']->value->Items, 'Typ');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['Typ']->value) {
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['Typ']->value->nazwa;?>
"><?php echo $_smarty_tpl->tpl_vars['Typ']->value->nazwa;?>
</option>
                                    <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
?>

                                </select>
                            </div> 
                            <div class="form-group">
                                <label>Hasło terapeuty</label>
                                <input type="password" name="password" class="form-control" />
                            </div>
                            <div class="p10 tac">
                                <a href="javascript:;" class="btn btn-primary DynamicFormSubmit">Zapisz</a>
                            </div>
                            <div class="p10 tac">
                                <small>* - Dodanie nowego kryterium spowoduje usunięcie wprowadzonych danych</small>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
</div><?php }
}
