Adding limit reached modal to registration

This commit is contained in:
Rob Harrington
2014-09-25 12:25:32 +10:00
parent 6fa7d9cbcb
commit f5849e91dc
3 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
Darkswarm.directive "ofnRegistrationLimitModal", (Navigation, $modal, Loading) ->
restrict: 'A'
link: (scope, elem, attr)->
scope.modalInstance = $modal.open
templateUrl: 'registration/limit_reached.html'
windowClass: "login-modal large"
backdrop: 'static'
scope.modalInstance.result.then scope.close, scope.close
scope.close = ->
Loading.message = "Taking you back to the home page"
Navigation.go "/"

View File

@@ -0,0 +1,15 @@
%div
.header.center
%h2 Oh no!
%h4 You have reached the limit!
.row
.small-12.medium-3.large-2.columns.text-right.hide-for-small-only
%img{:src => "/assets/potatoes.png"}
.small-12.medium-9.large-10.columns
%p
You have reached the limit for the number of enterprises you are allowed to own on the
%strong Open Food Network.
.row
.small-12.columns
%hr
%input.button.primary{ type: "button", value: "Return to the homepage", ng: { click: "close()" } }

View File

@@ -0,0 +1,2 @@
/ Directive which loads the modal
%div{ "ofn-registration-limit-modal" => true }