Changeset 9914
- Timestamp:
- 11/13/08 18:19:55 (2 months ago)
- Files:
-
- trunk/jaws/html/gadgets/Poll/LayoutHTML.php (modified) (2 diffs)
- trunk/jaws/html/gadgets/Poll/templates/Poll.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/jaws/html/gadgets/Poll/LayoutHTML.php
r8119 r9914 120 120 $btnVote =& Piwi::CreateWidget('Button', 'btn_vote', _t('POLL_POLLS_VOTE')); 121 121 $btnVote->SetSubmit(); 122 if (($poll['poll_type'] == 0) && Jaws_Session_Web::GetCookie('poll_'.$poll['id'])) {123 $btnVote->SetEnabled(false);124 }125 122 $tpl->SetVariable('btn_vote', $btnVote->Get()); 126 123 … … 148 145 } 149 146 147 if ($poll['poll_type'] == 0) { 148 $tpl->SetBlock('Poll/cookie'); 149 $tpl->SetVariable('pid', $poll['id']); 150 $tpl->ParseBlock('Poll/cookie'); 151 } 152 150 153 $tpl->ParseBlock('Poll'); 151 154 return $tpl->Get(); trunk/jaws/html/gadgets/Poll/templates/Poll.html
r9073 r9914 15 15 </div> 16 16 <div class="actions">{result_link} {btn_vote}</div> 17 <!-- BEGIN cookie --> 18 <script type="text/javascript"> 19 if (-1 != document.cookie.indexOf('poll_' + {pid})) { 20 this.onsubmit = function() { 21 return false; 22 } 23 } 24 </script> 25 <!-- END cookie --> 17 26 </form> 18 27 </div>
