You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2013/06/24 21:26:22 UTC
svn commit: r1496170 - in /bloodhound/trunk/bloodhound_theme/bhtheme:
templates/bloodhound_theme.html theme.py
Author: rjollos
Date: Mon Jun 24 19:26:21 2013
New Revision: 1496170
URL: http://svn.apache.org/r1496170
Log:
Reverting r1496160, which was committed in error.
Modified:
bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html?rev=1496170&r1=1496169&r2=1496170&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html Mon Jun 24 19:26:21 2013
@@ -114,19 +114,19 @@
</div>
<!--! create ticket button + dropdown -->
- <py:def function="field_select(field)">
+ <py:def function="field_select(field, value)">
<select id="field-${field.name}" name="field_${field.name}"
class="input-block-level" data-empty="true" data-field="${field.name}">
<option py:if="field.optional"></option>
<option py:for="option in field.options"
- selected="${field.value == option or None}"
+ selected="${value == option or None}"
value = "$option"
py:content="option"></option>
<optgroup py:for="optgroup in field.optgroups"
py:if="optgroup.options"
label="${optgroup.label}">
<option py:for="option in optgroup.options"
- selected="${field.value == option or None}"
+ selected="${value == option or None}"
value = "$option"
py:content="option"></option>
</optgroup>
@@ -169,13 +169,9 @@
<div class="control-group">
<py:for each="field in qct.fields">
<label for="field-${field.name}">${field.label}</label>
- ${field_select(field)}
+ ${field_select(field, None)}
</py:for>
</div>
-
- <py:for each="field in qct.hidden_fields">
- <input type="hidden" name="field_${field.name}" value="${field.value}" />
- </py:for>
</form>
<div class="controls">
@@ -318,7 +314,7 @@
<div class="control-group">
<py:for each="field in qct.fields">
<label for="field-${field.name}">${field.label}</label>
- ${field_select(field)}
+ ${field_select(field, None)}
</py:for>
</div>
</form>
Modified: bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1496170&r1=1496169&r2=1496170&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Mon Jun 24 19:26:21 2013
@@ -474,18 +474,11 @@ class QuickCreateTicketDialog(Component)
}
product_field = all_fields['product']
- if product_field:
- if self.env.product:
- product_field['value'] = self.env.product.prefix
- else:
- product_field['value'] = product_field['options'][0]
-
- data['qct'] = {
- 'fields': [all_fields[k] for k in self.qct_fields
- if k in all_fields],
- 'hidden_fields': [all_fields[k] for k in all_fields.keys()
- if k not in self.qct_fields]
- }
+ if product_field and self.env.product:
+ product_field['value'] = self.env.product.prefix
+
+ data['qct'] = {'fields': [all_fields[k] for k in self.qct_fields
+ if k in all_fields]}
return template, data, content_type
# IRequestHandler methods