/** * @param PROJECT $folder Project to edit or project in which to add. */ public function __construct($folder) { parent::__construct($folder); $field = new BOOLEAN_FIELD(); $field->id = 'defines_options'; $field->caption = 'Defines options'; $this->add_field($field); include_once 'projects/obj/project_options.php'; // include the constants used below $field = new ENUMERATED_FIELD(); $field->id = 'assignee_group_type'; $field->caption = 'Assignees'; $field->add_value(Project_user_all); $field->add_value(Project_user_registered_only); $field->add_value(Project_user_group); $this->add_field($field); $field = new INTEGER_FIELD(); $field->id = 'assignee_group_id'; $field->caption = 'Assignee group id'; $field->min_value = 1; $this->add_field($field); $field = new ENUMERATED_FIELD(); $field->id = 'reporter_group_type'; $field->caption = 'Reporters'; $field->add_value(Project_user_all); $field->add_value(Project_user_registered_only); $field->add_value(Project_user_group); $this->add_field($field); $field = new INTEGER_FIELD(); $field->id = 'reporter_group_id'; $field->caption = 'Reporter group id'; $field->min_value = 1; $this->add_field($field); $field = new INTEGER_FIELD(); $field->id = 'seconds_until_deadline'; $field->caption = 'Releases'; $field->description = 'Show a warning for releases with a deadline within this many days.'; $field->min_value = 0; $this->add_field($field); // only shown for existing objects $field = new INTEGER_FIELD(); $field->id = 'trunk_id'; $field->caption = 'Trunk'; $field->description = 'Default branch for new jobs and changes.'; $field->min_value = 1; $this->add_field($field); // only shown for new objects $field = new TITLE_FIELD(); $field->id = 'branch_title'; $field->caption = 'Branch title'; $field->description = 'Fill in the name of the default branch for this project.'; $this->add_field($field); }
/** * @param ALBUM $folder Album to edit or create. */ public function __construct($folder) { parent::__construct($folder); $field = new URI_FIELD(); $field->id = 'url_root'; $field->caption = 'Root URL'; $field->required = true; $this->add_field($field); $field = new BOOLEAN_FIELD(); $field->id = 'show_times'; $field->caption = 'Show times'; $field->description = 'Shows times with albums, picture and journals for finer detail.'; $this->add_field($field); $field = new BOOLEAN_FIELD(); $field->id = 'show_celsius'; $field->caption = 'Show celsius'; $this->add_field($field); $field = new INTEGER_FIELD(); $field->id = 'max_picture_height'; $field->caption = 'Maximum picture height'; $field->min_value = 0; $this->add_field($field); $field = new INTEGER_FIELD(); $field->id = 'max_picture_width'; $field->caption = 'Maximum picture width'; $field->min_value = 0; $this->add_field($field); $field = new ENUMERATED_FIELD(); $field->id = 'date_style'; $field->caption = ''; $field->add_value(Album_is_single_day); $field->add_value(Album_is_span); $field->add_value(Album_is_journal); $field->add_value(Album_is_adjusted); $field->required = true; $this->add_field($field); $field = new DATE_FIELD(); $field->id = 'first_day'; $field->caption = 'First day'; $this->add_field($field); $field = new DATE_FIELD(); $field->id = 'last_day'; $field->caption = 'Last day'; $this->add_field($field); $field = new BOOLEAN_FIELD(); $field->id = 'constrain_picture_size'; $field->caption = 'Display pictures as'; $field->description = 'Constrain larger pictures to this initial size.'; $this->add_field($field); $field = new INTEGER_FIELD(); $field->id = 'main_picture_id'; $field->caption = 'Key photo'; $field->min_value = 0; $field->visible = false; $this->add_field($field); $field = new ENUMERATED_FIELD(); $field->id = 'location'; $field->caption = 'Location'; $field->required = true; $field->add_value(Album_location_type_local); $field->add_value(Album_location_type_remote); $this->add_field($field); $field = new BOOLEAN_FIELD(); $field->id = 'url_root_enabled'; $field->caption = ''; $field->description = 'Check to change the Root URL. For advanced users only -- pictures are not moved when the root is changed.'; $this->add_field($field); }