diff --git a/app/views/admin/enterprises/_ng_form.html.haml b/app/views/admin/enterprises/_ng_form.html.haml index 3914cc1df2..ca38b7eca4 100644 --- a/app/views/admin/enterprises/_ng_form.html.haml +++ b/app/views/admin/enterprises/_ng_form.html.haml @@ -7,7 +7,11 @@ 'onchange' => 'angular.element(enterprise_form).scope().setFormDirty()', } do |f| - %save-bar{ buttons: "[{ text: 'Update', action: submit, param: null, class: 'red' }, { text: 'Cancel', action: cancel, param: '#{main_app.admin_enterprises_path}' }]", form: "enterprise_form" } + %save-bar{ dirty: "enterprise_form.$dirty", persist: "true" } + %input.red{ type: "button", value: "Update", ng: { click: "submit()", disabled: "!enterprise_form.$dirty" } } + %input{ type: "button", ng: { value: "enterprise_form.$dirty ? 'Cancel' : 'Close'", click: "cancel('#{main_app.admin_enterprises_path}')" } } + + .row .sixteen.columns.alpha