<commit_before><?php
/**
 * Template Name: Contato
 * @package WordPress
 * @subpackage fat-uerj
 * @since FAT-UERJ 1.0
 */
get_header();
?>
<?php if (have_posts()) while (have_posts()) : the_post(); ?>
    <!-- Main jumbotron for a primary marketing message or call to action -->
    <div class="jumbotron internal">
      <div class="container">
        <div class="row">
          <div class="col-md-12">
              <h3 class="text-uppercase"><?php the_title() ?></h3>
            <ul class="breadcrumb">
                <li><a href="<?php bloginfo("url") ?>">Home</a></li>
              <li class="active"><?php the_title() ?></li>
            </ul>
          </div>
        </div>
      </div>
    </div>

    <div class="container main internal">
      <div class="row">
        <div class="col-md-12">
          <h2 class="text-uppercase page-header"><?php the_title() ?></h2>
          <div class="row">
            <div class="col-md-7">
                <form class="form-horizontal" id="form-contato" method="post">
                  <fieldset>
                    <div class="form-group"><!-- <div class="form-group has-success has-feedback"> -->
                      <label for="inputName" class="col-lg-2 control-label">Nome</label>
                      <div class="col-lg-10">
                        <input type="text" class="form-control" id="inputName" name="nome" placeholder="Digite seu nome...">
                        <!--<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
                        <span id="inputSuccess2Status" class="sr-only">(success)</span>-->
                      </div>
                    </div>
                    <div class="form-group"><!-- <div class="form-group has-error"> -->
                      <label for="inputEmail" class="col-lg-2 control-label">E-mail</label>
                      <div class="col-lg-10">
                        <input type="text" class="form-control" id="inputEmail" name="email" placeholder="Qual seu e-mail?">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="inputTel" class="col-lg-2 control-label">Telefone</label>
                      <small class="col-lg-10 pull-right">Opcional</small>
                      <div class="col-lg-10">
                        <input type="text" class="form-control" id="inputTel" name="telefone" placeholder="Deixe seu telefone conosco">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="select" class="col-lg-2 control-label">Setor</label>
                      <div class="col-lg-10">
                        <select class="form-control" id="select" name="setor">
                          <option value="geral">Geral</option>
                          <option value="secretarias">Secretarias</option>
                          <option value="reitoria">Reitoria</option>
                          <option value="direcao">Direção</option>
                          <option value="administracao">Administração</option>
                          <option value="tesouraria">Tesouraria</option>
                        </select>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="textArea" class="col-lg-2 control-label">Mensagem</label>
                      <div class="col-lg-10">
                        <textarea class="form-control" rows="3" id="textArea" name="mensagem"></textarea>
                        <span class="help-block">Digite uma mensagem de forma clara para que possamos responder o mais brevemente possível.</span>
                      </div>
                    </div>
                    <div class="form-group">
                      <div class="col-xs-3 col-lg-offset-2">
                        <button type="submit" class="btn btn-primary btn-lg">Enviar</button>
                      </div>
                      <div class="col-xs-9 col-lg-7">
                        <!--<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Sua mensagem foi enviada com sucesso!</div>-->
                      </div>
                    </div>
                  </fieldset>
                </form>
            </div>
            <aside class="col-md-5">
              <address>
                <strong>Faculdade de Tecnologia UERJ - Resende</strong><br>
                Rodovia Presidente Dutra km 298 (sentido RJ-SP) - Pólo Industrial Resende/RJ<br>
                CEP: 27.537-000<br>
                Tel: <a href="tel:(24) 3354-7851">(24) 3354-7851</a> / <a href="tel:(24) 3354-7875">(24) 3354-7875</a><br><commit_msg>Finalizando a página de contato, inserindo plugin de validação do jquery e lista de e-mails<commit_after><?php
/**
 * Template Name: Contato
 * @package WordPress
 * @subpackage fat-uerj
 * @since FAT-UERJ 1.0
 */
