summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Boyer2011-12-02 20:00:59 (GMT)
committer Sam Boyer2011-12-02 20:00:59 (GMT)
commit3a5066515640800aadfd42084e98e6debc1b6cc5 (patch)
tree1e292c95ff64a9bffbf0cce8b6973d904c65e95c
parentb7df969d4ee72672803ed1302df5c99932555b59 (diff)
Rough edges remain, but core of the operations export UI works.
-rw-r--r--includes/export-ui.theme.inc2
-rw-r--r--plugins/export_ui/ctools_export_ui.class.php12
2 files changed, 6 insertions, 8 deletions
diff --git a/includes/export-ui.theme.inc b/includes/export-ui.theme.inc
index 5fb8691..56b5536 100644
--- a/includes/export-ui.theme.inc
+++ b/includes/export-ui.theme.inc
@@ -116,7 +116,7 @@ function template_preprocess_ctools_export_ui_operations_page(&$vars) {
$vars['operations'] = !empty($element['#operations']['operations']) ? $element['#operations']['operations'] : '';
$vars['actions'] = !empty($element['#operations']['actions']) ? $element['#operations']['actions'] : '';
$vars['content'] = $element['#content'];
- $vars['save'] = drupal_render($element['#save_form']);
+ $vars['save'] = drupal_render($element['#save']);
}
/**
diff --git a/plugins/export_ui/ctools_export_ui.class.php b/plugins/export_ui/ctools_export_ui.class.php
index e33e98c..d8f0642 100644
--- a/plugins/export_ui/ctools_export_ui.class.php
+++ b/plugins/export_ui/ctools_export_ui.class.php
@@ -956,6 +956,8 @@ class ctools_export_ui {
// considered the master.
$operation_form_state = $form_state;
+ $operations = $this->get_operations($form_state['item']);
+
// This is the default operation trail if no operation was specified.
if (empty($trail)) {
$trail = $this->get_default_operation_trail($form_state['item'], $operations);
@@ -977,8 +979,6 @@ class ctools_export_ui {
}
}
- $operations = $this->get_operations($form_state['item']);
-
// In the default scenario, there's a default "operation" and we get its
// content on this page.
$content = $this->render_operation($operation_form_state, $operations, $trail);
@@ -1012,9 +1012,6 @@ class ctools_export_ui {
$save_form = drupal_build_form('ctools_export_ui_save_object_form', $form_state);
}
- // @todo -- we should move this to render() in the template
- $form = drupal_render($save_form);
-
$output = $this->render_operation_page($save_form, $rendered_operations, $content);
if ($form_state['ajax']) {
@@ -1438,6 +1435,7 @@ class ctools_export_ui {
$form_state['redirect'] = $operation['#path'];
}
}
+ $this->edit_cache_set($item, $form_state['op']);
}
/**
@@ -1447,7 +1445,8 @@ class ctools_export_ui {
* the default implementation doesn't do anything here.
*/
function edit_operation_save(&$form_state) {
-
+ $this->edit_save_form($form_state);
+ $this->edit_cache_clear($item, 'edit');
}
/**
@@ -1508,7 +1507,6 @@ class ctools_export_ui {
* Figure out what the cache key is for this object.
*/
function edit_cache_get_key($item, $op) {
- $export_key = $this->plugin['export']['key'];
return $op == 'edit' ? $item->{$this->plugin['export']['key']} : "::$op";
}