## The contents of this file are subject to the Common Public Attribution
## License Version 1.0. (the "License"); you may not use this file except in
## compliance with the License. You may obtain a copy of the License at
## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
## License Version 1.1, but Sections 14 and 15 have been added to cover use of
## software over a computer network and provide for limited attribution for the
## Original Developer. In addition, Exhibit A has been modified to be
## consistent with Exhibit B.
##
## Software distributed under the License is distributed on an "AS IS" basis,
## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
## the specific language governing rights and limitations under the License.
##
## The Original Code is reddit.
##
## The Original Developer is the Initial Developer. The Initial Developer of
## the Original Code is reddit Inc.
##
## All portions of the code written by reddit are Copyright (c) 2006-2012
## reddit Inc. All Rights Reserved.
###############################################################################
<%namespace file="utils.html" import="error_field, success_field, radio_type"/>
<%namespace name="utils" file="utils.html"/>
<%!
from r2.lib.strings import strings, Score
%>
<%def name="goldsec(goldtype)">
<%self:goldsec goldtype="autorenew">
<%utils:round_field title="${'Monthly or yearly?'}">
${radio_type("period", "monthly", _("$3.99 / month"), "", False)}
${radio_type("period", "yearly", _("$29.99 / year (which works out to just $2.50 / month!)"),
"", True)}
%utils:round_field>
%self:goldsec>
<%self:goldsec goldtype="onetime">
<%utils:round_field title="${_('How many months?')}">
${gold_dropdown("months")}
%utils:round_field>
%self:goldsec>
<%self:goldsec goldtype="gift">
<%utils:round_field title="${_('How much gold do you wish to bestow?')}">
%if thing.user_creddits:
${_("Note: If you want to give more than %(number)d, you'll need to buy more creddits.") % dict(number=thing.user_creddits)}
%else:
${gold_dropdown("months")}
%endif
${_("To whom are you giving said gold?")}
${error_field("NO_USER", "recipient", "span")}
${error_field("USER_DOESNT_EXIST", "recipient", "span")}
%if thing.bad_recipient:
${_("that user doesn't exist")}
%endif
${_("Do you want them to know it came from you?")}
${radio_type("signed", "yes", _("yes, include my username"),
"",
True)}
${radio_type("signed", "no", _("no, make it anonymous"),
"",
False)}
${_("Gift message (optional):")}
%utils:round_field>
%self:goldsec>
<%self:goldsec goldtype="creddits">
<%utils:round_field title="${_('How many creddits would you like to buy? (each will allow you to give one month of reddit gold)')}">
${gold_dropdown("creddits")}
%utils:round_field>
%self:goldsec>