Exemplo n.º 1
0
    def writeContent(self):
        wr = self.writeln
        qs = self.request().fields()

        # Admins can change others.
        ISA = is_site_admin(self.request())
        asuserid = qs.get('asuserid')

        rolestr = self.request().cookies().get('role', '')
        IS_DIP = rolestr == DIPLSTR

        wr('<h1><em>%s</em> Account Information</h1>' % (un))

        if qs.get('pc'):
            self.render_special_msg('Password changed successfully.')
        if qs.get('ic'):
            self.render_special_msg('Contact info saved.')
        if qs.get('pv'):
            self.render_special_msg('Privacy settings saved.')
        if qs.get('fh'):
            self.render_special_msg('Consultancy setting saved.')

        p = get_user_acct(un)
        if ISA and asuserid:
            p = get_user_acct(asuserid)

        wr('<div id="acct-container" class="acct-tabs"> ')
        wr('<ul class="idTabs">')
        wr('<li><a class="selected" href="#tab1">Contact Info</a></li> ')
        wr('<li><a href="#tab2">Change Password</a></li> ')
        wr('<li><a href="#tab3">Privacy Settings</a></li> ')
        if IS_DIP:
            wr('<li><a href="#tab4">For Hire?</a></li> ')
        wr('</ul> ')
        ######################################################
        wr('<div id="tab1">')
        wr('<h2>Your Contact Information</h2>')
        wr('<form method="POST" action="Acct_Edit_Info">')
        wr(hidden('form_username', un))
        wr(hidden('form_hash', self.request().cookies().get('hash')))
        wr('<div><table id="contact_info">')
        wr('<tr><td><label>First</label>')
        wr('<td>%s' % (text('fn', p.get('fn', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>MI</label>')
        wr('<td>%s' % (text('mi', p.get('mi', ''), 'input', 2)))
        wr('<tr><td><label>Last</label>')
        wr('<td>%s' % (text('sn', p.get('sn', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>Degrees Held</label>')
        wr('<td>%s' % (text('degrees', p.get('degrees', ''), 'input', 6)))
        wr('<td class="hint">(e.g., Ph.D., MBA, MS, etc.)')
        wr('<tr><td><label>Country</label>')
        wr('<td>%s' % (text('country', p.get('country', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>Addr 1</label>')
        wr('<td>%s' % (text('addr1', p.get('addr1', ''), 'input')))
        wr('<tr><td><label>Addr 2</label>')
        wr('<td>%s' % (text('addr2', p.get('addr2', ''), 'input')))
        wr('<tr><td><label>City</label>')
        wr('<td>%s' % (text('city', p.get('city', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>State/Prov.</label>')
        wr('<td>%s' % (text('state', p.get('state', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>ZIP/Postal Code</label>')
        wr('<td>%s' % (text('zip', p.get('zip', ''), 'input', 6)))
        wr('<tr><td><label>Email</label>')
        wr(hidden('original_email', p.get('email', '')))
        wr('<td>%s' % (text('email', p.get('email', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>Phone</label>')
        wr('<td>%s' % (text('phone', p.get('phone', ''), 'input')))
        wr('<tr><td><label>Fax</label>')
        wr('<td>%s' % (text('fax', p.get('fax', ''), 'input')))
        wr('<tr><td colspan="3">')
        wr(submit('Save Contact Info'))
        wr('</table></div>')
        wr('</form>')
        wr('</div><!-- tab1 -->')
        ######################################################
        wr('<div id="tab2">')
        wr('<h2>Change Your Password</h2>')
        wr('<div>If you wish to keep your current password, you shouldn\'t do anything here.</div>'
           )
        wr('<form method="POST" action="Acct_Change_Pass">')
        wr(hidden('form_username', un))
        wr(hidden('form_hash', self.request().cookies().get('hash')))
        wr('<div>Enter your new password twice:</div>')
        wr('<div>%s</div>' % (passwd('pw1', '', 'input', 24)))
        wr('<div>%s</div>' % (passwd('pw2', '', 'input', 24)))
        wr('<div>%s</div>' % (submit('Change Password')))
        wr('</form>')
        wr('</div><!-- tab2 -->')
        ######################################################
        # radio_jq (name, value='', clss='', id='', checked=False)
        wr('<div id="tab3">')
        wr('<h2>Your Privacy Settings</h2>')
        wr('<div>Your current privacy settings are shown below. Change them as you see fit.</div>'
           )
        wr('<form method="POST" action="Acct_Change_Privacy">')
        wr(hidden('form_username', un))
        wr(hidden('form_hash', self.request().cookies().get('hash')))
        wr('<div><table id="contact_info">')
        # ------------------------------------------------------
        wr('<fieldset>')
        wr('<legend>Please select your overall security posture:</legend>')
        wr('<tr><td>')
        wr('<label for="sec-paranoid">%s Hide all my information from everyone</label><br />' % \
            (radio_jq('sec_policy', 'paranoid', '', 'sec-paranoid', (p.get('sec_policy')=='paranoid') )))
        wr('<label for="sec-permissive">%s Display some of my information, specified below</label>' % \
            (radio_jq('sec_policy', 'permissive', '', 'sec-permissive', (p.get('sec_policy')=='permissive') )))
        wr('</fieldset>')
        # ------------------------------------------------------
        wr('<fieldset>')
        wr('<legend class="sec-legend">Who should be allowed to view your full postal address?</legend>'
           )
        wr('<tr><td class="sec-td">')
        wr('<label for="hide1">%s Nobody; show only my city &amp; state</label><br />' % \
            (radio_jq('show_address', 'hide', 'sec-sub', 'hide1', (p.get('show_address')=='hide') )))
        wr('<label for="dips1">%s ACVA Diplomates only</label><br />' % \
            (radio_jq('show_address', 'diplomates', 'sec-sub', 'dips1', (p.get('show_address')=='diplomates') )))
        wr('<label for="both1">%s ACVA Diplomates &amp; Candidates</label><br />' % \
            (radio_jq('show_address', 'both', 'sec-sub', 'both1', (p.get('show_address')=='both') )))
        wr('<label for="all1">%s Everyone, even the general public</label>' % \
            (radio_jq('show_address', 'all', 'sec-sub', 'all1', (p.get('show_address')=='all') )))
        wr('</fieldset>')
        # ------------------------------------------------------
        wr('<fieldset>')
        wr('<legend class="sec-legend">Who should be allowed to view your email address?</legend>'
           )
        wr('<tr><td class="sec-td">')
        wr('<label for="hide2">%s Nobody</label><br />' % \
            (radio_jq('show_email', 'hide', 'sec-sub', 'hide2', (p.get('show_email')=='hide') )))
        wr('<label for="dips2">%s ACVA Diplomates only</label><br />' % \
            (radio_jq('show_email', 'diplomates', 'sec-sub', 'dips2', (p.get('show_email')=='diplomates') )))
        wr('<label for="both2">%s ACVA Diplomates &amp; Candidates</label><br />' % \
            (radio_jq('show_email', 'both', 'sec-sub', 'both2', (p.get('show_email')=='both') )))
        wr('<label for="all2">%s Everyone, even the general public</label>' % \
            (radio_jq('show_email', 'all', 'sec-sub', 'all2', (p.get('show_email')=='all') )))
        wr('</fieldset>')
        # ------------------------------------------------------
        wr('<fieldset>')
        wr('<legend class="sec-legend">Who should be allowed to view your phone &amp; fax numbers?</legend>'
           )
        wr('<tr><td class="sec-td">')
        wr('<label for="hide3">%s Nobody</label><br />' % \
            (radio_jq('show_numbers', 'hide', 'sec-sub', 'hide3', (p.get('show_numbers')=='hide') )))
        wr('<label for="dips3">%s ACVA Diplomates only</label><br />' % \
            (radio_jq('show_numbers', 'diplomates', 'sec-sub', 'dips3', (p.get('show_numbers')=='diplomates') )))
        wr('<label for="both3">%s ACVA Diplomates &amp; Candidates</label><br />' % \
            (radio_jq('show_numbers', 'both', 'sec-sub', 'both3', (p.get('show_numbers')=='both') )))
        wr('<label for="all3">%s Everyone, even the general public</label>' % \
            (radio_jq('show_numbers', 'all', 'sec-sub', 'all3', (p.get('show_numbers')=='all') )))
        wr('</fieldset>')
        # ------------------------------------------------------
        wr('<tr><td>%s' % (submit('Save Privacy Settings')))
        wr('</table></div>')
        wr('</form>')
        wr('</div><!-- tab3 -->')
        ######################################################
        if IS_DIP:
            wr('<div id="tab4">')
            wr('<h2>For Hire?</h2>')
            wr('<div>Control whether or not you wish to be listed in our "Consultants for Hire" section, which is intended to help other vets connect with ACVA members.</div>'
               )
            if p.get('sec_policy') == 'paranoid':
                wr('<div>Unfortunately, you have selected to hide all your information. You must <em>adjust your privacy settings</em> to allow some information about you be available to the public before you can be included in the "Consultants for Hire" list.</div>'
                   )
            else:
                wr('<form method="POST" action="Acct_Change_Hire">')
                wr(hidden('form_username', un))
                wr(hidden('form_hash', self.request().cookies().get('hash')))
                wr('<div>')
                wr('<fieldset>')
                wr('<legend class="sec-legend">Do you wish to be listed as a Consultant for Hire?</legend>'
                   )
                wr('')
                wr('<label for="for-hire-yes">%s Yes, that would be fantastic.</label><br />' % \
                    (radio_jq('show_for_hire', 'yes', 'sec-sub', 'for-hire-yes', (p.get('show_for_hire')=='yes') )))
                wr('<label for="for-hire-no">%s No.</label><br />' % \
                    (radio_jq('show_for_hire', 'no', 'sec-sub', 'for-hire-no', (p.get('show_for_hire')!='yes') )))
                wr('</fieldset>')
                wr('<div id="for-hire-extra-info">')

                wr('<div>')
                wr('<b>What geographic area(s) do you serve?</b><br />')
                wr('<textarea name="for_hire_areas" class="input" cols="60" rows="3">%s</textarea>'
                   % (p.get('for_hire_areas', '')))
                wr('</div>')

                wr('<div>')
                wr('<b>What services do you provide?</b><br />')
                wr('<textarea name="for_hire_services" class="input" cols="60" rows="3">%s</textarea>'
                   % (p.get('for_hire_services', '')))
                wr('</div>')

                wr('<div>')
                wr('<b>If you have a website, provide it here:</b><br />')
                wr(
                    text('for_hire_url',
                         value=p.get('for_hire_url', ''),
                         clss='input'))
                wr('</div>')

                wr('</div>')
                wr('%s' % (submit('Save Consultancy Status')))
                wr('</div>')
                wr('</form>')

            wr('</div><!-- tab4 -->')
        ######################################################
        wr('</div><!-- acct-container -->')
Exemplo n.º 2
0
    def writeContent(self):
        wr = self.writeln
        qs = self.request().fields()

        # Admins can change others.
        ISA = is_site_admin(self.request())
        asuserid = qs.get('asuserid')

        rolestr = self.request().cookies().get('role', '')
        IS_DIP = rolestr == DIPLSTR

        wr('<h1><em>%s</em> Account Information</h1>' % (un))

        if qs.get('pc'):
            self.render_special_msg('Password changed successfully.')
        if qs.get('ic'):
            self.render_special_msg('Contact info saved.')
        if qs.get('pv'):
            self.render_special_msg('Privacy settings saved.')
        if qs.get('fh'):
            self.render_special_msg('Consultancy setting saved.')

        p = get_user_acct(un)
        if ISA and asuserid:
            p = get_user_acct(asuserid)

        wr('<div id="acct-container" class="acct-tabs"> ')
        wr('<ul class="idTabs">')
        wr('<li><a class="selected" href="#tab1">Contact Info</a></li> ')
        wr('<li><a href="#tab2">Change Password</a></li> ')
        wr('<li><a href="#tab3">Privacy Settings</a></li> ')
        if IS_DIP:
            wr('<li><a href="#tab4">For Hire?</a></li> ')
        wr('</ul> ')
        ######################################################
        wr('<div id="tab1">')
        wr('<h2>Your Contact Information</h2>')
        wr('<form method="POST" action="Acct_Edit_Info">')
        wr(hidden('form_username', un))
        wr(hidden('form_hash', self.request().cookies().get('hash')))
        wr('<div><table id="contact_info">')
        wr('<tr><td><label>First</label>')
        wr('<td>%s' % (text('fn', p.get('fn', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>MI</label>')
        wr('<td>%s' % (text('mi', p.get('mi', ''), 'input', 2)))
        wr('<tr><td><label>Last</label>')
        wr('<td>%s' % (text('sn', p.get('sn', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>Degrees Held</label>')
        wr('<td>%s' % (text('degrees', p.get('degrees', ''), 'input', 6)))
        wr('<td class="hint">(e.g., Ph.D., MBA, MS, etc.)')
        wr('<tr><td><label>Country</label>')
        wr('<td>%s' % (text('country', p.get('country', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>Addr 1</label>')
        wr('<td>%s' % (text('addr1', p.get('addr1', ''), 'input')))
        wr('<tr><td><label>Addr 2</label>')
        wr('<td>%s' % (text('addr2', p.get('addr2', ''), 'input')))
        wr('<tr><td><label>City</label>')
        wr('<td>%s' % (text('city', p.get('city', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>State/Prov.</label>')
        wr('<td>%s' % (text('state', p.get('state', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>ZIP/Postal Code</label>')
        wr('<td>%s' % (text('zip', p.get('zip', ''), 'input', 6)))
        wr('<tr><td><label>Email</label>')
        wr(hidden('original_email', p.get('email', '')))
        wr('<td>%s' % (text('email', p.get('email', ''), 'input')))
        wr('<td class="req">required')
        wr('<tr><td><label>Phone</label>')
        wr('<td>%s' % (text('phone', p.get('phone', ''), 'input')))
        wr('<tr><td><label>Fax</label>')
        wr('<td>%s' % (text('fax', p.get('fax', ''), 'input')))
        wr('<tr><td colspan="3">')
        wr(submit('Save Contact Info'))
        wr('</table></div>')
        wr('</form>')
        wr('</div><!-- tab1 -->')
        ######################################################
        wr('<div id="tab2">')
        wr('<h2>Change Your Password</h2>')
        wr('<div>If you wish to keep your current password, you shouldn\'t do anything here.</div>')
        wr('<form method="POST" action="Acct_Change_Pass">')
        wr(hidden('form_username', un))
        wr(hidden('form_hash', self.request().cookies().get('hash')))
        wr('<div>Enter your new password twice:</div>')
        wr('<div>%s</div>' % ( passwd('pw1', '', 'input', 24) ))
        wr('<div>%s</div>' % ( passwd('pw2', '', 'input', 24) ))
        wr('<div>%s</div>' % ( submit('Change Password') ))
        wr('</form>')
        wr('</div><!-- tab2 -->')
        ######################################################
        # radio_jq (name, value='', clss='', id='', checked=False)
        wr('<div id="tab3">')
        wr('<h2>Your Privacy Settings</h2>')
        wr('<div>Your current privacy settings are shown below. Change them as you see fit.</div>')
        wr('<form method="POST" action="Acct_Change_Privacy">')
        wr(hidden('form_username', un))
        wr(hidden('form_hash', self.request().cookies().get('hash')))
        wr('<div><table id="contact_info">')
        # ------------------------------------------------------
        wr('<fieldset>')
        wr('<legend>Please select your overall security posture:</legend>')
        wr('<tr><td>')
        wr('<label for="sec-paranoid">%s Hide all my information from everyone</label><br />' % \
            (radio_jq('sec_policy', 'paranoid', '', 'sec-paranoid', (p.get('sec_policy')=='paranoid') )))
        wr('<label for="sec-permissive">%s Display some of my information, specified below</label>' % \
            (radio_jq('sec_policy', 'permissive', '', 'sec-permissive', (p.get('sec_policy')=='permissive') )))
        wr('</fieldset>')
        # ------------------------------------------------------
        wr('<fieldset>')
        wr('<legend class="sec-legend">Who should be allowed to view your full postal address?</legend>')
        wr('<tr><td class="sec-td">')
        wr('<label for="hide1">%s Nobody; show only my city &amp; state</label><br />' % \
            (radio_jq('show_address', 'hide', 'sec-sub', 'hide1', (p.get('show_address')=='hide') )))
        wr('<label for="dips1">%s ACVA Diplomates only</label><br />' % \
            (radio_jq('show_address', 'diplomates', 'sec-sub', 'dips1', (p.get('show_address')=='diplomates') )))
        wr('<label for="both1">%s ACVA Diplomates &amp; Candidates</label><br />' % \
            (radio_jq('show_address', 'both', 'sec-sub', 'both1', (p.get('show_address')=='both') )))
        wr('<label for="all1">%s Everyone, even the general public</label>' % \
            (radio_jq('show_address', 'all', 'sec-sub', 'all1', (p.get('show_address')=='all') )))
        wr('</fieldset>')
        # ------------------------------------------------------
        wr('<fieldset>')
        wr('<legend class="sec-legend">Who should be allowed to view your email address?</legend>')
        wr('<tr><td class="sec-td">')
        wr('<label for="hide2">%s Nobody</label><br />' % \
            (radio_jq('show_email', 'hide', 'sec-sub', 'hide2', (p.get('show_email')=='hide') )))
        wr('<label for="dips2">%s ACVA Diplomates only</label><br />' % \
            (radio_jq('show_email', 'diplomates', 'sec-sub', 'dips2', (p.get('show_email')=='diplomates') )))
        wr('<label for="both2">%s ACVA Diplomates &amp; Candidates</label><br />' % \
            (radio_jq('show_email', 'both', 'sec-sub', 'both2', (p.get('show_email')=='both') )))
        wr('<label for="all2">%s Everyone, even the general public</label>' % \
            (radio_jq('show_email', 'all', 'sec-sub', 'all2', (p.get('show_email')=='all') )))
        wr('</fieldset>')
        # ------------------------------------------------------
        wr('<fieldset>')
        wr('<legend class="sec-legend">Who should be allowed to view your phone &amp; fax numbers?</legend>')
        wr('<tr><td class="sec-td">')
        wr('<label for="hide3">%s Nobody</label><br />' % \
            (radio_jq('show_numbers', 'hide', 'sec-sub', 'hide3', (p.get('show_numbers')=='hide') )))
        wr('<label for="dips3">%s ACVA Diplomates only</label><br />' % \
            (radio_jq('show_numbers', 'diplomates', 'sec-sub', 'dips3', (p.get('show_numbers')=='diplomates') )))
        wr('<label for="both3">%s ACVA Diplomates &amp; Candidates</label><br />' % \
            (radio_jq('show_numbers', 'both', 'sec-sub', 'both3', (p.get('show_numbers')=='both') )))
        wr('<label for="all3">%s Everyone, even the general public</label>' % \
            (radio_jq('show_numbers', 'all', 'sec-sub', 'all3', (p.get('show_numbers')=='all') )))
        wr('</fieldset>')
        # ------------------------------------------------------
        wr('<tr><td>%s' % (submit('Save Privacy Settings')))
        wr('</table></div>')
        wr('</form>')
        wr('</div><!-- tab3 -->')
        ######################################################
        if IS_DIP:
            wr('<div id="tab4">')
            wr('<h2>For Hire?</h2>')
            wr('<div>Control whether or not you wish to be listed in our "Consultants for Hire" section, which is intended to help other vets connect with ACVA members.</div>')
            if p.get('sec_policy')=='paranoid':
                wr('<div>Unfortunately, you have selected to hide all your information. You must <em>adjust your privacy settings</em> to allow some information about you be available to the public before you can be included in the "Consultants for Hire" list.</div>')
            else:
                wr('<form method="POST" action="Acct_Change_Hire">')
                wr(hidden('form_username', un))
                wr(hidden('form_hash', self.request().cookies().get('hash')))
                wr('<div>')
                wr('<fieldset>')
                wr('<legend class="sec-legend">Do you wish to be listed as a Consultant for Hire?</legend>')
                wr('')
                wr('<label for="for-hire-yes">%s Yes, that would be fantastic.</label><br />' % \
                    (radio_jq('show_for_hire', 'yes', 'sec-sub', 'for-hire-yes', (p.get('show_for_hire')=='yes') )))
                wr('<label for="for-hire-no">%s No.</label><br />' % \
                    (radio_jq('show_for_hire', 'no', 'sec-sub', 'for-hire-no', (p.get('show_for_hire')!='yes') )))
                wr('</fieldset>')
                wr('<div id="for-hire-extra-info">')

                wr('<div>')
                wr('<b>What geographic area(s) do you serve?</b><br />')
                wr('<textarea name="for_hire_areas" class="input" cols="60" rows="3">%s</textarea>' % (p.get('for_hire_areas', '')))
                wr('</div>')

                wr('<div>')
                wr('<b>What services do you provide?</b><br />')
                wr('<textarea name="for_hire_services" class="input" cols="60" rows="3">%s</textarea>' % (p.get('for_hire_services', '')))
                wr('</div>')

                wr('<div>')
                wr('<b>If you have a website, provide it here:</b><br />')
                wr(text('for_hire_url', value=p.get('for_hire_url', ''), clss='input'))
                wr('</div>')

                wr('</div>')
                wr('%s' % (submit('Save Consultancy Status')))
                wr('</div>')
                wr('</form>')
    
            wr('</div><!-- tab4 -->')
        ######################################################
        wr('</div><!-- acct-container -->')
Exemplo n.º 3
0
    def writeContent(self):
        wr = self.writeln
        qs = self.request().fields()
        wr('<h1>%s</h1>' % (self.title()))

        harvest_code = qs.get('hc')
        if harvest_code == HARV_DIPL:
            acct_type = 'Diplomate'
        elif harvest_code == HARV_RESD:
            acct_type = 'Candidate'

        if self.request()._environ.get('REQUEST_METHOD') == 'POST':
            form = self.request().fields()
            ERROR = None
            required = {'hc': 'validation code', 'fn': 'first name', 'sn': 'surname', 'city': 'city', 'state': 'state', 'email': 'email', 'pw1': 'first password', 'pw2': 'second password'}
            for r in required.keys():
                if not form.get(r):
                    ERROR = 'The field "%s" is required.' % (required.get(r))
            if form.get('pw1') != form.get('pw2'):
                ERROR = 'The two passwords you entered are not the same.'
            if not ERROR:
                ERROR = check_email_address(form.get('email'))
            if not ERROR:
                if is_email_registered(form.get('email')):
                    ERROR = 'We already have an account that uses the email address: %s.' % (form.get('email'))

            if ERROR:
                self.render_form_error('Registration Error', ERROR)
            else:
                newid = save_registration(form)

                # Auto Login
                userinfo = get_user_acct(newid)
                hvc = hash_string(userinfo.get('vcode'))
                ex1 = self.getCookieExpiry('maxAge', y=10)
                ex2 = self.getCookieExpiry('Expires', y=10)
                self.setCookie('username', newid, ex1, ex2)
                self.setCookie('hash', hvc, ex1, ex2)
                possible_role = get_user_role(newid)
                if possible_role:
                    self.setCookie('role', possible_role, ex1, ex2)

                wr('<h2>Success!</h2>')
                wr('<P>Your ACVAA %s account has been created. Your site user name is:</P>' % (acct_type))
                wr('<h3>%s</h3>' % (newid))
                wr('''
<P><em>IMPORTANT!</em> Don\'t lose your user name.</P>

<P>An email confirming your account registration will be sent ASAP; it will also include your site user name.</P>

<p>
You are now logged in. You can:
</p>

<p>
<a href="Account">Manage your account</a><br />
You can also change your privacy settings here.
</p>

<p>
<a href="Directory">View the member directory</a>
</p>

<p>
<a href="Calendar">Check out the events calendar</a>
</p>
                    ''')

        else:
            if harvest_code and (harvest_code in [HARV_DIPL, HARV_RESD]):
                wr('<div class="sb"><div class="st">')
                wr('<h3>Note</h3>')
                wr('<P>Submitting this form will create a new %s account for you on the ACVAA site.</P>' % (acct_type))
                wr('<P>Please provide as much information as possible; you can specify your privacy settings as you go.</P>')
                wr('</div></div>')
                wr('<form method="POST" action="Register">')
                wr(hidden('hc', harvest_code))
                wr('<h2>%s</h2>' % (acct_type))
                wr('<P><table id="contact_info">')
                wr('<tr><td colspan="3">')
                wr('<fieldset>')
                wr('<legend>Tell us about you.</legend>')
                wr('<tr><td colspan="3">This information will be available to the public.')
                wr('<tr><td><label>First Name</label>')
                wr('<td>%s' % (text('fn', '', clss='input')))
                wr('<td class="req">required')
                wr('<tr><td><label>Middle Initial</label>')
                wr('<td>%s' % (text('mi', '', clss='input', size='2')))
                wr('<tr><td><label>Last Name</label>')
                wr('<td>%s' % (text('sn', '', clss='input')))
                wr('<td class="req">required')
                wr('<tr><td><label>Degrees Held</label>')
                wr('<td>%s' % (text('degrees', '', clss='input', size='6')))
                wr('<td class="hint">(e.g., Ph.D., MBA, MS, etc.)')
                wr('</fieldset>')
                wr('<tr><td colspan="3">')
                wr('<fieldset>')
                wr('<legend>Where are you located?</legend>')
                wr('<tr><td><label>Country</label>')
                wr('<td>%s' % (COUNTRY_SELECT))
                wr('<td class="req">required')
                wr('<tr><td><label>Address 1</label>')
                wr('<td>%s' % (text('addr1', '', clss='input')))
                wr('<tr><td><label>Address 2</label>')
                wr('<td>%s' % (text('addr2', '', clss='input')))
                wr('<tr><td><label>City</label>')
                wr('<td>%s' % (text('city', '', clss='input')))
                wr('<td class="req">required')
                wr('<tr><td><label>State/Prov.</label>')
                wr('<td id="state_slot">')
                wr('<td class="req">required')
                wr('<tr><td><label>ZIP/Postal Code</label>')
                wr('<td>%s' % (text('zip', '', clss='input', size='6')))
                wr('<tr><td colspan="3">Who should be allowed to view your full address?')
                # radio_jq (name, value='', clss='', id='', checked=False)
                wr('<tr><td><td colspan="2">')
                wr('''
                    <label for="hide1">
                    %s
                    Nobody; show only my city &amp; state
                    </label><br />
                    ''' % (radio_jq('show_address', 'hide', '', 'hide1', checked=True)))
                wr('''
                    <label for="dips1">
                    %s
                    ACVAA Diplomates only
                    </label><br />
                    ''' % (radio_jq('show_address', 'diplomates', '', 'dips1', checked=False)))
                wr('''
                    <label for="both1">
                    %s
                    ACVAA Diplomates &amp; Candidates
                    </label><br />
                    ''' % (radio_jq('show_address', 'both', '', 'both1', checked=False)))
                wr('''
                    <label for="all1">
                    %s
                    Everyone, even the general public
                    </label>
                    ''' % (radio_jq('show_address', 'all', '', 'all1', checked=False)))
                wr('</fieldset>')
                wr('<tr><td colspan="3">')
                wr('<fieldset>')
                wr('<legend>How can you be contacted?</legend>')
                wr('<tr><td><label>Email</label>')
                wr('<td>%s' % (text('email', '', clss='input')))
                wr('<td class="req">required')
                wr('<tr><td colspan="3">Who should be allowed to view your email address?')
                wr('<tr><td><td colspan="2">')
                wr('''
                    <label for="hide2">
                    %s
                    Nobody
                    </label><br />
                    ''' % (radio_jq('show_email', 'hide', '', 'hide2', checked=True)))
                wr('''
                    <label for="dips2">
                    %s
                    ACVAA Diplomates only
                    </label><br />
                    ''' % (radio_jq('show_email', 'diplomates', '', 'dips2', checked=False)))
                wr('''
                    <label for="both2">
                    %s
                    ACVAA Diplomates &amp; Candidates
                    </label><br />
                    ''' % (radio_jq('show_email', 'both', '', 'both2', checked=False)))
                wr('''
                    <label for="all2">
                    %s
                    Everyone, even the general public
                    </label>
                    ''' % (radio_jq('show_email', 'all', '', 'all2', checked=False)))
                wr('<tr><td><label>Phone</label>')
                wr('<td>%s' % (text('phone', '', clss='input')))
                wr('<tr><td><label>Fax</label>')
                wr('<td>%s' % (text('fax', '', clss='input')))
                wr('<tr><td colspan="3">Who should be allowed to view your phone &amp; fax numbers?')
                wr('<tr><td><td colspan="2">')
                wr('''
                    <label for="hide3">
                    %s
                    Nobody
                    </label><br />
                    ''' % (radio_jq('show_numbers', 'hide', '', 'hide3', checked=True)))
                wr('''
                    <label for="dips3">
                    %s
                    ACVAA Diplomates only
                    </label><br />
                    ''' % (radio_jq('show_numbers', 'diplomates', '', 'dips3', checked=False)))
                wr('''
                    <label for="both3">
                    %s
                    ACVAA Diplomates &amp; Candidates
                    </label><br />
                    ''' % (radio_jq('show_numbers', 'both', '', 'both3', checked=False)))
                wr('''
                    <label for="all3">
                    %s
                    Everyone, even the general public
                    </label>
                    ''' % (radio_jq('show_numbers', 'all', '', 'all3', checked=False)))
                wr('<tr><td colspan="3">')
                wr('<fieldset>')
                wr('<legend>Choose a password &amp; enter it twice.</legend>')
                wr('<tr><td><label>Password</label>')
                wr('<td>%s' % (passwd('pw1', '', clss='input')))
                wr('<td class="req">required')
                wr('<tr><td><label>Password</label>')
                wr('<td>%s' % (passwd('pw2', '', clss='input')))
                wr('<td class="req">required')
                wr('</fieldset>')
                wr('<tr><td><td colspan="2">')
                wr('<input type="image" src="/g/create_acct_button.png" style="margin-top: 20px;">')
                wr('</table></P>')
                wr('</form>')
            else:
                wr('''<h1 class="error">Validation Error</h1>
                <P>
                Sorry, but you cannot register with the ACVAA site unless you
                use a web address with a proper validation code.
                <em>This is most likely due to the web address having been
                mistyped.</em>
                </P>
                <P>
                Please use only the address provided in the email from ACVAA.
                <em>Copying &amp; pasting the address into your browser is the
                easiest way to avoid mistakes.</em>
                </P>
                <P>
                If you have further problems or questions, please contact
                %s or %s.
                </P>''' % (self.lydia(), self.steph()))