function certificate_form_submit in Certificate 8.3
Same name and namespace in other branches
- 7.3 certificate.module \certificate_form_submit()
Certificate node form submit
File
- ./
certificate.module, line 71 - Certificate module.
Code
function certificate_form_submit(&$form, &$form_state) {
$certificate = entity_ui_form_submit_build_entity($form, $form_state);
if (entity_save('certificate', $certificate)) {
drupal_set_message(t('The certificate %title has been saved.', array(
'%title' => entity_label('certificate', $certificate),
)));
}
else {
drupal_set_message(t('There was an error saving the certificate'), 'error');
}
$form_state['redirect'] = 'admin/structure/certificates';
}