From b6dd1aafb4c9cddf89b06c2eeac1b5277046ad9f Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 24 Nov 2005 19:45:27 +0000 Subject: [PATCH] Add new style and fix up HTML to avoid boilerplate --- Makefile | 10 +++ apps.mlt | 74 ++++++++++----------- apt.mlt | 58 ++++++++--------- balances.mlt | 26 ++++---- contact.mlt | 34 +++++----- domain.mlt | 60 ++++++++--------- exn.mlt | 2 +- footer.mlt | 7 +- footer.mlt.in | 3 + groups.mlt | 38 +++++------ header.mlt | 77 +++++++++++++++++++++- header.mlt.in | 65 ++++++++++++++++++ header.setTitle | 4 ++ issue.mlt | 108 +++++++++++++++--------------- kind.mlt | 24 +++---- link.mlt | 36 +++++----- list.mlt | 60 ++++++++--------- location.mlt | 38 +++++------ money.mlt | 134 +++++++++++++++++++------------------- poll.mlt | 134 +++++++++++++++++++------------------- portal.mlt | 129 ++++++++++++------------------------ pref.mlt | 14 ++-- roll.mlt | 46 ++++++------- sec.mlt | 118 ++++++++++++++++----------------- static/gen.sml | 30 ++++++--- support.mlt | 34 +++++----- user.mlt | 12 ++-- users.mlt | 46 ++++++------- vmailpasswd/Makefile | 4 ++ vmailpasswd/passwd.mlt | 26 +++++--- vmailpasswd/passwd.mlt.in | 28 ++++++++ 31 files changed, 822 insertions(+), 657 deletions(-) create mode 100644 Makefile create mode 100644 footer.mlt.in create mode 100644 header.mlt.in create mode 100644 header.setTitle rewrite portal.mlt (67%) create mode 100644 vmailpasswd/Makefile create mode 100644 vmailpasswd/passwd.mlt.in diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3231768 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +all: header.mlt footer.mlt + +header.mlt: /etc/hcoop.header header.setTitle header.mlt.in + cat header.setTitle >header.mlt + hcoop_header "<% Web.html title %>" >>header.mlt + cat header.mlt.in >>header.mlt + +footer.mlt: /etc/hcoop.footer footer.mlt.in + cat footer.mlt.in >footer.mlt + hcoop_footer >>footer.mlt diff --git a/apps.mlt b/apps.mlt index c75781e..af6e1bf 100644 --- a/apps.mlt +++ b/apps.mlt @@ -9,15 +9,15 @@ ref showNormal = true; if $"vote" <> "" then Group.requireGroupName "board"; App.vote (you, Web.stoi ($"vote")) - %>

Vote registered

<% + %>

Vote registered

<% elseif $"unvote" <> "" then Group.requireGroupName "board"; App.unvote (you, Web.stoi ($"unvote")) - %>

Unvote registered

<% + %>

Unvote registered

<% elseif $"deny" <> "" then showNormal := false; val appl = App.lookupApp (Web.stoi ($"deny")) - %>

Deny application for <% #name appl %>

+ %>

Deny application for <% #name appl %>

"> Reason:
@@ -27,14 +27,14 @@ elseif $"deny" <> "" then elseif $"deny2" <> "" then Group.requireGroupName "board"; if not (App.deny (Web.stoi ($"deny2"), $"msg")) then - %>

Error denying application

<% + %>

Error denying application

<% else - %>

Application denied

<% + %>

Application denied

<% end elseif $"approve" <> "" then showNormal := false; val appl = App.lookupApp (Web.stoi ($"approve")) - %>

Approve application for <% #name appl %>

+ %>

Approve application for <% #name appl %>

"> Message:
@@ -44,20 +44,20 @@ elseif $"approve" <> "" then elseif $"approve2" <> "" then Group.requireGroupName "board"; if not (App.approve (Web.stoi ($"approve2"), $"msg")) then - %>

Error approving application

<% + %>

Error approving application

<% else - %>

Application approved

<% + %>

Application approved

<% end elseif $"cmd" = "approved" then showNormal := false - %>

Pending applications

<% + %>

Pending applications

<% foreach appl in App.listApps App.ACCEPTED do %>


