{if $page_lang == 'en'}
    {assign var='ArticleTitle' value=$item->title}
{else}
    {assign var='ArticleTitle' value=$item->titlu_ro}
{/if}
	
<div class="content_page">
		<div class="text">
			<div class="container about pbottom60 ptop30 careers_description">
				<div class="container">
					{if $page_lang === 'en'}
						<h3 class="title">{$item->title}</h3>
					{else}
						<h3 class="title">{$item->title_ro}</h3>
					{/if}
					<p>{$item->category_name} Team, {$item->locatie}</p>
				</div>
			</div>
		</div>
	</div>
	<div class="content_page bgk_gray">
		<div class="text">
			<div class="container about pbottom60 ptop30 careers_description">
				{if $page_lang === 'en'}
					{$item->descriere}
				{else}
					{$item->descriere_ro}
				{/if}
			</div>
		</div>
	</div>
	<div class="content_page">
		<div class="text">
			<div class="container about pbottom60 ptop30 careers_description">
				<div class="container">
				{if $page_lang === 'en'}
					<h3 class="title">Submit your application here</h3>
				{else}
					<h3 class="title">Trimite-ne CV-ul</h3>
				{/if}

				{* Variable traduceri *}
				
				<!-- IF RO -->
				{if $page_lang === 'ro'}

				{* ROMANA *}
				{assign var='careers_fullname' value='Nume Prenume'}
				{assign var='careers_phone' value='Telefon'}
				{assign var='careers_email' value='E-mail'}
				{assign var='careers_social' value='Retele Sociale (LinkedIn, Behance, Other)'}
				{assign var='careers_website' value='Website'}
				{assign var='careers_resume' value='CV'}
				{assign var='careers_coverletter' value='Scrisoare de intentie'}
				{assign var='careers_submit' value='Trimite'}
				
				{else}<!-- ELSE EN -->
				
				{* ENGLEZA *}
				{assign var='careers_fullname' value='Full Name'}
				{assign var='careers_phone' value='Phone'}
				{assign var='careers_email' value='Email'}
				{assign var='careers_social' value='Social (LinkedIn, Behance, Other)'}
				{assign var='careers_website' value='Website'}
				{assign var='careers_resume' value='Resume/CV'}
				{assign var='careers_coverletter' value='Cover Letter'}
				{assign var='careers_submit' value='Apply now'}
				
				{/if}<!-- END IF -->

				{* END Variable traduceri *}
				<form id="careers_form" method="POST" action="careers_process.php" enctype="multipart/form-data" >
            <input type="hidden" name="page_lang" id="page_lang" value="{$page_lang}">
						<input type="hidden" name="job_name" id="job" value="{$item->title}">
					<div class="row">
						<div class="col-sm-6">
							<div class="form-group">
								<input type="text" name="fullname" id="fullname" class="form-control font-size-normal" placeholder="{$careers_fullname}" required>
							</div> <!-- ./form-group -->

							<div class="form-group">
								<input type="text" name="phone" id="phone" class="form-control font-size-normal" placeholder="{$careers_phone}" required>
							</div> <!-- ./form-group -->

							<div class="form-group">
								<input type="text" name="email" id="email" class="form-control font-size-normal" placeholder="{$careers_email}" required>
							</div> <!-- ./form-group -->

							<div class="form-group">
								<input type="text" name="social" id="social" class="form-control font-size-normal" placeholder="{$careers_social}">
							</div> <!-- ./form-group -->
							
              <div class="form-group">
                <input type="text" name="website" id="website" class="form-control font-size-normal" placeholder="{$careers_website}">
              </div> <!-- ./form-group -->

							<div class="form-group">
								<input type="file" name="cv_file" id="cv_file" class="btn btn-default col-sm-6 col-xs-12" required>
                <label for="cv_file" style="font-size: 12px;" class="col-sm-6 col-xs-12"> PDF. Max 5MB</label>
                <div class="clearfix"></div>
							</div> <!-- ./form-group -->
<!-- 
							<div class="input-group">
								<label class="input-group-btn">
									<span class="btn btn-default" style="font-weight:600; color: #ff5900;">
										{$careers_resume}: <input type="file" name="cv_file" required style="display: none;">
									</span>
								</label>
								<input type="text" class="form-control formnone" readonly value="...">
							</div>  -->
              <!-- ./input-group -->

						</div> <!-- ./col-sm-6 -->
						<div class="col-sm-6">
								<div class="form-group">
									<textarea name="coverletter" id="CoverLetter" rows="15" class="form-control" placeholder="{$careers_coverletter}" required></textarea>
								</div>
						</div> <!-- ./col-sm-6 -->
					</div> <!-- ./ROW -->

					<div id="result" class="form-group"></div>
					<div id="error_container" class="hide"></div>
					<div class="form-group text-center">
						<input type="submit" value="{$careers_submit}">
					</div><!-- ./form-group -->

					</form>

			    <script src="{root_url}/js/bootstrapValidator.min.js"></script>
	        <script>
	            $(document).ready(function() {
	                $('#careers_form').bootstrapValidator({
	                    container: '#error_container',
	                    excluded: [':disabled', ':hidden', ':not(:visible)'],
	                    feedbackIcons: {
	                        valid: 'fa fa-check',
	                        invalid: 'fa fa-times',
	                        validating: 'fa fa-refresh'
	                    },
	                    live: 'enabled',
	                    fields: {
	                        phone: { // Nume
	                            validators: {
	                                regexp: {
	                                    regexp: /^[0-9]+$/i,
	                                }
	                            }
	                        },
	                        email: { //Email
	                            validators: {
	                                emailAddress: {}
	                            }
	                        },
                          cv_file: {
                              validators: {
                                file: {
                                    extension: 'pdf',
                                    type: 'application/pdf',
                                    maxSize: 10*1024*1024, {if 'en' === $page_lang}
                                    message: 'Please choose a pdf file with a size less than 10M.' {else}
                                    message: 'Te rugam sa selectezi un fisier PDF de maxim 10MB.' {/if}
                                }
                              }
                          }
	                    } // Fileds Obj.   
	                })
	                .on('success.field.fv', function(e, data) {
	                    if (data.fv.getInvalidFields().length > 0) {    // There is invalid field
	                        data.fv.disableSubmitButtons(true);
	                    }
	                }); //ON function
	            });
	        </script>

				</div>
			</div>
		</div>
	</div>


{assign var='articol_detail_ro' value="/careers/`$item->item_id`/95/`$item->alias`"}
{assign var='articol_detail' value="/careers/`$item->item_id`/80/`$item->alias`"}