diff --git a/horizon/static/framework/widgets/form/modal-form.controller.js b/horizon/static/framework/widgets/form/modal-form.controller.js index 2a725f00b8..3c3e8f06b4 100644 --- a/horizon/static/framework/widgets/form/modal-form.controller.js +++ b/horizon/static/framework/widgets/form/modal-form.controller.js @@ -50,6 +50,7 @@ ctrl.submitText = context.submitText; ctrl.submitIcon = context.submitIcon; ctrl.cancel = cancel; + ctrl.helpUrl = context.helpUrl; function submit($event, schemaForm) { $event.preventDefault(); diff --git a/horizon/static/framework/widgets/form/modal-form.controller.spec.js b/horizon/static/framework/widgets/form/modal-form.controller.spec.js index 45779cf972..d70b6c3350 100644 --- a/horizon/static/framework/widgets/form/modal-form.controller.spec.js +++ b/horizon/static/framework/widgets/form/modal-form.controller.spec.js @@ -31,7 +31,8 @@ title: "title", form: "form", schema: "schema", - model: "model" + model: "model", + helpUrl: "help.html" }; ctrl = $controller( 'horizon.framework.widgets.form.ModalFormController', @@ -63,6 +64,10 @@ expect(ctrl.model).toEqual('model'); }); + it('sets helpUrl on scope', function() { + expect(ctrl.helpUrl).toEqual('help.html'); + }); + it('calls modalInstance close on submit', function() { spyOn(modalInstance, 'close'); ctrl.submit(mockEvent, mockSchemaValidForm); diff --git a/horizon/static/framework/widgets/form/modal-form.html b/horizon/static/framework/widgets/form/modal-form.html index d1e7452812..b4413b703c 100644 --- a/horizon/static/framework/widgets/form/modal-form.html +++ b/horizon/static/framework/widgets/form/modal-form.html @@ -16,6 +16,9 @@ pristine: { errors: false, success: false } }" ng-submit="ctrl.submit($event, schemaForm)"> + + +