mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Merge branch 'master' into bugfix
Conflicts: app/models/enterprise.rb
This commit is contained in:
@@ -3,7 +3,7 @@ Darkswarm.controller "RegistrationCtrl", ($scope, RegistrationService, Enterpris
|
||||
$scope.enterprise = EnterpriseRegistrationService.enterprise
|
||||
$scope.select = RegistrationService.select
|
||||
|
||||
$scope.steps = ['details','address','contact','about','images','social']
|
||||
$scope.steps = ['details','contact','type','about','images','social']
|
||||
|
||||
$scope.countries = availableCountries
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
Darkswarm.directive "ofnInlineAlert", ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
link: (scope, elem, attrs) ->
|
||||
scope.visible = true
|
||||
scope.close = ->
|
||||
scope.visible = false
|
||||
@@ -1,6 +0,0 @@
|
||||
Darkswarm.directive "ofnInlineFlash", ->
|
||||
restrict: 'E'
|
||||
controller: ($scope) ->
|
||||
$scope.visible = true
|
||||
$scope.closeFlash = ->
|
||||
$scope.visible = false
|
||||
@@ -3,7 +3,7 @@ Darkswarm.directive "ofnRegistrationLimitModal", (Navigation, $modal, Loading) -
|
||||
link: (scope, elem, attr)->
|
||||
scope.modalInstance = $modal.open
|
||||
templateUrl: 'registration/limit_reached.html'
|
||||
windowClass: "login-modal large"
|
||||
windowClass: "login-modal register-modal xlarge"
|
||||
backdrop: 'static'
|
||||
|
||||
scope.modalInstance.result.then scope.close, scope.close
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.factory "AuthenticationService", (Navigation, $modal, $location, Redirections)->
|
||||
Darkswarm.factory "AuthenticationService", (Navigation, $modal, $location, Redirections, Loading)->
|
||||
|
||||
new class AuthenticationService
|
||||
selectedPath: "/login"
|
||||
@@ -25,4 +25,9 @@ Darkswarm.factory "AuthenticationService", (Navigation, $modal, $location, Redir
|
||||
active: Navigation.active
|
||||
|
||||
close: ->
|
||||
Navigation.navigate "/"
|
||||
if location.pathname == "/"
|
||||
Navigation.navigate "/"
|
||||
else
|
||||
Loading.message = "Taking you back to the home page"
|
||||
location.hash = ""
|
||||
location.pathname = "/"
|
||||
|
||||
@@ -1,44 +1,47 @@
|
||||
.container#registration-about
|
||||
.header
|
||||
%h2 Nice one!
|
||||
%h5
|
||||
Now let's flesh out the details about
|
||||
%span.brick{"ng-show" => "enterprise.is_distributor"}
|
||||
{{ enterprise.name }}
|
||||
%span.turquoise{"ng-show" => "!enterprise.is_distributor" }
|
||||
{{ enterprise.name }}
|
||||
|
||||
%ng-include{ src: "'registration/steps.html'" }
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 Nice one!
|
||||
%h5
|
||||
Now let's flesh out the details about
|
||||
%span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } }
|
||||
{{ enterprise.name }}
|
||||
|
||||
%form{ name: 'about', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "update('images',about)" } }
|
||||
.row
|
||||
.small-12.columns
|
||||
.alert-box.alert{"data-alert" => ""}
|
||||
{{ 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" => ""}
|
||||
{{ 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 => "#"} ×
|
||||
.alert-box.info{ "ofn-inline-alert" => true, ng: { show: "visible" } }
|
||||
%h6 Success! {{ enterprise.name }} added to the Open Food Network
|
||||
%span If you exit the wizard at any stage, login and go to admin to edit or update your enterprise details.
|
||||
%a.close{ ng: { click: "close()" } } ×
|
||||
|
||||
.small-12.large-8.columns
|
||||
.row
|
||||
.small-12.columns
|
||||
%label{ for: 'enterprise_description' } Short Description:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_description', placeholder: "A short sentence describing your enterprise", ng: { model: 'enterprise.description' } }
|
||||
.field
|
||||
%label{ for: 'enterprise_description' } Short Description:
|
||||
%input.chunky{ id: 'enterprise_description', placeholder: "A short sentence describing your enterprise", ng: { model: 'enterprise.description' } }
|
||||
.row
|
||||
.small-12.columns
|
||||
%label{ for: 'enterprise_long_desc' } Long Description:
|
||||
%textarea.chunky.small-12.columns{ id: 'enterprise_long_desc', rows: 6, placeholder: "This is your opportunity to tell the story of your enterprise - what makes you different and wonderful? We'd suggest keeping your description to under 600 characters or 150 words.", ng: { model: 'enterprise.long_description' } }
|
||||
%small {{ enterprise.long_description.length }} characters / up to 600 recommended
|
||||
.field
|
||||
%label{ for: 'enterprise_long_desc' } Long Description:
|
||||
%textarea.chunky{ id: 'enterprise_long_desc', rows: 6, placeholder: "This is your opportunity to tell the story of your enterprise - what makes you different and wonderful? We'd suggest keeping your description to under 600 characters or 150 words.", ng: { model: 'enterprise.long_description' } }
|
||||
%small {{ enterprise.long_description.length }} characters / up to 600 recommended
|
||||
.small-12.large-4.columns
|
||||
.row
|
||||
.small-12.columns
|
||||
%label{ for: 'enterprise_abn' } ABN:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_abn', placeholder: "eg. 99 123 456 789", ng: { model: 'enterprise.abn' } }
|
||||
.field
|
||||
%label{ for: 'enterprise_abn' } ABN:
|
||||
%input.chunky{ id: 'enterprise_abn', placeholder: "eg. 99 123 456 789", ng: { model: 'enterprise.abn' } }
|
||||
.row
|
||||
.small-12.columns
|
||||
%label{ for: 'enterprise_acn' } ACN:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_acn', placeholder: "eg. 123 456 789", ng: { model: 'enterprise.acn' } }
|
||||
.field
|
||||
%label{ for: 'enterprise_acn' } ACN:
|
||||
%input.chunky{ id: 'enterprise_acn', placeholder: "eg. 123 456 789", ng: { model: 'enterprise.acn' } }
|
||||
|
||||
.row.buttons.pad-top
|
||||
.small-12.columns
|
||||
%input.button.primary{ type: "submit", value: "Continue" }
|
||||
%input.button.primary.right{ type: "submit", value: "Continue" }
|
||||
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
.container#registration-address
|
||||
.header
|
||||
%h2
|
||||
Greetings
|
||||
%span{ ng: { class: "{brick: enterprise.is_distributor, turquoise: !enterprise.is_distributor}" } }
|
||||
{{ enterprise.name }}
|
||||
|
||||
%h5 Now we need to know where you are
|
||||
%ng-include{ src: "'registration/steps.html'" }
|
||||
%form{ name: 'address', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('contact',address)" } }
|
||||
.row.content
|
||||
.small-12.medium-12.large-7.columns
|
||||
.row
|
||||
.small-12.columns.field
|
||||
%label{ for: 'enterprise_address' } Address:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "eg. 123 Cranberry Drive", required: true, ng: { model: 'enterprise.address.address1' } }
|
||||
%span.error.small-12.columns{ ng: { show: "address.address1.$error.required && submitted" } }
|
||||
You need to enter an address.
|
||||
.row
|
||||
.small-12.large-8.columns.field
|
||||
%label{ for: 'enterprise_city' } Suburb:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_city', name: 'city', required: true, placeholder: "eg. Northcote", ng: { model: 'enterprise.address.city' } }
|
||||
%span.error.small-12.columns{ ng: { show: "address.city.$error.required && submitted" } }
|
||||
You need to enter a suburb.
|
||||
.small-12.large-4.columns.field
|
||||
%label{ for: 'enterprise_zipcode' } Postcode:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "eg. 3070", ng: { model: 'enterprise.address.zipcode' } }
|
||||
%span.error.small-12.columns{ ng: { show: "address.zipcode.$error.required && submitted" } }
|
||||
You need to enter a postcode.
|
||||
.row
|
||||
.small-12.large-8.columns.field
|
||||
%label{ for: 'enterprise_country' } Country:
|
||||
%select.chunky.small-12.columns{ id: 'enterprise_country', name: 'country', required: true, ng: { model: 'enterprise.country', options: 'c as c.name for c in countries' } }
|
||||
%span.error.small-12.columns{ ng: { show: "address.country.$error.required && submitted" } }
|
||||
You need to enter a country.
|
||||
.small-12.large-4.columns.field
|
||||
%label{ for: 'enterprise_state' } State:
|
||||
%select.chunky.small-12.columns{ id: 'enterprise_state', name: 'state', ng: { model: 'enterprise.address.state_id', options: 's.id as s.abbr for s in enterprise.country.states', show: 'countryHasStates()', required: 'countryHasStates()' } }
|
||||
%span.error.small-12.columns{ ng: { show: "address.state.$error.required && submitted" } }
|
||||
You need to enter a state.
|
||||
.small-12.medium-12.large-5.hide-for-small-only
|
||||
// This is the location area
|
||||
/ %h6
|
||||
/ Location display
|
||||
/ %i.ofn-i_013-help.has-tip{ 'data-tooltip' => true, title: "Choose how you want to display your enterprise's address on the Open Food Network. By default, full location is shown everywhere including street name and number."}
|
||||
/ .row
|
||||
/ .small-12.columns
|
||||
/ %label.indent-checkbox
|
||||
/ %input{ type: 'checkbox', id: 'enterpise_suburb_only', ng: { model: 'enterprise.suburb_only' } }
|
||||
/ Hide my street name and street number from the public (ie. only show the suburb)
|
||||
/ .small-12.columns
|
||||
/ %label.indent-checkbox
|
||||
/ %input{ type: 'checkbox', id: 'enterprise_on_map', ng: { model: 'enterprise.on_map' } }
|
||||
/ Blur my location on the map (show an approximate, not exact pin)
|
||||
|
||||
.row.buttons
|
||||
.small-12.columns
|
||||
%input.button.secondary{ type: "button", value: "Back", ng: { click: "select('details')" } }
|
||||
|
||||
%input.button.primary{ type: "submit", value: "Continue" }
|
||||
@@ -1,12 +1,13 @@
|
||||
.container#registration-contact
|
||||
.header
|
||||
%h2 Last step to create your enterprise!
|
||||
%h5
|
||||
Who is responsible for managing
|
||||
%span{ ng: { class: "{brick: enterprise.is_distributor, turquoise: !enterprise.is_distributor}" } }
|
||||
{{ enterprise.name }}?
|
||||
%ng-include{ src: "'registration/steps.html'" }
|
||||
%form{ name: 'contact', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "create(contact)" } }
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 Greetings!
|
||||
%h5
|
||||
Who is responsible for managing {{ enterprise.name }}?
|
||||
|
||||
%form{ name: 'contact', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('type',contact)" } }
|
||||
.row.content
|
||||
.small-12.medium-12.large-7.columns
|
||||
.row
|
||||
@@ -39,8 +40,8 @@
|
||||
/ .small-12.columns
|
||||
/ %label.indent-checkbox
|
||||
/ %input{ type: 'checkbox', id: 'contact_phone_profile', ng: { model: 'enterprise.phone_in_profile' } } Display phone in profile
|
||||
|
||||
.row.buttons
|
||||
.small-12.columns
|
||||
%input.button.secondary{ type: "button", value: "Back", ng: { click: "select('address')" } }
|
||||
|
||||
%input.button.primary{ type: "submit", value: "Continue" }
|
||||
%input.button.secondary{ type: "button", value: "Back", ng: { click: "select('details')" } }
|
||||
%input.button.primary.right{ type: "submit", value: "Continue" }
|
||||
|
||||
@@ -1,43 +1,77 @@
|
||||
.container#registration-details{bindonce: true}
|
||||
.header
|
||||
%h2 Let's Get Started
|
||||
%h5{ bo: { if: "enterprise.sells != 'own'" } } Woot! First we need to know what sort of enterprise you are:
|
||||
%h5{ bo: { if: "enterprise.sells == 'own'" } } Woot! First we need to know the name of your farm:
|
||||
%ng-include{ src: "'registration/steps.html'" }
|
||||
%form{ name: 'details', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('address',details)" } }
|
||||
.row
|
||||
.small-12.columns.field
|
||||
%label{ for: 'enterprise_name', bo: { if: "enterprise.sells != 'own'" } } Enterprise Name:
|
||||
%label{ for: 'enterprise_name', bo: { if: "enterprise.sells == 'own'" } } Farm Name:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_name', name: 'name', placeholder: "eg. Charlie's Awesome Farm", required: true, ng: { model: 'enterprise.name' } }
|
||||
%span.error.small-12.columns{ ng: { show: "details.name.$error.required && submitted" } }
|
||||
You need to enter a name for your enterprise!
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 Let's Get Started
|
||||
%h5{ bo: { if: "enterprise.type != 'own'" } } Woot! First we need to know a little bit about your enterprise:
|
||||
%h5{ bo: { if: "enterprise.type == 'own'" } } Woot! First we need to know a little bit about your farm:
|
||||
|
||||
.row#enterprise-types{ 'data-equalizer' => true, bo: { if: "enterprise.sells != 'own'" } }
|
||||
.small-12.columns.field
|
||||
%form{ name: 'details', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('contact',details)" } }
|
||||
|
||||
.row
|
||||
.small-12.medium-9.large-12.columns.end
|
||||
.field
|
||||
%label{ for: 'enterprise_name', bo: { if: "enterprise.type != 'own'" } } Enterprise Name:
|
||||
%label{ for: 'enterprise_name', bo: { if: "enterprise.type == 'own'" } } Farm Name:
|
||||
%input.chunky{ id: 'enterprise_name', name: 'name', placeholder: "e.g. Charlie's Awesome Farm", required: true, ng: { model: 'enterprise.name' } }
|
||||
%span.error{ ng: { show: "details.name.$error.required && submitted" } }
|
||||
Please choose a unique name for your enterprise
|
||||
|
||||
.row
|
||||
.small-12.medium-9.large-6.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_address' } Address line 1:
|
||||
%input.chunky{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "e.g. 123 Cranberry Drive", required: true, ng: { model: 'enterprise.address.address1' } }
|
||||
%span.error{ ng: { show: "details.address1.$error.required && submitted" } }
|
||||
Please enter an address
|
||||
.field
|
||||
%label{ for: 'enterprise_address2' } Address line 2:
|
||||
%input.chunky{ id: 'enterprise_address2', name: 'address2', required: false, placeholder: "", required: false, ng: { model: 'enterprise.address.address2' } }
|
||||
|
||||
.small-12.medium-9.large-6.columns.end
|
||||
.row
|
||||
.small-12.columns
|
||||
%label Choose one:
|
||||
.small-12.medium-8.large-8.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_city' } Suburb:
|
||||
%input.chunky{ id: 'enterprise_city', name: 'city', required: true, placeholder: "e.g. Northcote", ng: { model: 'enterprise.address.city' } }
|
||||
%span.error{ ng: { show: "details.city.$error.required && submitted" } }
|
||||
Please enter a suburb
|
||||
.small-12.medium-4.large-4.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_zipcode' } Postcode:
|
||||
%input.chunky{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "e.g. 3070", ng: { model: 'enterprise.address.zipcode' } }
|
||||
%span.error{ ng: { show: "details.zipcode.$error.required && submitted" } }
|
||||
Postcode required
|
||||
.row
|
||||
-# TODO redesign this to refelct the extra options available.
|
||||
.small-12.medium-4.large-4.columns{ 'data-equalizer-watch' => true }
|
||||
%a.panel#producer-panel{ href: "#", ng: { click: "enterprise.is_primary_producer = true", class: "{selected: (!enterprise.is_distributor && enterprise.is_primary_producer)}" } }
|
||||
.left
|
||||
/ %render-svg{ path: "/assets/map-icon-producer.svg" }
|
||||
%h4 I'm A Producer
|
||||
%p Producers make yummy things to eat &/or drink. You're a producer if you grow it, raise it, brew it, bake it, ferment it, milk it or mould it.
|
||||
.small-12.medium-4.large-4.columns{ 'data-equalizer-watch' => true }
|
||||
%a.panel#hub-panel{ href: "#", ng: { click: "enterprise.is_distributor = true; enterprise.is_primary_producer = false", class: "{selected: (enterprise.is_distributor && !enterprise.is_primary_producer)}" } }
|
||||
.left
|
||||
/ %render-svg{ path: "/assets/map-icon-hub.svg" }
|
||||
%h4 I'm A Hub
|
||||
%p Hubs connect the producer to the eater. Hubs can be co-ops, independent retailers, buying groups, wholesalers, CSA box schemes, farm-gate stalls, etc.
|
||||
.small-12.medium-4.large-4.columns{ 'data-equalizer-watch' => true }
|
||||
%a.panel#both-panel{ href: "#", ng: { click: "enterprise.is_distributor = true; enterprise.is_primary_producer = true", class: "{selected: (enterprise.is_distributor && enterprise.is_primary_producer)}" } }
|
||||
.left
|
||||
/ %render-svg{path: "/assets/map-icon-both.svg"}
|
||||
%h4 I'm Both
|
||||
%p Hey there, Jack-of-all-trades! Not only do you produce things to eat &/or drink, you also want to sell your yummies through an Open Food Network shopfront.
|
||||
.small-12.medium-4.large-4.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_state' } State:
|
||||
%select.chunky{ id: 'enterprise_state', name: 'state', ng: { model: 'enterprise.address.state_id', options: 's.id as s.abbr for s in enterprise.country.states', show: 'countryHasStates()', required: 'countryHasStates()' } }
|
||||
%span.error{ ng: { show: "details.state.$error.required && submitted" } }
|
||||
State required
|
||||
.small-12.medium-8.large-8.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_country' } Country:
|
||||
%select.chunky{ id: 'enterprise_country', name: 'country', required: true, ng: { model: 'enterprise.country', options: 'c as c.name for c in countries' } }
|
||||
%span.error{ ng: { show: "details.country.$error.required && submitted" } }
|
||||
Please select a country
|
||||
/ .small-12.medium-12.large-5.hide-for-small-only
|
||||
/ %h6
|
||||
/ Location display
|
||||
/ %i.ofn-i_013-help.has-tip{ 'data-tooltip' => true, title: "Choose how you want to display your enterprise's address on the Open Food Network. By default, full location is shown everywhere including street name and number."}
|
||||
/ .row
|
||||
/ .small-12.columns
|
||||
/ %label.indent-checkbox
|
||||
/ %input{ type: 'checkbox', id: 'enterpise_suburb_only', ng: { model: 'enterprise.suburb_only' } }
|
||||
/ Hide my street name and street number from the public (ie. only show the suburb)
|
||||
/ .small-12.columns
|
||||
/ %label.indent-checkbox
|
||||
/ %input{ type: 'checkbox', id: 'enterprise_on_map', ng: { model: 'enterprise.on_map' } }
|
||||
/ Blur my location on the map (show an approximate, not exact pin)
|
||||
|
||||
|
||||
.row.buttons
|
||||
.small-12.columns
|
||||
%hr
|
||||
%input.button.primary.right{ type: "submit", value: "Continue" }
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
.container#registration-finished
|
||||
.header
|
||||
%h2 Well done!
|
||||
%h5
|
||||
You have successfully completed the profile for
|
||||
%span.brick{"ng-show" => "enterprise.is_distributor"}
|
||||
{{ enterprise.name }}
|
||||
%span.turquoise{"ng-show" => "!enterprise.is_distributor" }
|
||||
{{ enterprise.name }}
|
||||
.content{ style: 'text-align: center'}
|
||||
%h3 Why not check it out on the Open Food Network?
|
||||
%a.button.primary{ type: "button", href: "/map" } Go to Map Page >
|
||||
.row
|
||||
.small-12.columns.pad-top
|
||||
%header
|
||||
%h2 Finished!
|
||||
.panel.callout
|
||||
%p
|
||||
Thanks for filling out the details for
|
||||
%span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } }
|
||||
{{ enterprise.name }}
|
||||
%p You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin.
|
||||
.row
|
||||
.small-12.columns.text-center
|
||||
%h4
|
||||
Activate
|
||||
%span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } }
|
||||
{{ enterprise.name }}
|
||||
|
||||
%br
|
||||
%br
|
||||
%p
|
||||
We've sent a confirmation email to
|
||||
%strong {{ enterprise.email }}.
|
||||
%br Please follow the instructions there to make your enterprise visible on the Open Food Network.
|
||||
|
||||
%h3 Next step - add some products:
|
||||
%a.button.primary{ type: "button", href: "/admin/products/new" } Add a Product >
|
||||
%a.button.primary{ type: "button", href: "/" } Open Food Network home >
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
.container#registration-images{ 'nv-file-drop' => true, uploader: "imageUploader", options:"{ alias: imageStep }", ng: { controller: "EnterpriseImageCtrl" } }
|
||||
.header
|
||||
%h2 Thanks!
|
||||
%h5 Let's upload some pretty pictures so your profile looks great! :)
|
||||
%ng-include{ src: "'registration/steps.html'" }
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 Thanks!
|
||||
%h5 Let's upload some pretty pictures so your profile looks great! :)
|
||||
|
||||
%form{ name: 'images', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "select('social')" } }
|
||||
.row{ ng: { repeat: 'image_step in imageSteps', show: "imageStep == image_step" } }
|
||||
%ng-include{ src: "'registration/images/'+ image_step + '.html'" }
|
||||
|
||||
.row.buttons.pad-top{ ng: { if: "imageStep == 'logo'" } }
|
||||
.small-12.columns
|
||||
%input.button.primary{ type: "button", value: "Back", ng: { click: "select('about')" } }
|
||||
%input.button.secondary{ type: "button", value: "Back", ng: { click: "select('about')" } }
|
||||
|
||||
%input.button.primary{ type: "button", value: "Continue", ng: { click: "imageSelect('promo')" } }
|
||||
%input.button.primary.right{ type: "button", value: "Continue", ng: { click: "imageSelect('promo')" } }
|
||||
|
||||
.row.buttons.pad-top{ ng: { if: "imageStep == 'promo'" } }
|
||||
.small-12.columns
|
||||
%input.button.primary{ type: "button", value: "Back", ng: { click: "imageSelect('logo')" } }
|
||||
|
||||
%input.button.primary{ type: "submit", value: "Continue" }
|
||||
%input.button.secondary{ type: "button", value: "Back", ng: { click: "imageSelect('logo')" } }
|
||||
%input.button.primary.right{ type: "submit", value: "Continue" }
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
.row.pad-top
|
||||
.small-12.columns.center
|
||||
#image-placeholder.logo
|
||||
%img{ ng: { show: "imageSrc()", src: '{{ imageSrc() }}' } }
|
||||
.message{ ng: { hide: "imageSrc()" } }
|
||||
%img{ ng: { show: "imageSrc() && !imageUploader.isUploading", src: '{{ imageSrc() }}' } }
|
||||
.message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } }
|
||||
Your logo will appear here for review once uploaded
|
||||
.loading{ ng: { hide: "!imageUploader.isUploading" } }
|
||||
%img.spinner{ src: "/assets/loading.gif" }
|
||||
%br/
|
||||
Uploading...
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
.row.pad-top
|
||||
.small-12.columns.center
|
||||
#image-placeholder.promo
|
||||
%img{ ng: { show: "imageSrc()", src: '{{ imageSrc() }}' } }
|
||||
.message{ ng: { hide: "imageSrc()" } }
|
||||
%img{ ng: { show: "imageSrc() && !imageUploader.isUploading", src: '{{ imageSrc() }}' } }
|
||||
.message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } }
|
||||
Your logo will appear here for review once uploaded
|
||||
.loading{ ng: { hide: "!imageUploader.isUploading" } }
|
||||
%img.spinner{ src: "/assets/loading.gif" }
|
||||
%br/
|
||||
Uploading...
|
||||
|
||||
@@ -1,39 +1,45 @@
|
||||
%div
|
||||
.header
|
||||
%h2 Hi there!
|
||||
%h4 This wizard will step you through creating a profile
|
||||
.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
|
||||
Your profile gives you an online presence on the
|
||||
%strong Open Food Network,
|
||||
allowing you to easily connect with potential customers or partners. You can always choose to update your info later, as well as choose to upgrade your Profile to and Online Store, where you can sell products, track orders and receive payments. Creating a profile takes about 5-10 minutes.
|
||||
.row{ 'data-equalizer' => true }
|
||||
.small-12.medium-6.large-6.columns.pad-top{ 'data-equalizer-watch' => true }
|
||||
%h5 You'll need the following:
|
||||
%ul.check-list
|
||||
%li
|
||||
Your enterprise address and contact details
|
||||
%li
|
||||
Your logo image
|
||||
%li
|
||||
A pretty picture for your profile header
|
||||
%li
|
||||
Some 'About Us' text
|
||||
|
||||
.small-12.medium-6.large-6.columns{ 'data-equalizer-watch' => true}
|
||||
.highlight-box
|
||||
%h5 Your profile entitles you to:
|
||||
%ul.small-block-grid-1
|
||||
%li
|
||||
%i.ofn-i_020-search
|
||||
A searchable listing
|
||||
%li
|
||||
%i.ofn-i_040-hub
|
||||
A pin on the OFN map
|
||||
.row
|
||||
.small-12.columns
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 Hi there!
|
||||
%h4
|
||||
%small
|
||||
%i.ofn-i_040-hub
|
||||
Create your enterprise profile
|
||||
.hide-for-large-up
|
||||
%hr
|
||||
%input.button.primary{ type: "button", value: "Let's get started!", ng: { click: "select('details')" } }
|
||||
%input.button.small.primary{ type: "button", value: "Let's get started!", ng: { click: "select('details')" } }
|
||||
%hr
|
||||
|
||||
.row{ 'data-equalizer' => true }
|
||||
.small-12.medium-12.large-6.columns.pad-top{ 'data-equalizer-watch' => true }
|
||||
%h5 You'll need:
|
||||
%ul.check-list
|
||||
%li
|
||||
5-10 minutes
|
||||
%li
|
||||
Enterprise address
|
||||
%li
|
||||
Primary contact details
|
||||
%li
|
||||
Your logo image
|
||||
%li
|
||||
Landscape image for your profile
|
||||
%li
|
||||
'About Us' text
|
||||
|
||||
.small-9.medium-8.large-5.columns.pad-top.end{ 'data-equalizer-watch' => true}
|
||||
%h5
|
||||
What do I get?
|
||||
%p
|
||||
Your profile helps people
|
||||
%strong find
|
||||
and
|
||||
%strong contact
|
||||
you on the Open Food Network.
|
||||
%p Use this space to tell the story of your enterprise, to help drive connections to your social and online presence.
|
||||
|
||||
.row.show-for-large-up
|
||||
.small-12.columns
|
||||
%hr
|
||||
%input.button.primary.right{ type: "button", value: "Let's get started!", ng: { click: "select('details')" } }
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
%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()" } }
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%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()" } }
|
||||
|
||||
@@ -1,35 +1,49 @@
|
||||
.container#registration-social
|
||||
.header
|
||||
%h2 Last step!
|
||||
%h5 How can people find {{ enterprise.name }} online?
|
||||
%ng-include{ src: "'registration/steps.html'" }
|
||||
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 Final step!
|
||||
%h5
|
||||
How can people find
|
||||
%span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } }
|
||||
{{ enterprise.name }}
|
||||
online?
|
||||
|
||||
%form{ name: 'social', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "update('finished',social)" } }
|
||||
.row.content
|
||||
.small-12.large-7.columns
|
||||
.row
|
||||
.small-12.columns
|
||||
%label{ for: 'enterprise_website' } Website:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_website', placeholder: "eg. openfoodnetwork.org.au", ng: { model: 'enterprise.website' } }
|
||||
.field
|
||||
%label{ for: 'enterprise_website' } Website:
|
||||
%input.chunky{ id: 'enterprise_website', placeholder: "eg. openfoodnetwork.org.au", ng: { model: 'enterprise.website' } }
|
||||
.row
|
||||
.small-12.columns
|
||||
%label{ for: 'enterprise_facebook' } Facebook:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_facebook', placeholder: "eg. www.facebook.com/PageNameHere", ng: { model: 'enterprise.facebook' } }
|
||||
.field
|
||||
%label{ for: 'enterprise_facebook' } Facebook:
|
||||
%input.chunky{ id: 'enterprise_facebook', placeholder: "eg. www.facebook.com/PageNameHere", ng: { model: 'enterprise.facebook' } }
|
||||
.row
|
||||
.small-12.columns
|
||||
%label{ for: 'enterprise_linkedin' } LinkedIn:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_linkedin', placeholder: "eg. www.linkedin.com/YourNameHere", ng: { model: 'enterprise.linkedin' } }
|
||||
.field
|
||||
%label{ for: 'enterprise_linkedin' } LinkedIn:
|
||||
%input.chunky{ id: 'enterprise_linkedin', placeholder: "eg. www.linkedin.com/YourNameHere", ng: { model: 'enterprise.linkedin' } }
|
||||
.small-12.large-5.columns
|
||||
.row
|
||||
.small-12.columns
|
||||
%label{ for: 'enterprise_twitter' } Twitter:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_twitter', placeholder: "eg. @twitter_handle", ng: { model: 'enterprise.twitter' } }
|
||||
.field
|
||||
%label{ for: 'enterprise_twitter' } Twitter:
|
||||
%input.chunky{ id: 'enterprise_twitter', placeholder: "eg. @twitter_handle", ng: { model: 'enterprise.twitter' } }
|
||||
.row
|
||||
.small-12.columns
|
||||
%label{ for: 'enterprise_instagram' } Instagram:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_instagram', placeholder: "eg. @instagram_handle", ng: { model: 'enterprise.instagram' } }
|
||||
.field
|
||||
%label{ for: 'enterprise_instagram' } Instagram:
|
||||
%input.chunky{ id: 'enterprise_instagram', placeholder: "eg. @instagram_handle", ng: { model: 'enterprise.instagram' } }
|
||||
|
||||
.row.buttons
|
||||
.small-12.columns
|
||||
%input.button.secondary{ type: "button", value: "Back", ng: { click: "select('images')" } }
|
||||
|
||||
%input.button.primary{ type: "submit", value: "Continue" }
|
||||
%input.button.primary.right{ type: "submit", value: "Continue" }
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
.row#progress-bar
|
||||
.small-12.medium-2.columns.item{ ng: { repeat: 'step in steps', class: "{active: (currentStep() == step),'show-for-medium-up': (currentStep() != step)}" } }
|
||||
{{ $index+1 + ". " + step }}
|
||||
|
||||
|
||||
46
app/assets/javascripts/templates/registration/type.html.haml
Normal file
46
app/assets/javascripts/templates/registration/type.html.haml
Normal file
@@ -0,0 +1,46 @@
|
||||
.container#registration-type{bindonce: true}
|
||||
|
||||
%ng-include{ src: "'registration/steps.html'" }
|
||||
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2
|
||||
Last step to add
|
||||
%span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } }
|
||||
{{ enterprise.name }}!
|
||||
%h4
|
||||
Are you a producer?
|
||||
|
||||
%form{ name: 'type', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "create(type)" } }
|
||||
.row#enterprise-types{ 'data-equalizer' => true, bo: { if: "enterprise.type != 'own'" } }
|
||||
.small-12.columns.field
|
||||
.row
|
||||
.small-12.medium-6.large-6.columns{ 'data-equalizer-watch' => true }
|
||||
%a.btnpanel#producer-panel{ href: "#", ng: { click: "enterprise.is_primary_producer = true", class: "{selected: enterprise.is_primary_producer}" } }
|
||||
%i.ofn-i_059-producer
|
||||
%h4 Yes, I'm a producer
|
||||
|
||||
.small-12.medium-6.large-6.columns{ 'data-equalizer-watch' => true }
|
||||
%a.btnpanel#hub-panel{ href: "#", ng: { click: "enterprise.is_primary_producer = false", class: "{selected: enterprise.is_primary_producer == false}" } }
|
||||
%i.ofn-i_063-hub
|
||||
%h4 No, I'm not a producer
|
||||
|
||||
.row
|
||||
.small-12.columns
|
||||
%input.chunky{ id: 'enterprise_is_primary_producer', name: 'is_primary_producer', hidden: true, required: true, ng: { model: 'enterprise.is_primary_producer' } }
|
||||
%span.error{ ng: { show: "type.is_primary_producer.$error.required && submitted" } }
|
||||
Please choose one. Are you are producer?
|
||||
.row
|
||||
.small-12.columns
|
||||
.panel.callout
|
||||
.left
|
||||
%i.ofn-i_013-help
|
||||
|
||||
%p Producers make yummy things to eat &/or drink. You're a producer if you grow it, raise it, brew it, bake it, ferment it, milk it or mould it.
|
||||
/ %p Hubs connect the producer to the eater. Hubs can be co-ops, independent retailers, buying groups, wholesalers, CSA box schemes, farm-gate stalls, etc.
|
||||
|
||||
.row.buttons
|
||||
.small-12.columns
|
||||
%input.button.secondary{ type: "button", value: "Back", ng: { click: "select('contact')" } }
|
||||
%input.button.primary.right{ type: "submit", value: "Continue" }
|
||||
Reference in New Issue
Block a user