ManageIQ/manageiq-ui-classic

View on GitHub
app/views/layouts/angular/_x_custom_form_buttons_angular.html.haml

Summary

Maintainability
Test Coverage
-# version for controllerAs is app/views/layouts/angular/custom_form_buttons_controller_as
.clearfix
.pull-right.button-group{"ng-controller" => "buttonGroupController"}
  %miq-button{:name      => button_label,
              :title     => button_label,
              :alt       => button_label,
              :enabled   => "saveable(angularForm)",
              'on-click' => button_click,
              :primary   => 'true'}
  %miq-button{:name      => t = _("Reset"),
              :title     => t,
              :alt       => t,
              :enabled   => '!angularForm.$pristine',
              'ng-show'  => '!newRecord',
              'on-click' => "resetClicked()"}
  %miq-button{:name      => t = _("Cancel"),
              :title     => t,
              :alt       => t,
              :enabled   => 'true',
              'on-click' => cancel_function || "cancelClicked($event)"}