beginning the code for new user account

This commit is contained in:
2025-10-04 16:59:09 -06:00
parent 070afc365e
commit 8ad88c4957
6 changed files with 198 additions and 1 deletions
+11
View File
@@ -16,6 +16,7 @@ import (
"net/mail"
"strconv"
"strings"
"time"
"git.erbosoft.com/amy/amsterdam/database"
"gopkg.in/yaml.v3"
@@ -108,6 +109,16 @@ func (fld *DialogItem) ValueRange() (int, int) {
return -1, -1
}
// AsDate returns the value of a date field as a Go date.
func (fld *DialogItem) AsDate() *time.Time {
if fld.Type == "date" && fld.AuxData != nil {
v := fld.AuxData.([]int)
rc := time.Date(v[2], time.Month(v[0]), v[1], 0, 0, 0, 0, time.Now().Location())
return &rc
}
return nil
}
/* Field returns a pointer to a dialog's field, given its name.
* Parameters:
* name - The name of the field to find.
+1 -1
View File
@@ -10,7 +10,7 @@ name: "newaccount"
formName: "createform"
menuSelector: "top"
title: "Create New Account"
action: "/TODO/newacct2"
action: "/newacct2"
instructions: >
To create a new account, please enter your information below.
fields: