Rename sellCtrl to changeTypeFormCtrl

This commit is contained in:
Rob Harrington
2014-10-24 11:02:16 +11:00
parent f6b0324456
commit f03c7ba02d
2 changed files with 4 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
angular.module("admin.enterprises")
.controller "sellsCtrl", ($scope) ->
.controller "changeTypeFormCtrl", ($scope) ->
$scope.sells = "unspecified"
$scope.producer_profile_only = true
$scope.submitted = false

View File

@@ -1,5 +1,7 @@
= admin_inject_enterprise
= form_for @enterprise, url: main_app.set_sells_admin_enterprise_path(@enterprise),
html: { name: "change_type", id: "change_type", novalidate: true, "ng-app" => "admin.enterprises", "ng-controller"=> 'sellsCtrl' } do |change_type_form|
html: { name: "change_type", id: "change_type", novalidate: true, "ng-app" => "admin.enterprises", "ng-controller"=> 'changeTypeFormCtrl' } do |change_type_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