/** * @param ALBUM $folder Album in which to add or edit the journal entry. */ public function __construct($folder) { parent::__construct($folder); $field = new INTEGER_FIELD(); $field->id = 'lo_temp'; $field->caption = 'Low'; $field->min_value = -60; $field->max_value = 60; $this->add_field($field); $field = new INTEGER_FIELD(); $field->id = 'hi_temp'; $field->caption = 'High'; $field->min_value = -60; $field->max_value = 60; $this->add_field($field); $field = new INTEGER_FIELD(); $field->id = 'weather_type'; $field->caption = 'Weather Type'; $field->required = true; $this->add_field($field); $field = new MUNGER_TEXT_FIELD(); $field->id = 'weather'; $field->caption = 'Weather'; $this->add_field($field); }
/** * @param ALBUM $folder Album in which to add or edit the picture. */ public function __construct($folder) { parent::__construct($folder); $field = new TEXT_FIELD(); $field->id = 'file_name'; $field->caption = 'File Name'; $field->min_length = 1; $field->max_length = 1000; $this->add_field($field); $field = new UPLOAD_FILE_FIELD(); $field->id = 'upload_file'; $field->caption = 'Picture'; $field->max_bytes = text_to_file_size('2MB'); $this->add_field($field); $field = new BOOLEAN_FIELD(); $field->id = 'create_thumbnail'; $field->caption = 'Create a thumbnail'; $field->sticky = true; $this->add_field($field); $field = new INTEGER_FIELD(); $field->id = 'thumbnail_size'; $field->caption = 'Thumbnail size'; $field->min_value = 32; $field->max_value = 400; $field->sticky = true; $this->add_field($field); $field = new BOOLEAN_FIELD(); $field->id = 'overwrite'; $field->caption = 'Overwrite existing file'; $field->sticky = true; $this->add_field($field); $field = new BOOLEAN_FIELD(); $field->id = 'read_exif'; $field->caption = 'Read EXIF info'; $field->sticky = true; $this->add_field($field); $field = new BOOLEAN_FIELD(); $field->id = 'use_upload'; $field->sticky = true; $this->add_field($field); $field = $this->field_at('day'); $field->required = false; }