/**
  * @param ALBUM $folder Album in which to add or edit the picture.
  */
 public function __construct($folder)
 {
     parent::__construct($folder);
     $field = new DATE_TIME_FIELD();
     $field->id = 'day';
     $field->caption = 'Day';
     $field->required = true;
     $field->sticky = true;
     $this->add_field($field);
 }
 /**
  * @param PROJECT $folder Project in which to add or edit the PROJECT_ENTRY.
  */
 public function __construct($folder)
 {
     parent::__construct($folder);
     $field = new MUNGER_TEXT_FIELD();
     $field->id = 'extra_description';
     $field->caption = 'Description';
     $field->description = 'This information is not shown in job lists or change logs, ' . ' but is always available when a job is viewed alone. If it\'s' . ' a bug, store the stack trace or log output here. If it\'s a' . ' new feature, store examples and a more in-depth description here.';
     $this->add_field($field);
     $field = new ENUMERATED_FIELD();
     $field->id = 'kind';
     $field->caption = 'Kind';
     $field->required = true;
     $field->sticky = true;
     $kinds = $this->app->display_options->entry_kinds();
     if (sizeof($kinds)) {
         foreach ($kinds as $kind) {
             $field->add_value($kind->value);
         }
     }
     $this->add_field($field);
     $field = new INTEGER_FIELD();
     $field->id = 'component_id';
     $field->caption = 'Component';
     $field->sticky = true;
     $this->add_field($field);
     $branch_query = $folder->branch_query();
     $this->branches = $branch_query->objects();
     $this->default_branch_id = $folder->trunk_id;
     foreach ($this->branches as $branch) {
         $this->_add_fields_for_branch($branch);
     }
     $field = new INTEGER_FIELD();
     $field->id = "main_branch_id";
     $field->caption = "Main Branch";
     $field->min_value = 1;
     $this->add_field($field);
     $field = $this->field_at('description');
     $field->caption = 'Summary';
     $field->description = 'A short description that is shown in change logs and job lists.' . ' Longer text that should not appear in summaries should go in' . ' the \'Extra Information\' field below.';
 }
 /**
  * @param FOLDER $folder Object is created/edited in this folder.
  */
 public function __construct($folder)
 {
     parent::__construct($folder);
     $field = new BOOLEAN_FIELD();
     $field->id = 'draft';
     $field->caption = 'Draft';
     $field->visible = false;
     $this->add_field($field);
     $field = new BOOLEAN_FIELD();
     $field->id = 'quick_save';
     $field->caption = 'Quick Save';
     $field->visible = false;
     $this->add_field($field);
 }