Skip to content

Commit

Permalink
Merge pull request #3 from Lullabot/CROPS-26-disable-form
Browse files Browse the repository at this point in the history
CROPS-26 Disable blog form when user does not have a profile
  • Loading branch information
jrearick committed Jun 5, 2015
2 parents c39b28a + 0239e9a commit bd33c1c
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 bd33c1c

Please sign in to comment.