<commit_before>- defaults = {input_wrapper_html: {class: 'col-lg-6'}, label_html: {class: 'col-lg-2'}}

div ng-controller="adminVenueCtrl" ng-init="venue = #{@venue.to_json(include: :contacts)}"
  = simple_form_for [:admin, @venue], html: {name: 'venueForm', class: 'form-horizontal'}, defaults: defaults do |f|
    = f.input :name, input_html: { class: 'form-control' }
    = f.input :address, as: :text, input_html: { class: 'form-control' }
    = f.input :send_hour, collection: 0..23, input_html: { class: 'form-control' }, include_blank: false
    = f.input :send_day_offset do
      = f.input_field :send_day_offset, collection: 0..10, class: 'form-control', include_blank: false
      span.help-block How many days early should contests be sent?

    .form-group
      label.col-lg-2.control-label Contacts

      .col-lg-10
        .form-group ng-repeat="contact in venue.contacts" ng-hide="contact.destroy"
          input type="hidden" name="venue[contacts_attributes][][id]" value="{{contact.id}}"
          input type="hidden" name="venue[contacts_attributes][][email]" value="{{contact.email}}"
          input type="hidden" name="venue[contacts_attributes][][_destroy]" value="{{contact.destroy}}"

          .col-lg-4
            input.form-control type="email" ng-model="contact.email" ng-if="!contact.destroy" required="required"

          .col-lg-6
            button.btn.btn-danger.delete-contact type="button" ng-click="deleteContact(contact)"
              i.glyphicon.glyphicon-trash>
              | Remove Contact
        .form-group
          .col-lg-4
            input.form-control type="email" name="newContactEmail" ng-model="newContact.email" ui-keydown="{'enter': 'addContact($event)'}"

          .col-lg-6
            button.btn.btn-primary#addContact type="button" ng-click="addContact($event)" ng-disabled="venueForm.newContactEmail.$invalid || newContact.email.length === 0"
              i.glyphicon.glyphicon-plus>
              | Add Contact

    .form-group
      .col-lg-offset-2.col-lg-10
        = f.button :submit, class: 'btn-primary', :'ng-disabled' => 'venueForm.$invalid'<commit_msg>initially cloak contacts in venue form<commit_after>- defaults = {input_wrapper_html: {class: 'col-lg-6'}, label_html: {class: 'col-lg-2'}}

div ng-controller="adminVenueCtrl" ng-init="venue = #{@venue.to_json(include: :contacts)}"
  = simple_form_for [:admin, @venue], html: {name: 'venueForm', class: 'form-horizontal'}, defaults: defaults do |f|
    = f.input :name, input_html: { class: 'form-control' }
    = f.input :address, as: :text, input_html: { class: 'form-control' }
    = f.input :send_hour, collection: 0..23, input_html: { class: 'form-control' }, include_blank: false
    = f.input :send_day_offset do
      = f.input_field :send_day_offset, collection: 0..10, class: 'form-control', include_blank: false
      span.help-block How many days early should contests be sent?

    .form-group.ng-cloak
      label.col-lg-2.control-label Contacts

      .col-lg-10
        .form-group ng-repeat="contact in venue.contacts" ng-hide="contact.destroy"
          input type="hidden" name="venue[contacts_attributes][][id]" value="{{contact.id}}"
          input type="hidden" name="venue[contacts_attributes][][email]" value="{{contact.email}}"
          input type="hidden" name="venue[contacts_attributes][][_destroy]" value="{{contact.destroy}}"

          .col-lg-4
            input.form-control type="email" ng-model="contact.email" ng-if="!contact.destroy" required="required"

          .col-lg-6
            button.btn.btn-danger.delete-contact type="button" ng-click="deleteContact(contact)"
              i.glyphicon.glyphicon-trash>
              | Remove Contact
        .form-group
          .col-lg-4
            input.form-control type="email" name="newContactEmail" ng-model="newContact.email" ui-keydown="{'enter': 'addContact($event)'}"

          .col-lg-6
            button.btn.btn-primary#addContact type="button" ng-click="addContact($event)" ng-disabled="venueForm.newContactEmail.$invalid || newContact.email.length === 0"
              i.glyphicon.glyphicon-plus>
              | Add Contact

    .form-group
      .col-lg-offset-2.col-lg-10
        = f.button :submit, class: 'btn-primary', :'ng-disabled' => 'venueForm.$invalid'
{'fraction_non_alphanumeric': 0.16240111679851094, 'fraction_numerical': 0.008841321544904607, 'mean_word_length': 3.1982421875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3296835', 'n_tokens_mistral': 1388, 'n_tokens_neox': 1339, 'n_words': 256}