- - -
Received: <% #applied appl %>
Approved by: <% + + + - - - - - - + + + + + +
Received: <% #applied appl %>
Approved by: <% ref first = true; ref found = false; foreach (id, name) in App.votes (#id appl) do @@ -68,12 +68,12 @@ elseif $"cmd" = "approved" then end %><% name %><% end %>
Username: <% #name appl %>
Real name: <% Web.html (#rname appl) %>
E-mail address: <% #email appl %>
Forward e-mail? <% if #forward appl then %>yes<% else %>no<% end %>
Proposed uses: <% Web.htmlNl (#uses appl) %>
Other information: <% Web.htmlNl (#other appl) %>
Username: <% #name appl %>
Real name: <% Web.html (#rname appl) %>
E-mail address: <% #email appl %>
Forward e-mail? <% if #forward appl then %>yes<% else %>no<% end %>
Proposed uses: <% Web.htmlNl (#uses appl) %>
Other information: <% Web.htmlNl (#other appl) %>
<% if root then %> @@ -94,19 +94,19 @@ First, create this UNIX user: - - - -
Name:
Real name:
Funded by: + + + - - - - + + +
Name:
Real name:
Funded by:
Initial transaction amount:
Initial transaction description:
Subscribe to hcoop-announce
Groups:
Initial transaction amount:
Initial transaction description:
Subscribe to hcoop-announce
Groups: - -
Received: <% #applied appl %>
Approved by: <% + + + - - - - - - + + + + + +
Received: <% #applied appl %>
Approved by: <% ref first = true; ref found = false; val votes = App.votes (#id appl); @@ -146,12 +146,12 @@ end %> %> [Unvote]<% end end %> <% if (iff board then not found else false) then %>[Vote]<% end %>
Username: <% #name appl %>
Real name: <% Web.html (#rname appl) %>
E-mail address: <% #email appl %>
Forward e-mail? <% if #forward appl then %>yes<% else %>no<% end %>
Proposed uses: <% Web.htmlNl (#uses appl) %>
Other information: <% Web.htmlNl (#other appl) %>
Username: <% #name appl %>
Real name: <% Web.html (#rname appl) %>
E-mail address: <% #email appl %>
Forward e-mail? <% if #forward appl then %>yes<% else %>no<% end %>
Proposed uses: <% Web.htmlNl (#uses appl) %>
Other information: <% Web.htmlNl (#other appl) %>
<% if board then %> diff --git a/apt.mlt b/apt.mlt index 65c9d76..0679155 100644 --- a/apt.mlt +++ b/apt.mlt @@ -58,21 +58,21 @@ elseif $"req" <> "" then if ok then val id = Apt.add (Init.getUserId(), $"req", $"msg"); if not (Apt.notifyNew id) then - %>

Error sending e-mail notification

<% + %>

Error sending e-mail notification

<% end - %>

Request added

<% + %>

Request added

<% end elseif $"cmd" = "open" then - %>

Open requests

+ %>

Open requests

List all requests<% foreach (name, req) in Apt.listOpen () do %>


- - - -<% +
By: <% name %>
Time: <% #stamp req %>
Packages:
+ + +<% ref first = true; val pkgs = String.tokens Char.isSpace (#data req); @@ -92,7 +92,7 @@ elseif $"cmd" = "open" then end end %> - +
By: <% name %>
Time: <% #stamp req %>
Packages:
Reason: <% Web.html (#msg req) %>
Reason: <% Web.html (#msg req) %>
<% if admin then %> @@ -105,14 +105,14 @@ elseif $"cmd" = "open" then <% end elseif $"cmd" = "list" then - %>

All requests

<% + %>

All requests

<% foreach (name, req) in Apt.list () do %>


- - - -<% +
By: <% name %>
Time: <% #stamp req %>
Packages:
+ + +<% ref first = true; val pkgs = String.tokens Char.isSpace (#data req); @@ -132,7 +132,7 @@ elseif $"cmd" = "list" then end end %> - +
By: <% name %>
Time: <% #stamp req %>
Packages:
Reason: <% Web.html (#msg req) %>
Reason: <% Web.html (#msg req) %>
<% if admin then %> @@ -148,20 +148,20 @@ elseif $"mod" <> "" then val id = Web.stoi ($"mod"); val req = Apt.lookup id; val user = Init.lookupUser (#usr req) %> -

Handle request

+

Handle request

- - - -
Requestor: <% #name user %>
Time: <% #stamp req %>
Status: + + + - - + +
Requestor: <% #name user %>
Time: <% #stamp req %>
Status:
Packages:
Message:
Packages:
Message:
@@ -175,10 +175,10 @@ elseif $"mod" <> "" then Apt.modify {req with data = $"pkgs", msg = $"msg", status = newStatus}; if oldStatus <> newStatus then if not (Apt.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then - %>

Error sending e-mail notification

<% + %>

Error sending e-mail notification

<% end end - %>

Request modified

+ %>

Request modified

Back to: open requests, all requests <% elseif $"del" <> "" then @@ -186,26 +186,26 @@ elseif $"mod" <> "" then val id = Web.stoi ($"del"); val req = Apt.lookup id; val user = Init.lookupUser (#usr req) - %>

Are you sure you want to delete request by <% #name user %> for <% #data req %>?

+ %>

Are you sure you want to delete request by <% #name user %> for <% #data req %>?

Yes, I'm sure! <% elseif $"del2" <> "" then Group.requireGroupName "server"; val id = Web.stoi ($"del2"); Apt.delete id - %>

Request deleted

+ %>

Request deleted

Back to: open requests, all requests <% else %> -

Request new installations

+

Request new installations

List the package names you'd like, separated by any whitespace characters.
- - - +
Packages:
Reason:
+ +
Packages:
Reason:
diff --git a/balances.mlt b/balances.mlt index a6b9352..d565cca 100644 --- a/balances.mlt +++ b/balances.mlt @@ -6,24 +6,24 @@ ref showNormal = true; if $"cmd" = "Create" then if not (Balance.validBalanceName ($"name")) then %> -

Invalid balance name

+

Invalid balance name

<% else switch Balance.balanceNameToId ($"name") of SOME _ => %> -

Balance name already in use

+

Balance name already in use

<% | NONE => val id = Balance.addBalance ($"name") %> -

Balance added

+

Balance added

<% end end elseif $"mod" <> "" then showNormal := false; val balance = Balance.lookupBalance (Web.stoi ($"mod")) %> -

Modify balance record

+

Modify balance record

"> - - +
Name:
+
Name:
@@ -31,33 +31,33 @@ elseif $"mod" <> "" then <% elseif $"cmd" = "Save" then val balance = Balance.lookupBalance (Web.stoi ($"id")); Balance.modBalance {balance with name = $"name"} %> -

Balance record saved.

+

Balance record saved.

<% elseif $"del" <> "" then showNormal := false; val balance = Balance.lookupBalance (Web.stoi ($"del")) %> -

Are you sure you want to delete balance <% #name balance %>?

+

Are you sure you want to delete balance <% #name balance %>?

">Yes, delete <% #name balance %>! <% elseif $"del2" <> "" then val balance = Balance.lookupBalance (Web.stoi ($"del2")); Balance.deleteBalance (Web.stoi ($"del2")) %> -

<% #name balance %> deleted!

+

<% #name balance %> deleted!

<% end %> <% if showNormal then ref total = 0.0 %> -

New balance

+

New balance

- - +
Name:
+
Name:
-

Manage current balances

+

Manage current balances

<% foreach balance in Balance.listBalances () do diff --git a/contact.mlt b/contact.mlt index d7d0fd8..905b9c7 100644 --- a/contact.mlt +++ b/contact.mlt @@ -4,25 +4,25 @@ ref showNormal = true; if $"cmd" = "add" then val id = Contact.addContact (Init.getUserId(), Web.stoi ($"knd"), $"v", Contact.privFromInt (Web.stoi ($"priv"))) %> -

Contact added

+

Contact added

<% elseif $"mod" <> "" then showNormal := false; val id = Web.stoi ($"mod"); val cont = Contact.lookupContact id %> -

Modify contact entry

+

Modify contact entry

-
-
Kind: + - - +
Kind:
Value:
Readable by:
Value:
Readable by: - -
Kind: + - - +
Kind:
Value:
Readable by:
Value:
Readable by:
-

Your contact information

+

Your contact information

- +
<% foreach (kind, cont) in Contact.listUserContacts (Init.getUserId(), Contact.ADMINS) do %> - +
<% Web.html (#name kind) %>:
<% Web.html (#name kind) %>: <% Contact.format (kind, cont) %> <% switch #priv cont of Contact.PUBLIC => %>Public<% diff --git a/domain.mlt b/domain.mlt index eb4c4b5..9b7889d 100644 --- a/domain.mlt +++ b/domain.mlt @@ -7,24 +7,24 @@ if $"req" <> "" then if Util.validDomain dom then val id = Domain.add (Init.getUserId(), dom, $"msg"); if not (Domain.notifyNew id) then - %>

Error sending e-mail notification

<% + %>

Error sending e-mail notification

<% end - %>

Request added

<% + %>

Request added

<% else - %>

Invalid domain name

<% + %>

Invalid domain name

<% end elseif $"cmd" = "open" then - %>

Open requests

+ %>

Open requests

List all requests<% foreach (name, req) in Domain.listOpen () do %>


- - - - - +
By: <% name %>
Time: <% #stamp req %>
Domain: <% #data req %>
Reason: <% Web.html (#msg req) %>
+ + + +
By: <% name %>
Time: <% #stamp req %>
Domain: <% #data req %>
Reason: <% Web.html (#msg req) %>
<% if admin then %> @@ -37,15 +37,15 @@ elseif $"cmd" = "open" then <% end elseif $"cmd" = "list" then - %>

All requests

<% + %>

All requests

<% foreach (name, req) in Domain.list () do %>


- - - - - +
By: <% name %>
Time: <% #stamp req %>
Domain: <% #data req %>
Reason: <% Web.html (#msg req) %>
+ + + +
By: <% name %>
Time: <% #stamp req %>
Domain: <% #data req %>
Reason: <% Web.html (#msg req) %>
<% if admin then %> @@ -61,20 +61,20 @@ elseif $"mod" <> "" then val id = Web.stoi ($"mod"); val req = Domain.lookup id; val user = Init.lookupUser (#usr req) %> -

Handle request

+

Handle request

- - - -
Requestor: <% #name user %>
Time: <% #stamp req %>
Status: + + + - - + +
Requestor: <% #name user %>
Time: <% #stamp req %>
Status:
Domain:
Message:
Domain:
Message:
@@ -88,10 +88,10 @@ elseif $"mod" <> "" then Domain.modify {req with data = $"dom", msg = $"msg", status = newStatus}; if oldStatus <> newStatus then if not (Domain.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then - %>

Error sending e-mail notification

<% + %>

Error sending e-mail notification

<% end end - %>

Request modified

+ %>

Request modified

Back to: open requests, all requests <% elseif $"del" <> "" then @@ -99,26 +99,26 @@ elseif $"mod" <> "" then val id = Web.stoi ($"del"); val req = Domain.lookup id; val user = Init.lookupUser (#usr req) - %>

Are you sure you want to delete request by <% #name user %> for <% #data req %>?

+ %>

Are you sure you want to delete request by <% #name user %> for <% #data req %>?

Yes, I'm sure! <% elseif $"del2" <> "" then Group.requireGroupName "server"; val id = Web.stoi ($"del2"); Domain.delete id - %>

Request deleted

+ %>

Request deleted

Back to: open requests, all requests <% else %> -

Request new domain

+

Request new domain

Enter the full Internet domain name that you own and would like set up here. We don't do domain registration, so it is your responsibility to register this name with your registrar of choice before submitting it here. The "Reason" field is optional.
- - - +
Domain:
Reason:
+ +
Domain:
Reason:
diff --git a/exn.mlt b/exn.mlt index 8e534a4..7987ad6 100644 --- a/exn.mlt +++ b/exn.mlt @@ -2,7 +2,7 @@ Hcoop Portal: Exception -

Exception

+

Exception

<% switch Web.getExn () of Fail msg => %> diff --git a/footer.mlt b/footer.mlt index 8634a86..c1deb5b 100644 --- a/footer.mlt +++ b/footer.mlt @@ -1 +1,6 @@ - \ No newline at end of file + + + + + + diff --git a/footer.mlt.in b/footer.mlt.in new file mode 100644 index 0000000..5343723 --- /dev/null +++ b/footer.mlt.in @@ -0,0 +1,3 @@ + + + diff --git a/groups.mlt b/groups.mlt index 25f86b7..2868d1b 100644 --- a/groups.mlt +++ b/groups.mlt @@ -6,24 +6,24 @@ ref showNormal = true; if $"cmd" = "Create" then if not (Group.validGroupName ($"name")) then %> -

Invalid group name

+

Invalid group name

<% else switch Group.groupNameToId ($"name") of SOME _ => %> -

Group name already in use

+

Group name already in use

<% | NONE => val id = Group.addGroup ($"name") %> -

Group added

+

Group added

<% end end elseif $"mod" <> "" then showNormal := false; val group = Group.lookupGroup (Web.stoi ($"mod")) %> -

Modify group record

+

Modify group record

"> - - +
Name:
+
Name:
@@ -31,50 +31,50 @@ elseif $"mod" <> "" then <% elseif $"cmd" = "Save" then val group = Group.lookupGroup (Web.stoi ($"id")); Group.modGroup {group with name = $"name"} %> -

Group record saved.

+

Group record saved.

<% elseif $"del" <> "" then showNormal := false; val group = Group.lookupGroup (Web.stoi ($"del")) %> -

Are you sure you want to delete group <% #name group %>?

+

Are you sure you want to delete group <% #name group %>?

">Yes, delete <% #name group %>! <% elseif $"del2" <> "" then val group = Group.lookupGroup (Web.stoi ($"del2")); Group.deleteGroup (Web.stoi ($"del2")) %> -

<% #name group %> deleted!

+

<% #name group %> deleted!

<% elseif $"cmd" = "Grant" then Group.addToGroup {usr = Web.stoi ($"usr"), grp = Web.stoi ($"grp")} %> -

Membership granted.

+

Membership granted.

<% elseif $"revoke" <> "" then Group.removeFromGroup {usr = Web.stoi ($"revoke"), grp = Web.stoi ($"grp")} %> -

Membership revoked.

+

Membership revoked.

<% end %> <% if showNormal then %> -

Create group

+

Create group

- - +
Name:
+
Name:
-

Grant membership

+

Grant membership

- -
Group: + -
Group:
Member:
Member:
-

Manage current groups

+

Manage current groups

<% foreach group in Group.listGroups () do %> diff --git a/header.mlt b/header.mlt index 12510cc..25dc60a 100644 --- a/header.mlt +++ b/header.mlt @@ -1,11 +1,82 @@ - <% val title = case $"title" of "" => "HCoop Portal" | t => ("HCoop Portal: " ^ t) %> + +<% Web.html title %> -Return to main page +
+ +
+ +

<% Web.html title %>

+
+ +
+ -

<% Web.html title %>

+
diff --git a/header.mlt.in b/header.mlt.in new file mode 100644 index 0000000..eb94724 --- /dev/null +++ b/header.mlt.in @@ -0,0 +1,65 @@ + + +
diff --git a/header.setTitle b/header.setTitle new file mode 100644 index 0000000..1c2a723 --- /dev/null +++ b/header.setTitle @@ -0,0 +1,4 @@ +<% val title = + case $"title" of + "" => "HCoop Portal" + | t => ("HCoop Portal: " ^ t) %> diff --git a/issue.mlt b/issue.mlt index 0a5414e..b6924ac 100644 --- a/issue.mlt +++ b/issue.mlt @@ -12,15 +12,15 @@ ref showNormal = true; if $"cmd" = "new" then showNormal := false %> -

New issue

+

New issue

-
- - - +
Title:
Only make this issue accessible to the admins for this support category.
Description:
+ + +
Title:
Only make this issue accessible to the admins for this support category.
Description:
@@ -28,19 +28,19 @@ if $"cmd" = "new" then <% elseif $"cmd" = "add" then val title = $"title"; if not (Support.validTitle title) then - %>

Invalid title

<% + %>

Invalid title

<% else val id = Support.addIssue (you, catId, title, $"priv" = "on", Support.NEW); val _ = Support.addPost (you, id, $"body"); if not (Support.notifyCreation id) then - %>

Error sending e-mail notification

<% + %>

Error sending e-mail notification

<% end; viewingIssue := SOME id end elseif $"cmd" = "list" then showNormal := false %> -

All issues

+

All issues

<% foreach (name, issue) in Support.listCategoryIssues catId do @@ -64,23 +64,23 @@ end %> val id = Web.stoi ($"mod"); val issue = Support.lookupIssue id; if catId <> #cat issue then - %>

Inconsistent cat field

<% + %>

Inconsistent cat field

<% elseif not admin then - %>

You aren't authorized to modify that.

<% + %>

You aren't authorized to modify that.

<% else %> -

Modify issue

+

Modify issue

-
-
Category: + - - - + +
Category:
Title:
checked<% end %>> Only make this issue accessible to the admins for this support category.
Status:
Title>:
checked<% end %>> Only make this issue accessible to the admins for this support category.
Status: @@ -194,13 +194,13 @@ elseif $"savePost" <> "" then val issue = Support.lookupIssue (#iss post); if catId <> #cat issue then - %>

Inconsistent cat field

<% + %>

Inconsistent cat field

<% elseif not admin then - %>

Authorization failure

<% + %>

Authorization failure

<% else Support.modPost {post with body = $"body"}; viewingIssue := SOME (#iss post) - %>

Post saved

Post saved "" then @@ -210,11 +210,11 @@ elseif $"delPost" <> "" then val issue = Support.lookupIssue (#iss post); if catId <> #cat issue then - %>

Inconsistent cat field

<% + %>

Inconsistent cat field

<% elseif not admin then - %>

Authorization failure

<% + %>

Authorization failure

<% else - %>

Are you sure you want to delete this post?

+ %>

Are you sure you want to delete this post?

<% Web.htmlNl (#body post) %>
Yes, delete it!<% end @@ -225,13 +225,13 @@ elseif $"delPost2" <> "" then val issue = Support.lookupIssue (#iss post); if catId <> #cat issue then - %>

Inconsistent cat field

<% + %>

Inconsistent cat field

<% elseif not admin then - %>

Authorization failure

<% + %>

Authorization failure

<% else Support.deletePost id; viewingIssue := SOME (#iss post) - %>

Post deleted

<% + %>

Post deleted

<% end elseif $"id" <> "" then @@ -244,18 +244,18 @@ switch viewingIssue of val canEdit = Support.allowedToEdit id; val canView = Support.allowedToSee id; if catId <> #cat issue then - %>

Inconsistent cat field

<% + %>

Inconsistent cat field

<% elseif not canView then - %>

You aren't authorized to view that.

<% + %>

You aren't authorized to view that.

<% else val user = Init.lookupUser (#usr issue) %> - - - - - -
Title: <% Web.html (#title issue) %>
Created by: <% #name user %>
At: <% #stamp issue %>
Private: <% if #priv issue then %>yes<% else %>no<% end %>
Status: <% switch #status issue of + + + + + +
Title: <% Web.html (#title issue) %>
Created by: <% #name user %>
At: <% #stamp issue %>
Private: <% if #priv issue then %>yes<% else %>no<% end %>
Status: <% switch #status issue of Support.NEW => %>New<% | Support.PENDING => %>Pending<% | Support.CLOSED => %>Closed<% @@ -281,7 +281,7 @@ foreach (name, post) in Support.listPosts id do %>


-

Post to this thread

+

Post to this thread

@@ -299,7 +299,7 @@ if showNormal then %> New issue
List all issues -

Open issues

+

Open issues

<% val issues = iff admin then Support.listOpenCategoryIssuesAdmin catId diff --git a/kind.mlt b/kind.mlt index 11ce043..b378d97 100644 --- a/kind.mlt +++ b/kind.mlt @@ -6,7 +6,7 @@ ref showNormal = true; if $"cmd" = "add" then val id = Contact.addKind ($"name", (iff $"url" = "on" then SOME ($"urlPrefix", $"urlPostfix") else NONE)) - %>

Contact kind added

+ %>

Contact kind added

<% elseif $"mod" <> "" then showNormal := false; @@ -15,9 +15,9 @@ if $"cmd" = "add" then -
- -
Name:
URL pattern: <% + + +
Name:
URL pattern: <% switch #makeUrl kind of NONE => %> ...<% | SOME (pre, post) => %> ...<% @@ -31,13 +31,13 @@ if $"cmd" = "add" then val id = Web.stoi ($"save"); val kind = Contact.lookupKind id; Contact.modKind {kind with name = $"name", makeUrl = (iff $"url" = "on" then SOME ($"urlPrefix", $"urlPostfix") else NONE)} - %>

Contact kind modified

+ %>

Contact kind modified

<% elseif $"del" <> "" then showNormal := false; val id = Web.stoi ($"del"); val kind = Contact.lookupKind id %> -

Are you sure you want to delete "<% Web.html (#name kind) %>"?

+

Are you sure you want to delete "<% Web.html (#name kind) %>"?

">Yes, delete "<% Web.html (#name kind) %>"! @@ -45,24 +45,24 @@ if $"cmd" = "add" then val id = Web.stoi ($"del2"); val kind = Contact.lookupKind id; Contact.deleteKind id %> -

"<% Web.html (#name kind) %>" deleted

+

"<% Web.html (#name kind) %>" deleted

<% end %> <% if showNormal then %> -

Add a contact kind

+

Add a contact kind

- - - +
Name:
URL pattern: ...
+ +
Name:
URL pattern: ...
-

Current contact kinds

+

Current contact kinds

diff --git a/link.mlt b/link.mlt index e2943a9..adfd266 100644 --- a/link.mlt +++ b/link.mlt @@ -7,24 +7,24 @@ ref showNormal = true; if $"cmd" = "add" then val id = Link.addLink (you, $"title", $"url", $"descr") %> -

Link added

+

Link added

<% elseif $"mod" <> "" then val id = Web.stoi ($"mod"); val link = Link.lookupLink id; if (iff admin then false else you <> #usr link) then - %>

You can't modify somebody else's link.

<% + %>

You can't modify somebody else's link.

<% else showNormal := false %> -

Modify link

+

Modify link

-
Kind URL pattern
- - - +
Title:
URL:
Description:
+ + +
Title:
URL:
Description:
@@ -34,20 +34,20 @@ elseif $"save" <> "" then val id = Web.stoi ($"save"); val link = Link.lookupLink id; if (iff admin then false else you <> #usr link) then - %>

You can't modify somebody else's link.

<% + %>

You can't modify somebody else's link.

<% else Link.modLink {link with title = $"title", url = $"url", descr = $"descr"} - %>

Link modified

<% + %>

Link modified

<% end elseif $"del" <> "" then val id = Web.stoi ($"del"); val link = Link.lookupLink id; if (iff admin then false else you <> #usr link) then - %>

You can't delete somebody else's link.

<% + %>

You can't delete somebody else's link.

<% else showNormal := false %> -

Are you sure you want to delete link to "<% Web.html (#title link) %>"?

+

Are you sure you want to delete link to "<% Web.html (#title link) %>"?

Yes, delete "<% Web.html (#title link) %>"!<% end @@ -55,10 +55,10 @@ elseif $"del2" <> "" then val id = Web.stoi ($"del2"); val link = Link.lookupLink id; if (iff admin then false else you <> #usr link) then - %>

You can't delete somebody else's link.

<% + %>

You can't delete somebody else's link.

<% else Link.deleteLink id; - %>

Link "<% Web.html (#title link) %>" deleted

<% + %>

Link "<% Web.html (#title link) %>" deleted

<% end end; @@ -76,14 +76,14 @@ if showNormal then %> <% end %>
-

Add a link to a site you host with Hcoop

+

Add a link to a site you host with Hcoop

- - - - +
Title:
URL:
Description:
+ + +
Title:
URL:
Description:
diff --git a/list.mlt b/list.mlt index 6ea2716..6658cbe 100644 --- a/list.mlt +++ b/list.mlt @@ -7,24 +7,24 @@ if $"req" <> "" then if Util.validEmail dom then val id = MailingList.add (Init.getUserId(), dom, $"msg"); if not (MailingList.notifyNew id) then - %>

Error sending e-mail notification

<% + %>

Error sending e-mail notification

<% end - %>

Request added

<% + %>

Request added

<% else - %>

Invalid list e-mail address

<% + %>

Invalid list e-mail address

<% end elseif $"cmd" = "open" then - %>

Open requests

+ %>

Open requests

List all requests<% foreach (name, req) in MailingList.listOpen () do %>


- - - - - +
By: <% name %>
Time: <% #stamp req %>
List name: <% #data req %>
Reason: <% Web.html (#msg req) %>
+ + + +
By: <% name %>
Time: <% #stamp req %>
List name: <% #data req %>
Reason: <% Web.html (#msg req) %>
<% if admin then @@ -38,15 +38,15 @@ elseif $"cmd" = "open" then <% end elseif $"cmd" = "list" then - %>

All requests

<% + %>

All requests

<% foreach (name, req) in MailingList.list () do %>


- - - - - +
By: <% name %>
Time: <% #stamp req %>
List name: <% #data req %>
Reason: <% Web.html (#msg req) %>
+ + + +
By: <% name %>
Time: <% #stamp req %>
List name: <% #data req %>
Reason: <% Web.html (#msg req) %>
<% if admin then %> @@ -62,20 +62,20 @@ elseif $"mod" <> "" then val id = Web.stoi ($"mod"); val req = MailingList.lookup id; val user = Init.lookupUser (#usr req) %> -

Handle request

+

Handle request

- - - -
Requestor: <% #name user %>
Time: <% #stamp req %>
Status: + + + - - + +
Requestor: <% #name user %>
Time: <% #stamp req %>
Status:
List name:
Message:
List name:
Message:
@@ -89,10 +89,10 @@ elseif $"mod" <> "" then MailingList.modify {req with data = $"dom", msg = $"msg", status = newStatus}; if oldStatus <> newStatus then if not (MailingList.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then - %>

Error sending e-mail notification

<% + %>

Error sending e-mail notification

<% end end - %>

Request modified

+ %>

Request modified

Back to: open requests, all requests <% elseif $"del" <> "" then @@ -100,28 +100,28 @@ elseif $"mod" <> "" then val id = Web.stoi ($"del"); val req = MailingList.lookup id; val user = Init.lookupUser (#usr req) - %>

Are you sure you want to delete request by <% #name user %> for <% #data req %>?

+ %>

Are you sure you want to delete request by <% #name user %> for <% #data req %>?

Yes, I'm sure! <% elseif $"del2" <> "" then Group.requireGroupName "lists"; val id = Web.stoi ($"del2"); MailingList.delete id - %>

Request deleted

+ %>

Request deleted

Back to: open requests, all requests <% else %> -

Request new mailing list

+

Request new mailing list

Enter here the e-mail address you would like for your list. Please keep in mind that the part of your list address before the "@" must be unique across all mailing lists we run. We may reject applications with overly general names here, especially names of current users or UNIX usernames that are likely to be chosen by future members. The "Reason" field is optional.

If you want to use the Mailman web interface on your new list, and you want this to appear on a different web virtual host than hcoop.net, you should create a file .mailman in the domtool directory for this domain, before submitting a request. In that file, put the hostname of the vhost you want to use, and be sure to include a Mailman directive in that vhost's configuration.

- - - +
List name:
Reason:
+ +
List name:
Reason:
diff --git a/location.mlt b/location.mlt index 1390955..9ac74f9 100644 --- a/location.mlt +++ b/location.mlt @@ -9,10 +9,10 @@ if $"cmd" = "add" then val name = $"name"; if Location.alreadyExists (parent, name) then - %>

That location already exists!

<% + %>

That location already exists!

<% else val id = Location.addLocation (parent, $"name") - %>

Location added

+ %>

Location added

<% end elseif $"mod" <> "" then @@ -21,12 +21,12 @@ elseif $"mod" <> "" then val id = Web.stoi ($"mod"); val loc = Location.lookupLocation id %> -

Modify a location

+

Modify a location

- -
Parent: + - +
Parent:
Name:
Name:
@@ -53,14 +53,14 @@ end %> val loc = Location.lookupLocation id; Location.modLocation {loc with parent = (case $"parent" of "" => NONE | parent => SOME (Web.stoi parent)), name = $"name"}; - %>

Location saved

+ %>

Location saved

<% elseif $"del" <> "" then Group.requireGroupName "location"; showNormal := false; val id = Web.stoi ($"del"); val loc = Location.lookupLocation id %> -

Are you sure you want to delete "<% Web.html (#name loc) %>"?

+

Are you sure you want to delete "<% Web.html (#name loc) %>"?

Yes, delete "<% Web.html (#name loc) %>"! <% elseif $"del2" <> "" then @@ -68,15 +68,15 @@ end %> val id = Web.stoi ($"del2"); val loc = Location.lookupLocation id; Location.deleteLocation id %> -

Deleted location "<% Web.html (#name loc) %>"

+

Deleted location "<% Web.html (#name loc) %>"

<% elseif $"addLoc" <> "" then Location.addToLocation {loc = Web.stoi ($"addLoc"), usr = Init.getUserId ()} - %>

Added

+ %>

Added

<% elseif $"remLoc" <> "" then Location.removeFromLocation {loc = Web.stoi ($"remLoc"), usr = Init.getUserId ()} - %>

Removed

+ %>

Removed

<% elseif $"id" <> "" then showNormal := false; @@ -91,7 +91,7 @@ end %> %>Parent: <% Web.html (#name ploc) %><% end %> -

Residents:

+

Residents:

<% ref first = true; foreach user in Location.residents id do if first then @@ -102,7 +102,7 @@ foreach user in Location.residents id do %><% #name user %><% end %> -

Regions:

+

Regions:

<% foreach loc in Location.subLocations (SOME id) do %> <% Web.html (#name loc) %>
<% end; @@ -124,12 +124,12 @@ if showNormal then %> end %> -

Add a new location

+

Add a new location

- - val id = Money.addTransaction ($"descr", Util.neg (Web.stor ($"amount")), $"d"); Money.addHostingCharges {trn = id, cutoff = 1000 * Web.stoi ($"cutoff"), cost = Web.stor ($"cost"), usage = $"usage"}; - %>

Hosting transaction added.

+ %>

Hosting transaction added.

<% elseif $"modHosting" <> "" then Group.requireGroupName "money"; @@ -84,17 +84,17 @@ end %> val id = Web.stoi ($"modHosting"); val trn = Money.lookupTransaction id %> -

Modify hosting bill

+

Modify hosting bill

-
Parent: + - +
Parent:
Name:
Name:
<% val withUser = Location.locationTreeWithUser (NONE, NONE, Init.getUserId ()) %> -

Add yourself to a location

+

Add yourself to a location

Adding yourself to a location automatically adds you to all more general loations. @@ -175,7 +175,7 @@ end %> -

Remove yourself from a location

+

Remove yourself from a location

@@ -37,7 +37,7 @@ end %> <% elseif $"cmd" = "bals" then showNormal := false %> -

Balances

+

Balances

Date Description Amount Last modified Participants
<% foreach bal in Balance.listOwnedBalances () do %> @@ -57,17 +57,17 @@ end %> Group.requireGroupName "money"; showNormal := false %> -

New hosting bill

+

New hosting bill

-
- - - - - - +
Description:
Date:
Amount:
Free bandwidth cutoff (MB):
Cost/GB:
Member usage:
+ + + + + +
Description:
Date:
Amount:
Free bandwidth cutoff (MB):
Cost/GB:
Member usage:
@@ -76,7 +76,7 @@ end %>
- - - - - - @@ -110,19 +110,19 @@ end %> Money.modTransaction {trn with descr = $"descr", d = $"d", amount = Util.neg (Web.stor ($"amount"))}; Money.addHostingCharges {trn = id, cutoff = 1000 * Web.stoi ($"cutoff"), cost = Web.stor ($"cost"), usage = $"usage"}; - %>

Hosting transaction modified.

+ %>

Hosting transaction modified.

<% elseif $"cmd" = "evenForm" then Group.requireGroupName "money"; showNormal := false %> -

New generic/even transaction

+

New generic/even transaction

-
Description:
Date:
Amount:
Free bandwidth cutoff (MB):
Cost/GB:
Member usage:
- - - -
Description:
Date:
Amount:
Members: + + + + Group.requireGroupName "money"; showNormal := false %> -

New member payment

+

New member payment

-
Description:
Date:
Amount:
Members:
- - - -
Description:
Date:
Amount:
Member: + + + + Money.addCharge {trn = id, usr = Web.stoi ($"usr"), amount = amount}; Money.applyCharges id; - %>

Payment transaction added.

+ %>

Payment transaction added.

<% elseif $"modPay" <> "" then Group.requireGroupName "money"; @@ -167,15 +167,15 @@ end %> val id = Web.stoi ($"modPay"); val trn = Money.lookupTransaction id %> -

Modify member payment

+

Modify member payment

-
Description:
Date:
Amount:
Member:
- - - -
Description:
Date:
Amount:
Member: + + + + Money.addCharge {trn = id, usr = Web.stoi ($"usr"), amount = amount}; Money.applyCharges id; - %>

Member payment modified.

+ %>

Member payment modified.

<% elseif $"cmd" = "evenForm" then Group.requireGroupName "money"; showNormal := false %> -

New generic/even transaction

+

New generic/even transaction

-
Description:
Date:
Amount:
Member:
- - - -
Description:
Date:
Amount:
Members: + + + + val id = Money.addTransaction ($"descr", Web.stor ($"amount"), $"d"); Money.addEvenCharges (id, map Web.stoi (Web.getMultiParam "usrs")) - %>

Even transaction added.

+ %>

Even transaction added.

<% elseif $"modEven" <> "" then Group.requireGroupName "money"; showNormal := false; val trn = Money.lookupTransaction (Web.stoi ($"modEven")) %> -

Modify even transaction

+

Modify even transaction

"> -
Description:
Date:
Amount:
Members:
- - - -
Description:
Date:
Amount:
Members: + + + + Money.modTransaction {trn with descr = $"descr", d = $"d", amount = Web.stor ($"amount")}; Money.addEvenCharges (id, map Web.stoi (Web.getMultiParam "usrs")) - %>

Even transaction modified

+ %>

Even transaction modified

<% elseif $"del" <> "" then Group.requireGroupName "money"; showNormal := false; val trn = Money.lookupTransaction (Web.stoi ($"del")) %> -

Are you sure you want to delete transaction <% Web.html (#descr trn) %>?

+

Are you sure you want to delete transaction <% Web.html (#descr trn) %>?

">Yes, delete <% Web.html (#descr trn) %>! <% elseif $"del2" <> "" then @@ -266,24 +266,24 @@ end %> val trn = Money.lookupTransaction id; Money.clearCharges id; Money.deleteTransaction id %> -

<% Web.html (#descr trn) %> deleted!

+

<% Web.html (#descr trn) %> deleted!

<% elseif $"cmd" = "equalize" then Group.requireGroupName "money"; Money.equalizeBalances (); - %>

Balances equalized

+ %>

Balances equalized

<% elseif $"trn" <> "" then showNormal := false; val id = Web.stoi ($"trn"); val trn = Money.lookupTransaction id %> -
Description:
Date:
Amount:
Members:
- - - - - - +
TRN#: <% id %>
Description: <% Web.html (#descr trn) %>
Date: <% #d trn %>
Amount: $<% #amount trn %>
Distribution:
+ + + + + +x <% ref first = true; foreach (name, cha) in Money.listChargesWithNames id do if first then @@ -299,7 +299,7 @@ end %> <% if showNormal then %> -

Your balance: $<% #amount (Balance.lookupBalance (#bal (Init.getUser ()))) %>

+

Your balance: $<% #amount (Balance.lookupBalance (#bal (Init.getUser ()))) %>

List all transactions
List all balances
@@ -313,7 +313,7 @@ end %>
Equalize balances
-

Most recent transactions

+

Most recent transactions

TRN#: <% id %>
Description: <% Web.html (#descr trn) %>
Date: <% #d trn %>
Amount: $<% #amount trn %>
Distribution:
@@ -330,7 +330,7 @@ end %> <% else %> -

Your recent account activity

+

Your recent account activity

Date Description Amount Participants Replace Delete
diff --git a/poll.mlt b/poll.mlt index 834f22d..a0305d9 100644 --- a/poll.mlt +++ b/poll.mlt @@ -8,7 +8,7 @@ ref showNormal = true; if $"cmd" = "list" then showNormal := false %> -

All polls

+

All polls

<% foreach pol in Poll.listPolls () do %>
  • <% Web.html (#title pol) %> @@ -21,16 +21,16 @@ elseif $"vote" <> "" then val id = Web.stoi ($"vote"); val poll = Poll.lookupPoll id %> -
  • Date Description Amount
    - - - - - - +
    Poll#: <% id %>
    Title: <% Web.html (#title poll) %>
    Start: <% Web.html (#starts poll) %>
    End: <% Web.html (#ends poll) %>
    Votes/person: <% #votes poll %>
    Description: <% Web.htmlNl (#descr poll) %>
    + + + + + +
    Poll#: <% id %>
    Title: <% Web.html (#title poll) %>
    Start: <% Web.html (#starts poll) %>
    End: <% Web.html (#ends poll) %>
    Votes/person: <% #votes poll %>
    Description: <% Web.htmlNl (#descr poll) %>
    -

    Choices

    +

    Choices

    @@ -57,12 +57,12 @@ foreach (you, cho) in choices do %> | v => map Web.stoi v; if length votes > #votes poll then - %>

    You can't vote for that many different choices!

    <% + %>

    You can't vote for that many different choices!

    <% elseif not (Poll.noDupes votes) then - %>

    You can't vote multiple times for the same choice!

    <% + %>

    You can't vote multiple times for the same choice!

    <% else Poll.vote (Init.getUserId (), id, votes) - %>

    Thanks for voting!

    + %>

    Thanks for voting!

    <% end elseif $"cmd" = "add" then @@ -71,17 +71,17 @@ elseif $"cmd" = "add" then val ends = $"ends"; val votes = Web.stoi ($"votes"); if title = "" then - %>

    Your poll must have a title.

    <% + %>

    Your poll must have a title.

    <% elseif not pollAdmin and not (Poll.dateGeNow starts) then - %>

    That start date is in the past!

    <% + %>

    That start date is in the past!

    <% elseif not pollAdmin and not (Poll.dateLe (starts, ends)) then - %>

    The end date comes before the start date!

    <% + %>

    The end date comes before the start date!

    <% elseif votes <= 0 then - %>

    You must specify a positive number of votes per person.

    <% + %>

    You must specify a positive number of votes per person.

    <% else val id = Poll.addPoll (Init.getUserId(), title, $"descr", starts, ends, votes); editingPoll := SOME id; - %>

    Poll added!

    <% + %>

    Poll added!

    <% end elseif $"mod" <> "" then @@ -89,16 +89,16 @@ elseif $"mod" <> "" then val poll = Poll.lookupPoll (Web.stoi ($"mod")); Poll.requireCanModify poll %> -

    Modify poll

    +

    Modify poll

    "> - - - - - - +
    Title:
    Start date:
    End date:
    Max votes/person:
    Description:
    + + + + +
    Title:
    Start date:
    End date:
    Max votes/person:
    Description:
    @@ -113,41 +113,41 @@ elseif $"mod" <> "" then val ends = $"ends"; val votes = Web.stoi ($"votes"); if title = "" then - %>

    Your poll must have a title.

    <% + %>

    Your poll must have a title.

    <% elseif not pollAdmin and not (Poll.dateGeNow starts) then - %>

    That start date is in the past!

    <% + %>

    That start date is in the past!

    <% elseif not pollAdmin and not (Poll.dateLe (starts, ends)) then - %>

    The end date comes before the start date!

    <% + %>

    The end date comes before the start date!

    <% elseif votes <= 0 then - %>

    You must specify a positive number of votes per person.

    <% + %>

    You must specify a positive number of votes per person.

    <% else Poll.modPoll {poll with title = title, descr = $"descr", starts = starts, ends = ends, votes = votes}; editingPoll := SOME (#id poll); - %>

    Poll record saved.

    <% + %>

    Poll record saved.

    <% end elseif $"del" <> "" then Group.requireGroupName "poll"; showNormal := false; val poll = Poll.lookupPoll (Web.stoi ($"del")) %> -

    Are you sure you want to delete poll <% Web.html (#title poll) %>?

    +

    Are you sure you want to delete poll <% Web.html (#title poll) %>?

    ">Yes, delete <% Web.html (#title poll) %>! <% elseif $"del2" <> "" then Group.requireGroupName "poll"; val poll = Poll.lookupPoll (Web.stoi ($"del2")); Poll.deletePoll (Web.stoi ($"del2")) %> -

    <% Web.html (#title poll) %> deleted!

    +

    <% Web.html (#title poll) %> deleted!

    <% elseif $"addChoice" <> "" then val id = Web.stoi ($"addChoice"); editingPoll := SOME id; val descr = $"descr"; if descr = "" then - %>

    Your poll choice must have a description.

    <% + %>

    Your poll choice must have a description.

    <% else val id = Poll.addChoice (id, Web.stor ($"seq"), descr); - %>

    Choice added!

    <% + %>

    Choice added!

    <% end elseif $"modChoice" <> "" then @@ -159,9 +159,9 @@ elseif $"modChoice" <> "" then
    - - - +
    Text:
    Sequence#:
    + +
    Text:
    Sequence#:
    @@ -174,10 +174,10 @@ elseif $"modChoice" <> "" then editingPoll := SOME (#id poll); val descr = $"descr"; if descr = "" then - %>

    Your poll choice must have a description.

    <% + %>

    Your poll choice must have a description.

    <% else Poll.modChoice {cho with seq = Web.stor ($"seq"), descr = descr}; - %>

    Choice saved!

    <% + %>

    Choice saved!

    <% end elseif $"delChoice" <> "" then @@ -186,7 +186,7 @@ elseif $"delChoice" <> "" then val poll = Poll.lookupPoll (#pol cho); Poll.requireCanModify poll; showNormal := false %> -

    Are you sure you want to delete choice "<% Web.html (#descr cho) %>"?

    +

    Are you sure you want to delete choice "<% Web.html (#descr cho) %>"?

    ">Yes, delete "<% Web.html (#descr cho) %>"! <% elseif $"delChoice2" <> "" then @@ -196,7 +196,7 @@ elseif $"delChoice" <> "" then Poll.requireCanModify poll; Poll.deleteChoice id; editingPoll := SOME (#id poll) %> -

    "<% Web.html (#descr cho) %>" deleted!

    +

    "<% Web.html (#descr cho) %>" deleted!

    <% elseif $"report" <> "" then showNormal := false; @@ -205,7 +205,7 @@ elseif $"delChoice" <> "" then val poll = Poll.lookupPoll id; val canModify = Poll.canModify poll %> -

    Vote Report

    +

    Vote Report

    Voters: <% ref first = true; @@ -218,13 +218,13 @@ elseif $"delChoice" <> "" then %><% #name user %><% end %>

    - - - - - - - +
    Poll#: <% id %>
    Title: <% Web.html (#title poll) %>
    Start: <% Web.html (#starts poll) %>
    End: <% Web.html (#ends poll) %>
    Votes/person: <% #votes poll %>
    Description: <% Web.htmlNl (#descr poll) %>
    + + + + + +
    Poll#: <% id %>
    Title: <% Web.html (#title poll) %>
    Start>: <% Web.html (#starts poll) %>
    End: <% Web.html (#ends poll) %>
    Votes/person: <% #votes poll %>
    Description: <% Web.htmlNl (#descr poll) %>



    @@ -256,17 +256,17 @@ end %> val poll = Poll.lookupPoll id; val canModify = Poll.canModify poll %> - +
    <% if canModify then %><% end %> - - - - - - + + + + + +
    Edit poll data
    Poll#: <% id %>
    Title: <% Web.html (#title poll) %>
    Start: <% Web.html (#starts poll) %>
    End: <% Web.html (#ends poll) %>
    Votes/person: <% #votes poll %>
    Description: <% Web.htmlNl (#descr poll) %>
    Poll#: <% id %>
    Title: <% Web.html (#title poll) %>
    Start: <% Web.html (#starts poll) %>
    End: <% Web.html (#ends poll) %>
    Votes/person: <% #votes poll %>
    Description: <% Web.htmlNl (#descr poll) %>
    -

    Choices<% if Poll.takingVotes poll then %>(Vote!)<% end %>

    +

    Choices<% if Poll.takingVotes poll then %>(Vote!)<% end %>

    <% Poll.countVoters (#id poll) %> people have voted.

    @@ -300,13 +300,13 @@ end %> <% if canModify then %>


    -

    Add a new choice

    +

    Add a new choice

    - - - +
    Text:
    Sequence#:
    + +
    Text:
    Sequence#:
    @@ -317,16 +317,16 @@ if showNormal then %> Show all polls
    -

    Create a poll

    +

    Create a poll

    - - - - - - +
    Title:
    Start date:
    End date:
    Max votes/person:
    Description:
    + + + + +
    Title:
    Start date:
    End date:
    Max votes/person:
    Description:
    diff --git a/portal.mlt b/portal.mlt dissimilarity index 67% index 63c4116..f88c28f 100644 --- a/portal.mlt +++ b/portal.mlt @@ -1,86 +1,43 @@ -<% val you = Init.getUser(); -val bal = Balance.lookupBalance (#bal you); -@header [] %> - -<% if Group.inGroupNum 0 then %> -

    Admin

    -Approved applicants waiting for accounts
    -Members
    -Groups
    -Balances
    -Contact kinds
    -Roll call!
    -<% end %> - -

    Your account

    - -Preferences
    -Financial
    -Security settings
    -Contact information
    -Your geographic locations
    -Public URL directory
    - -

    Support requests

    - -Request control of a domain with domtool
    -Request Debian apt packages
    -Request a Mailman mailing list
    -Other support request
    - -

    Your recent account activity

    - - - -<% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), 5) do %> - -<% end %> -
    Date Description Amount
    <% #d trn %> <% Web.html (#descr trn) %> <% amount %>/<% #amount trn %>
    -Balance: $<% #amount bal %> - -

    Current polls

    - -<% foreach pol in Poll.listCurrentPolls () do %> -
  • <% Web.html (#title pol) %> -<% if Poll.takingVotes pol then %>[VOTE]<% end %> -(<% Web.html (#starts pol) %> to <% Web.html (#ends pol) %>)
  • -<% end %> - -

    Open support issues

    - -<% foreach (name, issue) in Support.listOpenIssues (#id you) do %> -<% name %>: <% Web.html (#title issue) %> -<% switch #status issue of - Support.NEW => %>(New)<% - | Support.PENDING => %>(Pending)<% - | Support.CLOSED => %>(Closed)<% -end %> -
    -<% end %> - -

    Statistics

    - -Apache bandwidth
    -Disk usage
    - -

    Public pages

    - -Member directory
    -Member location summary
    -URL directory
    - -

    Miscellaneous

    - -Review pending membership applications
    -Contact information directory
    -Polls
    - -

    Other services

    - -Webalizer
    -MRTG statistics
    -InterServer bandwidth statistics
    -Usermin
    -SquirrelMail
    - -<% @footer [] %> \ No newline at end of file +<% val you = Init.getUser(); +val bal = Balance.lookupBalance (#bal you); +@header [] %> + +

    Your recent account activity

    + + + +<% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), 5) do %> + +<% end %> +
    Date Description Amount
    <% #d trn %> <% Web.html (#descr trn) %> <% amount %>/<% #amount trn %>
    +Balance: $<% #amount bal %> + +<% val polls = Poll.listCurrentPolls (); +switch polls of + _::_ => %> +

    Current polls

    + +<% foreach pol in polls do %> +
  • <% Web.html (#title pol) %> +<% if Poll.takingVotes pol then %>[VOTE]<% end %> +(<% Web.html (#starts pol) %> to <% Web.html (#ends pol) %>)
  • +<% end +end %> + +<% val issues = Support.listOpenIssues (#id you); +switch issues of + _::_ => %> +

    Open support issues

    + +<% foreach (name, issue) in issues do %> +<% name %>: <% Web.html (#title issue) %> +<% switch #status issue of + Support.NEW => %>(New)<% + | Support.PENDING => %>(Pending)<% + | Support.CLOSED => %>(Closed)<% +end %> +
    +<% end +end %> + +<% @footer [] %> \ No newline at end of file diff --git a/pref.mlt b/pref.mlt index ebba9ab..6c973cf 100644 --- a/pref.mlt +++ b/pref.mlt @@ -15,25 +15,25 @@ if $"cmd" = "mod" then Pref.subscribe ("hcoop-discuss", youremail) else Pref.unsubscribe ("hcoop-discuss", youremail)) then - %>

    Error setting hcoop-discuss status

    <% + %>

    Error setting hcoop-discuss status

    <% end; if not (iff $"misc" = "on" then Pref.subscribe ("hcoop-misc", youremail) else Pref.unsubscribe ("hcoop-misc", youremail)) then - %>

    Error setting hcoop-misc status

    <% + %>

    Error setting hcoop-misc status

    <% end; - %>

    Preferences updated

    <% + %>

    Preferences updated

    <% end %>
    - - - - +
    checked<% end %>> Include me in the public member directory.
    checked<% end %>> Include me on the hcoop-discuss mailing list. (On-topic discussion and sporadically high volume)
    checked<% end %>> Include me on the hcoop-misc mailing list. (Off-topic)
    + + +
    checked<% end %>> Include me in the public member directory.
    checked<% end %>> Include me on the hcoop-discuss mailing list. (On-topic discussion and sporadically high volume)
    checked<% end %>> Include me on the hcoop-misc mailing list. (Off-topic)
    diff --git a/roll.mlt b/roll.mlt index 16db145..2d396aa 100644 --- a/roll.mlt +++ b/roll.mlt @@ -14,33 +14,33 @@ if $"cmd" = "respond" then if code = #code rc then Roll.respond (rol, you); - %>

    Your response has been saved. Thank you!

    <% + %>

    Your response has been saved. Thank you!

    <% else - %>

    Incorrect code!

    <% + %>

    Incorrect code!

    <% end elseif $"cmd" = "add" then Group.requireGroupNum 0; val title = $"title"; val msg = $"msg"; if title = "" then - %>

    Your roll call must have a title.

    <% + %>

    Your roll call must have a title.

    <% else val id = Roll.addRollCall (title, msg); viewingCall := SOME id; - %>

    Roll call added!

    <% + %>

    Roll call added!

    <% end elseif $"mod" <> "" then Group.requireGroupNum 0; showNormal := false; val rc = Roll.lookupRollCall (Web.stoi ($"mod")) %> -

    Modify roll call

    +

    Modify roll call

    "> - - - +
    Title:
    Message:
    + +
    Title:
    Message:
    @@ -52,25 +52,25 @@ elseif $"mod" <> "" then val title = $"title"; val msg = $"msg"; if title = "" then - %>

    Your rol call must have a title.

    <% + %>

    Your rol call must have a title.

    <% else Roll.modRollCall {rc with title = title, msg = msg}; viewingCall := SOME (#id rc); - %>

    Roll call saved.

    <% + %>

    Roll call saved.

    <% end elseif $"del" <> "" then Group.requireGroupNum 0; showNormal := false; val rc = Roll.lookupRollCall (Web.stoi ($"del")) %> -

    Are you sure you want to delete roll call "<% Web.html (#title rc) %>"?

    +

    Are you sure you want to delete roll call "<% Web.html (#title rc) %>"?

    ">Yes, delete <% Web.html (#title rc) %>! <% elseif $"del2" <> "" then Group.requireGroupNum 0; val rc = Roll.lookupRollCall (Web.stoi ($"del2")); Roll.deleteRollCall (Web.stoi ($"del2")) %> -

    <% Web.html (#title rc) %> deleted!

    +

    <% Web.html (#title rc) %> deleted!

    <% elseif $"cmd" = "mailall" then Group.requireGroupNum 0; @@ -97,19 +97,19 @@ if showNormal then switch viewingCall of NONE => %> -

    Existing roll calls

    +

    Existing roll calls

    <% foreach rc in Roll.listRollCalls () do %>
  • <% Web.html (#title rc) %> (<% #started rc %>)
  • <% end %> -

    New roll call

    +

    New roll call

    - - - +
    Title:
    Message:
    + +
    Title:
    Message:
    @@ -118,21 +118,21 @@ if showNormal then <% | SOME id => val rc = Roll.lookupRollCall id %> -

    Roll call "<% Web.html (#title rc) %>"

    - - - +

    Roll call "<% Web.html (#title rc) %>"

    +
    Started: <% #started rc %>
    Message: <% Web.htmlNl (#msg rc) %>
    + +
    Started: <% #started rc %>
    Message: <% Web.htmlNl (#msg rc) %>
    [ Modify | Delete ]
    <% val (didnt, did) = Roll.listEntries id %> -

    Didn't respond yet:

    +

    Didn't respond yet:

    <% foreach (usr, ent) in didnt do %>
  • <% Web.html (#name usr) %>
  • <% end %> -

    Responded:

    +

    Responded:

    <% foreach (usr, ent) in did do %>
  • <% Web.html (#name usr) %> (<% switch #responded ent of SOME st => st end %>)
  • diff --git a/sec.mlt b/sec.mlt index 9e5c0dd..386da98 100644 --- a/sec.mlt +++ b/sec.mlt @@ -22,9 +22,9 @@ if $"cmd" = "socks" then elseif $"cmd" = "socks2" then val id = Sec.Req.add (you, String.concat [uname, ": change socket permissions to ", $"socks"], $"msg"); if not (Sec.Req.notifyNew id) then - %>

    Error sending e-mail notification

    <% + %>

    Error sending e-mail notification

    <% end - %>

    Request added

    <% + %>

    Request added

    <% elseif $"cmd" = "tpe" then showNormal := false; @@ -34,9 +34,9 @@ elseif $"cmd" = "tpe" then elseif $"cmd" = "tpe2" then val id = Sec.Req.add (you, String.concat [uname, ": turn tpe ", $"tpe"], $"msg"); if not (Sec.Req.notifyNew id) then - %>

    Error sending e-mail notification

    <% + %>

    Error sending e-mail notification

    <% end - %>

    Request added

    <% + %>

    Request added

    <% elseif $"cmd" = "cron" then showNormal := false; @@ -47,9 +47,9 @@ elseif $"cmd" = "cron2" then val cron = iff $"cron" = "enabled" then "enable" else "disable"; val id = Sec.Req.add (you, String.concat [uname, ": ", cron, " cron access"], $"msg"); if not (Sec.Req.notifyNew id) then - %>

    Error sending e-mail notification

    <% + %>

    Error sending e-mail notification

    <% end - %>

    Request added

    <% + %>

    Request added

    <% elseif $"cmd" = "ftp" then showNormal := false; @@ -60,9 +60,9 @@ elseif $"cmd" = "ftp2" then val ftp = iff $"ftp" = "enabled" then "enable" else "disable"; val id = Sec.Req.add (you, String.concat [uname, ": ", ftp, " FTP access"], $"msg"); if not (Sec.Req.notifyNew id) then - %>

    Error sending e-mail notification

    <% + %>

    Error sending e-mail notification

    <% end - %>

    Request added

    <% + %>

    Request added

    <% elseif $"cmd" = "rule" then showNormal := false; @@ -72,9 +72,9 @@ elseif $"cmd" = "rule" then elseif $"cmd" = "rule2" then val id = Sec.Req.add (you, String.concat ["Add firewall rule \"", uname, " ", $"rule", "\""], $"msg"); if not (Sec.Req.notifyNew id) then - %>

    Error sending e-mail notification

    <% + %>

    Error sending e-mail notification

    <% end - %>

    Request added

    <% + %>

    Request added

    <% elseif $"modRule" <> "" then showNormal := false; @@ -89,9 +89,9 @@ elseif $"modRule" <> "" then elseif $"modRule2" <> "" then val id = Sec.Req.add (you, String.concat ["Change firewall rule \"", uname, " ", $"modRule2", "\" to \"", uname, " ", $"rule", "\""], $"msg"); if not (Sec.Req.notifyNew id) then - %>

    Error sending e-mail notification

    <% + %>

    Error sending e-mail notification

    <% end - %>

    Request added

    <% + %>

    Request added

    <% elseif $"delRule" <> "" then showNormal := false; @@ -101,23 +101,23 @@ elseif $"delRule" <> "" then elseif $"delRule2" <> "" then val id = Sec.Req.add (you, String.concat ["Delete firewall rule \"", uname, " ", $"delRule2", "\""], $"msg"); if not (Sec.Req.notifyNew id) then - %>

    Error sending e-mail notification

    <% + %>

    Error sending e-mail notification

    <% end - %>

    Request added

    <% + %>

    Request added

    <% elseif $"cmd" = "open" then showNormal := false; Group.requireGroupName "server"; - %>

    Open requests

    + %>

    Open requests

    List all requests<% foreach (name, req) in Sec.Req.listOpen () do %>


    - - - - - +
    By: <% name %>
    Time: <% #stamp req %>
    Request: <% #data req %>
    Msg: <% Web.html (#msg req) %>
    + + + +
    By: <% name %>
    Time: <% #stamp req %>
    Request: <% #data req %>
    Msg: <% Web.html (#msg req) %>

    @@ -129,15 +129,15 @@ elseif $"cmd" = "open" then elseif $"cmd" = "list" then showNormal := false; Group.requireGroupName "server" - %>

    All requests

    <% + %>

    All requests

    <% foreach (name, req) in Sec.Req.list () do %>


    - - - - - +
    By: <% name %>
    Time: <% #stamp req %>
    Request: <% #data req %>
    Reason: <% Web.html (#msg req) %>
    + + + +
    By: <% name %>
    Time: <% #stamp req %>
    Request: <% #data req %>
    Reason: <% Web.html (#msg req) %>

    @@ -152,20 +152,20 @@ elseif $"mod" <> "" then val id = Web.stoi ($"mod"); val req = Sec.Req.lookup id; val user = Init.lookupUser (#usr req) %> -

    Handle request

    +

    Handle request

    - - - -
    Requestor: <% #name user %>
    Time: <% #stamp req %>
    Status: + + + - - + +
    Requestor: <% #name user %>
    Time: <% #stamp req %>
    Status:
    Request:
    Message:
    Request:
    Message:
    @@ -180,10 +180,10 @@ elseif $"mod" <> "" then Sec.Req.modify {req with data = $"req", msg = $"msg", status = newStatus}; if oldStatus <> newStatus then if not (Sec.Req.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then - %>

    Error sending e-mail notification

    <% + %>

    Error sending e-mail notification

    <% end end - %>

    Request modified

    + %>

    Request modified

    Back to: open requests, all requests <% elseif $"del" <> "" then @@ -192,7 +192,7 @@ elseif $"mod" <> "" then val id = Web.stoi ($"del"); val req = Sec.Req.lookup id; val user = Init.lookupUser (#usr req) - %>

    Are you sure you want to delete request by <% #name user %> for "<% #data req %>"?

    + %>

    Are you sure you want to delete request by <% #name user %> for "<% #data req %>"?

    Yes, I'm sure! <% elseif $"del2" <> "" then @@ -200,7 +200,7 @@ elseif $"mod" <> "" then Group.requireGroupName "server"; val id = Web.stoi ($"del2"); Sec.Req.delete id - %>

    Request deleted

    + %>

    Request deleted

    Back to: open requests, all requests <% end; @@ -213,64 +213,64 @@ if showNormal then %> <% end %> -

    Request socket permissions change

    +

    Request socket permissions change

    - -
    New permissions: + - +
    New permissions:
    Reason:
    Reason:
    -

    Request change to your execute permissions

    +

    Request change to your execute permissions

    - -
    Trusted path executables only? + - +
    Trusted path executables only?
    Reason:
    Reason:
    -

    Request change to your cron permissions

    +

    Request change to your cron permissions

    - -
    Allowed to use cron? + - +
    Allowed to use cron?
    Reason:
    Reason:
    -

    Request change to your FTP permissions

    +

    Request change to your FTP permissions

    - -
    Allowed to use FTP? + - +
    Allowed to use FTP?
    Reason:
    Reason:
    @@ -278,7 +278,7 @@ if showNormal then %> <% val rules = Sec.findFirewallRules uname; switch rules of _::_ => %> -

    Your firewall rules

    +

    Your firewall rules

    <% foreach rule in rules do %>
    @@ -291,16 +291,16 @@ switch rules of <% end end%> -

    Request a new firewall rule

    +

    Request a new firewall rule

    You can find a description of rule formats on our wiki. Enter here the rule you want, without the initial user portion.

    - - - +
    Rule
    Reason:
    + +
    Rule
    Reason:
    diff --git a/static/gen.sml b/static/gen.sml index 326212f..2d595c4 100644 --- a/static/gen.sml +++ b/static/gen.sml @@ -16,15 +16,25 @@ fun generate () = let val db = C.conn "dbname='hcoop_hcoop'" + fun procOutput (outf, cmdline) = + let + val proc = Unix.execute cmdline + val ins = Unix.textInstreamOf proc + + fun loop () = + case TextIO.inputLine ins of + NONE => () + | SOME s => (TextIO.output (outf, s); loop ()) + in + loop (); + ignore (Unix.reap proc) + end + fun header (outf, title) = - (TextIO.output (outf, "\n"); - TextIO.output (outf, title); - TextIO.output (outf, "\n\n

    "); - TextIO.output (outf, title); - TextIO.output (outf, "

    \n")) + procOutput (outf, ("/usr/local/bin/hcoop_header", [title])) fun footer outf = - TextIO.output (outf, "\n") + procOutput (outf, ("/usr/local/bin/hcoop_footer", [])) fun genMemberList () = let @@ -50,7 +60,7 @@ fun generate () = end | printOne _ = raise Fail "Bad printOne line" - val _ = header (outf, "Member list") + val _ = header (outf, "HCoop Member List") val _ = TextIO.output (outf, "\n") val (total, anon) = C.fold db printOne (0, 0) "SELECT name, rname, usr FROM WebUserPaying LEFT OUTER JOIN DirectoryPref ON id = usr ORDER BY name" @@ -80,7 +90,7 @@ fun generate () = let val outf = TextIO.openOut (String.concat [outputDir, "member/", name, ".html"]) - val _ = header (outf, "Hcoop member: " ^ name) + val _ = header (outf, "HCoop member: " ^ name) val _ = TextIO.output (outf, "
    \n\n
    Member: ") val _ = TextIO.output (outf, name) val _ = TextIO.output (outf, "
    Name: ") @@ -197,7 +207,7 @@ fun generate () = let val outf = TextIO.openOut (outputDir ^ "locs.html") - val _ = header (outf, "Where members live") + val _ = header (outf, "HCoop: Where members live") fun countResidents () = let @@ -266,7 +276,7 @@ fun generate () = let val outf = TextIO.openOut (outputDir ^ "sites.html") - val _ = header (outf, "Hosted sites") + val _ = header (outf, "HCoop: Hosted sites") fun doLink [url, title, descr, name] = (C.stringFromSql url, C.stringFromSql title, C.stringFromSql descr, C.stringFromSql name) | doLink _ = raise Fail "Bad link' row" diff --git a/support.mlt b/support.mlt index a9c64c9..79ad977 100644 --- a/support.mlt +++ b/support.mlt @@ -7,16 +7,16 @@ ref showNormal = true; if $"sub" <> "" then Support.subscribe { cat = Web.stoi ($"sub"), usr = you } - %>

    Subscribed

    + %>

    Subscribed

    <% elseif $"unsub" <> "" then Support.unsubscribe { cat = Web.stoi ($"unsub"), usr = you } - %>

    Unsubscribed

    + %>

    Unsubscribed

    <% elseif $"cmd" = "add" then Group.requireGroupName "support"; val id = Support.addCategory (Web.stoi ($"grp"), $"name", $"descr") - %>

    Category added

    + %>

    Category added

    <% elseif $"mod" <> "" then Group.requireGroupName "support"; @@ -24,18 +24,18 @@ if $"sub" <> "" then val id = Web.stoi ($"mod"); val cat = Support.lookupCategory id %> -

    Modify category

    +

    Modify category

    - - -
    Name:
    Owning group: + + - +
    Name:
    Owning group:
    Description:
    Description:
    @@ -45,14 +45,14 @@ if $"sub" <> "" then val id = Web.stoi ($"save"); val cat = Support.lookupCategory id; Support.modCategory {cat with name = $"name", descr = $"descr", grp = Web.stoi ($"grp")} - %>

    Category saved

    + %>

    Category saved

    <% elseif $"del" <> "" then Group.requireGroupName "support"; showNormal := false; val id = Web.stoi ($"del"); val cat = Support.lookupCategory id; - %>

    Are you sure you want to delete category "<% Web.html (#name cat) %>"?

    + %>

    Are you sure you want to delete category "<% Web.html (#name cat) %>"?

    Yes, delete "<% Web.html (#name cat) %>"! <% elseif $"del2" <> "" then @@ -60,13 +60,13 @@ if $"sub" <> "" then val id = Web.stoi ($"del2"); val cat = Support.lookupCategory id; Support.deleteCategory id; - %>

    "<% Web.html (#name cat) %>" deleted

    + %>

    "<% Web.html (#name cat) %>" deleted

    <% end; if showNormal then %> -

    Choose a category:

    +

    Choose a category:

    <% foreach (sub, cat) in Support.listCategoriesWithSubscriptions you do %> <% Web.html (#name cat) %>: <% Web.html (#descr cat) %> @@ -84,18 +84,18 @@ if showNormal then %> <% if admin then %> -

    Add new category

    +

    Add new category

    - - -
    Name:
    Owning group: + + - +
    Name:
    Owning group:
    Description:
    Description:
    diff --git a/user.mlt b/user.mlt index 94b3ce9..bf9e1c6 100644 --- a/user.mlt +++ b/user.mlt @@ -3,12 +3,12 @@ val user = Init.lookupUser id; @header[("title", [#name user])] %> - - - - - -
    Member: <% #name user %>
    Real name: <% Web.html (#rname user) %>
    Hcoop e-mail: <% #name user %><% Init.emailSuffix %>
    Joined: <% #joined user %>
    Locations: <% + + + + + +
    Member: <% #name user %>
    Real name: <% Web.html (#rname user) %>
    Hcoop e-mail: <% #name user %><% Init.emailSuffix %>
    Joined: <% #joined user %>
    Locations: <% ref first = true; foreach loc in Location.userLocations id do if first then diff --git a/users.mlt b/users.mlt index fbd60aa..cd7582b 100644 --- a/users.mlt +++ b/users.mlt @@ -6,10 +6,10 @@ ref showNormal = true; if $"cmd" = "Create" then if not (Init.validUsername ($"name")) then %> -

    Invalid username

    +

    Invalid username

    <% else switch Init.userNameToId ($"name") of SOME _ => %> -

    Username already in use

    +

    Username already in use

    <% | NONE => val ap = Web.stoi ($"app"); val bal = @@ -29,23 +29,23 @@ if $"cmd" = "Create" then if $"subscribe" = "on" then if not (Pref.subscribe ("hcoop-announce", $"name" ^ Init.emailSuffix)) then - %>

    Error subscribing to hcoop-announce

    <% + %>

    Error subscribing to hcoop-announce

    <% end end %> -

    Member added

    +

    Member added

    <% end end elseif $"mod" <> "" then showNormal := false; val user = Init.lookupUser (Web.stoi ($"mod")) %> -

    Modify member record

    +

    Modify member record

    "> - - - -
    Name:
    Real name:
    Funded by: + + +
    Name:
    Real name:
    Funded by: - - -
    Name:
    Real name:
    Funded by: + + + - - - - + + +
    Name:
    Real name:
    Funded by:
    Initial transaction amount:
    Initial transaction description:
    Subscribe to hcoop-announce
    Groups:
    Initial transaction amount:
    Initial transaction description:
    Subscribe to hcoop-announce
    Groups:
    -

    Manage current members

    +

    Manage current members

    <% foreach user in Init.listUsers () do %> diff --git a/vmailpasswd/Makefile b/vmailpasswd/Makefile new file mode 100644 index 0000000..8fe703b --- /dev/null +++ b/vmailpasswd/Makefile @@ -0,0 +1,4 @@ +all: passwd.mlt + +passwd.mlt: /etc/hcoop.header /etc/hcoop.footer passwd.mlt.in + hcoop_html "HCoop: Change virtual mailbox password" passwd.mlt.in >passwd.mlt diff --git a/vmailpasswd/passwd.mlt b/vmailpasswd/passwd.mlt index a1c6aba..eb10dab 100644 --- a/vmailpasswd/passwd.mlt +++ b/vmailpasswd/passwd.mlt @@ -1,7 +1,16 @@ -Change virtual mailbox password + +HCoop: Change virtual mailbox password +
    + +
    + +

    HCoop: Change virtual mailbox password

    +
    + +
    <% if $"email" <> "" then val email = $"email" val old = $"old" @@ -19,18 +28,17 @@ end end %> -

    Change virtual mailbox password

    -
    -
    - - - - +
    E-mail address: ">
    Old password:
    New password:
    Confirm new password:
    + + + +
    E-mail address: ">
    Old password:
    New password:
    Confirm new password:
    + - \ No newline at end of file + diff --git a/vmailpasswd/passwd.mlt.in b/vmailpasswd/passwd.mlt.in new file mode 100644 index 0000000..ca68fb6 --- /dev/null +++ b/vmailpasswd/passwd.mlt.in @@ -0,0 +1,28 @@ +<% if $"email" <> "" then + val email = $"email" + val old = $"old" + val new = $"new" + val new2 = $"new2" + + if not (Pass.validEmail email) then + %>

    That is not a valid virtual mailbox address!

    <% + elseif new <> new2 then + %>

    Your new passwords do not match.

    <% + elseif not (Pass.change (email, old, new)) then + %>

    Error changing password. Did you enter the right e-mail address and current password?

    <% + else + %>

    Password changed!

    <% + end +end %> + +
    + + + + + + + +
    E-mail address: ">
    Old password:
    New password:
    Confirm new password:
    + +
    -- 2.20.1