Skip to content

Commit

Permalink
CROPS-26 Disable blog form when user does not have a profile
Browse files Browse the repository at this point in the history
  • Loading branch information
juampynr committed Jun 5, 2015
1 parent c39b28a commit 0239e9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions luggage_blog.module
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ function luggage_blog_form_alter(&$form, &$form_state, $form_id) {
// TODO: This needs to be cleaned up a bit to look better
$form['field_lug_blog_author']['#markup'] = $prefix . $profile->title . $suffix;
}
// if there is not a matching author, prompt the user to create their profile.
else {
// if there is not a matching author, prompt the user to create their profile.
drupal_set_message(t('You must <a href="'.$GLOBALS['base_path'].'my/profile">create your profile</a> before creating a blog entry.'), 'warning');
// hide the empty field
$form['field_lug_blog_author']['#markup'] = ' ';
$form['#disabled'] = TRUE;
}

}
Expand Down

0 comments on commit 0239e9a

Please sign in to comment.