1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php

class ProductStyle extends DataObject {

  public static $db = array(
    'StyleSeason' => 'Text',
    'StyleGender' => 'Text',
    'StyleNumber' => 'Text',
    'StyleName' => 'Text',
    'StyleColor' => 'Text',
    'StyleCategory' => 'Text',
    'StyleSubCategory' => 'Text',
    'StyleSize' => 'Text',
    'StyleMaterial' => 'Text',
    'StyleDescription' => 'Text'
  );

  public static $belongs_many_many = array(
    'ProductPages' => 'ProductPage'
  );

  function getCMSFields_forPopup() {
    $fields = new FieldSet();
    $fields->push( new TextField( 'StyleSeason', 'Season' ) );

    $fields->push( new DropdownField( 'StyleGender', 'Gender', $source = array(mens => "MENS", ladies => "LADIES") ) );

    $fields->push( new TextField( 'StyleNumber', 'Style #' ) );

    $fields->push( new TextField( 'StyleName', 'Name' ) );

    $fields->push( new TextField( 'StyleColor', 'Colors' ) );

    $fields->push( new DropdownField( 'StyleCategory', 'Category', $source = array(rainwear => "Rainwear", windwear => "Windwear", sweaters => "Tech Sweaters", tecknits => "Tecknits", accessories => "Accessories") ) );

    $fields->push( new TextField( 'StyleSubCategory', 'Sub Category' ) );    

    $fields->push( new TextField( 'StyleSize', 'Sizes' ) );

    $fields->push( new TextField( 'StyleMaterial', 'Material' ) );

    $fields->push( new TextField( 'StyleDescription', 'Description' ) );

    return $fields;
  }

}
?>