| 1 |
<?php |
<?php |
| 2 |
// $Id: add_reference.php,v 1.1.2.2 2008/09/09 11:11:13 anselmheaton Exp $ |
// $Id: add_reference.php,v 1.1.2.3 2008/10/13 11:34:19 anselmheaton Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_menu() for the add to referrer page |
* Implementation of hook_menu() for the add to referrer page |
| 42 |
'#title' => t('Select @content_type you want to add to @title', |
'#title' => t('Select @content_type you want to add to @title', |
| 43 |
array('@content_type' => $type['name'], '@title' => $node->title)), |
array('@content_type' => $type['name'], '@title' => $node->title)), |
| 44 |
'#autocomplete_path' => 'nodereference/autocomplete/'.$field_name, |
'#autocomplete_path' => 'nodereference/autocomplete/'.$field_name, |
| 45 |
'#default_value' => '' |
'#default_value' => '', |
| 46 |
|
'#maxlength' => 1024, // A Drupal title is maximum 255 chars ; but the autocomplete can be the result of a view. |
| 47 |
); |
); |
| 48 |
} else { |
} else { |
| 49 |
$form['referrence'] = array( |
$form['referrence'] = array( |
| 51 |
'#title' => t('Select @content_type you want to use for @title. This will replace the existing value.', |
'#title' => t('Select @content_type you want to use for @title. This will replace the existing value.', |
| 52 |
array('@content_type' => $type['name'], '@title' => $node->title)), |
array('@content_type' => $type['name'], '@title' => $node->title)), |
| 53 |
'#autocomplete_path' => 'nodereference/autocomplete/'.$field_name, |
'#autocomplete_path' => 'nodereference/autocomplete/'.$field_name, |
| 54 |
'#default_value' => '' |
'#default_value' => '', |
| 55 |
|
'#maxlength' => 1024, // A Drupal title is maximum 255 chars ; but the autocomplete can be the result of a view. |
| 56 |
); |
); |
| 57 |
} |
} |
| 58 |
|
|