/** * @access private */ protected function _draw_scripts() { parent::_draw_scripts(); ?> function upload_file_changed (ctrl) { if (ctrl.value) { ctrl.form.create_thumbnail.checked = true; select_item (ctrl.form.use_upload, 1, true); select_item (ctrl.form.read_exif, 1, true); } } function file_name_changed (ctrl) { if (ctrl.value) { ctrl.form.create_thumbnail.checked = true; select_item (ctrl.form.use_upload, 0, true); } } function file_option_changed (ctrl) { var is_uploading = is_selected (ctrl, 1); ctrl.form.file_name.disabled = is_uploading; ctrl.form.upload_file.disabled = ! is_uploading; ctrl.form.overwrite.disabled = ! is_uploading; } function on_click_thumbnail (ctrl) { ctrl.form.thumbnail_size.disabled = ! ctrl.checked; } function on_date_changed (ctrl) { ctrl.form.day.disabled = is_selected (ctrl, 1); } <?php }
/** * Store the form's values to this journal entry. * @param JOURNAL $obj * @access private */ protected function _store_to_object($obj) { $obj->weather = $this->value_as_text('weather'); $obj->lo_temp = $this->value_as_text('lo_temp'); $obj->hi_temp = $this->value_as_text('hi_temp'); $obj->weather_type = $this->value_for('weather_type'); parent::_store_to_object($obj); }