Skip to content

Commit

Permalink
update nominations to 2016
Browse files Browse the repository at this point in the history
  • Loading branch information
Society for Music Theory committed Apr 16, 2017
1 parent 6803cd2 commit 4b242ff
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
32 changes: 16 additions & 16 deletions smt_profile/smt_profile.routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,65 +47,65 @@ smt_profile.paypal_cancelled:
_permission: 'Use SMT Profile'

smt_profile.nominations:
path: '/smtprofile/nominating2015'
path: '/smtprofile/nominating2016'
defaults:
_title: 'Nominations 2015'
_title: 'Nominations 2016'
_form: '\Drupal\smt_profile\Form\NominationsForm'
requirements:
_permission: 'Use SMT Profile'

smt_profile.conference_registration:
path: '/smtprofile/registration2015'
path: '/smtprofile/registration2016'
defaults:
_controller: '\Drupal\smt_profile\Controller\RegistrationController::content'
_title: '2015 Conference Registration'
_title: '2016 Conference Registration'
requirements:
_permission: 'Use SMT Profile'

smt_profile.conference_registration_info:
path: '/smtprofile/registration2015/info'
path: '/smtprofile/registration2016/info'
defaults:
_title: '2015 Conference Registration'
_title: '2016 Conference Registration'
_form: '\Drupal\smt_profile\Form\RegistrationInfoForm'
requirements:
_permission: 'Use SMT Profile'

smt_profile.conference_registration_options:
path: '/smtprofile/registration2015/options'
path: '/smtprofile/registration2016/options'
defaults:
_title: '2015 Conference Registration'
_title: '2016 Conference Registration'
_form: '\Drupal\smt_profile\Form\RegistrationOptionsForm'
requirements:
_permission: 'Use SMT Profile'

smt_profile.conference_registration_payment:
path: '/smtprofile/registration2015/payment/{idstr}'
path: '/smtprofile/registration2016/payment/{idstr}'
defaults:
_controller: '\Drupal\smt_profile\Controller\RegistrationController::payment'
_title: '2015 Conference Registration'
_title: '2016 Conference Registration'
requirements:
_permission: 'Use SMT Profile'

smt_profile.conference_registration_payment_success:
path: '/smtprofile/registration2015/success/{idstr}'
path: '/smtprofile/registration2016/success/{idstr}'
defaults:
_controller: '\Drupal\smt_profile\Controller\RegistrationController::payment_success'
_title: '2015 Conference Registration'
_title: '2016 Conference Registration'
requirements:
_permission: 'Use SMT Profile'

smt_profile.conference_registration_payment_cancelled:
path: '/smtprofile/registration2015/cancelled/{idstr}'
path: '/smtprofile/registration2016/cancelled/{idstr}'
defaults:
_controller: '\Drupal\smt_profile\Controller\RegistrationController::payment_cancelled'
_title: '2015 Conference Registration'
_title: '2016 Conference Registration'
requirements:
_permission: 'Use SMT Profile'

smt_profile.conference_registration_payment_receipt:
path: '/smtprofile/registration2015/receipt/{idstr}'
path: '/smtprofile/registration2016/receipt/{idstr}'
defaults:
_controller: '\Drupal\smt_profile\Controller\RegistrationController::payment_receipt'
_title: '2015 Conference Registration'
_title: '2016 Conference Registration'
requirements:
_permission: 'Use SMT Profile'
14 changes: 7 additions & 7 deletions smt_profile/src/Form/NominationsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#markup' => $output
);

$form['smtnomination2015_president_elect'] = array(
$form['smtnomination2016_president_elect'] = array(
'#type' => 'textfield',
'#title' => t('Nominate one President-Elect'),
'#prefix' => '<hr>',
);
$form['smtnomination2015_members'] = array(
$form['smtnomination2016_members'] = array(
'#type' => 'textfield',
'#title' => t('Nominate first Member-at-Large'),
);
$form['smtnomination2015_members2'] = array(
$form['smtnomination2016_members2'] = array(
'#type' => 'textfield',
'#title' => t('Nominate second Member-at-Large'),
);
Expand Down Expand Up @@ -83,11 +83,11 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$db = Database::getConnection();
$uid = \Drupal::currentUser()->id();

$vice_value = $form_state->getValue('smtnomination2015_president_elect');
$members_value = $form_state->getValue('smtnomination2015_members');
$members2_value = $form_state->getValue('smtnomination2015_members2');
$vice_value = $form_state->getValue('smtnomination2016_president_elect');
$members_value = $form_state->getValue('smtnomination2016_members');
$members2_value = $form_state->getValue('smtnomination2016_members2');

$sql = "INSERT INTO smtnominations2015 (ID, president_elect, members, members2) VALUES (?, ?, ?, ?)";
$sql = "INSERT INTO smtnominations2016 (ID, president_elect, members, members2) VALUES (?, ?, ?, ?)";
$success = $db->query($sql, array($uid, $vice_value, $members_value, $members2_value));

if (!$success) {
Expand Down

0 comments on commit 4b242ff

Please sign in to comment.