Completed
Push — master ( 38f5b7...442fb4 )
by Nic
32s
created
code/form/LocatorBootstrapForm.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -2,46 +2,46 @@
 block discarded – undo
2 2
 
3 3
 if (class_exists('BootstrapForm')) {
4 4
 
5
-    /**
6
-     * Class LocatorForm
7
-     */
8
-    class LocatorBootstrapForm extends BootstrapForm
9
-    {
10
-
11
-        /**
12
-         * LocatorForm constructor.
13
-         * @param Controller $controller
14
-         * @param string $name
15
-         */
16
-        public function __construct(Controller $controller, $name)
17
-        {
18
-            $fields = FieldList::create(
19
-                TextField::create('Address')
20
-                    ->setTitle('')
21
-                    ->setAttribute('placeholder', 'address or zip code')
22
-            );
23
-
24
-            $categories = (Locator::locator_categories_by_locator($controller->data()->ID)->count() > 0)
25
-                ? Locator::locator_categories_by_locator($controller->data()->ID)
26
-                : Locator::get_all_categories();
27
-
28
-            $categoriesField = DropdownField::create('CategoryID')
29
-                ->setTitle('')
30
-                ->setEmptyString('All Categories')
31
-                ->setSource($categories->map());
32
-
33
-            $fields->push($categoriesField);
34
-
35
-            $actions = FieldList::create(
36
-                FormAction::create('doFilterLocations')
37
-                    ->setTitle('Search')
38
-            );
39
-
40
-            $validator = RequiredFields::create();
41
-
42
-            parent::__construct($controller, $name, $fields, $actions, $validator);
43
-        }
44
-
45
-    }
5
+	/**
6
+	 * Class LocatorForm
7
+	 */
8
+	class LocatorBootstrapForm extends BootstrapForm
9
+	{
10
+
11
+		/**
12
+		 * LocatorForm constructor.
13
+		 * @param Controller $controller
14
+		 * @param string $name
15
+		 */
16
+		public function __construct(Controller $controller, $name)
17
+		{
18
+			$fields = FieldList::create(
19
+				TextField::create('Address')
20
+					->setTitle('')
21
+					->setAttribute('placeholder', 'address or zip code')
22
+			);
23
+
24
+			$categories = (Locator::locator_categories_by_locator($controller->data()->ID)->count() > 0)
25
+				? Locator::locator_categories_by_locator($controller->data()->ID)
26
+				: Locator::get_all_categories();
27
+
28
+			$categoriesField = DropdownField::create('CategoryID')
29
+				->setTitle('')
30
+				->setEmptyString('All Categories')
31
+				->setSource($categories->map());
32
+
33
+			$fields->push($categoriesField);
34
+
35
+			$actions = FieldList::create(
36
+				FormAction::create('doFilterLocations')
37
+					->setTitle('Search')
38
+			);
39
+
40
+			$validator = RequiredFields::create();
41
+
42
+			parent::__construct($controller, $name, $fields, $actions, $validator);
43
+		}
44
+
45
+	}
46 46
 
47 47
 }
48 48
\ No newline at end of file
Please login to merge, or discard this patch.