| 1 |
<?php |
<?php |
| 2 |
// $Id: addresses_cck.module,v 1.10 2008/07/31 10:16:10 brmassa Exp $ |
// $Id: addresses_cck.module,v 1.11 2008/08/01 04:09:08 brmassa Exp $ |
| 3 |
/** |
/** |
| 4 |
* @author Bruno Massa |
* @author Bruno Massa |
| 5 |
* @file addresses_cck.module |
* @file addresses_cck.module |
| 7 |
* |
* |
| 8 |
* @todo Implement AJAX for multiple values. |
* @todo Implement AJAX for multiple values. |
| 9 |
* @todo Ensure this will work with the Addresses, Views, and GMap |
* @todo Ensure this will work with the Addresses, Views, and GMap |
|
* @todo Probably replace the 'old' method of adding fields to nodes and users |
|
|
* (can use usernodes and/or nodeprofiles instead) |
|
| 10 |
* @todo All the cool stuff you get with CCK widgets |
* @todo All the cool stuff you get with CCK widgets |
| 11 |
* @todo Can pre-populate default values per-field |
* @todo Can pre-populate default values per-field |
| 12 |
*/ |
*/ |
| 106 |
switch ($op) { |
switch ($op) { |
| 107 |
case 'form': |
case 'form': |
| 108 |
// Get the form fields from the API addressesfieldapi |
// Get the form fields from the API addressesfieldapi |
| 109 |
|
module_load_include('inc', 'addresses'); |
| 110 |
$form = _addresses_settings($field); |
$form = _addresses_settings($field); |
| 111 |
return $form; |
return $form; |
| 112 |
|
|
| 113 |
case 'save': |
case 'save': |
| 114 |
// First, get the form fields from the API addressesfieldapi |
// First, get the form fields from the API addressesfieldapi |
| 115 |
|
module_load_include('inc', 'addresses'); |
| 116 |
$form = _addresses_settings($field); |
$form = _addresses_settings($field); |
| 117 |
|
|
| 118 |
// With the fields and their values correctly assigned, |
// With the fields and their values correctly assigned, |