You are here

function avatar_selection_edit_delete_form_submit in Avatar Selection 7

Same name and namespace in other branches
  1. 6 avatar_selection.admin.inc \avatar_selection_edit_delete_form_submit()

Submit the image list form in the Avatar Selection - 'Manage Avatars' page.

Function called when the Delete button is pressed, and deletes the selected avatar(s).

Parameters

$form: General variable used in drupal, defining the structure & the fields of a form.

&$form_state: General reference, used to control the processing of the form.

1 string reference to 'avatar_selection_edit_delete_form_submit'
avatar_selection_edit_form in ./avatar_selection.admin.inc
Create the form structure for listing the avatars and managing them in the 'Manage Avatars' tab under the Avatar Selection administration page.

File

./avatar_selection.admin.inc, line 753
Administrative page callbacks for the avatar_selection module.

Code

function avatar_selection_edit_delete_form_submit($form, &$form_state) {
  $fid = $form_state['values']['select_avatar'];
  $deleted = avatar_selection_image_delete($fid);
  if ($deleted) {
    drupal_set_message(t('Image deleted.'));
  }
}