get_header();
?>

    <script src="<?php echo get_template_directory_uri() ?>/js/jquery.validate.min.js"></script>
	<script>
		jQuery(function($){
			var validator = $("#form-contato").validate({  
				submitHandler: function() {
					$('.alert').addClass('hide');
					$('.send-form').html('<i class="icon-spinner icon-spin icon-large"></i> Enviando');
					
					$.ajax({
						method: "POST",
						url: '/wp-content/themes/fat-uerj/mail.php',
						data: { nome: $('.nome').val(), email: $('.email').val(), telefone: $('.telefone').val(), setor: $('.setor').val(), mensagem: $('.mensagem').val() },
						success: function(data, textStatus, jqXHR) {
							if (data == 'ok') {
								$('.alert-success').removeClass('hide');
								$('.send-form').html('Enviar');
								$('#form-contato').trigger('reset');
								
								$('.has-success').each(function () {
									$(this).removeClass('has-success');
								});
							}
						},
						error: function(jqXHR, textStatus, errorThrown) {
							toastr.warning(textStatus);
						}
					});
				},		
				rules:{     
					nome: {
						required:true,
					},
					email: {  
						required:true,
						email: true,
					},
					mensagem: {
						required:true,
					}
				},
				errorPlacement: function(error,element) {
					return false;
				},
				highlight: function(element, errorClass) {
					var target = $(element).closest('.form-group');
					target.addClass('has-error')
					target.removeClass('has-success');
				},
				unhighlight: function (element, errorClass) {
					var target = $(element).closest('.form-group');
					target.removeClass('has-error');
					target.addClass('has-success');
				}
			});
		});
	</script>

<?php if (have_posts()) while (have_posts()) : the_post(); ?>
    <!-- Main jumbotron for a primary marketing message or call to action -->
    <div class="jumbotron internal">
      <div class="container">
        <div class="row">
          <div class="col-md-12">
              <h3 class="text-uppercase"><?php the_title() ?></h3>
            <ul class="breadcrumb">
                <li><a href="<?php bloginfo("url") ?>">Home</a></li>
              <li class="active"><?php the_title() ?></li>
            </ul>
          </div>
        </div>
      </div>
    </div>

    <div class="container main internal">
      <div class="row">
        <div class="col-md-12">
          <h2 class="text-uppercase page-header"><?php the_title() ?></h2>
          <div class="row">
            <div class="col-md-7">
                <form class="form-horizontal" id="form-contato" method="post">
                  <fieldset>
                    <div class="form-group"><!-- <div class="form-group has-success has-feedback"> -->
                      <label for="inputName" class="col-lg-2 control-label">Nome</label>
                      <div class="col-lg-10">
                        <input type="text" class="form-control nome" id="inputName" name="nome" placeholder="Digite seu nome...">
                        <!--<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
                        <span id="inputSuccess2Status" class="sr-only">(success)</span>-->
                      </div>
                    </div>
                    <div class="form-group"><!-- <div class="form-group has-error"> -->
                      <label for="inputEmail" class="col-lg-2 control-label">E-mail</label>
                      <div class="col-lg-10">
                        <input type="text" class="form-control email" id="inputEmail" name="email" placeholder="Qual seu e-mail?">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="inputTel" class="col-lg-2 control-label">Telefone</label>
                      <small class="col-lg-10 pull-right">Opcional</small>
                      <div class="col-lg-10">
                        <input type="text" class="form-control telefone" id="inputTel" name="telefone" placeholder="Deixe seu telefone conosco">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="select" class="col-lg-2 control-label">Setor</label>
                      <div class="col-lg-10">
                        <select class="form-control setor" id="select" name="setor">
                          <option value="geral">Geral</option>
                          <option value="direcao">Direção</option>
                          <option value="pos">PÓS</option>
                          <option value="departamentos">Departamentos</option>
                        </select>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="textArea" class="col-lg-2 control-label">Mensagem</label>
                      <div class="col-lg-10">
                        <textarea class="form-control mensagem" rows="3" id="textArea" name="mensagem"></textarea>
                        <span class="help-block">Digite uma mensagem de forma clara para que possamos responder o mais brevemente possível.</span>
                      </div>
                    </div>
                    <div class="form-group">
                      <div class="col-xs-3 col-lg-offset-2">
						<button type="submit" class="btn btn-primary btn-lg send-form">Enviar</button>
                      </div>
                      <div class="col-xs-9 col-lg-7">
                        <div class="alert alert-success hide" role="alert"><span class="glyphicon glyphicon-ok"></span> Sua mensagem foi enviada com sucesso!</div>
                      </div>
                    </div>
                  </fieldset>
                </form>
            </div>
            <aside class="col-md-5">
              <address>
                <strong>Faculdade de Tecnologia UERJ - Resende</strong><br>
                Rodovia Presidente Dutra km 298 (sentido RJ-SP) - Pólo Industrial Resende/RJ<br>
                CEP: 27.537-000<br>
                Tel: <a href="tel:(24) 3354-7851">(24) 3354-7851</a> / <a href="tel:(24) 3354-7875">(24) 3354-7875</a><br>
{'fraction_non_alphanumeric': 0.16228265715559517, 'fraction_numerical': 0.01533660276415515, 'mean_word_length': 1.6452830188679246, 'pattern_counts': {'":': 0, '<': 253, '<?xml version=': 0, '>': 253, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '917111', 'n_tokens_mistral': 3590, 'n_tokens_neox': 3135, 'n_words': 637}