Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-16412

Remove useless name/id/value for poll inputs in posting_preview.html, or add the ability to vote in the posting editor

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Trivial
    • Resolution: Unresolved
    • 3.2.9, 3.3.0
    • None
    • Posting, Styles

    Description

      In the posting_preview.html template file, you can find this, in the poll_option loop :

      <!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF -->
      

      The part name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}" (two times, for checkbox and for radio) is completely useless in the posting (preview) context, unlike in viewtopic.

      The message author cannot vote while preview his or her text, before posting a new subject with poll, or while editing a subject to add or modify a poll.

      If the input needs a name and a value attributes for somewhat reason, an expression like name="vote_id" value="" should be enough.

       

      An alternative would be adding the possibility to vote inside the posting editor : I create a poll, I immediately vote and then submit the poll for other users.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Big Monstro Big Monstro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: