ManageIQ/manageiq-ui-classic

View on GitHub
app/views/miq_ae_class/_git_domain_refresh.html.haml

Summary

Maintainability
Test Coverage
= render :partial => "layouts/flash_msg"

%form#form_div
  = hidden_field_tag(:git_repo_id, @git_repo_id, :class => "hidden-git-repo-id")
  %input{:type => "hidden", :class => "git-branch-or-tag", :name => "git_branch_or_tag"}

  .form-horizontal
    .form-group
      %label.col-md-2.control-label
        = _("Branch/Tag")
      .col-md-8
        = select_tag("branch_or_tag_select",
                     options_for_select(%w(Branch Tag)),
                     :class => "git-branch-or-tag-select selectpicker")

    .form-group.git-branch-group
      %label.col-md-2.control-label
        = _("Branches")
      .col-md-8
        = select_tag("git_branches", options_for_select(@branch_names), :class => "git-branches selectpicker")

    .form-group.git-tag-group{:style => "display: none;"}
      %label.col-md-2.control-label
        = _("Tags")
      .col-md-8
        = select_tag("git_tags", options_for_select(@tag_names), :class => "git-tags selectpicker")

:javascript
  $(function() {
    miqInitSelectPicker();

    Automate.setUpGitRefreshClickHandlers();
    Automate.setUpDefaultGitBranchOrTagValue();

    miqButtons('show');
  });