Revision 6e3ce7c2
Added by Assos Assos over 3 years ago
drupal7/sites/all/modules/ctools/bulk_export/bulk_export.info | ||
---|---|---|
4 | 4 |
dependencies[] = ctools |
5 | 5 |
package = Chaos tool suite |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2020-10-23
|
|
8 |
version = "7.x-1.17"
|
|
7 |
; Information added by Drupal.org packaging script on 2021-01-30
|
|
8 |
version = "7.x-1.19"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "ctools" |
11 |
datestamp = "1603490551" |
|
11 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/ctools.info | ||
---|---|---|
19 | 19 |
files[] = tests/object_cache_unit.test |
20 | 20 |
files[] = tests/page_tokens.test |
21 | 21 |
|
22 |
; Information added by Drupal.org packaging script on 2020-10-23
|
|
23 |
version = "7.x-1.17"
|
|
22 |
; Information added by Drupal.org packaging script on 2021-01-30
|
|
23 |
version = "7.x-1.19"
|
|
24 | 24 |
core = "7.x" |
25 | 25 |
project = "ctools" |
26 |
datestamp = "1603490551" |
|
26 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info | ||
---|---|---|
4 | 4 |
package = Chaos tool suite |
5 | 5 |
dependencies[] = ctools |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2020-10-23
|
|
8 |
version = "7.x-1.17"
|
|
7 |
; Information added by Drupal.org packaging script on 2021-01-30
|
|
8 |
version = "7.x-1.19"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "ctools" |
11 |
datestamp = "1603490551" |
|
11 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info | ||
---|---|---|
4 | 4 |
dependencies[] = ctools |
5 | 5 |
core = 7.x |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2020-10-23
|
|
8 |
version = "7.x-1.17"
|
|
7 |
; Information added by Drupal.org packaging script on 2021-01-30
|
|
8 |
version = "7.x-1.19"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "ctools" |
11 |
datestamp = "1603490551" |
|
11 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info | ||
---|---|---|
4 | 4 |
package = Chaos tool suite |
5 | 5 |
dependencies[] = ctools |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2020-10-23
|
|
8 |
version = "7.x-1.17"
|
|
7 |
; Information added by Drupal.org packaging script on 2021-01-30
|
|
8 |
version = "7.x-1.19"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "ctools" |
11 |
datestamp = "1603490551" |
|
11 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info | ||
---|---|---|
7 | 7 |
dependencies[] = advanced_help |
8 | 8 |
core = 7.x |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2020-10-23
|
|
11 |
version = "7.x-1.17"
|
|
10 |
; Information added by Drupal.org packaging script on 2021-01-30
|
|
11 |
version = "7.x-1.19"
|
|
12 | 12 |
core = "7.x" |
13 | 13 |
project = "ctools" |
14 |
datestamp = "1603490551" |
|
14 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/includes/context.inc | ||
---|---|---|
1416 | 1416 |
if (is_array($rdata['context'])) { |
1417 | 1417 |
$rcontexts = array(); |
1418 | 1418 |
foreach ($rdata['context'] as $cid) { |
1419 |
if (empty($contexts[$cid])) { |
|
1420 |
continue 2;
|
|
1419 |
if (!empty($contexts[$cid])) {
|
|
1420 |
$rcontexts[] = $contexts[$cid];
|
|
1421 | 1421 |
} |
1422 |
$rcontexts[] = $contexts[$cid]; |
|
1423 | 1422 |
} |
1424 | 1423 |
} |
1425 |
else { |
|
1426 |
if (empty($contexts[$rdata['context']])) { |
|
1427 |
continue; |
|
1428 |
} |
|
1424 |
elseif (!empty($contexts[$rdata['context']])) { |
|
1429 | 1425 |
$rcontexts = $contexts[$rdata['context']]; |
1430 | 1426 |
} |
1431 | 1427 |
|
drupal7/sites/all/modules/ctools/includes/export-ui.inc | ||
---|---|---|
456 | 456 |
|
457 | 457 |
// Load the $plugin information. |
458 | 458 |
$plugin = ctools_get_export_ui($plugin_name); |
459 |
$handler = ctools_export_ui_get_handler($plugin); |
|
460 |
|
|
461 |
if ($handler) { |
|
462 |
$method = $op . '_page'; |
|
463 |
if (method_exists($handler, $method)) { |
|
464 |
// Replace the first two arguments: |
|
465 |
$args[0] = $js; |
|
466 |
$args[1] = $_POST; |
|
467 |
return call_user_func_array(array($handler, $method), $args); |
|
468 |
} |
|
459 |
if (!$plugin) { |
|
460 |
return t('Configuration error. No plugin found: %plugin_name.', array('%plugin_name' => $plugin_name)); |
|
469 | 461 |
} |
470 |
else { |
|
462 |
|
|
463 |
$handler = ctools_export_ui_get_handler($plugin); |
|
464 |
if (!$handler) { |
|
471 | 465 |
return t('Configuration error. No handler found.'); |
472 | 466 |
} |
467 |
|
|
468 |
$method = $op . '_page'; |
|
469 |
if (method_exists($handler, $method)) { |
|
470 |
// Replace the first two arguments: |
|
471 |
$args[0] = $js; |
|
472 |
$args[1] = $_POST; |
|
473 |
return call_user_func_array(array($handler, $method), $args); |
|
474 |
} |
|
473 | 475 |
} |
drupal7/sites/all/modules/ctools/includes/export.inc | ||
---|---|---|
637 | 637 |
} |
638 | 638 |
|
639 | 639 |
/** |
640 |
* Get export object defaults. |
|
641 |
* |
|
640 | 642 |
* Call the hook to get all default objects of the given type from the |
641 | 643 |
* export. If configured properly, this could include loading up an API |
642 | 644 |
* to get default objects. |
645 |
* |
|
646 |
* @param string $table |
|
647 |
* The name of the table to be loaded. Data is expected to be in the |
|
648 |
* schema to make all this work. |
|
649 |
* @param array $export |
|
650 |
* The export definition from the table's hook_schema() definition. |
|
643 | 651 |
*/ |
644 |
function _ctools_export_get_defaults($table, $export) { |
|
652 |
function _ctools_export_get_defaults($table, array $export) {
|
|
645 | 653 |
$cache = &drupal_static(__FUNCTION__, array()); |
646 | 654 |
|
647 | 655 |
// If defaults may be cached, first see if we can load from cache. |
... | ... | |
684 | 692 |
$cache[$table][$name] = $object; |
685 | 693 |
} |
686 | 694 |
else { |
687 |
// If version checking is enabled, ensure that the object can be used. |
|
695 |
// If version checking is enabled, ensure that the object can be |
|
696 |
// used. |
|
688 | 697 |
if (isset($object->api_version) && |
689 | 698 |
version_compare($object->api_version, $export['api']['minimum_version']) >= 0 && |
690 | 699 |
version_compare($object->api_version, $export['api']['current_version']) <= 0) { |
... | ... | |
866 | 875 |
} |
867 | 876 |
else { |
868 | 877 |
$output = "array(\n"; |
878 |
ksort($var); |
|
869 | 879 |
foreach ($var as $key => $value) { |
870 | 880 |
$output .= $prefix . " " . ctools_var_export($key) . " => " . ctools_var_export($value, $prefix . ' ') . ",\n"; |
871 | 881 |
} |
drupal7/sites/all/modules/ctools/includes/fields.inc | ||
---|---|---|
238 | 238 |
function ctools_field_invoke_field($field_name, $op, $entity_type, $entity, &$a = NULL, &$b = NULL, $options = array()) { |
239 | 239 |
if (is_array($field_name)) { |
240 | 240 |
$instance = $field_name; |
241 |
$field = empty($field_name['field']) ? field_info_field($instance['field_name']) : $field_name['field']; |
|
242 |
$field_name = $instance['field_name']; |
|
243 | 241 |
} |
244 | 242 |
else { |
245 | 243 |
list(, , $bundle) = entity_extract_ids($entity_type, $entity); |
... | ... | |
250 | 248 |
return; |
251 | 249 |
} |
252 | 250 |
|
251 |
// Keep the variables consistent regardless if we retrieve the field instance |
|
252 |
// ourself, or if one is provided to us via the $field_name variable. |
|
253 |
$field = field_info_field($instance['field_name']); |
|
254 |
$field_name = $instance['field_name']; |
|
255 |
|
|
253 | 256 |
// Merge default options. |
254 | 257 |
$default_options = array( |
255 | 258 |
'default' => FALSE, |
drupal7/sites/all/modules/ctools/includes/page-wizard.inc | ||
---|---|---|
97 | 97 |
} |
98 | 98 |
|
99 | 99 |
// Check for possibly more complex access callback on plugin. |
100 |
if ($function = ctools_plugin_get_function($plugin, 'access callback') && !$function($plugin)) {
|
|
100 |
if (($function = ctools_plugin_get_function($plugin, 'access callback')) && !$function($plugin)) {
|
|
101 | 101 |
return MENU_ACCESS_DENIED; |
102 | 102 |
} |
103 | 103 |
|
drupal7/sites/all/modules/ctools/js/ajax-responder.js | ||
---|---|---|
26 | 26 |
// Grab all the links that match this url and add the fetching class. |
27 | 27 |
// This allows the caching system to grab each url once and only once |
28 | 28 |
// instead of grabbing the url once per <a>. |
29 |
var $objects = $('a[href="' + old_url + '"]') |
|
29 |
var $objects = $('a[href="' + old_url + '"]');
|
|
30 | 30 |
$objects.addClass('ctools-fetching'); |
31 | 31 |
try { |
32 | 32 |
url = old_url.replace(/\/nojs(\/|$)/g, '/ajax$1'); |
drupal7/sites/all/modules/ctools/js/auto-submit.js | ||
---|---|---|
98 | 98 |
}); |
99 | 99 |
}); |
100 | 100 |
} |
101 |
} |
|
101 |
};
|
|
102 | 102 |
})(jQuery); |
drupal7/sites/all/modules/ctools/js/collapsible-div.js | ||
---|---|---|
194 | 194 |
Drupal.CTools.CollapsibleCallbacksAfterToggle[i]($container, handle, content, toggle); |
195 | 195 |
} |
196 | 196 |
} |
197 |
} |
|
197 |
};
|
|
198 | 198 |
|
199 | 199 |
var clickMe = function () { |
200 | 200 |
if (Drupal.CTools.CollapsibleCallbacks) { |
... | ... | |
222 | 222 |
} |
223 | 223 |
|
224 | 224 |
return false; |
225 |
} |
|
225 |
};
|
|
226 | 226 |
|
227 | 227 |
// Let both the toggle and the handle be clickable. |
228 | 228 |
toggle.click(clickMe); |
... | ... | |
237 | 237 |
attach: function(context) { |
238 | 238 |
$('.ctools-collapsible-container', context).once('ctools-collapsible', Drupal.CTools.bindCollapsible); |
239 | 239 |
} |
240 |
} |
|
240 |
};
|
|
241 | 241 |
})(jQuery); |
drupal7/sites/all/modules/ctools/js/dependent.js | ||
---|---|---|
14 | 14 |
* - Checkboxes don't have their own id, so you need to add one in a div |
15 | 15 |
* around the checkboxes via #prefix and #suffix. You actually need to add TWO |
16 | 16 |
* divs because it's the parent that gets hidden. Also be sure to retain the |
17 |
* 'expand_checkboxes' in the #process array, because the CTools process will
|
|
17 |
* 'form_process_checkboxes' in the #process array, because the CTools process will
|
|
18 | 18 |
* override it. |
19 | 19 |
*/ |
20 | 20 |
|
... | ... | |
34 | 34 |
} |
35 | 35 |
} |
36 | 36 |
return false; |
37 |
} |
|
37 |
};
|
|
38 | 38 |
|
39 | 39 |
|
40 | 40 |
Drupal.CTools.dependent.autoAttach = function() { |
... | ... | |
118 | 118 |
} |
119 | 119 |
} |
120 | 120 |
return val; |
121 |
} |
|
121 |
};
|
|
122 | 122 |
|
123 | 123 |
var setChangeTrigger = function(trigger_id, bind_id) { |
124 | 124 |
// Triggered when change() is clicked. |
... | ... | |
205 | 205 |
} |
206 | 206 |
} |
207 | 207 |
} |
208 |
} |
|
208 |
};
|
|
209 | 209 |
|
210 | 210 |
$(trigger_id).bind('change.ctools-dependent', function() { |
211 | 211 |
// Trigger the internal change function |
... | ... | |
214 | 214 |
}); |
215 | 215 |
// Trigger initial reaction |
216 | 216 |
changeTrigger(trigger_id, bind_id); |
217 |
} |
|
217 |
};
|
|
218 | 218 |
setChangeTrigger(trigger_id, bind_id); |
219 | 219 |
} |
220 | 220 |
} |
221 |
} |
|
221 |
};
|
|
222 | 222 |
|
223 | 223 |
Drupal.behaviors.CToolsDependent = { |
224 | 224 |
attach: function (context) { |
... | ... | |
240 | 240 |
}) |
241 | 241 |
.trigger('change.ctools-dependent'); |
242 | 242 |
} |
243 |
} |
|
243 |
};
|
|
244 | 244 |
})(jQuery); |
drupal7/sites/all/modules/ctools/js/dropbutton.js | ||
---|---|---|
69 | 69 |
$secondaryActions.animate({height: "show", opacity: "show"}, 100); |
70 | 70 |
$dropbutton.addClass('open'); |
71 | 71 |
} |
72 |
} |
|
72 |
};
|
|
73 | 73 |
// Hide the secondary actions initially. |
74 | 74 |
$secondaryActions.hide(); |
75 | 75 |
|
... | ... | |
90 | 90 |
); |
91 | 91 |
}); |
92 | 92 |
} |
93 |
} |
|
93 |
};
|
|
94 | 94 |
})(jQuery); |
drupal7/sites/all/modules/ctools/js/dropdown.js | ||
---|---|---|
61 | 61 |
$("div.ctools-dropdown-container", $dropdown) |
62 | 62 |
.animate({height: "show", opacity: "show"}, 100); |
63 | 63 |
} |
64 |
} |
|
64 |
};
|
|
65 | 65 |
$("a.ctools-dropdown-link", $dropdown).click(function() { |
66 | 66 |
toggle(); |
67 | 67 |
return false; |
... | ... | |
83 | 83 |
); |
84 | 84 |
}); |
85 | 85 |
} |
86 |
} |
|
86 |
};
|
|
87 | 87 |
})(jQuery); |
drupal7/sites/all/modules/ctools/js/jump-menu.js | ||
---|---|---|
38 | 38 |
return false; |
39 | 39 |
}); |
40 | 40 |
} |
41 |
} |
|
41 |
};
|
|
42 | 42 |
})(jQuery); |
drupal7/sites/all/modules/ctools/js/modal.js | ||
---|---|---|
86 | 86 |
'width': (width - Drupal.CTools.Modal.currentSettings.modalSize.contentRight) + 'px', |
87 | 87 |
'height': (height - Drupal.CTools.Modal.currentSettings.modalSize.contentBottom) + 'px' |
88 | 88 |
}); |
89 |
} |
|
89 |
};
|
|
90 | 90 |
|
91 | 91 |
if (!Drupal.CTools.Modal.modal) { |
92 | 92 |
Drupal.CTools.Modal.modal = $(Drupal.theme(settings.modalTheme)); |
... | ... | |
120 | 120 |
* Provide the HTML to create the modal dialog. |
121 | 121 |
*/ |
122 | 122 |
Drupal.theme.prototype.CToolsModalDialog = function () { |
123 |
var html = '' |
|
124 |
html += '<div id="ctools-modal">' |
|
125 |
html += ' <div class="ctools-modal-content">' // panels-modal-content |
|
123 |
var html = '';
|
|
124 |
html += '<div id="ctools-modal">';
|
|
125 |
html += ' <div class="ctools-modal-content">'; // panels-modal-content
|
|
126 | 126 |
html += ' <div class="modal-header">'; |
127 | 127 |
html += ' <a class="close" href="#">'; |
128 | 128 |
html += Drupal.CTools.Modal.currentSettings.closeText + Drupal.CTools.Modal.currentSettings.closeImage; |
... | ... | |
135 | 135 |
html += '</div>'; |
136 | 136 |
|
137 | 137 |
return html; |
138 |
} |
|
138 |
};
|
|
139 | 139 |
|
140 | 140 |
/** |
141 | 141 |
* Provide the HTML to create the throbber. |
... | ... | |
159 | 159 |
if (match) { |
160 | 160 |
return match[1]; |
161 | 161 |
} |
162 |
} |
|
162 |
};
|
|
163 | 163 |
|
164 | 164 |
/** |
165 | 165 |
* Click function for modals that can be cached. |
... | ... | |
186 | 186 |
|
187 | 187 |
setTimeout(function() { Drupal.CTools.AJAX.ajaxSubmit($form, url); }, 1); |
188 | 188 |
return false; |
189 |
} |
|
189 |
};
|
|
190 | 190 |
|
191 | 191 |
/** |
192 | 192 |
* Bind links that will open modals to the appropriate function. |
... | ... | |
250 | 250 |
|
251 | 251 |
element_settings.url = $this.attr('action'); |
252 | 252 |
element_settings.event = 'submit'; |
253 |
element_settings.progress = { 'type': 'throbber' } |
|
253 |
element_settings.progress = { 'type': 'throbber' };
|
|
254 | 254 |
var base = $this.attr('id'); |
255 | 255 |
|
256 | 256 |
Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings); |
... | ... | |
291 | 291 |
* AJAX responder command to place HTML within the modal. |
292 | 292 |
*/ |
293 | 293 |
Drupal.CTools.Modal.modal_display = function(ajax, response, status) { |
294 |
var settings = response.settings || ajax.settings || Drupal.settings; |
|
295 |
// If the modal does not exist yet, create it. |
|
294 | 296 |
if ($('#modalContent').length == 0) { |
295 | 297 |
Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(ajax.element)); |
296 | 298 |
} |
299 |
// If the modal exists run detachBehaviors before removing existing content. |
|
300 |
else { |
|
301 |
Drupal.detachBehaviors($('#modalContent'), settings, 'unload'); |
|
302 |
} |
|
297 | 303 |
$('#modal-title').html(response.title); |
298 | 304 |
// Simulate an actual page load by scrolling to the top after adding the |
299 | 305 |
// content. This is helpful for allowing users to see error messages at the |
... | ... | |
302 | 308 |
$(document).trigger('CToolsAttachBehaviors', $('#modalContent')); |
303 | 309 |
|
304 | 310 |
// Attach behaviors within a modal dialog. |
305 |
var settings = response.settings || ajax.settings || Drupal.settings; |
|
306 | 311 |
Drupal.attachBehaviors($('#modalContent'), settings); |
307 | 312 |
|
308 | 313 |
if ($('#modal-content').hasClass('ctools-modal-loading')) { |
... | ... | |
315 | 320 |
// button by the show() function called above.) |
316 | 321 |
$('#modal-content :focusable:first').focus(); |
317 | 322 |
} |
318 |
} |
|
323 |
};
|
|
319 | 324 |
|
320 | 325 |
/** |
321 | 326 |
* AJAX responder command to dismiss the modal. |
... | ... | |
323 | 328 |
Drupal.CTools.Modal.modal_dismiss = function(command) { |
324 | 329 |
Drupal.CTools.Modal.dismiss(); |
325 | 330 |
$('link.ctools-temporary-css').remove(); |
326 |
} |
|
331 |
};
|
|
327 | 332 |
|
328 | 333 |
/** |
329 | 334 |
* Display loading |
... | ... | |
334 | 339 |
output: Drupal.theme(Drupal.CTools.Modal.currentSettings.throbberTheme), |
335 | 340 |
title: Drupal.CTools.Modal.currentSettings.loadingText |
336 | 341 |
}); |
337 |
} |
|
342 |
};
|
|
338 | 343 |
|
339 | 344 |
/** |
340 | 345 |
* Find a URL for an AJAX button. |
... | ... | |
590 | 595 |
$('body').unbind( 'keydown', modalTabTrapHandler ); |
591 | 596 |
$('.close', $modalHeader).unbind('click', modalContentClose); |
592 | 597 |
$(document).unbind('keydown', modalEventEscapeCloseHandler); |
598 |
$(document).trigger('CToolsCloseModalBehaviors', $('#modalContent')); |
|
593 | 599 |
$(document).trigger('CToolsDetachBehaviors', $('#modalContent')); |
594 | 600 |
|
595 | 601 |
// Closing animation. |
... | ... | |
675 | 681 |
var $modalContent = $('#modalContent'); |
676 | 682 |
var $modalHeader = $modalContent.find('.modal-header'); |
677 | 683 |
$('.close', $modalHeader).unbind('click', modalContentClose); |
678 |
$('body').unbind('keypress', modalEventEscapeCloseHandler);
|
|
684 |
$(document).unbind('keydown', modalEventEscapeCloseHandler);
|
|
679 | 685 |
$(document).trigger('CToolsDetachBehaviors', $modalContent); |
680 | 686 |
|
681 | 687 |
// jQuery magic loop through the instances and run the animations or removal. |
drupal7/sites/all/modules/ctools/js/stylizer.js | ||
---|---|---|
180 | 180 |
); |
181 | 181 |
$(this).after(lock); |
182 | 182 |
locks.push(lock); |
183 |
};
|
|
183 |
} |
|
184 | 184 |
|
185 | 185 |
// Add hook |
186 | 186 |
var $this = $(this); |
... | ... | |
216 | 216 |
$widget.attr('checked', !$widget.attr('checked') || $widget.is('input[type=radio]')); |
217 | 217 |
}); |
218 | 218 |
} |
219 |
} |
|
219 |
};
|
|
220 | 220 |
})(jQuery); |
drupal7/sites/all/modules/ctools/page_manager/page_manager.info | ||
---|---|---|
6 | 6 |
|
7 | 7 |
files[] = tests/head_links.test |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2020-10-23
|
|
10 |
version = "7.x-1.17"
|
|
9 |
; Information added by Drupal.org packaging script on 2021-01-30
|
|
10 |
version = "7.x-1.19"
|
|
11 | 11 |
core = "7.x" |
12 | 12 |
project = "ctools" |
13 |
datestamp = "1603490551" |
|
13 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/plugins/access/node_status.inc | ||
---|---|---|
21 | 21 |
* Check for access. |
22 | 22 |
*/ |
23 | 23 |
function ctools_node_status_ctools_access_check($conf, $context) { |
24 |
return (!empty($context->data) && $context->data->status); |
|
24 |
return (!empty($context->data->status) && $context->data->status);
|
|
25 | 25 |
} |
26 | 26 |
|
27 | 27 |
/** |
drupal7/sites/all/modules/ctools/plugins/content_types/form/entity_form_field.inc | ||
---|---|---|
152 | 152 |
* Returns the administrative title for a type. |
153 | 153 |
*/ |
154 | 154 |
function ctools_entity_form_field_content_type_admin_title($subtype, $conf, $context) { |
155 |
// Return early because we don't have context to build this field from. |
|
156 |
if (!$context || !isset($context->identifier)) { |
|
157 |
watchdog('ctools_entity_form_field_content_type_admin_title', 'Context is missing for field: @name', array('@name' => $subtype), WATCHDOG_NOTICE); |
|
158 |
return t('Deleted/missing field @name', array('@name' => $subtype)); |
|
159 |
} |
|
160 |
|
|
155 | 161 |
list($entity_type, $field_name) = explode(':', $subtype, 2); |
156 | 162 |
|
157 | 163 |
if (!empty($context->restrictions)) { |
drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_actions.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Plugins are described by creating a $plugin array which will be used |
|
5 |
* by the system that includes this file. |
|
6 |
*/ |
|
7 |
$plugin = array( |
|
8 |
'single' => TRUE, |
|
9 |
'icon' => 'icon_user_form.png', |
|
10 |
'title' => t('User form actions / buttons'), |
|
11 |
'description' => t('The user form actions / buttons.'), |
|
12 |
'required context' => new ctools_context_required(t('Form'), 'form'), |
|
13 |
'category' => t('Form'), |
|
14 |
); |
|
15 |
|
|
16 |
/** |
|
17 |
* Ctools plugin content type render for the picture form field. |
|
18 |
*/ |
|
19 |
function ctools_user_form_actions_content_type_render($subtype, $conf, $panel_args, &$context) { |
|
20 |
$block = new stdClass(); |
|
21 |
$block->module = t('user-form'); |
|
22 |
|
|
23 |
$block->delta = 'title-options'; |
|
24 |
|
|
25 |
if (isset($context->form)) { |
|
26 |
if (!empty($context->form['actions'])) { |
|
27 |
$block->content['actions'] = $context->form['actions']; |
|
28 |
unset($context->form['actions']); |
|
29 |
} |
|
30 |
// Because we are adding the submit buttons outside the General form |
|
31 |
// we can assume the necessary hidden components should be added as well. |
|
32 |
if (!empty($context->form['form_build_id'])) { |
|
33 |
$block->content['form_build_id'] = $context->form['form_build_id']; |
|
34 |
unset($context->form['form_build_id']); |
|
35 |
} |
|
36 |
if (!empty($context->form['form_token'])) { |
|
37 |
$block->content['form_token'] = $context->form['form_token']; |
|
38 |
unset($context->form['form_token']); |
|
39 |
} |
|
40 |
if (!empty($context->form['form_id'])) { |
|
41 |
$block->content['form_id'] = $context->form['form_id']; |
|
42 |
unset($context->form['form_id']); |
|
43 |
} |
|
44 |
} |
|
45 |
else { |
|
46 |
$block->content = t('User actions / buttons form components.'); |
|
47 |
} |
|
48 |
return $block; |
|
49 |
} |
|
50 |
|
|
51 |
/** |
|
52 |
* Ctools plugin admin title function for the actions form field. |
|
53 |
*/ |
|
54 |
function ctools_user_form_actions_content_type_admin_title($subtype, $conf, $context) { |
|
55 |
return t('"@s" user form actions / buttons field', array('@s' => $context->identifier)); |
|
56 |
} |
|
57 |
|
|
58 |
/** |
|
59 |
* Ctools plugin configuration edit form for the actions form field. |
|
60 |
* |
|
61 |
* Provide a blank form so we have a place to have context setting. |
|
62 |
*/ |
|
63 |
function ctools_user_form_actions_content_type_edit_form($form, &$form_state) { |
|
64 |
return $form; |
|
65 |
} |
drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_component.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Plugins are described by creating a $plugin array which will be used |
|
5 |
* by the system that includes this file. |
|
6 |
*/ |
|
7 |
$plugin = array( |
|
8 |
'single' => TRUE, |
|
9 |
'icon' => 'icon_user_form.png', |
|
10 |
'title' => t('User form: add a specific component'), |
|
11 |
'description' => t('The user form component by selection.'), |
|
12 |
'required context' => new ctools_context_required(t('Form'), 'form'), |
|
13 |
'category' => t('Form'), |
|
14 |
); |
|
15 |
|
|
16 |
/** |
|
17 |
* Ctools plugin content type render for the picture form field. |
|
18 |
*/ |
|
19 |
function ctools_user_form_component_content_type_render($subtype, $conf, $panel_args, &$context) { |
|
20 |
$block = new stdClass(); |
|
21 |
$block->module = t('user-form'); |
|
22 |
|
|
23 |
$block->delta = 'title-options'; |
|
24 |
|
|
25 |
if (isset($context->form)) { |
|
26 |
if (!empty($context->form[$conf['field']])) { |
|
27 |
$block->content[$conf['field']] = $context->form[$conf['field']]; |
|
28 |
unset($context->form[$conf['field']]); |
|
29 |
} |
|
30 |
} |
|
31 |
else { |
|
32 |
$block->content = t('User form edit components.'); |
|
33 |
} |
|
34 |
return $block; |
|
35 |
} |
|
36 |
|
|
37 |
/** |
|
38 |
* Ctools plugin admin title function for the a selectable form field. |
|
39 |
*/ |
|
40 |
function ctools_user_form_component_content_type_admin_title($subtype, $conf, $context) { |
|
41 |
return t('"@s" user form @field field', array('@s' => $context->identifier, '@field' => $conf['field'])); |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* Ctools plugin configuration edit form for the selectable form field. |
|
46 |
* |
|
47 |
* Provide the list of fields in the user profile edit form to select from the |
|
48 |
* plugin configuration. |
|
49 |
*/ |
|
50 |
function ctools_user_form_component_content_type_edit_form($form, &$form_state) { |
|
51 |
$conf = $form_state['conf']; |
|
52 |
$user_form = drupal_get_form('user_profile_form'); |
|
53 |
|
|
54 |
$field_keys = element_children($user_form); |
|
55 |
$options = array_combine($field_keys, $field_keys); |
|
56 |
|
|
57 |
$form['field'] = array( |
|
58 |
'#type' => 'select', |
|
59 |
'#title' => t('User form field'), |
|
60 |
'#options' => $options, |
|
61 |
'#description' => t('Select a form field from the current user form to display in this pane.'), |
|
62 |
'#default_value' => !empty($conf['field']) ? $conf['field'] : '', |
|
63 |
); |
|
64 |
return $form; |
|
65 |
} |
|
66 |
|
|
67 |
/** |
|
68 |
* Ctools plugin configuration edit form submit handler. |
|
69 |
*/ |
|
70 |
function ctools_user_form_component_content_type_edit_form_submit($form, &$form_state) { |
|
71 |
$form_state['conf']['field'] = $form_state['values']['field']; |
|
72 |
} |
drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_email.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Plugins are described by creating a $plugin array which will be used |
|
5 |
* by the system that includes this file. |
|
6 |
*/ |
|
7 |
$plugin = array( |
|
8 |
'single' => TRUE, |
|
9 |
'icon' => 'icon_user_form.png', |
|
10 |
'title' => t('User form email field'), |
|
11 |
'description' => t('The user email form.'), |
|
12 |
'required context' => new ctools_context_required(t('Form'), 'form'), |
|
13 |
'category' => t('Form'), |
|
14 |
); |
|
15 |
|
|
16 |
/** |
|
17 |
* Ctools plugin content type render for the email form field. |
|
18 |
*/ |
|
19 |
function ctools_user_form_email_content_type_render($subtype, $conf, $panel_args, &$context) { |
|
20 |
$block = new stdClass(); |
|
21 |
$block->module = t('user-form'); |
|
22 |
|
|
23 |
$block->delta = 'title-options'; |
|
24 |
|
|
25 |
if (isset($context->form)) { |
|
26 |
// The current password is required to change the email. |
|
27 |
if (!empty($context->form['account']['current_pass'])) { |
|
28 |
$block->content['current_pass'] = $context->form['account']['current_pass']; |
|
29 |
unset($context->form['account']['current_pass']); |
|
30 |
} |
|
31 |
if (!empty($context->form['account']['mail'])) { |
|
32 |
$block->content['mail'] = $context->form['account']['mail']; |
|
33 |
unset($context->form['account']['mail']); |
|
34 |
} |
|
35 |
} |
|
36 |
else { |
|
37 |
$block->content = t('User email form.'); |
|
38 |
} |
|
39 |
return $block; |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* Ctools plugin admin title function for the email form field. |
|
44 |
*/ |
|
45 |
function ctools_user_form_email_content_type_admin_title($subtype, $conf, $context) { |
|
46 |
return t('"@s" user form email field', array('@s' => $context->identifier)); |
|
47 |
} |
|
48 |
|
|
49 |
/** |
|
50 |
* Ctools plugin configuration edit form for the email form field. |
|
51 |
* |
|
52 |
* Provide a blank form so we have a place to have context setting. |
|
53 |
*/ |
|
54 |
function ctools_user_form_email_content_type_edit_form($form, &$form_state) { |
|
55 |
return $form; |
|
56 |
} |
drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_notify.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Plugins are described by creating a $plugin array which will be used |
|
5 |
* by the system that includes this file. |
|
6 |
*/ |
|
7 |
$plugin = array( |
|
8 |
'single' => TRUE, |
|
9 |
'icon' => 'icon_user_form.png', |
|
10 |
'title' => t('User form notify field'), |
|
11 |
'description' => t('The user notify form.'), |
|
12 |
'required context' => new ctools_context_required(t('Form'), 'form'), |
|
13 |
'category' => t('Form'), |
|
14 |
); |
|
15 |
|
|
16 |
/** |
|
17 |
* Ctools plugin content type render for the notify form field. |
|
18 |
*/ |
|
19 |
function ctools_user_form_notify_content_type_render($subtype, $conf, $panel_args, &$context) { |
|
20 |
$block = new stdClass(); |
|
21 |
$block->module = t('user-form'); |
|
22 |
|
|
23 |
$block->delta = 'title-options'; |
|
24 |
|
|
25 |
if (isset($context->form)) { |
|
26 |
if (!empty($context->form['account']['notify'])) { |
|
27 |
$block->content['notify'] = $context->form['account']['notify']; |
|
28 |
unset($context->form['account']['notify']); |
|
29 |
} |
|
30 |
} |
|
31 |
else { |
|
32 |
$block->content = t('User notify form.'); |
|
33 |
} |
|
34 |
return $block; |
|
35 |
} |
|
36 |
|
|
37 |
/** |
|
38 |
* Ctools plugin admin title function for the notify form field. |
|
39 |
*/ |
|
40 |
function ctools_user_form_notify_content_type_admin_title($subtype, $conf, $context) { |
|
41 |
return t('"@s" user form notify field', array('@s' => $context->identifier)); |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* Ctools plugin configuration edit form for the notify form field. |
|
46 |
* |
|
47 |
* Provide a blank form so we have a place to have context setting. |
|
48 |
*/ |
|
49 |
function ctools_user_form_notify_content_type_edit_form($form, &$form_state) { |
|
50 |
return $form; |
|
51 |
} |
drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_password.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Plugins are described by creating a $plugin array which will be used |
|
5 |
* by the system that includes this file. |
|
6 |
*/ |
|
7 |
$plugin = array( |
|
8 |
'single' => TRUE, |
|
9 |
'icon' => 'icon_user_form.png', |
|
10 |
'title' => t('User form password field'), |
|
11 |
'description' => t('The user password form.'), |
|
12 |
'required context' => new ctools_context_required(t('Form'), 'form'), |
|
13 |
'category' => t('Form'), |
|
14 |
); |
|
15 |
|
|
16 |
/** |
|
17 |
* Ctools plugin content type render for the password form field. |
|
18 |
*/ |
|
19 |
function ctools_user_form_password_content_type_render($subtype, $conf, $panel_args, &$context) { |
|
20 |
$block = new stdClass(); |
|
21 |
$block->module = t('user-form'); |
|
22 |
|
|
23 |
$block->delta = 'title-options'; |
|
24 |
|
|
25 |
if (isset($context->form)) { |
|
26 |
// The current password is required to change the password. |
|
27 |
if (!empty($context->form['account']['current_pass'])) { |
|
28 |
$block->content['current_pass'] = $context->form['account']['current_pass']; |
|
29 |
unset($context->form['account']['current_pass']); |
|
30 |
} |
|
31 |
if (!empty($context->form['account']['pass'])) { |
|
32 |
$block->content['pass'] = $context->form['account']['pass']; |
|
33 |
unset($context->form['account']['pass']); |
|
34 |
} |
|
35 |
} |
|
36 |
else { |
|
37 |
$block->content = t('User password form.'); |
|
38 |
} |
|
39 |
return $block; |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* Ctools plugin admin title function for the password form field. |
|
44 |
*/ |
|
45 |
function ctools_user_form_password_content_type_admin_title($subtype, $conf, $context) { |
|
46 |
return t('"@s" user form password field', array('@s' => $context->identifier)); |
|
47 |
} |
|
48 |
|
|
49 |
/** |
|
50 |
* Ctools plugin configuration edit form for the password form field. |
|
51 |
* |
|
52 |
* Provide a blank form so we have a place to have context setting. |
|
53 |
*/ |
|
54 |
function ctools_user_form_password_content_type_edit_form($form, &$form_state) { |
|
55 |
return $form; |
|
56 |
} |
drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_picture.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Plugins are described by creating a $plugin array which will be used |
|
5 |
* by the system that includes this file. |
|
6 |
*/ |
|
7 |
$plugin = array( |
|
8 |
'single' => TRUE, |
|
9 |
'icon' => 'icon_user_form.png', |
|
10 |
'title' => t('User form picture field'), |
|
11 |
'description' => t('The user picture form.'), |
|
12 |
'required context' => new ctools_context_required(t('Form'), 'form'), |
|
13 |
'category' => t('Form'), |
|
14 |
); |
|
15 |
|
|
16 |
/** |
|
17 |
* Ctools plugin content type render for the picture form field. |
|
18 |
*/ |
|
19 |
function ctools_user_form_picture_content_type_render($subtype, $conf, $panel_args, &$context) { |
|
20 |
$block = new stdClass(); |
|
21 |
$block->module = t('user-form'); |
|
22 |
|
|
23 |
$block->delta = 'title-options'; |
|
24 |
|
|
25 |
if (isset($context->form)) { |
|
26 |
if (!empty($context->form['picture'])) { |
|
27 |
$block->content['picture'] = $context->form['picture']; |
|
28 |
unset($context->form['picture']); |
|
29 |
} |
|
30 |
} |
|
31 |
else { |
|
32 |
$block->content = t('User picture form.'); |
|
33 |
} |
|
34 |
return $block; |
|
35 |
} |
|
36 |
|
|
37 |
/** |
|
38 |
* Ctools plugin admin title function for the picture form field. |
|
39 |
*/ |
|
40 |
function ctools_user_form_picture_content_type_admin_title($subtype, $conf, $context) { |
|
41 |
return t('"@s" user form picture field', array('@s' => $context->identifier)); |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* Ctools plugin configuration edit form for the picture form field. |
|
46 |
* |
|
47 |
* Provide a blank form so we have a place to have context setting. |
|
48 |
*/ |
|
49 |
function ctools_user_form_picture_content_type_edit_form($form, &$form_state) { |
|
50 |
return $form; |
|
51 |
} |
drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_roles.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Plugins are described by creating a $plugin array which will be used |
|
5 |
* by the system that includes this file. |
|
6 |
*/ |
|
7 |
$plugin = array( |
|
8 |
'single' => TRUE, |
|
9 |
'icon' => 'icon_user_form.png', |
|
10 |
'title' => t('User form roles field'), |
|
11 |
'description' => t('The user roles form.'), |
|
12 |
'required context' => new ctools_context_required(t('Form'), 'form'), |
|
13 |
'category' => t('Form'), |
|
14 |
); |
|
15 |
|
|
16 |
/** |
|
17 |
* Ctools plugin content type render for the roles form field. |
|
18 |
*/ |
|
19 |
function ctools_user_form_roles_content_type_render($subtype, $conf, $panel_args, &$context) { |
|
20 |
$block = new stdClass(); |
|
21 |
$block->module = t('user-form'); |
|
22 |
|
|
23 |
$block->delta = 'title-options'; |
|
24 |
|
|
25 |
if (isset($context->form)) { |
|
26 |
if (!empty($context->form['account']['roles'])) { |
|
27 |
$block->content['roles'] = $context->form['account']['roles']; |
|
28 |
unset($context->form['account']['roles']); |
|
29 |
} |
|
30 |
} |
|
31 |
else { |
|
32 |
$block->content = t('User roles form.'); |
|
33 |
} |
|
34 |
return $block; |
|
35 |
} |
|
36 |
|
|
37 |
/** |
|
38 |
* Ctools plugin admin title function for the roles form field. |
|
39 |
*/ |
|
40 |
function ctools_user_form_roles_content_type_admin_title($subtype, $conf, $context) { |
|
41 |
return t('"@s" user form roles field', array('@s' => $context->identifier)); |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* Ctools plugin configuration edit form for the roles form field. |
|
46 |
* |
|
47 |
* Provide a blank form so we have a place to have context setting. |
|
48 |
*/ |
|
49 |
function ctools_user_form_roles_content_type_edit_form($form, &$form_state) { |
|
50 |
return $form; |
|
51 |
} |
drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_signature_settings.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Plugins are described by creating a $plugin array which will be used |
|
5 |
* by the system that includes this file. |
|
6 |
*/ |
|
7 |
$plugin = array( |
|
8 |
'single' => TRUE, |
|
9 |
'icon' => 'icon_user_form.png', |
|
10 |
'title' => t('User form signature settings field'), |
|
11 |
'description' => t('The user signature settings form.'), |
|
12 |
'required context' => new ctools_context_required(t('Form'), 'form'), |
|
13 |
'category' => t('Form'), |
|
14 |
); |
|
15 |
|
|
16 |
/** |
|
17 |
* Ctools plugin content type render for the signature settings form field. |
|
18 |
*/ |
|
19 |
function ctools_user_form_signature_settings_content_type_render($subtype, $conf, $panel_args, &$context) { |
|
20 |
$block = new stdClass(); |
|
21 |
$block->module = t('user-form'); |
|
22 |
|
|
23 |
$block->delta = 'title-options'; |
|
24 |
|
|
25 |
if (isset($context->form)) { |
|
26 |
if (!empty($context->form['signature_settings'])) { |
|
27 |
$block->content['signature_settings'] = $context->form['signature_settings']; |
|
28 |
unset($context->form['signature_settings']); |
|
29 |
} |
|
30 |
} |
|
31 |
else { |
|
32 |
$block->content = t('User signature settings form.'); |
|
33 |
} |
|
34 |
return $block; |
|
35 |
} |
|
36 |
|
|
37 |
/** |
|
38 |
* Ctools plugin admin title function for the signature settings form field. |
|
39 |
*/ |
|
40 |
function ctools_user_form_signature_settings_content_type_admin_title($subtype, $conf, $context) { |
|
41 |
return t('"@s" user form signature settings field', array('@s' => $context->identifier)); |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* Ctools plugin configuration edit form for the signature settings form field. |
|
46 |
* |
|
47 |
* Provide a blank form so we have a place to have context setting. |
|
48 |
*/ |
|
49 |
function ctools_user_form_signature_settings_content_type_edit_form($form, &$form_state) { |
|
50 |
return $form; |
|
51 |
} |
drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_status.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Plugins are described by creating a $plugin array which will be used |
|
5 |
* by the system that includes this file. |
|
6 |
*/ |
|
7 |
$plugin = array( |
|
8 |
'single' => TRUE, |
|
9 |
'icon' => 'icon_user_form.png', |
|
10 |
'title' => t('User form status field'), |
|
11 |
'description' => t('The user status form.'), |
|
12 |
'required context' => new ctools_context_required(t('Form'), 'form'), |
|
13 |
'category' => t('Form'), |
|
14 |
); |
|
15 |
|
|
16 |
/** |
|
17 |
* Ctools plugin content type render for the status form field. |
|
18 |
*/ |
|
19 |
function ctools_user_form_status_content_type_render($subtype, $conf, $panel_args, &$context) { |
|
20 |
$block = new stdClass(); |
|
21 |
$block->module = t('user-form'); |
|
22 |
|
|
23 |
$block->delta = 'title-options'; |
|
24 |
|
|
25 |
if (isset($context->form)) { |
|
26 |
if (!empty($context->form['account']['status'])) { |
|
27 |
$block->content['status'] = $context->form['account']['status']; |
|
28 |
unset($context->form['account']['status']); |
|
29 |
} |
|
30 |
} |
|
31 |
else { |
|
32 |
$block->content = t('User status form.'); |
|
33 |
} |
|
34 |
return $block; |
|
35 |
} |
|
36 |
|
|
37 |
/** |
|
38 |
* Ctools plugin admin title function for the status form field. |
|
39 |
*/ |
|
40 |
function ctools_user_form_status_content_type_admin_title($subtype, $conf, $context) { |
|
41 |
return t('"@s" user form status field', array('@s' => $context->identifier)); |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* Ctools plugin configuration edit form for the status form field. |
|
46 |
* |
|
47 |
* Provide a blank form so we have a place to have context setting. |
|
48 |
*/ |
|
49 |
function ctools_user_form_status_content_type_edit_form($form, &$form_state) { |
|
50 |
return $form; |
|
51 |
} |
drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_timezone.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Plugins are described by creating a $plugin array which will be used |
|
5 |
* by the system that includes this file. |
|
6 |
*/ |
|
7 |
$plugin = array( |
|
8 |
'single' => TRUE, |
|
9 |
'icon' => 'icon_user_form.png', |
|
10 |
'title' => t('User form timezone field'), |
|
11 |
'description' => t('The user timezone form.'), |
|
12 |
'required context' => new ctools_context_required(t('Form'), 'form'), |
|
13 |
'category' => t('Form'), |
|
14 |
); |
|
15 |
|
|
16 |
/** |
|
17 |
* Ctools plugin content type render for the timezone form field. |
|
18 |
*/ |
|
19 |
function ctools_user_form_timezone_content_type_render($subtype, $conf, $panel_args, &$context) { |
|
20 |
$block = new stdClass(); |
|
21 |
$block->module = t('user-form'); |
|
22 |
|
|
23 |
$block->delta = 'title-options'; |
|
24 |
|
|
25 |
if (isset($context->form)) { |
|
26 |
if (!empty($context->form['timezone'])) { |
|
27 |
$block->content['timezone'] = $context->form['timezone']; |
|
28 |
unset($context->form['timezone']); |
|
29 |
} |
|
30 |
} |
|
31 |
else { |
|
32 |
$block->content = t('User timezone form.'); |
|
33 |
} |
|
34 |
return $block; |
|
35 |
} |
|
36 |
|
|
37 |
/** |
|
38 |
* Ctools plugin admin title function for the timezone form field. |
|
39 |
*/ |
|
40 |
function ctools_user_form_timezone_content_type_admin_title($subtype, $conf, $context) { |
|
41 |
return t('"@s" user form timezone field', array('@s' => $context->identifier)); |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* Ctools plugin configuration edit form for the timezone form field. |
|
46 |
* |
|
47 |
* Provide a blank form so we have a place to have context setting. |
|
48 |
*/ |
|
49 |
function ctools_user_form_timezone_content_type_edit_form($form, &$form_state) { |
|
50 |
return $form; |
|
51 |
} |
drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_username.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Plugins are described by creating a $plugin array which will be used |
|
5 |
* by the system that includes this file. |
|
6 |
*/ |
|
7 |
$plugin = array( |
|
8 |
'single' => TRUE, |
|
9 |
'icon' => 'icon_user_form.png', |
|
10 |
'title' => t('User form username field'), |
|
11 |
'description' => t('The user username form.'), |
|
12 |
'required context' => new ctools_context_required(t('Form'), 'form'), |
|
13 |
'category' => t('Form'), |
|
14 |
); |
|
15 |
|
|
16 |
/** |
|
17 |
* Ctools plugin content type render for the username form field. |
|
18 |
*/ |
|
19 |
function ctools_user_form_username_content_type_render($subtype, $conf, $panel_args, &$context) { |
|
20 |
$block = new stdClass(); |
|
21 |
$block->module = t('user-form'); |
|
22 |
|
|
23 |
$block->delta = 'title-options'; |
|
24 |
|
|
25 |
if (isset($context->form)) { |
|
26 |
if (!empty($context->form['account']['name'])) { |
|
27 |
$block->content['name'] = $context->form['account']['name']; |
|
28 |
unset($context->form['account']['name']); |
|
29 |
} |
|
30 |
} |
|
31 |
else { |
|
32 |
$block->content = t('User username form.'); |
|
33 |
} |
|
34 |
return $block; |
|
35 |
} |
|
36 |
|
|
37 |
/** |
|
38 |
* Ctools plugin admin title function for the username form field. |
|
39 |
*/ |
|
40 |
function ctools_user_form_username_content_type_admin_title($subtype, $conf, $context) { |
|
41 |
return t('"@s" user form username field', array('@s' => $context->identifier)); |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* Ctools plugin configuration edit form for the username form field. |
|
46 |
* |
|
47 |
* Provide a blank form so we have a place to have context setting. |
|
48 |
*/ |
|
49 |
function ctools_user_form_username_content_type_edit_form($form, &$form_state) { |
|
50 |
return $form; |
|
51 |
} |
drupal7/sites/all/modules/ctools/plugins/contexts/user.inc | ||
---|---|---|
41 | 41 |
if ($conf) { |
42 | 42 |
if ($data['type'] == 'current') { |
43 | 43 |
global $user; |
44 |
$data = user_load($user->uid); |
|
45 | 44 |
if (user_is_logged_in()) { |
45 |
$data = user_load($user->uid); |
|
46 | 46 |
$data->logged_in_user = TRUE; |
47 | 47 |
} |
48 |
else { |
|
49 |
$data = drupal_anonymous_user(); |
|
50 |
} |
|
48 | 51 |
} |
49 | 52 |
else { |
50 | 53 |
$data = user_load($data['uid']); |
drupal7/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php | ||
---|---|---|
310 | 310 |
|
311 | 311 |
$form['bottom row']['reset'] = array( |
312 | 312 |
'#type' => 'submit', |
313 |
'#id' => 'ctools-export-ui-list-items-apply',
|
|
313 |
'#id' => 'ctools-export-ui-list-items-reset',
|
|
314 | 314 |
'#value' => t('Reset'), |
315 | 315 |
'#attributes' => array('class' => array('use-ajax-submit')), |
316 | 316 |
); |
drupal7/sites/all/modules/ctools/plugins/relationships/comment_parent.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* @file relationships/comment_parent.inc |
|
5 |
* Plugin to provide a relationship handler for comment parent. |
|
6 |
*/ |
|
7 |
|
|
8 |
/** |
|
9 |
* Plugins are described by creating a $plugin array which will be used |
|
10 |
* by the system that includes this file. |
|
11 |
*/ |
|
12 |
$plugin = array( |
|
13 |
'title' => t('Parent comment'), |
|
14 |
'keyword' => 'parent_comment', |
|
15 |
'description' => t('Adds a parent comment from a comment context.'), |
|
16 |
'required context' => new ctools_context_required(t('Comment'), 'entity:comment'), |
|
17 |
'context' => 'ctools_comment_parent_context', |
|
18 |
); |
|
19 |
|
|
20 |
/** |
|
21 |
* Return a new context based on an existing context. |
|
22 |
*/ |
|
23 |
function ctools_comment_parent_context($context, $conf) { |
|
24 |
if (empty($context->data)) { |
|
25 |
return ctools_context_create_empty('entity:comment'); |
|
26 |
} |
|
27 |
|
|
28 |
if (isset($context->data->pid) && ($context->data->pid !== 0)) { |
|
29 |
$parent_comment = comment_load($context->data->pid); |
|
30 |
return ctools_context_create('entity:comment', $parent_comment); |
|
31 |
} |
|
32 |
} |
drupal7/sites/all/modules/ctools/stylizer/stylizer.info | ||
---|---|---|
5 | 5 |
dependencies[] = ctools |
6 | 6 |
dependencies[] = color |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2020-10-23
|
|
9 |
version = "7.x-1.17"
|
|
8 |
; Information added by Drupal.org packaging script on 2021-01-30
|
|
9 |
version = "7.x-1.19"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "ctools" |
12 |
datestamp = "1603490551" |
|
12 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/term_depth/term_depth.info | ||
---|---|---|
4 | 4 |
dependencies[] = ctools |
5 | 5 |
package = Chaos tool suite |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2020-10-23
|
|
8 |
version = "7.x-1.17"
|
|
7 |
; Information added by Drupal.org packaging script on 2021-01-30
|
|
8 |
version = "7.x-1.19"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "ctools" |
11 |
datestamp = "1603490551" |
|
11 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info | ||
---|---|---|
7 | 7 |
|
8 | 8 |
files[] = ctools_export.test |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2020-10-23
|
|
11 |
version = "7.x-1.17"
|
|
10 |
; Information added by Drupal.org packaging script on 2021-01-30
|
|
11 |
version = "7.x-1.19"
|
|
12 | 12 |
core = "7.x" |
13 | 13 |
project = "ctools" |
14 |
datestamp = "1603490551" |
|
14 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/tests/ctools_plugin_test.info | ||
---|---|---|
5 | 5 |
dependencies[] = ctools |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2020-10-23
|
|
9 |
version = "7.x-1.17"
|
|
8 |
; Information added by Drupal.org packaging script on 2021-01-30
|
|
9 |
version = "7.x-1.19"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "ctools" |
12 |
datestamp = "1603490551" |
|
12 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/views_content/plugins/views/views_content_plugin_display_panel_pane.inc | ||
---|---|---|
385 | 385 |
return (bool) $conf['more_link']; |
386 | 386 |
} |
387 | 387 |
|
388 |
/** |
|
389 |
* {@inheritdoc} |
|
390 |
*/ |
|
391 |
public function has_path() { |
|
392 |
return TRUE; |
|
393 |
} |
|
394 |
|
|
395 | 388 |
/** |
396 | 389 |
* {@inheritdoc} |
397 | 390 |
*/ |
drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.info | ||
---|---|---|
1 |
name = Views content panes Test |
|
2 |
description = Test module for Views content panes. |
|
3 |
package = Views |
|
4 |
core = 7.x |
|
5 |
dependencies[] = views_content |
|
6 |
hidden = TRUE |
|
7 |
; Information added by Drupal.org packaging script on 2021-01-30 |
|
8 |
version = "7.x-1.19" |
|
9 |
core = "7.x" |
|
10 |
project = "ctools" |
|
11 |
datestamp = "1611988843" |
drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.module | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* @file |
|
5 |
* Helper module for Views content pane tests. |
|
6 |
*/ |
|
7 |
|
|
8 |
/** |
|
9 |
* Implements hook_views_api(). |
|
10 |
*/ |
|
11 |
function views_content_test_views_api() { |
|
12 |
return array( |
|
13 |
'api' => 3.0, |
|
14 |
); |
|
15 |
} |
drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.views_default.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* @file |
|
5 |
* Tests views. |
|
6 |
*/ |
|
7 |
|
|
8 |
/** |
|
9 |
* Implements hook_views_default_views(). |
|
10 |
*/ |
|
11 |
function views_content_test_views_default_views() { |
|
12 |
$view = new view(); |
|
13 |
$view->name = 'views_content_more_link'; |
|
14 |
$view->description = ''; |
|
15 |
$view->tag = 'default'; |
|
16 |
$view->base_table = 'node'; |
|
17 |
$view->human_name = 'views_content_more_link'; |
|
18 |
$view->core = 7; |
|
19 |
$view->api_version = '3.0'; |
|
20 |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
|
21 |
|
|
22 |
/* Display: Master */ |
|
23 |
$handler = $view->new_display('default', 'Master', 'default'); |
|
24 |
$handler->display->display_options['title'] = 'views_content_more_link'; |
|
25 |
$handler->display->display_options['use_more'] = TRUE; |
Also available in: Unified diff
Weekly update of contrib modules