[fixes] [tests] web forms

This commit is contained in:
Rushabh Mehta 2015-06-01 17:47:17 +05:30
parent 2716f4a613
commit 2ba83e464f
2 changed files with 3 additions and 4 deletions

View file

@ -102,12 +102,11 @@
<div class="form-group">
{{ label(field) }}
{% if value(field) -%}
<p>
<i class="icon-paperclip"></i>
<p class="small">
<a href="{{ doc.get(field.fieldname) }}" target="blank">
{{ doc.get(field.fieldname) }}
</a>
<br><button class="btn btn-small btn-default
<br><button class="btn btn-small btn-default btn-xs
change-attach" style="margin-top: 5px;">Change</button>
</p>
{%- endif %}

View file

@ -62,7 +62,7 @@ def get(doctype, txt=None, limit_start=0, **kwargs):
doc.doctype = doctype
new_context = { "doc": doc, "meta": meta }
if not frappe.flags.in_test:
new_context.pathname = frappe.local.request.path.strip("/ ")
new_context["pathname"] = frappe.local.request.path.strip("/ ")
new_context.update(list_context)
rendered_row = frappe.render_template(row_template, new_context, is_path=True)
result.append(rendered_row)