Skip to content

Commit

Permalink
feat: use default template if custom not needed; use mobile manual fo…
Browse files Browse the repository at this point in the history
…r native iOS client too
  • Loading branch information
jakubnakielskixebia committed Jul 23, 2024
1 parent a866d06 commit f398343
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 866 deletions.
7 changes: 6 additions & 1 deletion src/xebia_email_signature/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def main():

@app.route("/new/signature", methods=["POST"])
def create_new_signature():
current_path = os.path.abspath(os.path.dirname(__file__))

data = add_formatted_phone(request.form)
data = add_call_to_actions(data)
data = add_social_media(data)
Expand All @@ -120,7 +122,10 @@ def create_new_signature():
if email_client in allowed_clients:
jinjafile = "signature-" + email_client + ".html.jinja"
else:
jinjafile = "no_client.html"
jinjafile = "wrong_client.html"

if not os.path.exists(os.path.join(current_path, 'templates', jinjafile)):
jinjafile = "signature.html.jinja"

response = render_template(jinjafile, data=data, theme=get_new_theme(data))
return response
Expand Down
2 changes: 1 addition & 1 deletion src/xebia_email_signature/templates/new_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ <h2 class="preview-header">Installation guide:</h2>
</div>

<div
class="preview-manual js-preview-manual-mobile-outlook-ios js-preview-manual-mobile-outlook-and"
class="preview-manual js-preview-manual-mobile-outlook-ios js-preview-manual-mobile-outlook-and js-preview-manual-mobile-native-ios"
>
<h2 class="preview-header">Installation guide:</h2>
<ol>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f398343

Please sign in to comment.