/** * Store the form's values for this change. * @param CHANGE $obj * @access private */ protected function _store_to_object($obj) { parent::_store_to_object($obj); $obj->parent_release_id = $this->value_for('parent_release_id'); switch ($this->value_for('state')) { case Hidden: $obj->hide(Defer_database_update); break; case Locked: $obj->lock(Defer_database_update); break; case Visible: $obj->show(Defer_database_update); break; } }
/** * @access private */ protected function _draw_scripts() { parent::_draw_scripts(); ?> function upload_file_changed (ctrl) { if (ctrl.value) { ctrl.form.create_thumbnail.checked = true; } } function on_click_thumbnail (ctrl) { ctrl.form.thumbnail_size.disabled = ! ctrl.checked; } <?php }
/** * Draw options between the title and description. * This is a good place for controls that add content to the description * (toolbars, etc.). * @param FORM_RENDERER $renderer * @access private */ protected function _draw_options($renderer) { $this->_draw_attachment_selector($renderer); parent::_draw_options($renderer); }
/** * Initialize the form's fields with default values and visibilities. */ public function load_with_defaults() { parent::load_with_defaults(); $icon_url = read_var('icon_url'); if ($icon_url) { $this->set_value('icon_url', $icon_url); } }
/** * Store the form's values for this change. * @param RELEASE $obj * @access private */ protected function _store_to_object($obj) { $obj->summary = $this->value_for('summary'); /** @var DATE_TIME $time_scheduled */ $time_scheduled = $this->value_for('time_scheduled'); $obj->set_time_scheduled($time_scheduled); /** @var DATE_TIME $time_testing_scheduled */ $time_testing_scheduled = $this->value_for('time_testing_scheduled'); $obj->set_time_testing_scheduled($time_testing_scheduled); $obj->branch_id = $this->value_for('branch_id'); parent::_store_to_object($obj); switch ($this->value_for('state')) { case Hidden: $obj->hide(Defer_database_update); break; case Planned: $obj->plan(Defer_database_update); break; case Testing: $obj->test(Defer_database_update); break; case Shipped: $obj->ship(Defer_database_update); break; case Locked: $obj->lock(Defer_database_update); break; } }
/** * Store the form's values to this object. * @param STORABLE $obj * @access private * @abstract */ protected function _store_to_object($obj) { parent::_store_to_object($obj); $obj->icon_url = $this->value_for('icon_url'); }