@@ -42,28 +42,6 @@ function template_main()
4242 echo '
4343 }; ' ;
4444
45- // If this is a poll - use some javascript to ensure the user doesn't create a poll with illegal option combinations.
46- if (Utils::$ context ['make_poll ' ])
47- echo '
48- var pollOptionNum = 0, pollTabIndex;
49- var pollOptionId = ' , Utils::$ context ['last_choice_id ' ], ';
50- function addPollOption()
51- {
52- if (pollOptionNum == 0)
53- {
54- for (var i = 0, n = document.forms.postmodify.elements.length; i < n; i++)
55- if (document.forms.postmodify.elements[i].id.substr(0, 8) == \'options- \')
56- {
57- pollOptionNum++;
58- pollTabIndex = document.forms.postmodify.elements[i].tabIndex;
59- }
60- }
61- pollOptionNum++
62- pollOptionId++
63-
64- setOuterHTML(document.getElementById( \'pollMoreOptions \'), ' , Utils::JavaScriptEscape ('<dt><label for="options- ' ), ' + pollOptionId + ' , Utils::JavaScriptEscape ('"> ' . Lang::$ txt ['option ' ] . ' ' ), ' + pollOptionNum + ' , Utils::JavaScriptEscape ('</label>:</dt><dd><input type="text" name="options[ ' ), ' + pollOptionId + ' , Utils::JavaScriptEscape (']" id="options- ' ), ' + pollOptionId + ' , Utils::JavaScriptEscape ('" value="" size="80" maxlength="255" tabindex=" ' ), ' + pollTabIndex + ' , Utils::JavaScriptEscape ('"></dd><p id="pollMoreOptions"></p> ' ), ');
65- } ' ;
66-
6745 // If we are making a calendar event we want to ensure we show the current days in a month etc... this is done here.
6846 if (Utils::$ context ['make_event ' ])
6947 echo '
@@ -204,7 +182,7 @@ function addPollOption()
204182 <div id="edit_poll">
205183 <fieldset id="poll_main">
206184 <legend><span ' , (isset (Utils::$ context ['poll_error ' ]['no_question ' ]) ? ' class="error" ' : '' ), '> ' , Lang::$ txt ['poll_question ' ], '</span></legend>
207- <dl class="settings poll_options">
185+ <dl class="settings poll_options" data-more-txt=" ' , Lang:: $ txt [ ' poll_add_option ' ], ' " data-option-txt=" ' , Lang:: $ txt [ ' option ' ], ' " >
208186 <dt> ' , Lang::$ txt ['poll_question ' ], '</dt>
209187 <dd>
210188 <input type="text" name="question" value=" ' , isset (Utils::$ context ['question ' ]) ? Utils::$ context ['question ' ] : '' , '" tabindex=" ' , Utils::$ context ['tabindex ' ]++, '" size="80">
@@ -221,9 +199,7 @@ function addPollOption()
221199 </dd> ' ;
222200
223201 echo '
224- <p id="pollMoreOptions"></p>
225202 </dl>
226- <strong><a href="javascript:addPollOption(); void(0);">( ' , Lang::$ txt ['poll_add_option ' ], ')</a></strong>
227203 </fieldset>
228204 <fieldset id="poll_options">
229205 <legend> ' , Lang::$ txt ['poll_options ' ], '</legend>
0 commit comments