Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: userprofile Arguments: Description: OPTIONALARGS 0: error message, 1:key Page type: html Render function: Module: maybeathome Page source: <!DOCTYPE html> <webl> var sessionkey = nil; if Size(OPTIONALARGS) > 1 then sessionkey = OPTIONALARGS[1] end; WubCall("maybeathome.header", ["login",sessionkey]); </webl> <webl> var sessionkey = wubinfo.cookies.sessionkey ? nil; if Size(OPTIONALARGS) > 1 then sessionkey = OPTIONALARGS[1] end; var userInfo = WubCall("siteutil.getSessionInfo", ["maybeathome", sessionkey]); var userInfoUserName = userInfo.username ? ""; var userInfoName = userInfo.name ? ""; var userInfoPhone = userInfo.phone ? ""; var userInfoEmail = userInfo.email ? ""; if sessionkey == nil then sessionkey = "" end; var buyerChecked = ""; var agentChecked = ""; var sellerChecked = ""; var arg = userInfo.arg0 ? nil; if arg == "buyer" then buyerChecked = "checked" elsif arg == "seller" then sellerChecked = "checked" else agentChecked = "checked" end; var msg = ""; if Size(OPTIONALARGS) > 0 then msg = OPTIONALARGS[0] end; var res = ""; res = res + `<div class="login-register-wrapper"> <div class="container"> <div class="row"> <p class='message'>` + ToString(msg) + `</p> <div class="col-sm-6"> <h3 data-localize="login.profile">User Profile</h3> <div class="custom-form-wrapper register-wrapper"> <form class="form-horizontal" action="/webl/WubHub_DoIt" method="get"> <input name="cmdline" value="siteutil.siteUpdate(site,sessionkey,name,phone,email,username,origpw,pw,pw2,err,succ,category)" type="hidden"/> <input name="site" value="maybeathome" type="hidden"/> <input name="sessionkey" value="` + sessionkey + `" type="hidden"/> <input name="err" value="maybeathome.userprofile" type="hidden"/> <input name="succ" value="maybeathome.userprofile" type="hidden"/> <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <label class="radio-inline"> <input type="radio" id="category" name="category" value="buyer" ` + buyerChecked + `> <span data-localize="login.buyer">Buyer</span> </label> <label class="radio-inline"> <input type="radio" id="category" name="category" value="seller" ` + sellerChecked + `> <span data-localize="login.seller">Seller</span> </label> <label class="radio-inline"> <input type="radio" id="category" name="category" data-localize="login.agent" value="agent" ` + agentChecked + `> <span data-localize="login.agent">Agent</span> </label> </div> </div> <div class="form-group"> <label for="username" class="col-sm-3 control-label" data-localize="login.username">Username</label> <div class="col-sm-9"> <input type="text" class="form-control" id="username" name="username" readonly value="` + userInfoUserName + `"> </div> </div> <div class="form-group"> <label for="password" class="col-sm-3 control-label" data-localize="login.origpassword">Original Password</label> <div class="col-sm-9"> <input type="password" class="form-control" id="password" name="origpw" > </div> </div> <div class="form-group"> <label for="name" class="col-sm-3 control-label" data-localize="login.name">Your Name</label> <div class="col-sm-9"> <input type="text" class="form-control" id="name" name="name" value="` + userInfoName + `"> </div> </div> <div class="form-group"> <label for="Telephone" class="col-sm-3 control-label" data-localize="login.phone">Telephone</label> <div class="col-sm-9"> <input type="text" class="form-control" id="Telephone" name="phone" value="` + userInfoPhone + `"> </div> </div> <div class="form-group"> <label for="email" class="col-sm-3 control-label" data-localize="login.email">Email</label> <div class="col-sm-9"> <input type="text" class="form-control" id="email" name="email" value="` + userInfoEmail + `"> </div> </div> <div class="form-group"> <label for="password" class="col-sm-3 control-label" data-localize="login.newpassword">Password</label> <div class="col-sm-9"> <input type="password" class="form-control" id="password" name="pw" > </div> </div> <div class="form-group"> <label for="confirmPassword" class="col-sm-3 control-label" data-localize="login.confirm">Confirm</label> <div class="col-sm-9"> <input type="password" class="form-control" id="confirmPassword" name="pw2" > </div> </div> <div class="row"> <div class="col-sm-offset-3 col-sm-9"> <a href="/site/home:nil" class="terms-condition-link" data-localize="login.logout">Logout</a> <button type="submit" class="btn btn-custom" data-localize="login.update">Update</button> </div> </div> </form> </div> </div> </div> </div> </div> `; res; </webl> <webl>WubCall("maybeathome.footer", ["login"]);</webl> </body> </html>