<?php echo $header; ?><?php echo $column_left; ?>
<div id="content">
	<div class="page-header">
		<div class="container-fluid">
			<div class="pull-right">
				<button type="submit" form="form-exibir-parcelamento" data-toggle="tooltip" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>
				<a href="<?php echo $cancel; ?>" data-toggle="tooltip" title="<?php echo $button_cancel; ?>" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
			<h1><?php echo $heading_title; ?></h1>
			<ul class="breadcrumb">
				<?php foreach ($breadcrumbs as $breadcrumb) { ?>
				<li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
				<?php } ?>
			</ul>
		</div>
	</div>
	<div class="container-fluid">
		<?php if ($error_warning) { ?>
		<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?>
			<button type="button" class="close" data-dismiss="alert">&times;</button>
		</div>
		<?php } ?>
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title"><i class="fa fa-pencil"></i> <?php echo $text_edit; ?></h3>
			</div>
			<div class="panel-body">

				<div style="margin:0 0 30px 0; padding:10px; background:#d00; color:#fff;">
					<strong style="color:#ff0;">ATENÇÃO!</strong> <strong>Este módulo serve APENAS PARA EXIBIR os valores de parcelamento na página de produtos, mas NÃO habilita nem configura o parcelamento na finalização do pedido!</strong>
					Para habilitar o parcelamento na finalização do pedido, configure o módulo de pagamento desejado (PagSeguro, Bcash, Cielo e etc).
				</div>

				<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form-exibir-parcelamento" class="form-horizontal">

					<div class="row">
						<div class="col-sm-2">
							<ul class="nav nav-pills nav-stacked" id="modules">
								<?php $module_row = 0; ?>
								<?php foreach ($modules as $module) { ?>
								<li><a id="link-tab-module<?php echo $module_row; ?>" href="#tab-module<?php echo $module_row; ?>" data-toggle="tab"><i class="fa fa-minus-circle" onclick="$('#link-tab-module<?php echo $module_row; ?>').parent().remove(); $('#tab-module<?php echo $module_row; ?>').remove(); $('#modules a:first').tab('show');"></i> <?php echo $tab_module_num; ?> <?php echo $module_row + 1; ?></a></li>
								<?php $module_row++; ?>
								<?php } ?>
								<li><a href="#" data-toggle="tab" onclick="addModule(); return false;"><i class="fa fa-plus-circle"></i> <?php echo $tab_module_add; ?></a></li>
							</ul>
						</div>

						<div class="col-sm-10">
							<div class="tab-content">

								<?php $module_row = 0; ?>
								<?php foreach ($modules as $module) { ?>
								<div class="tab-pane" id="tab-module<?php echo $module_row; ?>">
									<div class="form-group">
										<label class="col-sm-2 control-label" for="input-minimo-<?php echo $module_row; ?>"><span data-toggle="tooltip" title="<?php echo $help_minimo; ?>"><?php echo $entry_minimo; ?></span></label>
										<div class="col-sm-10">
											<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][minimo]" value="<?php echo isset($module['minimo']) ? $module['minimo'] : ''; ?>" placeholder="<?php echo $entry_minimo; ?>" id="input-minimo-<?php echo $module_row; ?>" class="form-control" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label" for="input-maximo-parcelas-<?php echo $module_row; ?>"><span data-toggle="tooltip" title="<?php echo $help_maximo_parcelas; ?>"><?php echo $entry_maximo_parcelas; ?></span></label>
										<div class="col-sm-10">
											<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][maximo_parcelas]" value="<?php echo isset($module['maximo_parcelas']) ? $module['maximo_parcelas'] : ''; ?>" placeholder="<?php echo $entry_maximo_parcelas; ?>" id="input-maximo-parcelas-<?php echo $module_row; ?>" class="form-control" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label" for="input-parcelas-sem-juros-<?php echo $module_row; ?>"><span data-toggle="tooltip" title="<?php echo $help_parcelas_sem_juros; ?>"><?php echo $entry_parcelas_sem_juros; ?></span></label>
										<div class="col-sm-10">
											<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][parcelas_sem_juros]" value="<?php echo isset($module['parcelas_sem_juros']) ? $module['parcelas_sem_juros'] : ''; ?>" placeholder="<?php echo $entry_parcelas_sem_juros; ?>" id="input-parcelas-sem-juros-<?php echo $module_row; ?>" class="form-control" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label" for="input-juros-<?php echo $module_row; ?>"><span data-toggle="tooltip" title="<?php echo $help_juros; ?>"><?php echo $entry_juros; ?></span></label>
										<div class="col-sm-10">
											<div class="input-group">
												<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][juros]" value="<?php echo isset($module['juros']) ? $module['juros'] : ''; ?>" placeholder="<?php echo $entry_juros; ?>" id="input-juros-<?php echo $module_row; ?>" class="form-control" />
												<div class="input-group-addon">%</div>
											</div>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label" for="input-tipo-juros-<?php echo $module_row; ?>"><span data-toggle="tooltip" title="<?php echo $help_tipo_juros; ?>"><?php echo $entry_tipo_juros; ?></span></label>
										<div class="col-sm-10">
											<select name="exibir_parcelamento_config[<?php echo $module_row; ?>][tipo_juros]" id="input-tipo-juros-<?php echo $module_row; ?>" class="form-control">
												<option value="2" <?php if (isset($module['tipo_juros']) && $module['tipo_juros'] == '2') { echo('selected'); } ?> ><?php echo $text_calculo_juros_2; ?></option>
												<option value="1" <?php if (isset($module['tipo_juros']) && $module['tipo_juros'] == '1') { echo('selected'); } ?> ><?php echo $text_calculo_juros_1; ?></option>
												<option value="0" <?php if (isset($module['tipo_juros']) && $module['tipo_juros'] == '0') { echo('selected'); } ?> ><?php echo $text_calculo_juros_0; ?></option>
											</select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label" for="input-parcela-minima-<?php echo $module_row; ?>"><span data-toggle="tooltip" title="<?php echo $help_parcela_minima; ?>"><?php echo $entry_parcela_minima; ?></span></label>
										<div class="col-sm-10">
											<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][parcela_minima]" value="<?php echo isset($module['parcela_minima']) ? $module['parcela_minima'] : ''; ?>" placeholder="<?php echo $entry_parcela_minima; ?>" id="input-parcela-minima-<?php echo $module_row; ?>" class="form-control" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label" for="input-listagem-<?php echo $module_row; ?>"><span data-toggle="tooltip" title="<?php echo $help_listagem; ?>"><?php echo $entry_listagem; ?></span></label>
										<div class="col-sm-10">
											<select name="exibir_parcelamento_config[<?php echo $module_row; ?>][listagem]" id="input-listagem-<?php echo $module_row; ?>" class="form-control">
												<option value="1" <?php if (isset($module['listagem']) && $module['listagem'] == '1') { echo('selected'); } ?> ><?php echo $text_yes; ?></option>
												<option value="0" <?php if (isset($module['listagem']) && $module['listagem'] == '0') { echo('selected'); } ?> ><?php echo $text_no; ?></option>
											</select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label" for="input-resumo-sem-juros-<?php echo $module_row; ?>"><span data-toggle="tooltip" title="<?php echo $help_resumo_sem_juros; ?>"><?php echo $entry_resumo_sem_juros; ?></span></label>
										<div class="col-sm-10">
											<select name="exibir_parcelamento_config[<?php echo $module_row; ?>][resumo_sem_juros]" id="input-resumo-sem-juros-<?php echo $module_row; ?>" class="form-control">
												<option value="1" <?php if (isset($module['resumo_sem_juros']) && $module['resumo_sem_juros'] == '1') { echo('selected'); } ?> ><?php echo $text_yes; ?></option>
												<option value="0" <?php if (isset($module['resumo_sem_juros']) && $module['resumo_sem_juros'] == '0') { echo('selected'); } ?> ><?php echo $text_no; ?></option>
											</select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label" for="input-status-<?php echo $module_row; ?>"><?php echo $entry_status; ?></label>
										<div class="col-sm-10">
											<select name="exibir_parcelamento_config[<?php echo $module_row; ?>][status]" id="input-status-<?php echo $module_row; ?>" class="form-control">
												<option value="0" <?php if (isset($module['status']) && $module['status'] == '0') { echo('selected'); } ?> ><?php echo $text_disabled; ?></option>
												<option value="1" <?php if (isset($module['status']) && $module['status'] == '1') { echo('selected'); } ?> ><?php echo $text_enabled; ?></option>
											</select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label" for="input-sort-order-<?php echo $module_row; ?>"><?php echo $entry_sort_order; ?></label>
										<div class="col-sm-10">
											<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][sort_order]" value="<?php echo isset($module['sort_order']) ? $module['sort_order'] : ''; ?>" placeholder="<?php echo $entry_sort_order; ?>" id="input-sort-order-<?php echo $module_row; ?>" class="form-control" />
										</div>
									</div>

									<br>

									<div class="form-group">
										<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_a_vista; ?>"><?php echo $entry_texto_a_vista; ?></span></label>
										<div class="col-sm-10">
											<?php foreach ($languages as $language) { ?>
												<div class="input-group">
													<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>
													<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][texto_a_vista][<?php echo $language['language_id']; ?>]" value="<?php echo isset($module['texto_a_vista'][$language['language_id']]) ? $module['texto_a_vista'][$language['language_id']] : ''; ?>" placeholder="<?php echo $text_texto_a_vista_padrao; ?>" class="form-control" />
												</div>
											<?php } ?>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_sem_juros; ?>"><?php echo $entry_texto_sem_juros; ?></span></label>
										<div class="col-sm-10">
											<?php foreach ($languages as $language) { ?>
												<div class="input-group">
													<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>
													<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][texto_sem_juros][<?php echo $language['language_id']; ?>]" value="<?php echo isset($module['texto_sem_juros'][$language['language_id']]) ? $module['texto_sem_juros'][$language['language_id']] : ''; ?>" placeholder="<?php echo $text_texto_sem_juros_padrao; ?>" class="form-control" />
												</div>
											<?php } ?>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_com_juros; ?>"><?php echo $entry_texto_com_juros; ?></span></label>
										<div class="col-sm-10">
											<?php foreach ($languages as $language) { ?>
												<div class="input-group">
													<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>
													<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][texto_com_juros][<?php echo $language['language_id']; ?>]" value="<?php echo isset($module['texto_com_juros'][$language['language_id']]) ? $module['texto_com_juros'][$language['language_id']] : ''; ?>" placeholder="<?php echo $text_texto_com_juros_padrao; ?>" class="form-control" />
												</div>
											<?php } ?>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_descricao_lista; ?>"><?php echo $entry_descricao_lista; ?></span></label>
										<div class="col-sm-10">
											<?php foreach ($languages as $language) { ?>
												<div class="input-group">
													<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>
													<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][descricao_lista][<?php echo $language['language_id']; ?>]" value="<?php echo isset($module['descricao_lista'][$language['language_id']]) ? $module['descricao_lista'][$language['language_id']] : ''; ?>" placeholder="<?php echo $text_descricao_lista_padrao; ?>" class="form-control" />
												</div>
											<?php } ?>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_descricao_titulo; ?>"><?php echo $entry_descricao_titulo; ?></span></label>
										<div class="col-sm-10">
											<?php foreach ($languages as $language) { ?>
												<div class="input-group">
													<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>
													<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][descricao_titulo][<?php echo $language['language_id']; ?>]" value="<?php echo isset($module['descricao_titulo'][$language['language_id']]) ? $module['descricao_titulo'][$language['language_id']] : ''; ?>" placeholder="<?php echo $text_descricao_titulo_padrao; ?>" class="form-control" />
												</div>
											<?php } ?>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_link; ?>"><?php echo $entry_texto_link; ?></span></label>
										<div class="col-sm-10">
											<?php foreach ($languages as $language) { ?>
												<div class="input-group">
													<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>
													<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][texto_link][<?php echo $language['language_id']; ?>]" value="<?php echo isset($module['texto_link'][$language['language_id']]) ? $module['texto_link'][$language['language_id']] : ''; ?>" placeholder="<?php echo $text_texto_link_padrao; ?>" class="form-control" />
												</div>
											<?php } ?>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_titulo_tabela; ?>"><?php echo $entry_titulo_tabela; ?></span></label>
										<div class="col-sm-10">
											<?php foreach ($languages as $language) { ?>
												<div class="input-group">
													<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>
													<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][titulo_tabela][<?php echo $language['language_id']; ?>]" value="<?php echo isset($module['titulo_tabela'][$language['language_id']]) ? $module['titulo_tabela'][$language['language_id']] : ''; ?>" placeholder="<?php echo $text_titulo_tabela_padrao; ?>" class="form-control" />
												</div>
											<?php } ?>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_descricao_tabela; ?>"><?php echo $entry_descricao_tabela; ?></span></label>
										<div class="col-sm-10">
											<?php foreach ($languages as $language) { ?>
												<div class="input-group">
													<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>
													<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][descricao_tabela][<?php echo $language['language_id']; ?>]" value="<?php echo isset($module['descricao_tabela'][$language['language_id']]) ? $module['descricao_tabela'][$language['language_id']] : ''; ?>" placeholder="<?php echo $text_descricao_tabela_padrao; ?>" class="form-control" />
												</div>
											<?php } ?>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_juros; ?>"><?php echo $entry_texto_juros; ?></span></label>
										<div class="col-sm-10">
											<?php foreach ($languages as $language) { ?>
												<div class="input-group">
													<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>
													<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][texto_juros][<?php echo $language['language_id']; ?>]" value="<?php echo isset($module['texto_juros'][$language['language_id']]) ? $module['texto_juros'][$language['language_id']] : ''; ?>" placeholder="<?php echo $text_texto_juros_padrao; ?>" class="form-control" />
												</div>
											<?php } ?>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_parcela_minima; ?>"><?php echo $entry_texto_parcela_minima; ?></span></label>
										<div class="col-sm-10">
											<?php foreach ($languages as $language) { ?>
												<div class="input-group">
													<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>
													<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][texto_parcela_minima][<?php echo $language['language_id']; ?>]" value="<?php echo isset($module['texto_parcela_minima'][$language['language_id']]) ? $module['texto_parcela_minima'][$language['language_id']] : ''; ?>" placeholder="<?php echo $text_texto_parcela_minima_padrao; ?>" class="form-control" />
												</div>
											<?php } ?>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_observacoes; ?>"><?php echo $entry_texto_observacoes; ?></span></label>
										<div class="col-sm-10">
											<?php foreach ($languages as $language) { ?>
												<div class="input-group">
													<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>
													<input type="text" name="exibir_parcelamento_config[<?php echo $module_row; ?>][texto_observacoes][<?php echo $language['language_id']; ?>]" value="<?php echo isset($module['texto_observacoes'][$language['language_id']]) ? $module['texto_observacoes'][$language['language_id']] : ''; ?>" placeholder="<?php echo $text_texto_observacoes_padrao; ?>" class="form-control" />
												</div>
											<?php } ?>
										</div>
									</div>
								</div>
								<?php $module_row++; ?>
								<?php } ?>

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

				</form>

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

