mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
Adding limit reached modal to registration
This commit is contained in:
@@ -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 "/"
|
||||
@@ -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()" } }
|
||||
2
app/views/registration/limit_reached.html.haml
Normal file
2
app/views/registration/limit_reached.html.haml
Normal file
@@ -0,0 +1,2 @@
|
||||
/ Directive which loads the modal
|
||||
%div{ "ofn-registration-limit-modal" => true }
|
||||
Reference in New Issue
Block a user