-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mark
committed
Jun 14, 2017
0 parents
commit 7a7cd9d
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |