Source of contract-2.tcl
ad_page_contract {
@cvs-id $Id: contract-2.tcl,v 1.5 2017/12/29 09:59:11 gustafn Exp $
} {
count:naturalnum
noun:notnull,nohtml
{ plural:nohtml "" }
} -validate {
superstition -requires {count} {
if {$count == 13} {
ad_complain
}
}
csrf { csrf::validate }
} -errors {
superstition {This number brings you no luck.}
} -properties {
phrase:onevalue
} -return_errors error_list
if {[info exists error_list]} {
# divert to error-handling page
ad_return_template "contract-err"
} else {
set phrase "You've got "
if {$count == 1} {
append phrase "one $noun"
} else {
if {$plural eq ""} {
set plural "${noun}s"
}
append phrase "$count $plural"
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End: