<commit_before>
  <link href="/stylesheets/bootstrap-form.css" rel="stylesheet">
  <link href="/stylesheets/semantic-modal.css" rel="stylesheet">
  <link href="/stylesheets/dimmer.min.css" rel="stylesheet">
  <link href="/stylesheets/transition.min.css" rel="stylesheet">
  <script src="/js/jquery.3.0.1.min.js"></script>
  <script src="/js/jquery.validate.min.js"></script>
  <script src="/js/tinymce.min.js"></script>

<style>
  .navbar-fixed-top, .navbar-fixed-bottom {
      position: absolute !important;
      right: 0;
      left: 0;
      z-index: 0;
  }
</style>
  <!--CSS styles that ensure your typeform takes up all the available screen space (DO NOT EDIT!)-->
  <!--<style type="text/css">
    html{
      margin: 0;
      height: 100%;
      overflow: hidden;
    }
    iframe{
      position: absolute;
      left:0;
      right:0;
      bottom:0;
      top:0;
      border:0;
    }
  </style>-->

  <div class="container auth">
    <div id="big-form" class="auth-box">
      <h1>Post a Job</h1>
      <form id="job-form">
        <fieldset>

          <div class="form-group">
            <div class="">
              <input id="job_title" name="job_title" placeholder="Job Title" class="form-control input-md" type="text" maxlength="55" required>
            </div>
          </div>

          <div class="form-group row">
            <label for="job_type" class="col-sm-4 col-md-4 control-label margin-sm-bottom">Job Type</label>

            <div class="col-sm-12 col-md-12">
                <div id="radioBtn" class="btn-group">
                  <a name="job_type" class="btn btn-primary btn-sm active" data-toggle="job_type" data-title="Full-time">Full-time</a>
                  <a name="job_type" class="btn btn-primary btn-sm notActive" data-toggle="job_type" data-title="Part-time">Part-time</a>
                  <a name="job_type" class="btn btn-primary btn-sm notActive" data-toggle="job_type" data-title="Contract">Contract</a>
                  <a name="job_type" class="btn btn-primary btn-sm notActive border-radius-right" data-toggle="job_type" data-title="Freelance">Freelance</a>
                <input type="hidden" name="job_type" id="job_type" value="Full-time">
              </div>
            </div>
          </div>

          <div class="form-group row">
            <label for="location_type" class="col-sm-4 col-md-4 control-label">Location Type</label>
            <div class="col-sm-12 col-md-12">
                <div id="radioBtn" class="btn-group">
                  <a name="location_type" class="btn btn-primary btn-sm active" data-toggle="location_type" data-title="Remote">Remote</a>
                  <a name="location_type" class="btn btn-primary btn-sm border-radius-right notActive" data-toggle="location_type" data-title="OnSite">OnSite</a>
                <input type="hidden" name="location_type" id="location_type" value="Remote">
              </div>
            </div>
          </div>

          <div class="form-group">
            <label class=" control-label" for="textarea">Job Description</label>
            <div class="">
              <textarea class="form-control tinyedotor1" id="job-description" name="job_description" value="" required></textarea>
            </div>
          </div>
          <br>
          <div class="form-group">
            <div class="">
              <input id="company_name" name="company_name" placeholder="Company name" class="form-control input-md" type="text" maxlength="55" required>
            </div>
        </div>
        <br>
        <div class="form-group">
            <div class="">
              <input id="company_url" name="company_url" placeholder="Company URL (optional)" class="form-control input-md" type="url" maxlength="200" required>
            </div>
        </div>
        <br>
        <div class="form-group">
            <div class="">
              <input id="company_location" name="company_location" placeholder="Company Location" class="form-control input-md" type="text" maxlength="55" required>
            </div>
        </div>
        <br>
        <div class="form-group">
          <label class=" control-label" for="textarea">Company Description (optional)</label>
          <div class="">
            <textarea class="form-control" id="company-description" name="company_description" value=""></textarea>
          </div>
        </div>
        <br>
        <div class="form-group">
          <label class=" control-label" for="textarea">How can people apply to this job?</label>
          <div class="">
            <textarea class="form-control tinyedotor2" id="company-apply" name="company_apply" value="" required></textarea>
          </div>
        </div>
        <input class="btn asp-violet white submit-button" type="button"  value="Preview and Submit"  />
        </fieldset>
      </form>
    </div>
    <div class="clearfix"></div>
  </div>
  <!--<iframe id="typeform-full" width="100%" height="100%" frameborder="0" src="https://angrydevelopers.typeform.com/to/lJFA8E"></iframe>-->
  <!--<script type="text/javascript" src="https://s3-eu-west-1.amazonaws.com/share.typeform.com/embed.js"></script>-->
  <script src="/js/bootstrap-form.js" rel="stylesheet"></script>
  <script src="/js/semantic-modal.js"></script>
  <script src="/js/dimmer.min.js"></script>
  <script src="/js/transition.min.js"></script>
  <script src="/js/mustache.min.js"></script>

