Commit 509a9e1c authored by drumm's avatar drumm
Browse files

Do not limit project type option in new node preview

parent f0a9fd2e
......@@ -983,7 +983,7 @@ function project_form_node_form_alter(&$form, &$form_state) {
// On node forms, if we're updating a project, don't let the user directly
// manipulate field_project_type but force them to go through the promote
// UI instead. Only display the project type field on initial creation.
if (!empty($form['field_project_type']) && (!empty($node->field_project_type[LANGUAGE_NONE][0]['value']) || !(user_access('create full projects') || user_access("create full {$node->type} projects")))) {
if (!empty($node->nid) && !empty($form['field_project_type']) && (!empty($node->field_project_type[LANGUAGE_NONE][0]['value']) || !(user_access('create full projects') || user_access("create full {$node->type} projects")))) {
$form['field_project_type']['#access'] = FALSE;
if (!isset($node->nid) && !(user_access('create full projects') || user_access("create full {$node->type} projects"))) {
$form['field_project_type'][LANGUAGE_NONE]['#default_value'] = array('sandbox');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment