<commit_before>- @angular_form = true

.form-horizontal{:id => "start_form_div", :style => "display:none"}
  %form#form_div{:name           => "angularForm",
                 'ng-controller' => "providerForemanFormController",
                 'ng-show'       => "afterGet",
                 :novalidate     => true}
    = render :partial => "layouts/flash_msg"
    %br
    .form-group{"ng-class" => "{'has-error': angularForm.name.$invalid}"}
      %label.col-md-2.control-label
        = _("Name")
      .col-md-8
        %input.form-control{:type            => "text",
                            :name            => "name",
                            'ng-model'       => "providerForemanModel.name",
                            :maxlength       => MAX_NAME_LEN,
                            :required        => "",
                            :checkchange     => true,
                            "auto-focus"     => "",
                            "start-form-div" => "start_form_div"}
        %span.help-block{"ng-show" => "angularForm.name.$error.required"}
          = _("Required")

    .form-group{"ng-class" => "{'has-error': angularForm.type.$invalid}"}
      %label.col-md-2.control-label{"for" => "provider_type"}
        = _('Type')
      .col-md-8
        = select_tag('provtype',
                     options_for_select([["<#{_('Choose')}>", nil]] + @provider_types, disabled: ["<#{_('Choose')}>", nil]),
                     "ng-if"                       => "newRecord",
                     "ng-model"                    => "providerForemanModel.provtype",
                     "ng-change"                   => "providerTypeChanged()",
                     "id"                          => "provider_type",
                     "required"                    => "",
                     "checkchange"                 => "",
                     "selectpicker-for-select-tag" => "")
        %div{"ng-if" => "!newRecord"}
          %input.form-control{:type      => "text",
                              :name      => "provtype",
                              "ng-model" => "providerForemanModel.provtype",
                              "ng-if"    => "!newRecord",
                              "id"       => "provider_type",
                              "readonly" => true,
                              "style"    => "color: black; font-weight: normal;"}

    .form-group{"ng-class" => "{'has-error': angularForm.zone.$invalid}"}
      %label.col-md-2.control-label{"for" => "prov_zone"}
        = _("Zone")
      .col-md-8
        - if @server_zones.length <= 1
          %input.form-control{"type"        => "text",
                              "id"          => "prov_zone",
                              "name"        => "zone",
                              "ng-model"    => "providerForemanModel.zone",
                              "maxlength"   => 15,
                              "required"    => "",
                              "checkchange" => "",
                              "readonly"    => true,
                              "style"       => "color: black;"}
        - else
          = select_tag('zone',
                       options_for_select(@server_zones.sort_by { |name, _name| name }),
                       "ng-model"                    => "providerForemanModel.zone",
                       "checkchange"                 => "",
                       "required"                    => "",
                       "selectpicker-for-select-tag" => "")

    .form-group{"ng-class" => "{'has-error': angularForm.url.$invalid}"}
      %label.col-md-2.control-label{"for" => "provider_url"}
        = _("Url")
      .col-md-8
        %input.form-control{:type        => "text",
                            :name        => "url",
                            'ng-model'   => "providerForemanModel.url",
                            :maxlength   => MAX_DESC_LEN,
                            "id"         => "provider_url",
                            :required    => "",
                            :checkchange => true}
        %span.help-block{"ng-show" => "angularForm.url.$error.required"}
          = _("Required")
    .form-group
      %label.col-md-2.control-label
        = _("Verify Peer Certificate")<commit_msg>Do not allow spaces in the Configuration Management Provider's URL field<commit_after>- @angular_form = true

.form-horizontal{:id => "start_form_div", :style => "display:none"}
  %form#form_div{:name           => "angularForm",
                 'ng-controller' => "providerForemanFormController",
                 'ng-show'       => "afterGet",
                 :novalidate     => true}
    = render :partial => "layouts/flash_msg"
    %br
    .form-group{"ng-class" => "{'has-error': angularForm.name.$invalid}"}
      %label.col-md-2.control-label
        = _("Name")
      .col-md-8
        %input.form-control{:type            => "text",
                            :name            => "name",
                            'ng-model'       => "providerForemanModel.name",
                            :maxlength       => MAX_NAME_LEN,
                            :required        => "",
                            :checkchange     => true,
                            "auto-focus"     => "",
                            "start-form-div" => "start_form_div"}
        %span.help-block{"ng-show" => "angularForm.name.$error.required"}
          = _("Required")

    .form-group{"ng-class" => "{'has-error': angularForm.type.$invalid}"}
      %label.col-md-2.control-label{"for" => "provider_type"}
        = _('Type')
      .col-md-8
        = select_tag('provtype',
                     options_for_select([["<#{_('Choose')}>", nil]] + @provider_types, disabled: ["<#{_('Choose')}>", nil]),
                     "ng-if"                       => "newRecord",
                     "ng-model"                    => "providerForemanModel.provtype",
                     "ng-change"                   => "providerTypeChanged()",
                     "id"                          => "provider_type",
                     "required"                    => "",
                     "checkchange"                 => "",
                     "selectpicker-for-select-tag" => "")
        %div{"ng-if" => "!newRecord"}
          %input.form-control{:type      => "text",
                              :name      => "provtype",
                              "ng-model" => "providerForemanModel.provtype",
                              "ng-if"    => "!newRecord",
                              "id"       => "provider_type",
                              "readonly" => true,
                              "style"    => "color: black; font-weight: normal;"}

    .form-group{"ng-class" => "{'has-error': angularForm.zone.$invalid}"}
      %label.col-md-2.control-label{"for" => "prov_zone"}
        = _("Zone")
      .col-md-8
        - if @server_zones.length <= 1
          %input.form-control{"type"        => "text",
                              "id"          => "prov_zone",
                              "name"        => "zone",
                              "ng-model"    => "providerForemanModel.zone",
                              "maxlength"   => 15,
                              "required"    => "",
                              "checkchange" => "",
                              "readonly"    => true,
                              "style"       => "color: black;"}
        - else
          = select_tag('zone',
                       options_for_select(@server_zones.sort_by { |name, _name| name }),
                       "ng-model"                    => "providerForemanModel.zone",
                       "checkchange"                 => "",
                       "required"                    => "",
                       "selectpicker-for-select-tag" => "")

    .form-group{"ng-class" => "{'has-error': angularForm.url.$invalid}"}
      %label.col-md-2.control-label{"for" => "provider_url"}
        = _("Url")
      .col-md-8
        %input.form-control{:type           => "text",
                            :name           => "url",
                            'ng-model'      => "providerForemanModel.url",
                            :maxlength      => MAX_DESC_LEN,
                            "id"            => "url",
                            :required       => "",
                            "ng-trim"       => false,
                            "detect_spaces" => "",
                            :checkchange    => true}
        %span.help-block{"ng-show" => "angularForm.url.$error.required"}
          = _("Required")
        %span.help-block{"ng-show" => "angularForm.url.$error.detectedSpaces"}
          = _("Spaces are prohibited")
    .form-group
      %label.col-md-2.control-label
        = _("Verify Peer Certificate")
{'fraction_non_alphanumeric': 0.15509416836850465, 'fraction_numerical': 0.002722940776038121, 'mean_word_length': 1.0829395085066162, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 128, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4639877', 'n_tokens_mistral': 2358, 'n_tokens_neox': 2297, 'n_words': 321}