%s</textarea>
[label for=hourly Hourly Rate:]
[input #hourly type=number name=hourly value="%s"]
- [submit "update" "update" Update]
+ [submit "update" "%s" Update]
]' \
"$(HTML $id)" \
"$(UNSTRING "${address#address=}" |HTML)" \
- "$(UNSTRING "${hourly#hourly=}" |grep -xE '[0-9]+')"
+ "$(UNSTRING "${hourly#hourly=}" |grep -xE '[0-9]+')" \
+ "$(tid "clients/$id")"
}
list_clients(){
}
update_client(){
- id="$(POST id |checkid)"
- if [ "$(POST update)" = update -a "$id" ]; then
+ local id="$(POST id |checkid)"
+ if [ "$(POST update)" = "$(tid "clients/$id")" ]; then
mkdir -p clients
printf 'address=%s hourly=%s' \
"$(POST address |STRING)" "$(POST hourly |STRING)" \
>"clients/$id"
+ REDIRECT "/clients/"
else
- echo Invalid Data "$(POST id)" "$(POST update)" >&2
+ error Invalid Data "$id" "$(POST update)"
+ REDIRECT "/clients/$1"
fi
}