Skip to content
Snippets Groups Projects
Unverified Commit 6bae7689 authored by weaver299's avatar weaver299 Committed by GitHub
Browse files

Merge pull request #301 from ASCWebServices/canini-2

debugging people mobile view
parents 9cf58e78 39da8dc9
No related merge requests found
......@@ -632,15 +632,51 @@ function asc_bootstrap_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $
$form['field_research_interests_target_id']['#weight'] = 4;
if(count($form['field_appointment_target_id']['#options']) == 0) {
$form['field_appointment_target_id']['#access'] = FALSE;
$form['field_appointment_target_id_collapsible']['#access'] = FALSE;
}
else {
$tid = array_shift(array_keys($form['field_appointment_target_id']['#options']));
$term = Term::load($tid);
if (!empty($term)) {
$vid = array_shift($term->vid->getValue())['target_id'];
if(!empty($vid)) {
$vocab = Vocabulary::load($vid);
$vocab_label = $vocab->get('name');
$form['field_appointment_target_id_collapsible']['#title'] = $vocab_label;
}
}
}
if(count($form['field_research_interests_target_id']['#options']) == 0) {
$form['field_research_interests_target_id']['#access'] = FALSE;
$form['field_research_interests_target_id_collapsible']['#access'] = FALSE;
}
else {
$tid = array_shift(array_keys($form['field_research_interests_target_id']['#options']));
$term = Term::load($tid);
if (!empty($term)) {
$vid = array_shift($term->vid->getValue())['target_id'];
if(!empty($vid)) {
$vocab = Vocabulary::load($vid);
$vocab_label = $vocab->get('name');
$form['field_research_interests_target_id_collapsible']['#title'] = $vocab_label;
}
}
}
if(count($form['field_other_target_id']['#options']) == 0) {
$form['field_other_target_id']['#access'] = FALSE;
$form['field_other_target_id_collapsible']['#access'] = FALSE;
}
else {
$tid = array_shift(array_keys($form['field_other_target_id']['#options']));
$term = Term::load($tid);
if (!empty($term)) {
$vid = array_shift($term->vid->getValue())['target_id'];
if(!empty($vid)) {
$vocab = Vocabulary::load($vid);
$vocab_label = $vocab->get('name');
$form['field_other_target_id_collapsible']['#title'] = $vocab_label;
}
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment