<?php
/* Smarty version 3.1.30, created on 2018-02-07 21:05:56
  from "/home/users/spine/public_html/decydownik/admin/user/add.tpl" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.30',
  'unifunc' => 'content_5a7b5c24675486_59025796',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '1d7e7b3f9fc37db60ef1597aa68d1320138598ed' => 
    array (
      0 => '/home/users/spine/public_html/decydownik/admin/user/add.tpl',
      1 => 1517960583,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5a7b5c24675486_59025796 (Smarty_Internal_Template $_smarty_tpl) {
?>
<div class="handler">
 <?php echo statement::display();?>

    <div class="lap p5">
        Dodawanie użytkownika
    </div>
    <?php echo '<script'; ?>
 type="text/javascript">
    $(document).on('change','[name=umode]',function(){
        if( $(this).val() == 'user' )
        {
            $('#SelectTherapist').show();
        } 
        else 
        {
            $('#SelectTherapist').hide(); 
        }
    });
    <?php echo '</script'; ?>
>  
    <form method="post">
        <table class="table">
            <tbody>
                <tr>
                    <td class="typeName">Uprawnienia</td>
                    <td><select class="form-control" name="umode">
                        <option value="">- wybierz -</option>
                        <option value="user">Decydent</option>
                        <option value="admin"<?php if ($_smarty_tpl->tpl_vars['data']->value['mode'] == 'admin') {?> selected="selected"<?php }?>>Administrator</option>
                        <option value="therapist"<?php if ($_smarty_tpl->tpl_vars['data']->value['mode'] == 'therapist') {?> selected="selected"<?php }?>>Terapeuta</option>
                    </select></td>
                </tr>
            </tbody>
            <tbody>
                <tr>
                    <td class="typeName">Imię</td>
                    <td><input type="text" class="form-control" name="firstname" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['firstname'];?>
" /></td>
                </tr>
            </tbody>
            <tbody>
                <tr>
                    <td class="typeName">Nazwisko</td>
                    <td><input type="text" class="form-control" name="lastname" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['lastname'];?>
" /></td>
                </tr>
            </tbody>
            <tbody id="SelectTherapist"<?php if ($_smarty_tpl->tpl_vars['data']->value['mode'] != 'user') {?> class="none"<?php }?>>
                <tr>
                    <td class="typeName">Przydzielony terapeuta</td>
                    <td>
                        <select name="therapist" class="form-control">
                            <option value="">- wybierz -</option>
                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['TherapistList']->value->Items, 'Therapist');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['Therapist']->value) {
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['Therapist']->value->id;?>
"<?php if ($_smarty_tpl->tpl_vars['Therapist']->value->id == $_smarty_tpl->tpl_vars['data']->value['therapist']) {?> selected="true"<?php }?>><?php echo $_smarty_tpl->tpl_vars['Therapist']->value->fullname;?>
</option>
                            <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
?>

                        </select>
                    </td>
                </tr>
            </tbody> 
            <tbody>
                <tr>
                    <td class="typeName">Email</td>
                    <td><input type="text" class="form-control" name="email" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['email'];?>
" /></td>
                </tr>
            </tbody>

            <tbody id="password">
                <tr>
                    <td class="typeName">Hasło</td>
                    <td><input class="form-control" type="password" name="pass" /></td>
                </tr>
                <tr>
                    <td class="typeName">Powtórz hasło</td>
                    <td><input class="form-control" type="password" name="repass" /></td>
                </tr>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="2"><input class="btn btn-primary" type="submit" value="Zapisz" /></td>
                </tr>
            </tfoot>
        </table>
    </form>
</div><?php }
}
