Commit d9a5b9c4 by Braden MacDonald Committed by GitHub

Merge pull request #17 from mckinseyacademy/mcka-copy-changes

Mcka copy changes
parents 3cef87b9 a07513ed
...@@ -30,12 +30,11 @@ ...@@ -30,12 +30,11 @@
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
<input class="input-main" type="button" name="poll-submit" <input class="input-main" type="button" name="poll-submit" value="Submit" disabled/>
value="{% if choice %}Resubmit{% else %}Submit{% endif %}" disabled/>
</form> </form>
<div class="poll-voting-thanks <div class="poll-voting-thanks
{% if not choice or can_vote %}poll-hidden{% endif %}"> {% if not choice or can_vote %}poll-hidden{% endif %}">
<span>Thank you for your submission!</span> <span>Thank you.</span>
</div> </div>
<div class="poll-submissions-count poll-hidden"> <div class="poll-submissions-count poll-hidden">
You have used <span class="poll-current-count">{{ submissions_count }}</span> You have used <span class="poll-current-count">{{ submissions_count }}</span>
......
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
<input class="input-main" type="button" name="poll-submit" value="{% if choices and can_vote %}Resubmit{% else %}Submit{% endif %}" disabled /> <input class="input-main" type="button" name="poll-submit" value="Submit" disabled />
</form> </form>
<div class="poll-voting-thanks{% if not choices or can_vote %} poll-hidden{% endif %}"><span>Thank you for your submission!</span></div> <div class="poll-voting-thanks{% if not choices or can_vote %} poll-hidden{% endif %}"><span>Thank you.</span></div>
<div class="poll-submissions-count poll-hidden"> <div class="poll-submissions-count poll-hidden">
You have used <span class="poll-current-count">{{ submissions_count }}</span> You have used <span class="poll-current-count">{{ submissions_count }}</span>
out of <span class="poll-max-submissions">{{ max_submissions }}</span> submissions. out of <span class="poll-max-submissions">{{ max_submissions }}</span> submissions.
......
...@@ -158,9 +158,7 @@ function PollUtil (runtime, element, pollType) { ...@@ -158,9 +158,7 @@ function PollUtil (runtime, element, pollType) {
thanks.removeClass('poll-hidden'); thanks.removeClass('poll-hidden');
thanks.fadeOut(0).fadeIn('slow', 'swing'); thanks.fadeOut(0).fadeIn('slow', 'swing');
$('.poll-feedback-container', element).removeClass('poll-hidden'); $('.poll-feedback-container', element).removeClass('poll-hidden');
if (can_vote) { if (!can_vote) {
$('input[name="poll-submit"]', element).val(gettext('Resubmit'));
} else {
$('input', element).attr('disabled', true) $('input', element).attr('disabled', true)
} }
return; return;
......
...@@ -44,7 +44,7 @@ def package_data(pkg, roots): ...@@ -44,7 +44,7 @@ def package_data(pkg, roots):
setup( setup(
name='xblock-poll', name='xblock-poll',
version='1.2.1', version='1.2.2',
description='An XBlock for polling users.', description='An XBlock for polling users.',
packages=[ packages=[
'poll', 'poll',
......
...@@ -87,12 +87,9 @@ class TestPrivateResults(PollBaseTest): ...@@ -87,12 +87,9 @@ class TestPrivateResults(PollBaseTest):
submit.click() submit.click()
self.wait_until_clickable(self.browser.find_element_by_css_selector('.poll-voting-thanks')) self.wait_until_clickable(self.browser.find_element_by_css_selector('.poll-voting-thanks'))
self.assertIn('Resubmit', submit.get_attribute('outerHTML'), 'Resubmit') self.assertIn('Submit', submit.get_attribute('outerHTML'))
# ^ Note that in previous versions, this text would change to "Resubmit",
# This should persist on page reload. # but we removed that functionality in v1.2.2
self.go_to_page(page_name)
submit = self.get_submit()
self.assertIn('Resubmit', submit.get_attribute('outerHTML'), 'Resubmit')
@unpack @unpack
@data(*scenarios) @data(*scenarios)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment