<?php

/**
 * User account settings view
 *  
 * @author Lukas Havlicek
 * @version 1.0
 */

$this->headTitle($this->projectName);
$this->placeholder('title')->set($this->t('nastaveni-uctu-f'));
?>

<h1 class="page_title"><?=$this->t('nastaveni-uctu-f')?></h1>
        <h1 class="group_title"><?=$this->t('nastaveni-uctu-f')?></h1>
            <div class="main_inner2">
    			<div class="main_inner">
    			
    				<div class="main_text">
    				    
                        <h2 class="section_heading"><?=$this->t('nastaveni-uctu-f')?></h2>
                        
                        <?php if ($this->msg == 1) : ?>
                        	<div class="info_box"><?=$this->t('ucet-byl-aktualizovan-h')?></div>
                        <?php endif;?>
                        
                        <div class="form_errors">
                        	<?php if (isset($this->errors)) : ?>
                        		<?php foreach ($this->errors as $k => $v) : ?>
                        		 		<?=$this->t('polozka-f')?> "<?=$this->t($k)?>": <?=$this->t($v)?>.<br />
                        		<?php endforeach; ?>
                        	<?php endif; ?>
                        </div>
                        
                        <form action="<?=$this->baseUrl()?>/account" method="post">
	                        <label><?=$this->t('jmeno-f')?>:</label>
			                <input class="short" type="text" name="user_firstname" value="<?=$this->item->user_firstname?>" />
			                <br />
			                
			                <label><?=$this->t('prijmeni-f')?>:</label>
			                <input class="short" type="text" name="user_surname" value="<?=$this->item->user_surname?>" />
			                <br />
			                
			                <label><?=$this->t('e-mail-f')?>:</label>
			                <input class="short" type="text" name="email" value="<?=$this->item->email?>" />
			                <br />
			                
			                <label><?=$this->t('heslo-f')?>:</label>
			                <input class="short" type="password" name="password" />
			                <br />
			                
			                <label><?=$this->t('heslo-znovu-f')?>:</label>
			                <input class="short" type="password" name="password_check" />
			                <br />
			                
			                <input class="checkbox" type="checkbox" name="send_mail" value="1" <?if($this->item->send_mail) echo 'checked="checked"'?> />
			                <label><?=$this->t('chci-zpravy-email-f')?></label>
			                <br />
			                
			                <label><?=$this->t('tyden-zacina-v-f')?>:</label>
			                <select class="short" name="week_start">
			                	<option value="1" <?if($this->item->week_start == 1) echo 'selected="selected"'?>><?=$this->t('pondeli')?></option>
			                	<option value="0" <?if($this->item->week_start == 0) echo 'selected="selected"'?>><?=$this->t('nedeli')?></option>
			                </select>
			                <br />
			                
			                <label><?=$this->t('jazyk-aplikace-f')?>:</label>
			                <select class="short" name="lang">
			                	<option value="cs" <?if($this->item->lang == 'cs') echo 'selected="selected"'?>>čeština</option>
			                	<option value="en" <?if($this->item->lang == 'en') echo 'selected="selected"'?>>english</option>
			                </select>
			                <br />
			                
			                <div class="submit_line">
		                  		<button type="submit" class="inline_button"><?=$this->t('nastavit-btn')?></button>
                        	</div>
                        </form>
                        
                    </div>
    			
    			</div>
			</div>