<!-- Edit this file to change the layout of the detail view print preview page -->


<div class="panel-heading"><h3 class="panel-title">
	<strong><%%DETAIL_VIEW_TITLE%%></strong>
	<div class="hidden-print pull-right">
		<div class="btn-group">
			<button type="button" id="print" onclick="window.print();" title="<%%TRANSLATION(Print)%%>" class="btn btn-primary"><i class="glyphicon glyphicon-print"></i> <%%TRANSLATION(Print)%%></button>
			<button type="submit" id="back" title="<%%TRANSLATION(Cancel Printing)%%>" class="btn btn-default"><i class="glyphicon glyphicon-remove-circle"></i> <%%TRANSLATION(Cancel Printing)%%></button>
		</div>
	</div>
	<div class="clearfix"></div>
</h3></div>

<div class="panel-body">
	<fieldset class="form-horizontal">
		<!-- Field: Nip -->
		<div class="form-group trabalhadores-id" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Nip</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(id)%%></div>
			</div>
		</div>
		<!-- Field: Nome -->
		<div class="form-group trabalhadores-nome" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Nome</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(nome)%%></div>
			</div>
		</div>
		<!-- Field: Sobrenome -->
		<div class="form-group trabalhadores-sobrenome" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Sobrenome</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(sobrenome)%%></div>
			</div>
		</div>
		<!-- Field: Data de nascimento -->
		<div class="form-group trabalhadores-datanascimento" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Data de nascimento</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%COMBOTEXT(datanascimento)%%></div>
			</div>
		</div>
		<!-- Field: Bi -->
		<div class="form-group trabalhadores-bi" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Bi</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(bi)%%></div>
			</div>
		</div>
		<!-- Field: Ensino -->
		<div class="form-group trabalhadores-ensino" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Ensino</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(ensino)%%></div>
			</div>
		</div>
		<!-- Field: Profiss&#227;o -->
		<div class="form-group trabalhadores-profissao" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Profiss&#227;o</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(profissao)%%></div>
			</div>
		</div>
		<!-- Field: Cargo -->
		<div class="form-group trabalhadores-cargo" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Cargo</label>
			<div class="col-xs-9">
				<div class="form-control-static"><span id="cargo<%%RND1%%>"><%%COMBOTEXT(cargo)%%></span></div>
			</div>
		</div>
		<!-- Field: Salario base -->
		<div class="form-group trabalhadores-salario" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Salario base</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(salario)%%></div>
			</div>
		</div>
		<!-- Field: Salario ganho -->
		<div class="form-group trabalhadores-salario1" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Salario ganho</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(salario1)%%></div>
			</div>
		</div>
		<!-- Field: Iban -->
		<div class="form-group trabalhadores-iban" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Iban</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(iban)%%></div>
			</div>
		</div>
	</fieldset>
</div>
<script>
	$j(function() {
		// render read-only checkboxes in DVP
		$j('form input[type=checkbox]:not(.hidden):checked')
			.addClass('hidden')
			.after('<i class="glyphicon glyphicon-check"></i>');
		$j('form input[type=checkbox]:not(.hidden):not(:checked)')
			.addClass('hidden')
			.after('<i class="glyphicon glyphicon-unchecked"></i>')
	})
</script>
<!-- child records -->
<div class="panel-body">
	<div id="trabalhadores-children"></div>
</div>

<script>
	$j(function() {
		/* prevent loading child records in multiple DVP */
		if($j('[id=trabalhadores-children]').length > 1) return;

		post(
			'parent-children.php', {
				ParentTable: 'trabalhadores',
				SelectedID: '<%%VALUE(id)%%>',
				Operation: 'show-children-printable'
			},
			'trabalhadores-children',
			'disable-element',
			'loading-element',
			apply_persisting_children
		);

		$j('form').on('click', '#children-tabs button[data-target]', function() {
			$j(this).toggleClass('active');
			persist_expanded_child($j(this).attr('id'));
		});
	})
</script>

