Merge "Remove notices from user profile edit form"

This commit is contained in:
Jenkins 2015-03-10 10:55:26 +00:00 committed by Gerrit Code Review
commit 26defb2721
2 changed files with 14 additions and 10 deletions

View File

@ -36,10 +36,12 @@ function groups_comment_form_comment_form_alter(&$form, &$form_state) {
* Set default text format to markdown for the group/body field.
*/
function groups_comment_text_format_alter(&$element) {
if (($element['#bundle'] == 'comment_node_post') && ($element['#field_name'] == 'comment_body')) {
// set default value to markdown
$element['format']['format']['#default_value'] = 'markdown';
// hide text format filter
$element['format']['#access'] = FALSE;
if ((isset($element['#bundle'])) && (isset($element['#field_name']))) {
if (($element['#bundle'] == 'comment_node_post') && ($element['#field_name'] == 'comment_body')) {
// set default value to markdown
$element['format']['format']['#default_value'] = 'markdown';
// hide text format filter
$element['format']['#access'] = FALSE;
}
}
}

View File

@ -143,11 +143,13 @@ function groups_groups_theme() {
*/
function groups_groups_text_format_alter(&$element) {
$bundles = array('group', 'post');
if ((in_array($element['#bundle'], $bundles)) && ($element['#field_name'] == 'body')) {
// set default value to markdown
$element['format']['format']['#default_value'] = 'markdown';
// hide text format filter
$element['format']['#access'] = FALSE;
if ((isset($element['#bundle'])) && (isset($element['#field_name']))) {
if ((in_array($element['#bundle'], $bundles)) && ($element['#field_name'] == 'body')) {
// set default value to markdown
$element['format']['format']['#default_value'] = 'markdown';
// hide text format filter
$element['format']['#access'] = FALSE;
}
}
}