diff --git a/app/assets/javascripts/darkswarm/directives/inline_alert.js.coffee b/app/assets/javascripts/darkswarm/directives/inline_alert.js.coffee index 46550b854f..9b37934375 100644 --- a/app/assets/javascripts/darkswarm/directives/inline_alert.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/inline_alert.js.coffee @@ -1,6 +1,7 @@ -Darkswarm.directive "ofnInlineFlash", -> - restrict: 'E' - controller: ($scope) -> - $scope.visible = true - $scope.closeFlash = -> - $scope.visible = false +Darkswarm.directive "ofnInlineAlert", -> + restrict: 'A' + scope: true + link: (scope, elem, attrs) -> + scope.visible = true + scope.close = -> + scope.visible = false diff --git a/app/assets/javascripts/templates/registration/about.html.haml b/app/assets/javascripts/templates/registration/about.html.haml index d014c96d90..704a7e3815 100644 --- a/app/assets/javascripts/templates/registration/about.html.haml +++ b/app/assets/javascripts/templates/registration/about.html.haml @@ -12,13 +12,12 @@ %form{ name: 'about', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "update('images',about)" } } .row .small-12.columns - .alert-box.alert{"data-alert" => ""} + .alert-box.alert{ "ofn-inline-alert" => true, ng: { show: "visible" } } {{ enterprise.name }} won't be visible on the Open Food Network until you enter a long and short description. - %a.close{:href => "#"} × - - .alert-box.info{"data-alert" => ""} + %a.close{ ng: { click: "close()" } } × + .alert-box.info{ "ofn-inline-alert" => true, ng: { show: "visible" } } {{ enterprise.name }} has been created on the Open Food Network. If you leave at any point from here onwards, your enterprise will be saved, and you can always login to the admin section to update or continue filling out your enterprise details. - %a.close{:href => "#"} × + %a.close{ ng: { click: "close()" } } × .small-12.large-8.columns .row