Ejemplo n.º 1
0
 function generateForm(&$edit)
 {
     global $lr_session, $CONFIG;
     $this->smarty->assign('privacy_url', variable_get('privacy_policy', ''));
     $this->smarty->assign('app_org_short_name', variable_get('app_org_short_name', 'the league'));
     $this->smarty->assign('province_names', getProvinceNames());
     $this->smarty->assign('state_names', getStateNames());
     $this->smarty->assign('country_names', getCountryNames());
     $player_classes = array('player' => 'Player', 'visitor' => 'Non-player account');
     if ($lr_session->has_permission('person', 'edit', $this->person->id, 'class')) {
         $player_classes['administrator'] = 'Leaguerunner administrator';
         $player_classes['volunteer'] = 'Volunteer';
     }
     # Volunteers can unset themselves as volunteer if they wish.
     if ($this->person->class == 'volunteer') {
         $player_classes['volunteer'] = 'Volunteer';
     }
     $this->smarty->assign('player_classes', $player_classes);
     $this->smarty->assign('player_statuses', getOptionsFromEnum('person', 'status'));
     $this->smarty->assign('skill_levels', getOptionsFromRange(1, 10));
     $this->smarty->assign('start_years', getOptionsFromRange(1986, strftime('%Y', time()), 'reverse'));
     $this->smarty->assign('shirt_sizes', getShirtSizes());
     $this->smarty->assign('dog_questions', variable_get('dog_questions', 1));
     return true;
 }
Ejemplo n.º 2
0
 function generateForm(&$edit)
 {
     $this->smarty->assign('field_statuses', array('open' => 'open', 'closed' => 'closed'));
     $this->smarty->assign('ratings', field_rating_values());
     // TODO: Should become Field::get_eligible_parents()
     $sth = Field::query(array('_extra' => 'ISNULL(parent_fid)', '_order' => 'f.name,f.num'));
     $parents = array();
     $parents[0] = "---";
     while ($p = $sth->fetch(PDO::FETCH_OBJ)) {
         $parents[$p->fid] = $p->fullname;
     }
     $this->smarty->assign('parents', $parents);
     $this->smarty->assign('regions', getOptionsFromEnum('field', 'region'));
     $this->smarty->assign('noyes', array(0 => 'No', 1 => 'Yes'));
     $this->smarty->assign('province_names', getProvinceNames());
     $this->smarty->assign('state_names', getStateNames());
     $this->smarty->assign('country_names', getCountryNames());
     return true;
 }
Ejemplo n.º 3
0
 function generateForm(&$edit)
 {
     if (!isset($edit['app_admin_email'])) {
         $edit['app_admin_email'] = $_SERVER['SERVER_ADMIN'];
     }
     if (!isset($edit['privacy_policy'])) {
         $edit['privacy_policy'] = $_SERVER['SERVER_NAME'] . "/privacy";
     }
     if (!isset($edit['password_reset'])) {
         $edit['password_reset'] = url('person/forgotpassword');
     }
     $this->smarty->assign('app_org_province', $edit['app_org_province']);
     $this->smarty->assign('province_names', getProvinceNames());
     $this->smarty->assign('state_names', getStateNames());
     $this->smarty->assign('country_names', getCountryNames());
     $this->smarty->assign('seasons', getOptionsFromQuery("SELECT id AS theKey, display_name AS theValue FROM season ORDER BY year, id"));
     $this->smarty->assign('enable_disable', array('Disabled', 'Enabled'));
     $this->smarty->assign('questions', array('team_spirit' => 'team_spirit', 'ocua_team_spirit' => 'ocua_team_spirit'));
     $this->smarty->assign('log_levels', array(KLogger::EMERG => 'Emergency', KLogger::ALERT => 'Alert', KLogger::CRIT => 'Critical', KLogger::ERR => 'Error', KLogger::WARN => 'Warning', KLogger::NOTICE => 'Notice', KLogger::INFO => 'Information', KLogger::DEBUG => 'Debug'));
     $this->smarty->assign('live_sandbox', array('Live', 'Sandbox'));
 }
Ejemplo n.º 4
0
function getProvinceStateNames()
{
    return array_merge(getProvinceNames(), getStateNames());
}