<!DOCTYPE html>
<html>
<head>
	<title>Bootstrap 101 Template</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- Bootstrap -->
	<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
	<link href="css/bootstrap-select.min.css" rel="stylesheet" media="screen">
	<link href="css/bootstrap-fileupload.min.css" rel="stylesheet" media="screen">
    <script src="http://code.jquery.com/jquery-1.7.1.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/bootstrap-select.min.js"></script>
	<script src="js/bootstrap-fileupload.min.js"></script>
	<script src="js/bootstrap-inputmask.min.js"></script>
    <script src="validation/assets/js/jquery.validate.js"></script>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<script>
	
$(document).ready(function() {
	$('select').selectpicker();
	
	$("#CopyExperience").click(function(){
		$("#origExperience .area").clone().appendTo("#toCopyExperience");
	});	
	$('.RemoveExperience').live('click', function() {
		$(this).parent().remove();		
	});		
	$("#CopyEducation").click(function(){
		$("#origEducation .area").clone().appendTo("#toCopyEducation");
	});	
	$('.RemoveEducation').live('click', function() {
		$(this).parent().remove();		
	});	
	$('pre').addClass('prettyprint linenums');
				

 $('#cvForm').validate(	{
	rules: {		
		inputEmail: {
			required: true,
			email: true
		},
		inputLastName: {
			minlength: 2,
			required: true
		},
		inputStreet: {
			minlength: 2,
			required: true
		},

		inputZipCode: {
			minlength: 2,
			required: true
		},		
		inputCity: {
			minlength: 2,
			required: true
		},		
		inputPhone: {
			minlength: 2,
			required: true
		},		
		
		inputFirstName: {
			minlength: 2,
			required: true
		},
		inputCheck: {
			required: true
		},	
		inputDate: {
			minlength: 2,		
			required: true
		},	
		
	},
	highlight: function(element) {
		$(element).closest('.control-group').removeClass('success').addClass('error');
	},
	success: function(element) {
		element
		.text('OK!').addClass('valid')
		.closest('.control-group').removeClass('error').addClass('success');
	}
});	
	
	
});
</script>
<style>
	legend {
    	margin-bottom:5px;
	}
	textarea{
	 	width:270px;
	}
    label.valid {
    	width: 24px;
    	height: 24px;
    	background: url(validation/assets/img/valid.png) center center no-repeat;
    	display: inline-block;
    	text-indent: -9999px;
    }
    label.error {
    	font-weight: normal;
    	color: red;
    	padding: 2px 8px;
    	margin-top: 2px;
    }
	.form-horizontal .control-group{
		margin-bottom:10px;
	}	
