update core to 7.36
This commit is contained in:
@@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = poll.test
|
||||
stylesheets[all][] = poll.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2014-05-08
|
||||
version = "7.28"
|
||||
; Information added by Drupal.org packaging script on 2015-04-02
|
||||
version = "7.36"
|
||||
project = "drupal"
|
||||
datestamp = "1399522731"
|
||||
datestamp = "1427943826"
|
||||
|
||||
|
@@ -249,6 +249,7 @@ function poll_form($node, &$form_state) {
|
||||
'#title' => check_plain($type->title_label),
|
||||
'#required' => TRUE,
|
||||
'#default_value' => $node->title,
|
||||
'#maxlength' => 255,
|
||||
'#weight' => -5,
|
||||
);
|
||||
|
||||
@@ -720,7 +721,6 @@ function poll_view_voting($form, &$form_state, $node, $block = FALSE) {
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Choices'),
|
||||
'#title_display' => 'invisible',
|
||||
'#default_value' => -1,
|
||||
'#options' => $list,
|
||||
);
|
||||
}
|
||||
@@ -748,7 +748,7 @@ function poll_view_voting($form, &$form_state, $node, $block = FALSE) {
|
||||
* Validation function for processing votes
|
||||
*/
|
||||
function poll_view_voting_validate($form, &$form_state) {
|
||||
if ($form_state['values']['choice'] == -1) {
|
||||
if (empty($form_state['values']['choice'])) {
|
||||
form_set_error( 'choice', t('Your vote could not be recorded because you did not select any of the choices.'));
|
||||
}
|
||||
}
|
||||
@@ -925,7 +925,6 @@ function template_preprocess_poll_results(&$variables) {
|
||||
*
|
||||
* @see poll-bar.tpl.php
|
||||
* @see poll-bar--block.tpl.php
|
||||
* @see theme_poll_bar()
|
||||
*/
|
||||
function template_preprocess_poll_bar(&$variables) {
|
||||
if ($variables['block']) {
|
||||
|
@@ -315,6 +315,11 @@ class PollVoteTestCase extends PollTestCase {
|
||||
|
||||
$this->drupalLogin($vote_user);
|
||||
|
||||
// Record a vote without selecting any choice.
|
||||
$edit = array();
|
||||
$this->drupalPost('node/' . $poll_nid, $edit, t('Vote'));
|
||||
$this->assertText(t('Your vote could not be recorded because you did not select any of the choices.'), 'Found the empty poll submission error message.');
|
||||
|
||||
// Record a vote for the first choice.
|
||||
$edit = array(
|
||||
'choice' => '1',
|
||||
|
Reference in New Issue
Block a user