Commit 97689c876ef90aea15ad0b5a64c131e1616ab2b0
1 parent
8aefc351
Exists in
master
and in
2 other branches
Fixing goals creation multiple goals error
Showing
3 changed files
with
4 additions
and
0 deletions
Show diff stats
amadeus/static/css/base/amadeus.css
goals/forms.py
@@ -116,6 +116,8 @@ class GoalItemForm(forms.ModelForm): | @@ -116,6 +116,8 @@ class GoalItemForm(forms.ModelForm): | ||
116 | def clean(self): | 116 | def clean(self): |
117 | cleaned_data = super(GoalItemForm, self).clean() | 117 | cleaned_data = super(GoalItemForm, self).clean() |
118 | 118 | ||
119 | + print(cleaned_data) | ||
120 | + | ||
119 | description = cleaned_data.get('description', None) | 121 | description = cleaned_data.get('description', None) |
120 | ref_value = cleaned_data.get('ref_value', None) | 122 | ref_value = cleaned_data.get('ref_value', None) |
121 | 123 |
goals/templates/goals/_form.html
@@ -419,6 +419,7 @@ | @@ -419,6 +419,7 @@ | ||
419 | input.parent().find('.slider').remove(); | 419 | input.parent().find('.slider').remove(); |
420 | new_input.attr('class', input.attr('class')); | 420 | new_input.attr('class', input.attr('class')); |
421 | new_input.attr('id', input.attr('id')); | 421 | new_input.attr('id', input.attr('id')); |
422 | + new_input.attr('name', input.attr('name')); | ||
422 | new_input.insertBefore(input); | 423 | new_input.insertBefore(input); |
423 | input.remove(); | 424 | input.remove(); |
424 | new_input.bootstrapSlider({ | 425 | new_input.bootstrapSlider({ |