Changeset 142 for gna-drupal
- Timestamp:
- 05/27/08 01:17:44 (13 months ago)
- Location:
- gna-drupal/trunk/drupal-5/gna_registry
- Files:
-
- 2 moved
-
gna_contact.info (moved) (moved from gna-drupal/trunk/drupal-5/gna_registry/gna_registry_contact.info) (1 diff)
-
gna_contact.module (moved) (moved from gna-drupal/trunk/drupal-5/gna_registry/gna_registry_contact.module) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gna-drupal/trunk/drupal-5/gna_registry/gna_contact.info
r141 r142 4 4 dependencies = simpletest gna_registry 5 5 package = GNA 6 version = '$Rev$'6 version = "$Rev$" -
gna-drupal/trunk/drupal-5/gna_registry/gna_contact.module
r140 r142 10 10 * Implementation of hook_access(). 11 11 */ 12 function gna_ registry_contact_access($op, $node, $account) {12 function gna_contact_access($op, $node, $account) { 13 13 if ($op == 'view'){ 14 14 return TRUE; … … 23 23 * Implementation of hook_delete(). 24 24 */ 25 function gna_ registry_contact_delete(&$node) {25 function gna_contact_delete(&$node) { 26 26 $gc = new GnaContact; 27 27 $gc->init($node->nid, $node->vid); … … 34 34 */ 35 35 function gna_registry_contact_form($node) { 36 $form[' contact_id'] = array(36 $form['id'] = array( 37 37 '#type' => 'hidden', 38 38 '#default_value' => $node->id, … … 40 40 ); 41 41 42 $form[' contact_title'] = array(42 $form['title'] = array( 43 43 '#type' => 'textfield', 44 44 '#title' => t('Title'), … … 47 47 ); 48 48 49 $form[' contact_first_name'] = array(49 $form['first_name'] = array( 50 50 '#type' => 'textfield', 51 51 '#title' => t('First Name'), … … 53 53 '#required' => FALSE, 54 54 ); 55 $form[' contact_last_name'] = array(55 $form['last_name'] = array( 56 56 '#type' => 'textfield', 57 57 '#title' => t('Last Name'), … … 59 59 '#required' => FALSE, 60 60 ); 61 $form[' contact_email'] = array(61 $form['email'] = array( 62 62 '#type' => 'textfield', 63 63 '#title' => t('Email'), … … 65 65 '#required' => FALSE, 66 66 ); 67 $form[' contact_telephone'] = array(67 $form['telephone'] = array( 68 68 '#type' => 'textfield', 69 69 '#title' => t('Telephone'), … … 71 71 '#required' => FALSE, 72 72 ); 73 $form[' contact_address'] = array(73 $form['address'] = array( 74 74 '#type' => 'textfield', 75 75 '#title' => t('Address'), … … 89 89 } 90 90 91 function gna_ registry_contact_form_validate($form_id, $form_values){91 function gna_contact_form_validate($form_id, $form_values){ 92 92 //TODO: implement sensible validation in the form 93 93 if ($form_values['contact_first_name'] == 'King Kong'){ … … 101 101 * Implementation of hook_insert(). 102 102 */ 103 function gna_ registry_contact_insert($node) {103 function gna_contact_insert($node) { 104 104 $gc = new GnaContact; 105 105 $gc->create($node); … … 110 110 * Implementation of hook_load(). 111 111 */ 112 function gna_ registry_contact_load($node) {112 function gna_contact_load($node) { 113 113 $gc = new GnaContact; 114 114 $gc->init($node->nid, $node->vid); … … 120 120 * Implementation of hook_node_info(). 121 121 */ 122 function gna_ registry_contact_node_info() {122 function gna_contact_node_info() { 123 123 return array( 124 124 'gna_registry_contact' => array( 125 125 'name' => t('GNA Registry Contact'), 126 'module' => 'gna_ registry_contact',126 'module' => 'gna_contact', 127 127 'description' => t('GNA contact information'), 128 'has_title' => TRUE,129 'title_label' => t('Name'),128 'has_title' => FALSE, 129 //'title_label' => t('Name'), 130 130 'has_body' => FALSE, 131 131 'locked' => TRUE, … … 138 138 * Implementation of hook_update(). 139 139 */ 140 function gna_ registry_contact_update($node) {140 function gna_contact_update($node) { 141 141 $gc = new GnaContact; 142 142 $gc->init($node->nid, $node->vid); … … 148 148 * Implementation of hook_validate(). 149 149 */ 150 function gna_ registry_contact_validate($node, &$form) {150 function gna_contact_validate($node, &$form) { 151 151 // TODO: Enter sensible form validation code here 152 152 if ($form['contact_first_name'] == 'King Kong'){ … … 161 161 * Implementation of hook_view(). 162 162 */ 163 function gna_ registry_contact_view($node, $teaser = FALSE, $page = FALSE) {163 function gna_contact_view($node, $teaser = FALSE, $page = FALSE) { 164 164 // TODO: Insert additional code (call to theme functions, etc.) to execute when viewing a node, for example: 165 165 // $node = node_prepare($node, $teaser); … … 221 221 * Implementation of hook_perm(). 222 222 */ 223 function gna_ registry_contact_perm() {223 function gna_contact_perm() { 224 224 return array('GNA Registry Admin'); 225 225 }
