CINXE.COM
Frappe Wiki
<!DOCTYPE html> <!-- Built on Frappe. https://frappeframework.com/ --> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="generator" content="frappe"> <meta name="title" content="Frappe Wiki"><meta name="language" content="en"><meta property="og:type" content="article"><meta property="og:title" content="Frappe Wiki"><meta name="twitter:title" content="Frappe Wiki"><meta name="twitter:card" content="summary"> <title>Frappe Wiki</title> <link rel="shortcut icon" href="/files/f-logo-black.png" type="image/x-icon" > <script type="text/javascript"> function getCookie() { return Object.fromEntries(document.cookie.split('; ').map((part) => part.split('=')).map((d) => [d[0], decodeURIComponent(d[1])])); } function setCookie(cname, cvalue, exdays) { const d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); let expires = "expires=" + d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } let old_cookie = getCookie(); // Remove all cookies that are not mentioned in Cookie Policy for (let key in old_cookie) { if (!["sid", "io", "__stripe_sid", "__stripe_mid", "user_id", "user_image", "system_user", "full_name"].includes(key)) { setCookie(key, old_cookie['key'], -1); } } </script> <script defer data-api="/api/event" data-domain="frappecloud.com" src="/js/script.js"></script> <style> /* Works on Firefox */ * { scrollbar-width: thin; scrollbar-color: #C0C6CC #EBEEF0; } html { scrollbar-width: auto; } /* Works on Chrome, Edge, and Safari */ *::-webkit-scrollbar-thumb { background: #C0C6CC; border-radius: 6px; } *::-webkit-scrollbar-track, *::-webkit-scrollbar-corner { background: #EBEEF0; } *::-webkit-scrollbar { width: 6px; height: 6px; } body::-webkit-scrollbar { width: 12px; height: 12px; } </style> <!--<script async defer src="https://buttons.github.io/buttons.js"></script>--><link type="text/css" rel="stylesheet" href="/files/website_theme/frappe_ui_245c2f20.css"> <style> body { background-color: #F3F5F8; } h1 { font-size: var(--font-size-xl); font-weight: 400; text-align: center; } p { font-size: 13px; margin-bottom: 4px; } .form-step { display: none; } .card { width: 80%; box-shadow: 0px 1px 42px rgba(97, 97, 97, 0.07), 0px 1px 4px rgba(255, 255, 255, 1); border-color: transparent; height: fit-content; } .card-body { border-radius: 10px; padding: 30px 30px 30px 30px; } .password-popup { align-self: center; right: 30%; position: absolute; display: flex; flex-direction: column; text-decoration: none; font-size: smaller; padding: 8px 8px; background-color: white; border: 1px solid #ddd; border-radius: 5px; } .password-popup-list { list-style-type: none; padding: 0; font-size: small; } form i { margin-left: -30px; cursor: pointer; } select { margin: 0px; } #password { width: 100%; background-color: #F4F5F6; border-radius: 5px; border: none; padding: 7px 12px; font-size: small; } #password:focus { outline: none; } .password-popup-list-item-text { color: rgb(220 38 38); } #country, #no_of_employees, #industry, #designation { font-size: small; } .step { height: 15px; width: 15px; margin: 0 2px; background-color: #bbbbbb; border-radius: 50%; display: inline-block; opacity: 0.5; } /* Mark the active step: */ .step-active { opacity: 1; border: 2px solid rgb(147 197 253); } /* Mark the steps that are finished and valid: */ .step-finish { background-color: #0289FF; } @media (max-width: 576px) { h1 { margin-top: 0.5em; margin-bottom: 1em; } .form-container { padding: 0; } .card { border-radius: 0; padding: 0; } } </style> <script> window.frappe = {}; window._version_number = "{{ build_version }}"; frappe.ready_events = []; frappe.ready = function(fn) { frappe.ready_events.push(fn); } window.dev_server = 0; window.socketio_port = 9000; window.show_language_picker = false; </script> </head> <body frappe-session-status="logged-out" data-path="wiki/signup" class=""> <nav class="bg-transparent navbar navbar-light justify-content-center border-bottom-0"> <div class="text-center my-8"> <img src="/files/Wiki.svg" alt="Logo" style="height: 28px;"> </div> </nav><input id="app" type="text" value="wiki" hidden /> <input id="domain" type="text" value="frappe.cloud" hidden /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css" /> <div class="flex justify-center mx-auto form-container col-xl-5 col-lg-6 col-md-7 col-sm-9" id="user-signup" data-validators="field_validators"> <div class="card bg-gray-200"> <div class="card-body"> <div class="alert alert-primary form-alert-info small" style="display: none;" role="alert"></div> <div class="alert alert-danger form-alert-error small" style="display: none;" role="alert"></div> <!-- 1. Personal Details --> <form class="form-step create-account-form" data-step="1" data-action="submit_account_request"> <div class="form-group"> <p>Site Name</p> <div class="input-group"> <input type="text" id="subdomain" name="subdomain" class="form-control" placeholder="yourcompany" autocomplete="off" onchange="validate_subdomain(this)"> <div class="input-group-append"> <p class="px-2 py-0 text-xs input-group-text rounded-right">.frappe.cloud</p> </div> </div> <small class="form-text"></small> </div> <div class="form-row"> <div class="form-group col-12 col-md-6"> <p>First Name</p> <input type="text" id="first_name" name="first_name" class="form-control" autocomplete="given-name"> </div> <div class="form-group col-12 col-md-6"> <p>Last Name</p> <input type="text" id="last_name" name="last_name" class="form-control" autocomplete="family-name"> </div> </div> <div class="form-group"> <p for="country" class="">Country</p> <select id="country" class="custom-select" name="country"><option selected="selected">Singapore</option><option> Afghanistan </option><option> 脜land Islands </option><option> Albania </option><option> Algeria </option><option> American Samoa </option><option> Andorra </option><option> Angola </option><option> Anguilla </option><option> Antarctica </option><option> Antigua and Barbuda </option><option> Argentina </option><option> Armenia </option><option> Aruba </option><option> Australia </option><option> Austria </option><option> Azerbaijan </option><option> Bahamas </option><option> Bahrain </option><option> Bangladesh </option><option> Barbados </option><option> Belarus </option><option> Belgium </option><option> Belize </option><option> Benin </option><option> Bermuda </option><option> Bhutan </option><option> Bolivia, Plurinational State of </option><option> Bonaire, Sint Eustatius and Saba </option><option> Bosnia and Herzegovina </option><option> Botswana </option><option> Bouvet Island </option><option> Brazil </option><option> British Indian Ocean Territory </option><option> Brunei Darussalam </option><option> Bulgaria </option><option> Burkina Faso </option><option> Burundi </option><option> Cambodia </option><option> Cameroon </option><option> Canada </option><option> Cape Verde </option><option> Cayman Islands </option><option> Central African Republic </option><option> Chad </option><option> Chile </option><option> China </option><option> Christmas Island </option><option> Cocos (Keeling) Islands </option><option> Colombia </option><option> Comoros </option><option> Congo </option><option> Congo - Kinshasa </option><option> Cook Islands </option><option> Costa Rica </option><option> C么te d'ivoire </option><option> Croatia </option><option> Cuba </option><option> Cura莽ao </option><option> Cyprus </option><option> Czech Republic </option><option> Denmark </option><option> Djibouti </option><option> Dominica </option><option> Dominican Republic </option><option> Ecuador </option><option> Egypt </option><option> El Salvador </option><option> Equatorial Guinea </option><option> Eritrea </option><option> Estonia </option><option> Ethiopia </option><option> European Union </option><option> Falkland Islands (Malvinas) </option><option> Faroe Islands </option><option> Fiji </option><option> Finland </option><option> France </option><option> French Guiana </option><option> French Polynesia </option><option> French Southern Territories </option><option> Gabon </option><option> Gambia </option><option> Georgia </option><option> Germany </option><option> Ghana </option><option> Gibraltar </option><option> Greece </option><option> Greenland </option><option> Grenada </option><option> Guadeloupe </option><option> Guam </option><option> Guatemala </option><option> Guernsey </option><option> Guinea </option><option> Guinea-Bissau </option><option> Guyana </option><option> Haiti </option><option> Heard Island and McDonald Islands </option><option> Holy See (Vatican City State) </option><option> Honduras </option><option> Hong Kong </option><option> Hungary </option><option> Iceland </option><option> India </option><option> Indonesia </option><option> Iran </option><option> Iraq </option><option> Ireland </option><option> Isle of Man </option><option> Israel </option><option> Italy </option><option> Ivory Coast </option><option> Jamaica </option><option> Japan </option><option> Jersey </option><option> Jordan </option><option> Kazakhstan </option><option> Kenya </option><option> Kiribati </option><option> Korea, Democratic Peoples Republic of </option><option> Korea, Republic of </option><option> Kuwait </option><option> Kyrgyzstan </option><option> Lao Peoples Democratic Republic </option><option> Latvia </option><option> Lebanon </option><option> Lesotho </option><option> Liberia </option><option> Libya </option><option> Liechtenstein </option><option> Lithuania </option><option> Luxembourg </option><option> Macao </option><option> Macedonia </option><option> Madagascar </option><option> Malawi </option><option> Malaysia </option><option> Maldives </option><option> Mali </option><option> Malta </option><option> Marshall Islands </option><option> Martinique </option><option> Mauritania </option><option> Mauritius </option><option> Mayotte </option><option> Mexico </option><option> Micronesia, Federated States of </option><option> Moldova, Republic of </option><option> Monaco </option><option> Mongolia </option><option> Montenegro </option><option> Montserrat </option><option> Morocco </option><option> Mozambique </option><option> Myanmar </option><option> Namibia </option><option> Nauru </option><option> Nepal </option><option> Netherlands </option><option> New Caledonia </option><option> New Zealand </option><option> Nicaragua </option><option> Niger </option><option> Nigeria </option><option> Niue </option><option> Norfolk Island </option><option> Northern Mariana Islands </option><option> Norway </option><option> Oman </option><option> Pakistan </option><option> Palau </option><option> Palestinian Territory, Occupied </option><option> Panama </option><option> Papua New Guinea </option><option> Paraguay </option><option> Peru </option><option> Philippines </option><option> Pitcairn </option><option> Poland </option><option> Portugal </option><option> Puerto Rico </option><option> Qatar </option><option> R茅union </option><option> Romania </option><option> Russian Federation </option><option> Rwanda </option><option> Saint Barth茅lemy </option><option> Saint Helena, Ascension and Tristan da Cunha </option><option> Saint Kitts and Nevis </option><option> Saint Lucia </option><option> Saint Martin (French part) </option><option> Saint Pierre and Miquelon </option><option> Saint Vincent and the Grenadines </option><option> Samoa </option><option> San Marino </option><option> Sao Tome and Principe </option><option> Saudi Arabia </option><option> Senegal </option><option> Serbia </option><option> Seychelles </option><option> Sierra Leone </option><option> Singapore </option><option> Sint Maarten (Dutch part) </option><option> Slovakia </option><option> Slovenia </option><option> Solomon Islands </option><option> Somalia </option><option> South Africa </option><option> South Georgia and the South Sandwich Islands </option><option> South Sudan </option><option> Spain </option><option> Sri Lanka </option><option> Sudan </option><option> Suriname </option><option> Svalbard and Jan Mayen </option><option> Swaziland </option><option> Sweden </option><option> Switzerland </option><option> Syria </option><option> Taiwan </option><option> Tajikistan </option><option> Tanzania </option><option> Thailand </option><option> Timor-Leste </option><option> Togo </option><option> Tokelau </option><option> Tonga </option><option> Trinidad and Tobago </option><option> Tunisia </option><option> Turkey </option><option> Turkmenistan </option><option> Turks and Caicos Islands </option><option> Tuvalu </option><option> Uganda </option><option> Ukraine </option><option> United Arab Emirates </option><option> United Kingdom </option><option> United States </option><option> United States Minor Outlying Islands </option><option> Uruguay </option><option> Uzbekistan </option><option> Vanuatu </option><option> Venezuela, Bolivarian Republic of </option><option> Vietnam </option><option> Virgin Islands, British </option><option> Virgin Islands, U.S. </option><option> Wallis and Futuna </option><option> Western Sahara </option><option> Yemen </option><option> Zambia </option><option> Zimbabwe </option></select> </div> <div class="form-group"> <p>Email Address</p> <input type="email" id="email" class="form-control" name="email" autocomplete="email"> </div> <div class="form-group"> <input type="checkbox" name="user_accept_terms" id="user_accept_terms" style="margin-bottom: -0.15rem;"> <p class="d-inline" for="user_accept_terms"> I agree to Frappe <a href="https://frappecloud.com/terms" class="text-blue-600">Terms of Service</a>, <a href="https://frappecloud.com/privacy" class="text-blue-600">Privacy Policy</a> & <a href="https://frappecloud.com/cookie-policy" class="text-blue-600">Cookie Policy.</a> </p> </div> <button id="accountRequestButton" type="submit" style="width: 100%; background-color: #171717; color: white;" class="btn btn-step-1">Create Account</button> </form> <div id="googleLogin" class="flex justify-content-between" style="flex-direction: column;"> <div class="my-2 border-t text-center text-xs"> <div class="-translate-y-1/2 transform"> <p class="bg-white px-2 text-xs uppercase leading-8 tracking-wider text-gray-800"> Or </p> </div> </div> <div class="btn btn-secondary" style="width: 100%;" onclick="signupWithGoogle()"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="20px" height="20px"> <path fill="#FFC107" d="M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z" /> <path fill="#FF3D00" d="M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z" /> <path fill="#4CAF50" d="M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z" /> <path fill="#1976D2" d="M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z" /> </svg> <span> Signup with Google </span> </div> </div> <!-- 2. Verification Email Sent --> <form class="form-step" data-step="2"> <div class="text-center"> <h2 class="font-size-base mt-0">Verification email sent</h2> <p> We have sent an email to <span class="verification-email"></span>. Please click on the link received to verify your email and create your account. </p> </div> </form> </div> </div> </div><div id="all-symbols" style="display:none"></div><script type="text/javascript">fetch(`/assets/frappe/icons/timeless/icons.svg?v=${window._version_number}`, {credentials: "same-origin"}).then((r) => r.text()).then((svg) => {let c = document.getElementById("all-symbols"); c.insertAdjacentHTML("beforeend", svg);});</script><script type="text/javascript">fetch(`/assets/frappe/icons/espresso/icons.svg?v=${window._version_number}`, {credentials: "same-origin"}).then((r) => r.text()).then((svg) => {let c = document.getElementById("all-symbols"); c.insertAdjacentHTML("beforeend", svg);});</script> <!-- js should be loaded in body! --> <script> frappe.boot = { "apps_data": { "apps": [], "default_path": "", "is_desk_apps": 1 }, "assets_json": { "analytics.bundle.js": "/assets/analytics/dist/js/analytics.bundle.SKCKHGBU.js", "barcode_scanner.bundle.js": "/assets/frappe/dist/js/barcode_scanner.bundle.YJLDN4TP.js", "billing.bundle.js": "/assets/frappe/dist/js/billing.bundle.QKWL3DBH.js", "bootstrap-4-web.bundle.js": "/assets/frappe/dist/js/bootstrap-4-web.bundle.FOZOVELL.js", "build_events.bundle.js": "/assets/frappe/dist/js/build_events.bundle.BCX32TWL.js", "calendar.bundle.js": "/assets/frappe/dist/js/calendar.bundle.4A4YITIU.js", "chat.bundle.css": "/assets/frappe/dist/css/chat.bundle.2CO7LVQI.css", "chat.bundle.js": "/assets/frappe/dist/js/chat.bundle.3ZSGENSS.js", "checkout.bundle.js": "/assets/frappe/dist/js/checkout.bundle.I4AOUTZJ.js", "contributions.bundle.css": "/assets/wiki/dist/css/contributions.bundle.47EOYOT6.css", "controls.bundle.js": "/assets/frappe/dist/js/controls.bundle.CMPIQ7DT.js", "data_import_tools.bundle.js": "/assets/frappe/dist/js/data_import_tools.bundle.Q5YT4XP2.js", "desk.bundle.css": "/assets/frappe/dist/css/desk.bundle.TLN4OSHY.css", "desk.bundle.js": "/assets/frappe/dist/js/desk.bundle.QNFSL2JQ.js", "dialog.bundle.js": "/assets/frappe/dist/js/dialog.bundle.2ZAVP35B.js", "edit_wiki.bundle.css": "/assets/wiki/dist/css/edit_wiki.bundle.CEPGFVHN.css", "email.bundle.css": "/assets/frappe/dist/css/email.bundle.TSD75SJW.css", "file_uploader.bundle.js": "/assets/frappe/dist/js/file_uploader.bundle.QQ4TBKF5.js", "form.bundle.js": "/assets/frappe/dist/js/form.bundle.DPQKBSIB.js", "form_builder.bundle.js": "/assets/frappe/dist/js/form_builder.bundle.NRPX4YQU.js", "frappe-rtl.bundle.css": "/assets/frappe/dist/css/frappe-rtl.bundle.VJSONUDG.css", "frappe-web.bundle.js": "/assets/frappe/dist/js/frappe-web.bundle.KEWLD4GT.js", "helpdesk.bundle.js": "/assets/helpdesk/dist/js/helpdesk.bundle.77U63EU3.js", "kanban_board.bundle.js": "/assets/frappe/dist/js/kanban_board.bundle.7VUNYA4J.js", "libs.bundle.js": "/assets/frappe/dist/js/libs.bundle.TIV7ZGVY.js", "list.bundle.js": "/assets/frappe/dist/js/list.bundle.H4MKMV64.js", "login.bundle.css": "/assets/frappe/dist/css/login.bundle.XZV66HRG.css", "logtypes.bundle.js": "/assets/frappe/dist/js/logtypes.bundle.5KO3ZOOI.js", "marketplace.bundle.js": "/assets/press/dist/js/marketplace.bundle.A5KAQJFZ.js", "onboarding_tours.bundle.js": "/assets/frappe/dist/js/onboarding_tours.bundle.RAUR6X4Z.js", "photoswipe.bundle.js": "/assets/frappe/dist/js/photoswipe.bundle.YSXZQA64.js", "press.bundle.js": "/assets/press/dist/js/press.bundle.JRNX644T.js", "print.bundle.css": "/assets/frappe/dist/css/print.bundle.WUDGTX5C.css", "print_format.bundle.css": "/assets/frappe/dist/css/print_format.bundle.6MSNRU2P.css", "print_format_builder.bundle.js": "/assets/frappe/dist/js/print_format_builder.bundle.VQYWNAGA.js", "recorder.bundle.js": "/assets/frappe/dist/js/recorder.bundle.QHVRM32X.js", "report.bundle.css": "/assets/frappe/dist/css/report.bundle.ZMHEO4RM.css", "report.bundle.js": "/assets/frappe/dist/js/report.bundle.RLTY7FZF.js", "rtl_chat.bundle.css": "/assets/frappe/dist/css-rtl/chat.bundle.H7NNYOVV.css", "rtl_contributions.bundle.css": "/assets/wiki/dist/css-rtl/contributions.bundle.BEYJZHFY.css", "rtl_desk.bundle.css": "/assets/frappe/dist/css-rtl/desk.bundle.4QRKXWVY.css", "rtl_edit_wiki.bundle.css": "/assets/wiki/dist/css-rtl/edit_wiki.bundle.GXBHHBPQ.css", "rtl_email.bundle.css": "/assets/frappe/dist/css-rtl/email.bundle.7GUUJX37.css", "rtl_login.bundle.css": "/assets/frappe/dist/css-rtl/login.bundle.HR6BKDWJ.css", "rtl_print.bundle.css": "/assets/frappe/dist/css-rtl/print.bundle.56DGWRMI.css", "rtl_print_format.bundle.css": "/assets/frappe/dist/css-rtl/print_format.bundle.LY6E3FZ5.css", "rtl_report.bundle.css": "/assets/frappe/dist/css-rtl/report.bundle.55P6QGQP.css", "rtl_web_form.bundle.css": "/assets/frappe/dist/css-rtl/web_form.bundle.PRMNLWDF.css", "rtl_website.bundle.css": "/assets/frappe/dist/css-rtl/website.bundle.EKI4FRUC.css", "rtl_wiki.bundle.css": "/assets/wiki/dist/css-rtl/wiki.bundle.QFQ2JJVQ.css", "sentry.bundle.js": "/assets/frappe/dist/js/sentry.bundle.AX44GVWW.js", "telemetry.bundle.js": "/assets/frappe/dist/js/telemetry.bundle.LKEZCADB.js", "user_profile_controller.bundle.js": "/assets/frappe/dist/js/user_profile_controller.bundle.TPZWXYWN.js", "video_player.bundle.js": "/assets/frappe/dist/js/video_player.bundle.DUYYLSFO.js", "web_form.bundle.css": "/assets/frappe/dist/css/web_form.bundle.XQPQDR3H.css", "web_form.bundle.js": "/assets/frappe/dist/js/web_form.bundle.OT3FXJK3.js", "website.bundle.css": "/assets/frappe/dist/css/website.bundle.RTUZTFRX.css", "wiki.bundle.css": "/assets/wiki/dist/css/wiki.bundle.U22KPQ72.css", "wiki.bundle.js": "/assets/wiki/dist/js/wiki.bundle.PCTFQCL4.js", "workflow_builder.bundle.js": "/assets/frappe/dist/js/workflow_builder.bundle.MPAFFZ3D.js" }, "is_fc_site": 0, "lang": "en", "sitename": "frappe.cloud", "sysdefaults": { "currency": "", "date_format": "dd-mm-yyyy", "first_day_of_the_week": "Sunday", "float_precision": 3, "number_format": "#,##,###.##", "time_format": "HH:mm:ss" }, "time_zone": { "system": "Asia/Kolkata", "user": "Asia/Kolkata" } } // for backward compatibility of some libs frappe.sys_defaults = frappe.boot.sysdefaults; </script> <script type="text/javascript" src="/assets/frappe/dist/js/frappe-web.bundle.KEWLD4GT.js"></script> <script type="text/javascript" src="/website_script.js"></script><script src="/assets/press/js/form_controller.js"></script> <script> const app = document.getElementById('app').value; const domain = document.getElementById('domain').value; let controller; frappe.ready(() => { controller = new FormController("user-signup"); set_subdomain_from_url(); }); var field_validators = { subdomain: (value) => { let MIN_LENGTH = 4; let MAX_LENGTH = 20; if (value.length < MIN_LENGTH) { return `Site name cannot have less than ${MIN_LENGTH} characters`; } if (value.length > MAX_LENGTH) { return `Site name cannot have more than ${MAX_LENGTH} characters`; } if (!/^[a-z0-9][a-z0-9-]*[a-z0-9]$/.test(value)) { return "Site name should contain lowercase alphabets, numbers, and hyphens"; } }, first_name: value => { if (!value) { return 'First Name is required' } }, last_name: value => { if (!value) { return 'Last Name is required' } }, email: (value) => { if (!valid_email(value)) { return "Invalid email"; } }, country: (value) => { if (!value) { return "Please enter your country name"; } }, user_accept_terms: (value) => { if (!value) { return "You need to accept our Terms of Service & Privacy Policy" } } }; function submit_account_request($form, values) { $('#accountRequestButton').prop('disabled', true); $("#accountRequestButton").html('<span class="mr-2">Signing up</span><span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>'); let url_args = frappe.utils.get_query_params(); let form_data = {}; if (Object.keys(url_args)) { values.url_args = url_args; } values.app = app; if (values) { form_data = { ...values, app } } return call('press.api.saas.account_request', form_data) .then(() => { $('h1').hide(); $('#googleLogin').toggle(); $('.verification-email').text(form_data.email); }); } function set_subdomain_from_url() { let query_params = frappe.utils.get_query_params(); if (query_params.domain) { let subdomain = query_params.domain.replace(`.${domain}`, ""); $('input[name="subdomain"]').val(subdomain).trigger("change"); } } function call(method, args) { return frappe .call({ method, args, type: "POST", }) .then((r) => { if (r.exc) { console.error("An error occurred", r.exc); return; } return r; }); } function validate_subdomain(input) { let $input = $(input); let subdomain = $input.val(); let error = controller.validate_value("subdomain", subdomain); if (error) { controller.show_input_error("subdomain", error); } else { check_if_available(subdomain).then((available) => { controller.show_input_feedback( "subdomain", !available ? `${subdomain}.${domain} is already taken` : `${subdomain}.${domain} is available`, !available ); }); } } function check_if_available(subdomain) { return frappe .call({ method: "press.api.saas.check_subdomain_availability", args: { subdomain, app: app }, type: "POST", }) .then((r) => { if (r.message) { return true; } return false; }); } function signupWithGoogle() { return frappe.call({ method: "press.api.oauth.google_login", args: { saas_app: app }, type: "POST", }).then(r => { window.open(r.message, '_self'); }) } </script> <script>frappe.csrf_token = "None";</script></body> </html>