You are here

function feedback_entry_form_submit in Feedback 7.2

Form submit callback for entry edit form.

@todo Duplicates feedback_form_submit(). Add all default entity properties as #type 'value' to feedback_form() and merge the two submit handlers.

File

./feedback.admin.inc, line 226
Administrative functionality for Feedback module.

Code

function feedback_entry_form_submit(&$form, &$form_state) {
  $entry = feedback_load($form['#fid']);
  entity_form_submit_build_entity('feedback', $entry, $form, $form_state);
  $entry->message = $form_state['values']['message'];
  $entry->location = $form_state['values']['location'];
  $entry->location_masked = feedback_mask_path($entry->location);
  $entry->url = url($entry->location, array(
    'absolute' => TRUE,
  ));
  $entry->status = $form_state['values']['status'];
  feedback_save($entry);
  drupal_set_message(t('The entry has been updated.'));
}