diff --git a/frappe/templates/generators/web_form.html b/frappe/templates/generators/web_form.html
index e4f783420b..52b6060620 100644
--- a/frappe/templates/generators/web_form.html
+++ b/frappe/templates/generators/web_form.html
@@ -13,27 +13,27 @@
{% endblock %}
{% block header_actions %}
- {% if not read_only %}
- {% if has_header %}
+ {% if not read_only and has_header %}
+
{{ _("Cancel") }}
- {%- if allow_print %}
-
- {% endif -%}
-
- {% elif is_list %}
-
- {% endif %}
- {% endif %}
+
+ {% endif %}
+ {% if is_list %}
+
+ {% endif %}
+ {%- if allow_print and not is_list -%}
+
+ {%- endif -%}
{% endblock %}
{% block page_content %}
@@ -419,6 +419,7 @@ frappe.ready(function() {
// allow payment only if
$('.btn-payment').on('click', function() {
save(true);
+ return false;
});
// change attach
@@ -443,6 +444,7 @@ frappe.ready(function() {
show_slide(idx);
}
}
+ return false;
});
show_slide = function(idx) {
@@ -624,7 +626,7 @@ frappe.ready(function() {
$form.addClass("hide");
$(".comments, .introduction").addClass("hide");
scroll(0, 0);
- set_message(frappe.success_link);
+ set_message(frappe.success_message);
} else {
set_message(__('Saved'));
}