</style>
<div class="container">
<? if($_POST){ ?>

<h4 class="text-success">Dziękujemy za wysłanie swojego CV !</h4>

<? /* 
<address>
	<strong><? echo $_POST['inputFirstName']; ?> <? echo $_POST['inputLastName']; ?></strong><br>
	Data urodzenia: <? echo $_POST['inputDate']; ?><br>
	Stanowisko do aplikowania: <? echo $_POST['inputPosition']; ?>
</address>
<address>
<strong>Adres</strong>:<br>
	<? echo $_POST['inputStreet']; ?><br>
	<? echo $_POST['inputZipCode']; ?> <? echo $_POST['inputCity']; ?> , woj. <? echo $_POST['selectState']; ?>
</address>
<address>
	<strong>Kontakt</strong>:<br>
	tel. <? echo $_POST['inputPhone']; ?><br>
	e-mail <a href="mailto:<? echo $_POST['inputEmail']; ?>"><? echo $_POST['inputEmail']; ?></a>
</address>
<address>
	<strong>Wykształcenie</strong>:<br>
    <?
	$count =  count($_POST['EducationlTitle']);
	for($i=0;$i<$count;$i++)
	{
		if($i > 0) echo '<br><br>';	
		echo '<span class="text-info">'.$_POST['EducationSchool'][$i]."</span><br>";
		echo 'od '. $_POST['EducationFrom'][$i]." do ".$_POST['EducationTo'][$i]."<br>";
		echo 'Kierunek: '.$_POST['EducationTarget'][$i]."<br>";
		echo 'Uzyskany tytuł: '.$_POST['EducationlTitle'][$i];
	}	
	if($count == 0) echo '<em>Brak</em>';	
	?>
</address>
<address>
	<strong>Doświadczenie zawodowe</strong>:<br>
    <?
	unset($count);
	$count =  count($_POST['ExperienceWork']);
	for($i=0;$i<$count;$i++)
	{
		if($i > 0) echo '<br><br>';	
		echo '<span class="text-info">'.$_POST['ExperiencePosition'][$i]."</span><br>";
		echo 'od '. $_POST['ExperienceFrom'][$i]." do ".$_POST['ExperienceTo'][$i]."<br>";
		echo 'Zakład Pracy: '.$_POST['ExperienceWork'][$i]."<br>";
		echo 'Obowiązki: '.$_POST['ExperienceDuty'][$i];
	}
	if($count == 0) echo '<em>Brak</em>';	
	?>
</address>
<address>
	<strong>Dodatkowe informacje</strong>:<br>
	<? echo $_POST['inputExtraInfo']; ?>
</address>

<address>
	<strong>Oczekiwane wynagrodzenie</strong>:<br>
	<? echo $_POST['inputPrice']; ?>
</address>
*/ ?>
<? } else { ?>


<form action="" class="form-horizontal" id="cvForm" method="post">
<fieldset>
    <legend>Dane podstawowe</legend>
    <div class="control-group">
        <label class="control-label" for="inputFirstName">Imię:</label>
        <div class="controls">
        	<input type="text" id="inputFirstName" name="inputFirstName"  class="input-xlarge"  placeholder="Imie">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="inputLastName">Nazwisko:</label>
        <div class="controls">
        	<input type="text" id="inputLastName" name="inputLastName"  class="input-xlarge" placeholder="Nazwisko">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Data urodzenia:</label>
        <div class="controls">
        	<input type="text" id="inputDate"  name="inputDate" class="input-xlarge" data-mask="99-99-9999" placeholder="Data urodzenia DD-MM-RRRR">
        </div>
    </div> 
    <div class="control-group">
        <label class="control-label" for="inputPosition">Stanowisko na które aplikujesz:</label>
        <div class="controls">
            <select name="inputPosition" id="inputPosition">
            	<option value="opiekun/ka osób starszych">opiekun/ka osób starszych</option>
                <option value="opieka nad dziećmi">opieka nad dziećmi</option>
                <option value="pomoc domowa">pomoc domowa</option>
            </select>  
        </div>
    </div>       
</fieldset>
<fieldset>
    <legend>Dane teleadresowe</legend>
    <div class="control-group">
        <label class="control-label" for="inputState">Województwo:</label>
        <div class="controls">
            <select name="selectState"  id="selectState">
                <option>dolnośląskie</option>
                <option>kujawsko-pomorskie</option>
                <option>lubelskie</option>
                <option>lubuskie</option>
                <option>łódzkie</option>
                <option>małopolskie</option>
                <option>mazowieckie</option>
                <option>opolskie</option>
                <option>podkarpackie</option>
                <option>podlaskie</option>
                <option>pomorskie</option>
                <option>śląskie</option>
                <option>świętokrzyskie</option>
                <option>warmińsko-mazurskie</option>
                <option>wielkopolskie</option>
                <option>zachodniopomorskie</option>
            </select>  
        </div>
    </div>   
    <div class="control-group">
        <label class="control-label" for="inputStreet">Ulica:</label>
        <div class="controls">
        	<input type="text"  id="inputStreet" name="inputStreet" class="input-xlarge" placeholder="Ulica">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="inputZipCode">Kod Pocztowy:</label>
        <div class="controls">
        	<input type="text"  id="inputZipCode" name="inputZipCode" data-mask="99-999" class="input-xlarge" placeholder="Kod Pocztowy">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="inputCity">Miejscowość:</label>
        <div class="controls">
        	<input type="text"  id="inputCity" name="inputCity" class="input-xlarge" placeholder="Miejscowość">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="inputPhone">Telefon:</label>
        <div class="controls">
        	<input type="text"  id="inputPhone" name="inputPhone" class="input-xlarge" placeholder="Telefon">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="inputPhone">E-mail:</label>
        <div class="controls">
        	<input type="text" id="inputEmail" name="inputEmail" class="input-xlarge" placeholder="E-mail">
        </div>
    </div>
</fieldset>
<fieldset>
    <legend>Doświadczenie zawodowe   <span id="CopyExperience" class="btn btn-small btn-success">dodaj <i class="icon-plus-sign"></i></span></legend>  
    <div id="toCopyExperience"></div>   
</fieldset>
<fieldset style="margin-top:20px;">
    <legend>Wykształcenie <span id="CopyEducation" class="btn btn-small btn-success">dodaj <i class="icon-plus-sign"></i></span></legend>  
    <div id="toCopyEducation"></div>  
</fieldset>

<fieldset style="margin-top:20px;">
    <legend>Dodatkowe</legend>
    <div class="control-group">
        <label class="control-label">Zdjęcie:</label>
        <div class="controls">
            <div class="fileupload fileupload-new" data-provides="fileupload">
                <div class="fileupload-new thumbnail" style="width: 120px; height: 120px;"><img src="img/avatar.png" /></div>
                <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 120px; max-height: 120px; line-height: 20px;"></div>
                <div>
                <span class="btn btn-file"><span class="fileupload-new">Wybierz zdjęcie</span><span class="fileupload-exists">Zmień</span><input type="file" /></span>
                <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Usuń</a>
                </div>
            </div>              
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Dodatkowe informacje :</label>
        <div class="controls">
        	<textarea rows="3" name="inputExtraInfo" placeholder = "przebyte kursy i szkolenia, dodatkowe uprawnienia, prawo jazdy kat. B itp."></textarea>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Wynagrodzenie:</label>
        <div class="controls">
        	<input type="text" name="inputPrice"  class="input-xlarge" placeholder="Oczekiwane wynagrodzenie netto:">
        </div>
    </div>    
    
    <div class="control-group">
        <label class="control-label"></label>
        <div class="controls">
        	<input type="checkbox" id="inputCheck" name="inputCheck">
            <span style="font-size:11px; padding-left:3px;">Wyrażam zgodę na przetwarzanie moich danych osobowych dla potrzeb niezbęd­nych do real­iza­cji pro­cesu rekru­tacji (zgod­nie z Ustawą z dnia 29.08.1997 roku o Ochronie Danych Osobowych; tekst jed­no­lity: Dz. U. z 2002r. Nr 101, poz. 926 ze zm.).</span>
        </div>
    </div> 
</fieldset>  

<input class="btn btn-large btn-primary" type="submit" value="Wyślij wypełnione CV">
</form>
<? } ?>
</div> <!-- /container -->







