Permalink
Browse files

HUE-687 [beeswax] 'Save' query button not working

  • Loading branch information...
1 parent e57b02f commit 62b1bb8a0bea57969fedf8ab05da71c358b99597 @romainr romainr committed Apr 17, 2012
Showing with 9 additions and 5 deletions.
  1. +8 −4 apps/beeswax/src/beeswax/templates/execute.mako
  2. +1 −1 apps/beeswax/src/beeswax/views.py
@@ -371,10 +371,14 @@ ${layout.menubar(section='query')}
checkAndSubmit();
});
- $("#saveQuery").click(function(){
- $("<input>").attr("type","hidden").attr("name","saveform-save").attr("value","Save").appendTo($("#advancedSettingsForm"));
- checkAndSubmit();
- });
+ $("#saveQuery").click(function(){
+ $("<input>").attr("type","hidden").attr("name","saveform-name")
+ .attr("value", "${extract_field_data(form.saveform["name"])}").appendTo($("#advancedSettingsForm"));
+ $("<input>").attr("type","hidden").attr("name","saveform-desc")
+ .attr("value", "${extract_field_data(form.saveform["desc"])}").appendTo($("#advancedSettingsForm"));
+ $("<input>").attr("type","hidden").attr("name","saveform-save").attr("value","Save").appendTo($("#advancedSettingsForm"));
+ checkAndSubmit();
+ });
$("#saveQueryAs").click(function(){
$("<input>").attr("type","hidden").attr("name","saveform-saveas").attr("value","Save As...").appendTo($("#advancedSettingsForm"));
@@ -476,7 +476,7 @@ def save_design(request, form, type, design, explicit_save):
# Don't generate an auto-saved design if the user didn't change anything
if explicit_save:
design.name = form.saveform.cleaned_data['name']
- design.desc = form.saveform.cleaned_data.get('desc')
+ design.desc = form.saveform.cleaned_data['desc']
design.is_auto = False
elif new_data != old_design.data:
# Auto save iff the data is different

0 comments on commit 62b1bb8

Please sign in to comment.