Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark committed Jun 14, 2017
0 parents commit 7a7cd9d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
19 changes: 19 additions & 0 deletions mnn_project_id.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name = MNN Project ID
description = "Allows staff to manually set the OG Group ID (gid)"

dependencies[] = "cm_project"
dependencies[] = "og"

files[] = mnn_project_id.module

package = "MNN Community Media Advanced"
version = "7.x-1.0"
core = "7.x"
project = "mnn_project_id"
project_status_url = https://github.com/cm-advanced/mnn_project_id
php = "5.2.4"





38 changes: 38 additions & 0 deletions mnn_project_id.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
* @file
* Code for the MNN Project ID.
*/

/**
* Implements hook_form_FORM_ID_alter().
*/
function mnn_project_id_form_alter(&$form, &$form_state, $form_id) {

//dsm($form_id);

//dsm($form);

if ($form_id == 'cm_project_node_form' && empty($form['vid']['#value'])) {




$form['nid'] = array(
'#type' => 'textfield',
'#title' => 'Project ID',
'#required' => TRUE,
'#weight' => '-11',
'#description' => 'Create the Project in Access Center 1.0 first, then copy the ID into this field so the old and new ids match',
);

$form['is_new'] = array(
'#type' => 'hidden',
'#title' => 'is_new',
'#value' => TRUE,
);


//dsm($form);
}
}

0 comments on commit 7a7cd9d

Please sign in to comment.