From ec79595b699f271480589ded281f1fdcb914e9b8 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 24 Apr 2020 22:02:39 +0530 Subject: [PATCH] fix: Add confetti and CTA description to CTA Section --- .../web_template_field.json | 4 +-- .../section_with_cta/section_with_cta.html | 26 ++++++++++++++----- .../section_with_cta/section_with_cta.json | 26 +++++++++++++++---- 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/frappe/website/doctype/web_template_field/web_template_field.json b/frappe/website/doctype/web_template_field/web_template_field.json index 7fb6da6100..09335adf3a 100644 --- a/frappe/website/doctype/web_template_field/web_template_field.json +++ b/frappe/website/doctype/web_template_field/web_template_field.json @@ -31,7 +31,7 @@ "fieldtype": "Select", "in_list_view": 1, "label": "Fieldtype", - "options": "Attach Image\nCheckbox\nData\nInt\nSelect\nSmall Text\nText\nMarkdown Editor", + "options": "Attach Image\nCheck\nData\nInt\nSelect\nSmall Text\nText\nMarkdown Editor", "reqd": 1 }, { @@ -48,7 +48,7 @@ ], "istable": 1, "links": [], - "modified": "2020-04-21 20:54:56.199695", + "modified": "2020-04-24 17:05:25.322767", "modified_by": "Administrator", "module": "Website", "name": "Web Template Field", diff --git a/frappe/website/web_template/section_with_cta/section_with_cta.html b/frappe/website/web_template/section_with_cta/section_with_cta.html index d2110c37e7..e577aa7235 100644 --- a/frappe/website/web_template/section_with_cta/section_with_cta.html +++ b/frappe/website/web_template/section_with_cta/section_with_cta.html @@ -1,7 +1,21 @@ -
-

{{ title }}

-

{{ subtitle }}

-

- {{ c('button', label=cta_label, url=cta_url, variant="primary", size="large") }} -

+
+
+

{{ title }}

+

{{ subtitle }}

+

+ {{ c('button', label=cta_label, url=cta_url, variant="primary", size="large") }} +

+ {%- if cta_description -%} +
+ {{ cta_description }} +
+ {%- endif -%} +
+ {%- if show_confetti -%} +
+
+
+
+
+ {%- endif -%}
diff --git a/frappe/website/web_template/section_with_cta/section_with_cta.json b/frappe/website/web_template/section_with_cta/section_with_cta.json index 8739abbf16..b1de1c991f 100644 --- a/frappe/website/web_template/section_with_cta/section_with_cta.json +++ b/frappe/website/web_template/section_with_cta/section_with_cta.json @@ -6,26 +6,42 @@ { "fieldname": "title", "fieldtype": "Data", - "label": "Title" + "label": "Title", + "reqd": 0 }, { "fieldname": "subtitle", "fieldtype": "Small Text", - "label": "Subtitle" + "label": "Subtitle", + "reqd": 0 }, { "fieldname": "cta_label", "fieldtype": "Data", - "label": "CTA Label" + "label": "CTA Label", + "reqd": 0 }, { "fieldname": "cta_url", "fieldtype": "Data", - "label": "CTA URL" + "label": "CTA URL", + "reqd": 0 + }, + { + "fieldname": "cta_description", + "fieldtype": "Small Text", + "label": "CTA Description", + "reqd": 0 + }, + { + "fieldname": "show_confetti", + "fieldtype": "Check", + "label": "Show Confetti", + "reqd": 0 } ], "idx": 0, - "modified": "2020-04-17 19:57:40.534914", + "modified": "2020-04-24 22:01:17.098158", "modified_by": "Administrator", "name": "Section with CTA", "owner": "Administrator",