<script type="text/javascript"><!--
var module_row = <?php echo $module_row; ?>;

function addModule() {
	html  = '<div class="tab-pane" id="tab-module' + module_row + '">';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label" for="input-minimo-' + module_row + '"><span data-toggle="tooltip" title="<?php echo $help_minimo; ?>"><?php echo $entry_minimo; ?></span></label>';
	html += '		<div class="col-sm-10">';
	html += '			<input type="text" name="exibir_parcelamento_config[' + module_row + '][minimo]" value="0.00" placeholder="<?php echo $entry_minimo; ?>" id="input-minimo-' + module_row + '" class="form-control" />';
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label" for="input-maximo-parcelas-' + module_row + '"><span data-toggle="tooltip" title="<?php echo $help_maximo_parcelas; ?>"><?php echo $entry_maximo_parcelas; ?></span></label>';
	html += '		<div class="col-sm-10">';
	html += '			<input type="text" name="exibir_parcelamento_config[' + module_row + '][maximo_parcelas]" value="12" placeholder="<?php echo $entry_maximo_parcelas; ?>" id="input-maximo-parcelas-' + module_row + '" class="form-control" />';
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label" for="input-parcelas-sem-juros-' + module_row + '"><span data-toggle="tooltip" title="<?php echo $help_parcelas_sem_juros; ?>"><?php echo $entry_parcelas_sem_juros; ?></span></label>';
	html += '		<div class="col-sm-10">';
	html += '			<input type="text" name="exibir_parcelamento_config[' + module_row + '][parcelas_sem_juros]" value="3" placeholder="<?php echo $entry_parcelas_sem_juros; ?>" id="input-parcelas-sem-juros-' + module_row + '" class="form-control" />';
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label" for="input-juros-' + module_row + '"><span data-toggle="tooltip" title="<?php echo $help_juros; ?>"><?php echo $entry_juros; ?></span></label>';
	html += '		<div class="col-sm-10">';
	html += '			<div class="input-group">';
	html += '				<input type="text" name="exibir_parcelamento_config[' + module_row + '][juros]" value="2.99" placeholder="<?php echo $entry_juros; ?>" id="input-juros-' + module_row + '" class="form-control" />';
	html += '				<div class="input-group-addon">%</div>';
	html += '			</div>';
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label" for="input-tipo-juros-' + module_row + '"><span data-toggle="tooltip" title="<?php echo $help_tipo_juros; ?>"><?php echo $entry_tipo_juros; ?></span></label>';
	html += '		<div class="col-sm-10">';
	html += '			<select name="exibir_parcelamento_config[' + module_row + '][tipo_juros]" id="input-tipo-juros-' + module_row + '" class="form-control">';
	html += '				<option value="2"><?php echo $text_calculo_juros_2; ?></option>';
	html += '				<option value="1"><?php echo $text_calculo_juros_1; ?></option>';
	html += '				<option value="0"><?php echo $text_calculo_juros_0; ?></option>';
	html += '			</select>';
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label" for="input-parcela-minima-' + module_row + '"><span data-toggle="tooltip" title="<?php echo $help_parcela_minima; ?>"><?php echo $entry_parcela_minima; ?></span></label>';
	html += '		<div class="col-sm-10">';
	html += '			<input type="text" name="exibir_parcelamento_config[' + module_row + '][parcela_minima]" value="5.00" placeholder="<?php echo $entry_parcela_minima; ?>" id="input-parcela-minima-' + module_row + '" class="form-control" />';
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label" for="input-listagem-' + module_row + '"><span data-toggle="tooltip" title="<?php echo $help_listagem; ?>"><?php echo $entry_listagem; ?></span></label>';
	html += '		<div class="col-sm-10">';
	html += '			<select name="exibir_parcelamento_config[' + module_row + '][listagem]" id="input-listagem-' + module_row + '" class="form-control">';
	html += '				<option value="1"><?php echo $text_yes; ?></option>';
	html += '				<option value="0"><?php echo $text_no; ?></option>';
	html += '			</select>';
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label" for="input-resumo-sem-juros-' + module_row + '"><span data-toggle="tooltip" title="<?php echo $help_resumo_sem_juros; ?>"><?php echo $entry_resumo_sem_juros; ?></span></label>';
	html += '		<div class="col-sm-10">';
	html += '			<select name="exibir_parcelamento_config[' + module_row + '][resumo_sem_juros]" id="input-resumo-sem-juros-' + module_row + '" class="form-control">';
	html += '				<option value="1"><?php echo $text_yes; ?></option>';
	html += '				<option value="0"><?php echo $text_no; ?></option>';
	html += '			</select>';
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label" for="input-status-' + module_row + '"><?php echo $entry_status; ?></label>';
	html += '		<div class="col-sm-10">';
	html += '			<select name="exibir_parcelamento_config[' + module_row + '][status]" id="input-status-' + module_row + '" class="form-control">';
	html += '				<option value="0"><?php echo $text_disabled; ?></option>';
	html += '				<option value="1"><?php echo $text_enabled; ?></option>';
	html += '			</select>';
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label" for="input-sort-order-' + module_row + '"><?php echo $entry_sort_order; ?></label>';
	html += '		<div class="col-sm-10">';
	html += '			<input type="text" name="exibir_parcelamento_config[' + module_row + '][sort_order]" value="" placeholder="<?php echo $entry_sort_order; ?>" id="input-sort-order-' + module_row + '" class="form-control" />';
	html += '		</div>';
	html += '	</div>';

	html += '	<br>';

	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_a_vista; ?>"><?php echo $entry_texto_a_vista; ?></span></label>';
	html += '		<div class="col-sm-10">';
	<?php foreach ($languages as $language) { ?>
	html += '				<div class="input-group">';
	html += '					<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>';
	html += '					<input type="text" name="exibir_parcelamento_config[' + module_row + '][texto_a_vista][<?php echo $language['language_id']; ?>]" value="<?php echo $text_texto_a_vista_padrao; ?>" placeholder="<?php echo $text_texto_a_vista_padrao; ?>" class="form-control" />';
	html += '				</div>';
	<?php } ?>
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_sem_juros; ?>"><?php echo $entry_texto_sem_juros; ?></span></label>';
	html += '		<div class="col-sm-10">';
	<?php foreach ($languages as $language) { ?>
	html += '				<div class="input-group">';
	html += '					<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>';
	html += '					<input type="text" name="exibir_parcelamento_config[' + module_row + '][texto_sem_juros][<?php echo $language['language_id']; ?>]" value="<?php echo $text_texto_sem_juros_padrao; ?>" placeholder="<?php echo $text_texto_sem_juros_padrao; ?>" class="form-control" />';
	html += '				</div>';
	<?php } ?>
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_com_juros; ?>"><?php echo $entry_texto_com_juros; ?></span></label>';
	html += '		<div class="col-sm-10">';
	<?php foreach ($languages as $language) { ?>
	html += '				<div class="input-group">';
	html += '					<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>';
	html += '					<input type="text" name="exibir_parcelamento_config[' + module_row + '][texto_com_juros][<?php echo $language['language_id']; ?>]" value="<?php echo $text_texto_com_juros_padrao; ?>" placeholder="<?php echo $text_texto_com_juros_padrao; ?>" class="form-control" />';
	html += '				</div>';
	<?php } ?>
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_descricao_lista; ?>"><?php echo $entry_descricao_lista; ?></span></label>';
	html += '		<div class="col-sm-10">';
	<?php foreach ($languages as $language) { ?>
	html += '				<div class="input-group">';
	html += '					<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>';
	html += '					<input type="text" name="exibir_parcelamento_config[' + module_row + '][descricao_lista][<?php echo $language['language_id']; ?>]" value="<?php echo $text_descricao_lista_padrao; ?>" placeholder="<?php echo $text_descricao_lista_padrao; ?>" class="form-control" />';
	html += '				</div>';
	<?php } ?>
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_descricao_titulo; ?>"><?php echo $entry_descricao_titulo; ?></span></label>';
	html += '		<div class="col-sm-10">';
	<?php foreach ($languages as $language) { ?>
	html += '				<div class="input-group">';
	html += '					<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>';
	html += '					<input type="text" name="exibir_parcelamento_config[' + module_row + '][descricao_titulo][<?php echo $language['language_id']; ?>]" value="<?php echo $text_descricao_titulo_padrao; ?>" placeholder="<?php echo $text_descricao_titulo_padrao; ?>" class="form-control" />';
	html += '				</div>';
	<?php } ?>
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_link; ?>"><?php echo $entry_texto_link; ?></span></label>';
	html += '		<div class="col-sm-10">';
	<?php foreach ($languages as $language) { ?>
	html += '				<div class="input-group">';
	html += '					<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>';
	html += '					<input type="text" name="exibir_parcelamento_config[' + module_row + '][texto_link][<?php echo $language['language_id']; ?>]" value="<?php echo $text_texto_link_padrao; ?>" placeholder="<?php echo $text_texto_link_padrao; ?>" class="form-control" />';
	html += '				</div>';
	<?php } ?>
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_titulo_tabela; ?>"><?php echo $entry_titulo_tabela; ?></span></label>';
	html += '		<div class="col-sm-10">';
	<?php foreach ($languages as $language) { ?>
	html += '				<div class="input-group">';
	html += '					<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>';
	html += '					<input type="text" name="exibir_parcelamento_config[' + module_row + '][titulo_tabela][<?php echo $language['language_id']; ?>]" value="<?php echo $text_titulo_tabela_padrao; ?>" placeholder="<?php echo $text_titulo_tabela_padrao; ?>" class="form-control" />';
	html += '				</div>';
	<?php } ?>
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_descricao_tabela; ?>"><?php echo $entry_descricao_tabela; ?></span></label>';
	html += '		<div class="col-sm-10">';
	<?php foreach ($languages as $language) { ?>
	html += '				<div class="input-group">';
	html += '					<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>';
	html += '					<input type="text" name="exibir_parcelamento_config[' + module_row + '][descricao_tabela][<?php echo $language['language_id']; ?>]" value="<?php echo $text_descricao_tabela_padrao; ?>" placeholder="<?php echo $text_descricao_tabela_padrao; ?>" class="form-control" />';
	html += '				</div>';
	<?php } ?>
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_juros; ?>"><?php echo $entry_texto_juros; ?></span></label>';
	html += '		<div class="col-sm-10">';
	<?php foreach ($languages as $language) { ?>
	html += '				<div class="input-group">';
	html += '					<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>';
	html += '					<input type="text" name="exibir_parcelamento_config[' + module_row + '][texto_juros][<?php echo $language['language_id']; ?>]" value="<?php echo $text_texto_juros_padrao; ?>" placeholder="<?php echo $text_texto_juros_padrao; ?>" class="form-control" />';
	html += '				</div>';
	<?php } ?>
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_parcela_minima; ?>"><?php echo $entry_texto_parcela_minima; ?></span></label>';
	html += '		<div class="col-sm-10">';
	<?php foreach ($languages as $language) { ?>
	html += '				<div class="input-group">';
	html += '					<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>';
	html += '					<input type="text" name="exibir_parcelamento_config[' + module_row + '][texto_parcela_minima][<?php echo $language['language_id']; ?>]" value="<?php echo $text_texto_parcela_minima_padrao; ?>" placeholder="<?php echo $text_texto_parcela_minima_padrao; ?>" class="form-control" />';
	html += '				</div>';
	<?php } ?>
	html += '		</div>';
	html += '	</div>';
	html += '	<div class="form-group">';
	html += '		<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_texto_observacoes; ?>"><?php echo $entry_texto_observacoes; ?></span></label>';
	html += '		<div class="col-sm-10">';
	<?php foreach ($languages as $language) { ?>
	html += '				<div class="input-group">';
	html += '					<span class="input-group-addon"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /></span>';
	html += '					<input type="text" name="exibir_parcelamento_config[' + module_row + '][texto_observacoes][<?php echo $language['language_id']; ?>]" value="<?php echo $text_texto_observacoes_padrao; ?>" placeholder="<?php echo $text_texto_observacoes_padrao; ?>" class="form-control" />';
	html += '				</div>';
	<?php } ?>
	html += '		</div>';
	html += '	</div>';
	html += '</div>';

	$('#form-exibir-parcelamento').find('.tab-content').append(html);

	$('#modules').find('li:last-child').before('<li><a id="link-tab-module' + module_row + '" href="#tab-module' + module_row + '" data-toggle="tab"><i class="fa fa-minus-circle" onclick="$(\'#link-tab-module' + module_row + '\').parent().remove(); $(\'#tab-module' + module_row + '\').remove(); $(\'#modules a:first\').tab(\'show\');"></i> <?php echo $tab_module_num; ?> ' + (module_row + 1) + '</li>');

	var $last_link_tab = $('#link-tab-module' + module_row);

	setTimeout(function(){
		$last_link_tab.tab('show');
		$('#modules').find('li:last-child a').blur();
	}, 100);

	module_row++;
}

$('#modules').find('a:first').tab('show');

<?php if ($module_row == 0) { ?>
	addModule();
<?php } ?>
//--></script>

<?php echo $footer; ?>