/[drupal]/contributions/modules/transcription/transcription.module
ViewVC logotype

Diff of /contributions/modules/transcription/transcription.module

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

revision 1.5, Tue Oct 28 14:53:29 2008 UTC revision 1.6, Tue Oct 28 15:13:09 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: transcription.module,v 1.4 2008/10/28 14:50:12 aaron Exp $  // $Id: transcription.module,v 1.5 2008/10/28 14:53:29 aaron Exp $
3    
4  // Initial code by Jonathan DeLaigle (grndlvl).  // Initial code by Jonathan DeLaigle (grndlvl).
5  // Modified by Aaron Winborn for the Media Transcriptions module.  // Modified by Aaron Winborn for the Media Transcriptions module.
# Line 192  function transcription_widget($op, &$nod Line 192  function transcription_widget($op, &$nod
192              $form[$field['field_name']][$delta]['transcription'] = array(              $form[$field['field_name']][$delta]['transcription'] = array(
193                '#type' => 'textarea',                '#type' => 'textarea',
194                '#title' => t('Transcription'),                '#title' => t('Transcription'),
195                '#description' => (isset($field['transcription_description'])) ? t($field['transcription_description']) : '',                '#description' => (isset($field['transcription_description'])) ? check_plain($field['transcription_description']) : '',
196                '#maxlength' => $field['max_length'] ? $field['max_length'] : NULL,                '#maxlength' => $field['max_length'] ? $field['max_length'] : NULL,
197                '#weight' => -10,                '#weight' => -10,
198                '#required' => ($delta == 0) ? $field['required'] : FALSE,                '#required' => ($delta == 0) ? $field['required'] : FALSE,
# Line 204  function transcription_widget($op, &$nod Line 204  function transcription_widget($op, &$nod
204              $form[$field['field_name']][$delta]['timemarker'] = array(              $form[$field['field_name']][$delta]['timemarker'] = array(
205                '#type' => 'textfield',                '#type' => 'textfield',
206                '#title' => t('Transcription time marker'),                '#title' => t('Transcription time marker'),
207                '#description' => (isset($field['transcription_timemarker_description'])) ? t($field['transcription_timemarker_description']) : '',                '#description' => (isset($field['transcription_timemarker_description'])) ? check_plain($field['transcription_timemarker_description']) : '',
208                '#required' => ($delta == 0) ? $field['required'] : FALSE,                '#required' => ($delta == 0) ? $field['required'] : FALSE,
209                '#size' => 8,                '#size' => 8,
210                '#maxlength' => 8,                '#maxlength' => 8,
# Line 218  function transcription_widget($op, &$nod Line 218  function transcription_widget($op, &$nod
218            $form[$field['field_name']][$delta] = array(            $form[$field['field_name']][$delta] = array(
219              '#type' => 'fieldset',              '#type' => 'fieldset',
220              '#title' =>  t('Media Transcription') .' '. ($delta+1),              '#title' =>  t('Media Transcription') .' '. ($delta+1),
221              '#description' => t('In order to add additional fields you must click <strong>Submit</strong> or <strong>Preview</strong>.'),              '#description' => t('In order to add additional fields you must click %submit or %preview.', array('%submit' => t('Submit'), '%preview' => t('Preview'))),
222              '#collapsible' => true,              '#collapsible' => true,
223              '#collapsed' => false,              '#collapsed' => false,
224            );            );
# Line 228  function transcription_widget($op, &$nod Line 228  function transcription_widget($op, &$nod
228              '#maxlength' => $field['max_length'] ? $field['max_length'] : NULL,              '#maxlength' => $field['max_length'] ? $field['max_length'] : NULL,
229              '#weight' => -10,              '#weight' => -10,
230              '#required' => ($delta == 0) ? $field['required'] : FALSE,              '#required' => ($delta == 0) ? $field['required'] : FALSE,
231              '#description' => (isset($field['transcription_description'])) ? t($field['transcription_description']) : '',              '#description' => (isset($field['transcription_description'])) ? check_plain($field['transcription_description']) : '',
232            );            );
233            if ($field['text_processing']) {            if ($field['text_processing']) {
234              $form[$field['field_name']][$delta]['format'] = filter_form($items[$delta]['format'], $form[$field['field_name']][$delta]['transcription']['#weight'] + 1, array($field['field_name'], $delta, 'format'));              $form[$field['field_name']][$delta]['format'] = filter_form($items[$delta]['format'], $form[$field['field_name']][$delta]['transcription']['#weight'] + 1, array($field['field_name'], $delta, 'format'));
# Line 239  function transcription_widget($op, &$nod Line 239  function transcription_widget($op, &$nod
239              '#title' => t('Transcription time marker'),              '#title' => t('Transcription time marker'),
240              '#size' => 8,              '#size' => 8,
241              '#maxlength' => 8,              '#maxlength' => 8,
242              '#description' => (isset($field['transcription_timemarker_description'])) ? t($field['transcription_timemarker_description']) : '',              '#description' => (isset($field['transcription_timemarker_description'])) ? check_plain($field['transcription_timemarker_description']) : '',
243            );            );
244          }          }
245        }        }
# Line 247  function transcription_widget($op, &$nod Line 247  function transcription_widget($op, &$nod
247          $form[$field['field_name']][0]['transcription'] = array(          $form[$field['field_name']][0]['transcription'] = array(
248            '#type' => 'textarea',            '#type' => 'textarea',
249            '#title' => t('Transcription'),            '#title' => t('Transcription'),
250            '#description' => (isset($field['transcription_description'])) ? t($field['transcription_description']) : '',            '#description' => (isset($field['transcription_description'])) ? check_plain($field['transcription_description']) : '',
251            '#maxlength' => $field['max_length'] ? $field['max_length'] : NULL,            '#maxlength' => $field['max_length'] ? $field['max_length'] : NULL,
252            '#weight' => -10,            '#weight' => -10,
253            '#default_value' => isset($items[0]['transcription']) ? $items[0]['transcription'] : '',            '#default_value' => isset($items[0]['transcription']) ? $items[0]['transcription'] : '',
# Line 260  function transcription_widget($op, &$nod Line 260  function transcription_widget($op, &$nod
260            '#title' => t('Transcription time marker'),            '#title' => t('Transcription time marker'),
261            '#size' => 8,            '#size' => 8,
262            '#maxlength' => 8,            '#maxlength' => 8,
263            '#description' => (isset($field['transcription_timemarker_description'])) ? t($field['transcription_timemarker_description']) : '',            '#description' => (isset($field['transcription_timemarker_description'])) ? check_plain($field['transcription_timemarker_description']) : '',
264            '#default_value' => isset($items[0]['timemarker']) && $items[0]['timemarker'] != 0 ? $items[0]['timemarker'] : '',            '#default_value' => isset($items[0]['timemarker']) && $items[0]['timemarker'] != 0 ? $items[0]['timemarker'] : '',
265          );          );
266        }        }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.2