<!-- Modal -->
<div id="modaldiv"  class="ui modal background-none">
  <center><h2 class="white">Preview</h2></center>
    <div class="mustache-template">
    </div>
    <div class="splash-content text-center ng-scope">
      <h1><i class="fa fa-hand-paper-o white"></i></h1>
      <p class="lead ng-binding white" ng-bind="message">Are you sure you want to submit the job post?</p>
      <div id="submit-modal" class="btn btn-lg btn-success outline margin-md-horizontal submit-modal" submit="">
        <i class="fa fa-check"></i> Submit
      </div>
      <div id="close-modal" class="btn btn-lg btn-warning outline margin-md-horizontal">
        <i class="fa fa-ban">
          </i> Cancel
      </div>
  </div>
</div>


<div id="loading-modal"  class="ui modal background-none">
  <div class="splash-content text-center ng-scope">
    <div name="postSpinner">
        <div class="spinner-container">
          <div class="spinner">
            <div class="double-bounce1"></div>
            <div class="double-bounce2"></div>
          </div>
      </div>
    </div>
  </div>
</div>

<div id="thanks-modal"  class="ui modal background-none">
  <div class="splash-content text-center ng-scope">
    <h1>
      <i class="fa fa-thumbs-o-up white"></i></h1>
      <p class="lead ng-binding white" ng-bind="message">
        Thanks for your time!</p>
        <div class="btn btn-lg btn-primary outline submit-thanks-button">
          Done
        </div>
  </div>
</div>




