mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Moving welcomeCrtl to enterprise module as sellsCtrl
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
//= require ./products/products
|
||||
//= require ./shipping_methods/shipping_methods
|
||||
//= require ./users/users
|
||||
//= require ./welcome/welcome
|
||||
//= require textAngular.min.js
|
||||
//= require textAngular-sanitize.min.js
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
angular.module("admin.welcome")
|
||||
.controller "welcomeCtrl", ($scope) ->
|
||||
angular.module("admin.enterprises")
|
||||
.controller "sellsCtrl", ($scope) ->
|
||||
$scope.sells = "unspecified"
|
||||
$scope.producer_profile_only = true
|
||||
$scope.submitted = false
|
||||
@@ -1 +0,0 @@
|
||||
angular.module("admin.welcome", [])
|
||||
@@ -1,4 +1,5 @@
|
||||
= form_for @enterprise, url: main_app.set_sells_admin_enterprise_path(@enterprise), html: { name: "enterprise", novalidate: true } do |enterprise_form|
|
||||
= form_for @enterprise, url: main_app.set_sells_admin_enterprise_path(@enterprise),
|
||||
html: { name: "enterprise", novalidate: true, "ng-app" => "admin.enterprises", "ng-controller"=> 'sellsCtrl' } do |enterprise_form|
|
||||
-# Have to use hidden:'true' on this input rather than type:'hidden' as the latter seems to break ngPattern and therefore validation
|
||||
%input{ hidden: "true", name: "sells", ng: { required: true, pattern: "/^(none|own)$/", model: 'sells', value: "sells"} }
|
||||
.options.sixteen.columns.alpha
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#welcome_page.sixteen.columns.alpha{ ng: { app: "admin.welcome", controller: 'welcomeCtrl' } }
|
||||
#welcome_page.sixteen.columns.alpha
|
||||
%header
|
||||
%h1 Welcome to the Open Food Network!
|
||||
%p
|
||||
|
||||
Reference in New Issue
Block a user