equal
deleted
inserted
replaced
70 This function actually does very little, simply passing the |
70 This function actually does very little, simply passing the |
71 supplied field_label and field_value in a simple context used by the |
71 supplied field_label and field_value in a simple context used by the |
72 _readonly_field_as_table_row.html template (which is actually |
72 _readonly_field_as_table_row.html template (which is actually |
73 doing all of the work). |
73 doing all of the work). |
74 |
74 |
75 See soc/templates/soc/templatetags/_readonly_field_as_table_row.html for the CSS |
75 See soc/templates/soc/templatetags/_readonly_field_as_table_row.html for |
76 styles used by this template tag. |
76 the CSS styles used by this template tag. |
77 |
77 |
78 Usage: |
78 Usage: |
79 {% load forms_helpers %} |
79 {% load forms_helpers %} |
80 ... |
80 ... |
81 <table> |
81 <table> |
94 """ |
94 """ |
95 return {'field_label': field_label, |
95 return {'field_label': field_label, |
96 'field_value': field_value} |
96 'field_value': field_value} |
97 |
97 |
98 |
98 |
99 @register.inclusion_tag('soc/templatetags/_readonly_multiline_field_as_table_row.html') |
99 @register.inclusion_tag( |
|
100 'soc/templatetags/_readonly_multiline_field_as_table_row.html') |
100 def readonly_multiline_field_as_table_row(field_label, field_value): |
101 def readonly_multiline_field_as_table_row(field_label, field_value): |
101 """See readonly_field_as_table_row, but with a different template tag |
102 """See readonly_field_as_table_row, but with a different template tag. |
102 """ |
103 """ |
103 return {'field_label': field_label, |
104 return {'field_label': field_label, |
104 'field_value': field_value} |
105 'field_value': field_value} |
105 |
106 |
106 |
107 |