class documentation

class CallbackPageTemplate:

View In Hierarchy

Holder for callback page assets and template

Method render Render callback page
Constant ERROR_SVG SVG to display error icon
Constant PAGE_TEMPLATE Template for callback HTML page
Constant SUCCESS_SVG SVG to display checkmark
def render(self, title: str, message: str, lang: str = 'en', has_error: bool = False):

Render callback page

Parameters
title:strPage title
message:strMessage to display under the icon
lang:strLangauge for HTML tag
has_error:boolIndicates weather checkmark (false) or cross (true) should be displayed
Returns
Rendered HTML
ERROR_SVG: str =

SVG to display error icon

Value
'''
    <svg xmlns="http://www.w3.org/2000/svg" width="154px" height="154px">
        <g fill="none" stroke="#F44812" stroke-width="2">
            <circle cx="77" cy="77" r="72" style="stroke-dasharray:480px, 480px;
 stroke-dashoffset: 960px;"></circle>
            <circle id="colored" fill="#F44812" cx="77" cy="77" r="72" style="st
roke-dasharray:480px, 480px; stroke-dashoffset: 960px;"></circle>
...
PAGE_TEMPLATE =

Template for callback HTML page

Value
Template('''
            <html lang="$lang">
                <head>
                    <title>$title</title>
                    <meta name="viewport" content="width=device-width, initial-s
cale=1.0"/>
                    <meta name="charset" content="utf-8">
...
SUCCESS_SVG: str =

SVG to display checkmark

Value
'''
    <svg xmlns="http://www.w3.org/2000/svg" width="154px" height="154px">
        <g fill="none" stroke="#22AE73" stroke-width="2">
            <circle cx="77" cy="77" r="72" style="stroke-dasharray:480px, 480px;
 stroke-dashoffset: 960px;"></circle>
            <circle id="colored" fill="#22AE73" cx="77" cy="77" r="72" style="st
roke-dasharray:480px, 480px; stroke-dashoffset: 960px;"></circle>
...