<script id="job-detail-template" type="text/x-mustache-template">
  <div class="container margin-md template">
      <div class="row">
        <section class="col-md-8 col-md-offset-1 job-post  backgound-white">
          <div>
            <h1>{{job.job_title}}</h1>
            <p>
              <span class="light-gray">at </span>
              {{#if job.company_url}}
                <a target="_blank" href="/{{job.company_url}}">
                  <b class="sub-title">{{job.company_name}}</b>
                </a>
              {{else}}
                <b class="sub-title">{{job.company_name}}</b>
              {{/if}}
              <span class="light-gray"> in </span>
              <b class="sub-title">{{job.company_location}}</b>

            </p>
            <p>Job Post - {{formatDateTime job.metadata.date_submit "l"}}</p>
            <p>
              <span class="badge asp-violet badge-radio thin">{{job.job_type}}</span>
              <span class="badge asp-violet badge-radio thin">

              {{#ifeq job.location_type 'Remote'}}
                <i class="fa fa-wifi thin"></i>
              {{else}}
                <i class="fa fa-briefcase thin"></i>
              {{/ifeq}}
              {{job.location_type}}</span>
            </p>
            <legend></legend>
          </div>

          <p>{{{job.job_description}}}</p>

          {{#if job.company_description}}
            <h3 class="margin-bottom-none">Company</h3>
            <p>
                {{{job.company_description}}}
            </p>
          {{/if}}
          {{#if job.company_apply}}
            <h3 class="margin-bottom-none">How to apply</h3>
            <p>
                {{{job.company_apply}}}
            </p>
          {{/if}}

          {{#if job.company_url}}
            <div class="col-xs-12 margin-md">

              <center >
                <a class=" btn btn-info asp-violet text-center" href="{{job.company_url}}" target="_blank">Apply for this position</a>
              </center>
            </div>
          {{/if}}
        </section>
      </div>
    </div>
</script>


    <script>
        // $("#job-form").validate();
        $("#job-form").validate_bootstrap();


        tinymce.init({
            selector: "textarea",
            theme: "modern",
            plugins: [
                "advlist autolink lists link image charmap preview hr anchor pagebreak",
                "searchreplace wordcount visualblocks visualchars fullscreen",
                "insertdatetime media nonbreaking save table contextmenu directionality",
                "emoticons template paste textcolor colorpicker textpattern imagetools"
            ],
            toolbar1: "preview insertfile undo redo | styleselect | bold italic forecolor backcolor emoticons | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media ",
            image_advtab: true,
            templates: [
                {title: 'Test template 1', content: 'Test 1'},
                {title: 'Test template 2', content: 'Test 2'}
            ],
            setup: function(ed){
                var edt = ed;
                ed.on('blur', function(e) {

                    $("#"+this.id).html( tinyMCE.activeEditor.getContent() );
                });
            }
        });



        $(".submit-button").click(function(){

          $('#modaldiv').modal("show");
          //  $('.ui.modal').dimmer('show');


          if(!$('.tinyedotor1').html()){
            $('.tinyedotor1').focus();
            $('html, body').animate({
                scrollTop: $(".tinyedotor1").parent().offset().top
            }, 0);
          }

          if(!$('.tinyedotor2').html()){
            $('.tinyedotor2').focus();
            $('html, body').animate({
                  scrollTop: $(".tinyedotor2").parent().offset().bottom
              }, 0);
          }

        });

        $("#close-modal").click(function(){
          // console.log("modal");
          $('#modaldiv').modal("hide");

        });

        $(".submit-modal").click(function(){
          $('#modaldiv').hide();
          $('#loading-modal').modal("show");

          $.post("/jobs/new", $('form').serialize())
          .success(function(response){
              $('#loading-modal').modal("hide");
              console.log(response)
              if(response.success){
                setTimeout(function(){
                  $('#loading-modal').html($("#thanks-modal").html());
                  $(".submit-thanks-button").click(function(){
                    window.location = "/";
                  });
                },1200)

              }

            }).error(function(response){
              $("#thanks-modal").modal("show");
            });
        });



      </script>
<commit_msg>Added icons for remote and onsite in the insert jobs.<commit_after>
  <link href="/stylesheets/bootstrap-form.css" rel="stylesheet">
  <link href="/stylesheets/semantic-modal.css" rel="stylesheet">
  <link href="/stylesheets/dimmer.min.css" rel="stylesheet">
  <link href="/stylesheets/transition.min.css" rel="stylesheet">
  <script src="/js/jquery.3.0.1.min.js"></script>
  <script src="/js/jquery.validate.min.js"></script>
  <script src="/js/tinymce.min.js"></script>

<style>
  .navbar-fixed-top, .navbar-fixed-bottom {
      position: absolute !important;
      right: 0;
      left: 0;
      z-index: 0;
  }
</style>
  <!--CSS styles that ensure your typeform takes up all the available screen space (DO NOT EDIT!)-->
  <!--<style type="text/css">
    html{
      margin: 0;
      height: 100%;
      overflow: hidden;
    }
    iframe{
      position: absolute;
      left:0;
      right:0;
      bottom:0;
      top:0;
      border:0;
    }
  </style>-->

  <div class="container auth">
    <div id="big-form" class="auth-box">
      <h1>Post a Job</h1>
      <form id="job-form">
        <fieldset>

          <div class="form-group">
            <div class="">
              <input id="job_title" name="job_title" placeholder="Job Title" class="form-control input-md" type="text" maxlength="55" required>
            </div>
          </div>

          <div class="form-group row">
            <label for="job_type" class="col-sm-4 col-md-4 control-label margin-sm-bottom">Job Type</label>

            <div class="col-sm-12 col-md-12">
                <div id="radioBtn" class="btn-group">
                  <a name="job_type" class="btn btn-primary btn-sm active" data-toggle="job_type" data-title="Full-time">Full-time</a>
                  <a name="job_type" class="btn btn-primary btn-sm notActive" data-toggle="job_type" data-title="Part-time">Part-time</a>
                  <a name="job_type" class="btn btn-primary btn-sm notActive" data-toggle="job_type" data-title="Contract">Contract</a>
                  <a name="job_type" class="btn btn-primary btn-sm notActive border-radius-right" data-toggle="job_type" data-title="Freelance">Freelance</a>
                <input type="hidden" name="job_type" id="job_type" value="Full-time">
              </div>
            </div>
          </div>

          <div class="form-group row">
            <label for="location_type" class="col-sm-4 col-md-4 control-label">Location Type</label>
            <div class="col-sm-12 col-md-12">
                <div id="radioBtn" class="btn-group">
                  <a name="location_type" class="btn btn-primary btn-sm active" data-toggle="location_type" data-title="Remote"><span class="fa fa-wifi thin"></span> Remote</a>
                  <a name="location_type" class="btn btn-primary btn-sm border-radius-right notActive" data-toggle="location_type" data-title="OnSite"><span class="fa fa-briefcase thin"></span> OnSite</a>
                <input type="hidden" name="location_type" id="location_type" value="Remote">
              </div>
            </div>
          </div>

          <div class="form-group">
            <label class=" control-label" for="textarea">Job Description</label>
            <div class="">
              <textarea class="form-control tinyedotor1" id="job-description" name="job_description" value="" required></textarea>
            </div>
          </div>
          <br>
          <div class="form-group">
            <div class="">
              <input id="company_name" name="company_name" placeholder="Company name" class="form-control input-md" type="text" maxlength="55" required>
            </div>
        </div>
        <br>
        <div class="form-group">
            <div class="">
              <input id="company_url" name="company_url" placeholder="Company URL (optional)" class="form-control input-md" type="url" maxlength="200" required>
            </div>
        </div>
        <br>
        <div class="form-group">
            <div class="">
              <input id="company_location" name="company_location" placeholder="Company Location" class="form-control input-md" type="text" maxlength="55" required>
            </div>
        </div>
        <br>
        <div class="form-group">
          <label class=" control-label" for="textarea">Company Description (optional)</label>
          <div class="">
            <textarea class="form-control" id="company-description" name="company_description" value=""></textarea>
          </div>
        </div>
        <br>
        <div class="form-group">
          <label class=" control-label" for="textarea">How can people apply to this job?</label>
          <div class="">
            <textarea class="form-control tinyedotor2" id="company-apply" name="company_apply" value="" required></textarea>
          </div>
        </div>
        <input class="btn asp-violet white submit-button" type="button"  value="Preview and Submit"  />
        </fieldset>
      </form>
    </div>
    <div class="clearfix"></div>
  </div>
  <!--<iframe id="typeform-full" width="100%" height="100%" frameborder="0" src="https://angrydevelopers.typeform.com/to/lJFA8E"></iframe>-->
  <!--<script type="text/javascript" src="https://s3-eu-west-1.amazonaws.com/share.typeform.com/embed.js"></script>-->
  <script src="/js/bootstrap-form.js" rel="stylesheet"></script>
  <script src="/js/semantic-modal.js"></script>
  <script src="/js/dimmer.min.js"></script>
  <script src="/js/transition.min.js"></script>
  <script src="/js/mustache.min.js"></script>

<!-- Modal -->
<div id="modaldiv"  class="ui modal background-none">
  <center><h2 class="white">Preview</h2></center>
    <div class="mustache-template">
    </div>
    <div class="splash-content text-center ng-scope">
      <h1><i class="fa fa-hand-paper-o white"></i></h1>
      <p class="lead ng-binding white" ng-bind="message">Are you sure you want to submit the job post?</p>
      <div id="submit-modal" class="btn btn-lg btn-success outline margin-md-horizontal submit-modal" submit="">
        <i class="fa fa-check"></i> Submit
      </div>
      <div id="close-modal" class="btn btn-lg btn-warning outline margin-md-horizontal">
        <i class="fa fa-ban">
          </i> Cancel
      </div>
  </div>
</div>


<div id="loading-modal"  class="ui modal background-none">
  <div class="splash-content text-center ng-scope">
    <div name="postSpinner">
        <div class="spinner-container">
          <div class="spinner">
            <div class="double-bounce1"></div>
            <div class="double-bounce2"></div>
          </div>
      </div>
    </div>
  </div>
</div>

<div id="thanks-modal"  class="ui modal background-none">
  <div class="splash-content text-center ng-scope">
    <h1>
      <i class="fa fa-thumbs-o-up white"></i></h1>
      <p class="lead ng-binding white" ng-bind="message">
        Thanks for your time!</p>
        <div class="btn btn-lg btn-primary outline submit-thanks-button">
          Done
        </div>
  </div>
</div>




<script id="job-detail-template" type="text/x-mustache-template">
  <div class="container margin-md template">
      <div class="row">
        <section class="col-md-8 col-md-offset-1 job-post  backgound-white">
          <div>
            <h1>{{job.job_title}}</h1>
            <p>
              <span class="light-gray">at </span>
              {{#if job.company_url}}
                <a target="_blank" href="/{{job.company_url}}">
                  <b class="sub-title">{{job.company_name}}</b>
                </a>
              {{else}}
                <b class="sub-title">{{job.company_name}}</b>
              {{/if}}
              <span class="light-gray"> in </span>
              <b class="sub-title">{{job.company_location}}</b>

            </p>
            <p>Job Post - {{formatDateTime job.metadata.date_submit "l"}}</p>
            <p>
              <span class="badge asp-violet badge-radio thin">{{job.job_type}}</span>
              <span class="badge asp-violet badge-radio thin">

              {{#ifeq job.location_type 'Remote'}}
                <i class="fa fa-wifi thin"></i>
              {{else}}
                <i class="fa fa-briefcase thin"></i>
              {{/ifeq}}
              {{job.location_type}}</span>
            </p>
            <legend></legend>
          </div>

          <p>{{{job.job_description}}}</p>

          {{#if job.company_description}}
            <h3 class="margin-bottom-none">Company</h3>
            <p>
                {{{job.company_description}}}
            </p>
          {{/if}}
          {{#if job.company_apply}}
            <h3 class="margin-bottom-none">How to apply</h3>
            <p>
                {{{job.company_apply}}}
            </p>
          {{/if}}

          {{#if job.company_url}}
            <div class="col-xs-12 margin-md">

              <center >
                <a class=" btn btn-info asp-violet text-center" href="{{job.company_url}}" target="_blank">Apply for this position</a>
              </center>
            </div>
          {{/if}}
        </section>
      </div>
    </div>
</script>


    <script>
        // $("#job-form").validate();
        $("#job-form").validate_bootstrap();


        tinymce.init({
            selector: "textarea",
            theme: "modern",
            plugins: [
                "advlist autolink lists link image charmap preview hr anchor pagebreak",
                "searchreplace wordcount visualblocks visualchars fullscreen",
                "insertdatetime media nonbreaking save table contextmenu directionality",
                "emoticons template paste textcolor colorpicker textpattern imagetools"
            ],
            toolbar1: "preview insertfile undo redo | styleselect | bold italic forecolor backcolor emoticons | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media ",
            image_advtab: true,
            templates: [
                {title: 'Test template 1', content: 'Test 1'},
                {title: 'Test template 2', content: 'Test 2'}
            ],
            setup: function(ed){
                var edt = ed;
                ed.on('blur', function(e) {

                    $("#"+this.id).html( tinyMCE.activeEditor.getContent() );
                });
            }
        });



        $(".submit-button").click(function(){

          $('#modaldiv').modal("show");
          //  $('.ui.modal').dimmer('show');


          if(!$('.tinyedotor1').html()){
            $('.tinyedotor1').focus();
            $('html, body').animate({
                scrollTop: $(".tinyedotor1").parent().offset().top
            }, 0);
          }

          if(!$('.tinyedotor2').html()){
            $('.tinyedotor2').focus();
            $('html, body').animate({
                  scrollTop: $(".tinyedotor2").parent().offset().bottom
              }, 0);
          }

        });

        $("#close-modal").click(function(){
          // console.log("modal");
          $('#modaldiv').modal("hide");

        });

        $(".submit-modal").click(function(){
          $('#modaldiv').hide();
          $('#loading-modal').modal("show");

          $.post("/jobs/new", $('form').serialize())
          .success(function(response){
              $('#loading-modal').modal("hide");
              console.log(response)
              if(response.success){
                setTimeout(function(){
                  $('#loading-modal').html($("#thanks-modal").html());
                  $(".submit-thanks-button").click(function(){
                    window.location = "/";
                  });
                },1200)

              }

            }).error(function(response){
              $("#thanks-modal").modal("show");
            });
        });



      </script>

{'fraction_non_alphanumeric': 0.17462616623354493, 'fraction_numerical': 0.0072423635666510455, 'mean_word_length': 2.0339925035543494, 'pattern_counts': {'":': 0, '<': 473, '<?xml version=': 0, '>': 473, 'https://': 4, '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': '1629180', 'n_tokens_mistral': 7130, 'n_tokens_neox': 6802, 'n_words': 1407}