/[drupal]/contributions/modules/office_hours/office_hours.elements.inc
ViewVC logotype

Diff of /contributions/modules/office_hours/office_hours.elements.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.4, Sun Nov 1 14:49:36 2009 UTC revision 1.1.2.5, Sun Nov 8 08:35:20 2009 UTC
# Line 47  function office_hours_field_process($ele Line 47  function office_hours_field_process($ele
47    if (!($element['#weight'] & 1)) { //first cell    if (!($element['#weight'] & 1)) { //first cell
48      $element['#prefix'] = '<div class="office-hours-block">'.t($days[$day]);      $element['#prefix'] = '<div class="office-hours-block">'.t($days[$day]);
49    }    }
50    elseif ($field['addhrs']) {  //we're supposed to show the 'add hours link'    elseif ($field['addhrs']) {  // second cell, we're supposed to show the 'add hours link'
51      $link = l(t('Add more hours'),'office-hours-add',array('attributes' => array('class'=>'oh-add-more-link'))).'<div class="office-hours-block">'.t('And from');      $link = l(t('Add more hours'),'office-hours-add',array('attributes' => array('class'=>'oh-add-more-link'))).'<div class="office-hours-block">'.t('And from');
52      $element['#prefix'] = isset($element['#value'][$field_strhrs]) ? '<div class="office-hours-block">'.t('And from') : $link;      $element['#prefix'] = isset($element['#value'][$field_strhrs]) ? '<div class="office-hours-block">'.t('And from') : $link;
53    }    }
54    else { //this is the second cell and were not showing it- better to clear it.    else { //this is the second cell and were not showing it- better clear it (in case a value was entered before).
55      unset($element['#value'][$field_strhrs]);      $element['#prefix'] = "<div class='oh-hide'>";
56        $element['#value'][$field_strhrs] = '';
57    }    }
58    
59    $element['#suffix'] = '</div>';    $element['#suffix'] = '</div>';

Legend:
Removed from v.1.1.2.4  
changed lines
  Added in v.1.1.2.5

  ViewVC Help
Powered by ViewVC 1.1.2