<div style="display:none;"> 

<div id="origEducation">
	<div class="area">
    <div class="control-group">
        <label class="control-label">Okres:</label>
        <div class="controls">
            od <input type="text"  name="EducationFrom[]" data-mask="9999" class="input-mini" placeholder="2013">
            do <input type="text"  name="EducationTo[]" data-mask="9999" class="input-mini" placeholder="2013">
        </div>
    </div>   
    <div class="control-group">
        <label class="control-label">Nazwa szkoły/uczelni:</label>
        <div class="controls">
            <input type="text" name="EducationSchool[]" class="input-xlarge" placeholder="Nazwa szkoły/uczelni">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Kierunek:</label>
        <div class="controls">
            <input type="text" name="EducationTarget[]"  class="input-xlarge" placeholder="Kierunek">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Uzyskany tytuł:</label>
        <div class="controls">
        	<input type="text" name="EducationlTitle[]" class="input-xlarge" placeholder = "Uzyskany tytuł">
        </div>
    </div> 
    <span class="RemoveEducation btn btn-mini btn-danger">usuń <i class="icon-remove"></i></span>
   	<hr>
    </div>    
</div>


<div id="origExperience">
	<div class="area">
    <div class="control-group">
        <label class="control-label" for="inputFirstName">Okres:</label>
        <div class="controls">
            od <input type="text"  name="ExperienceFrom[]" data-mask="9999" class="input-mini" placeholder="2013">
            do <input type="text"  name="ExperienceTo[]" data-mask="9999" class="input-mini" placeholder="2013">
        </div>
    </div>   
    <div class="control-group">
        <label class="control-label">Nazwa zakładu pracy:</label>
        <div class="controls">
            <input type="text" name="ExperienceWork[]" class="input-xlarge" placeholder="Nazwa zakładu pracy">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Stanowisko:</label>
        <div class="controls">
            <input type="text" name="ExperiencePosition[]" class="input-xlarge" placeholder="Stanowisko">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Zakres obowiązków:</label>
        <div class="controls">
            <textarea name="ExperienceDuty" placeholder="Zakres obowiązków" class="input-xlarge"></textarea>    
        </div>
    </div> 
    <span class= "RemoveExperience btn btn-mini btn-danger">usuń <i class="icon-remove"></i></span>
   	<hr>
    </div>    
</div>



</div>
</body>
</html>