Mercurial Hosting > linkmystyle
view src/change_email.html.luan @ 3:b016e4b7c8da default tip
add read_me
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 12 Jul 2025 12:51:36 -0600 |
parents | 8f4df159f06b |
children |
line wrap: on
line source
local Luan = require "luan:Luan.luan" local error = Luan.error local Html = require "luan:Html.luan" local html_encode = Html.encode or error() local Io = require "luan:Io.luan" local Http = require "luan:http/Http.luan" local Shared = require "site:/lib/Shared.luan" local head = Shared.head or error() local page_header = Shared.page_header or error() local footer = Shared.footer or error() local User = require "site:/lib/User.luan" local Logging = require "luan:logging/Logging.luan" local logger = Logging.logger "change_email.html" return function() local user = User.current_required() if user==nil then return end Io.stdout = Http.response.text_writer() %> <!doctype html> <html lang="en"> <head> <% head() %> <title>Link My Style</title> </head> <body> <form page onsubmit="ajaxForm('/change_email.js',this)" action="javascript:"> <% page_header() %> <div> <h1>Enter confirmation code</h1> <p>To change your email, enter the six digit code we sent to your inbox (<%=html_encode(user.new_email)%>).</p> <input type=text required name=code placeholder="Enter 6-digit code"> <div error=code></div> <button type=submit big>Continue</button> </div> <% footer() %> </form> </body> </html> <% end