| 1 |
<?php |
<?php |
| 2 |
// $Id: css.module,v 1.3.2.3 2008/12/03 18:36:09 fax8 Exp $ |
// $Id: css.module,v 1.3.2.4 2008/12/26 16:06:02 fax8 Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 65 |
if (user_access('create css for nodes') && variable_get('css__'.$form['#node']->type, FALSE)) { |
if (user_access('create css for nodes') && variable_get('css__'.$form['#node']->type, FALSE)) { |
| 66 |
if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { |
if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { |
| 67 |
$node = $form['#node']; |
$node = $form['#node']; |
| 68 |
// _form_form code follows: |
// create a fieldset so we can collapse it |
| 69 |
$form['css_css'] = array( |
$form['css_fieldset'] = array( |
| 70 |
|
'#type' => 'fieldset', |
| 71 |
|
'#title' => t('CSS Rules'), |
| 72 |
|
'#collapsible' => TRUE, |
| 73 |
|
'#collapsed' => empty($node->css_css), // show uncollapsed if we have some css rule set |
| 74 |
|
); |
| 75 |
|
$form['css_fieldset']['css_css'] = array( |
| 76 |
'#type' => 'textarea', |
'#type' => 'textarea', |
| 77 |
'#title' => t('CSS'), |
'#title' => t('CSS Rules'), |
| 78 |
'#default_value' => $node->css_css, |
'#default_value' => $node->css_css ? $node->css_css : '', |
| 79 |
'#cols' => 60, |
'#cols' => 60, |
| 80 |
'#rows' => 10, |
'#rows' => 10, |
| 81 |
'#description' => t('Insert here the css rules for this node. You can use css defined for other nodes using <em>@import "?q=css/get/x";</em> where x is the identification number of the node which contains the css you want to use.'), |
'#description' => t('Insert here the css rules for this node. You can use css defined for other nodes using <em>@import "?q=css/get/x";</em> where x is the identification number of the node which contains the css you want to use.'), |