Revision e5e66f93
Added by Assos Assos over 8 years ago
drupal7/sites/all/modules/panelizer/includes/common.inc | ||
---|---|---|
29 | 29 |
'#type' => 'checkbox', |
30 | 30 |
'#default_value' => $panelizer->no_blocks, |
31 | 31 |
'#title' => t('Disable Drupal blocks/regions'), |
32 |
'#description' => t('Check this to have the panel disable sidebars displayed in the theme. Note that some themes support this setting better than others. If in doubt, try with stock themes to see.'),
|
|
32 |
'#description' => t("Check this to have the display not show the theme's sidebars. Note that some themes support this setting better than others. If in doubt, try with stock themes to see."),
|
|
33 | 33 |
); |
34 | 34 |
} |
35 | 35 |
|
... | ... | |
80 | 80 |
'#size' => 35, |
81 | 81 |
'#default_value' => $panelizer->css_class, |
82 | 82 |
'#title' => t('CSS class'), |
83 |
'#description' => t('The CSS class to apply to this panel. You may use context substitions here.'),
|
|
83 |
'#description' => t('The CSS class to apply to this display. You may use context substitions here.'),
|
|
84 | 84 |
); |
85 | 85 |
} |
86 | 86 |
else { |
... | ... | |
98 | 98 |
'#size' => 35, |
99 | 99 |
'#default_value' => $panelizer->css_id, |
100 | 100 |
'#title' => t('CSS ID'), |
101 |
'#description' => t('The CSS ID to apply to this panel.'),
|
|
101 |
'#description' => t('The CSS ID to apply to this display.'),
|
|
102 | 102 |
); |
103 | 103 |
|
104 | 104 |
$form['css'] = array( |
105 | 105 |
'#type' => 'textarea', |
106 | 106 |
'#title' => t('CSS code'), |
107 |
'#description' => t('Enter well-formed CSS code here; this code will be embedded into the panel, and should only be used for minor adjustments; it is usually better to try to put CSS for the panel into the theme if possible. This CSS will be filtered for safety so some CSS may not work.'),
|
|
107 |
'#description' => t('Enter well-formed CSS code here; this code will be embedded into the display and should only be used for minor adjustments; it is usually better to try to put CSS for this display into the theme if possible. This CSS will be filtered for safety so some CSS may not work.'),
|
|
108 | 108 |
'#default_value' => $panelizer->css, |
109 | 109 |
); |
110 | 110 |
|
... | ... | |
162 | 162 |
|
163 | 163 |
$entity = $form_state['entity']; |
164 | 164 |
|
165 |
list($use_revisions, $control_revisions) = $form_state['revision info']; |
|
165 |
list($use_revisions, $control_revisions, $default_revision) = $form_state['revision info'];
|
|
166 | 166 |
|
167 | 167 |
if ($use_revisions) { |
168 | 168 |
// @todo -- what if an entity uses some other flag to control revisioning? |
169 | 169 |
if (!isset($entity->revision)) { |
170 |
$entity->revision = $use_revisions;
|
|
170 |
$entity->revision = $default_revision;
|
|
171 | 171 |
$entity->log = ''; |
172 | 172 |
} |
173 | 173 |
|
... | ... | |
217 | 217 |
} |
218 | 218 |
} |
219 | 219 |
|
220 |
/** |
|
221 |
* Form submission callback for panelizer_add_revision_info_form(). |
|
222 |
*/ |
|
220 | 223 |
function panelizer_add_revision_info_form_submit(&$form, &$form_state) { |
221 |
$entity = $form_state['entity']; |
|
224 |
$entity = &$form_state['entity'];
|
|
222 | 225 |
if (!empty($form_state['use revisions'])) { |
223 | 226 |
$entity->revision = $form_state['values']['revision']; |
224 | 227 |
$entity->log = $form_state['values']['log']; |
... | ... | |
226 | 229 |
} |
227 | 230 |
|
228 | 231 |
/** |
229 |
* Form to edit contexts that go with a panelizer panel.
|
|
232 |
* Form to edit contexts that go with a Panelizer display.
|
|
230 | 233 |
*/ |
231 | 234 |
function panelizer_default_context_form($form, &$form_state) { |
232 | 235 |
ctools_include('context-admin'); |
... | ... | |
296 | 299 |
|
297 | 300 |
/** |
298 | 301 |
* Form used when an entity bundle is panelized but there is no default |
299 |
* panel. Entities are then individually panelized.
|
|
302 |
* display. Entities are then individually panelized.
|
|
300 | 303 |
*/ |
301 | 304 |
function panelizer_panelize_entity_form($form, &$form_state) { |
302 | 305 |
$entity_type = $form_state['panelizer']->panelizer_type; |
... | ... | |
323 | 326 |
$entity_info = entity_get_info($entity_type); |
324 | 327 |
$form = array(); |
325 | 328 |
|
326 |
return confirm_form( |
|
329 |
// Build the confirmation form. |
|
330 |
$form = confirm_form( |
|
327 | 331 |
$form, |
328 | 332 |
t('Are you sure you want to reset the panelizer status for this %entity?', array('%entity' => $entity_info['label'])), |
329 | 333 |
dirname(dirname($_GET['q'])), |
... | ... | |
331 | 335 |
t('Reset'), |
332 | 336 |
t('Cancel'), |
333 | 337 |
'panelizer_reset_entity_confirm'); |
338 |
|
|
339 |
// Append the revision form. |
|
340 |
panelizer_add_revision_info_form($form, $form_state); |
|
341 |
|
|
342 |
return $form; |
|
334 | 343 |
} |
335 | 344 |
|
336 | 345 |
/** |
Also available in: Unified diff
Weekly update of contrib modules