Last modified: 2008-09-19 21:16:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T16838, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14838 - Validation error when field is mandatory and input type=radiobuttons
Validation error when field is mandatory and input type=radiobuttons
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-16 18:56 UTC by Matt Williamson
Modified: 2008-09-19 21:16 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
HTML output from the form definition in the Description (25.83 KB, text/html)
2008-07-16 18:56 UTC, Matt Williamson
Details

Description Matt Williamson 2008-07-16 18:56:23 UTC
Created attachment 5077 [details]
HTML output from the form definition in the Description

See attached form definition and produced output. The generated javascript searches for an element with ID "input_2" (line 191), but that doesn't exist, because it's a radiobutton field with a different name, so the validation function errors on line 76.

It seems that you're at least supposed to be able to specify "mandatory" for a radiobutton control, because doing so eliminates the "None" option that otherwise appears. Ideally, I'd like to be able to specify "mandatory|input type=radiobutton|default=AKeywordOrNotOneOfTheValues", in which case the validation would make the user explicitly select a radio button, rather than having a default selected...but that might constitute a feature request. Right now it seems putting mandatory on the radiobutton control is broken, I'm not sure what the intended behavior is.


Form Definition:

{{{info|page name=Radar Checklist <Radar Checklist[timestamp]>|add title=Complete Radar Checklist}}}

{{{for template|Radar Checklist}}}
<table class="wikitable">
<tr><th colspan=2>Operational Status</th></tr>
<tr>
  <td>Time Check (+/- 3min)</td>
  <td>{{{field|timecheck|mandatory|input type=radiobutton}}}</td>
</tr>
<tr>
  <td>RDA Power</td>
  <td>{{{field|rdapower|mandatory}}}</td>
</tr>
<tr>
  <td>Generator Fuel Level</td>
  <td>{{{field|fuel|mandatory}}}%</td>
</tr>
<tr>
  <td>VCP Selected</td>
  <td>{{{field|vcp|mandatory}}}</td>
</tr>
<tr><th colspan=2>Communications Lines</th></tr>
<tr>
  <td>Line 21 (FAA ZLC) Connected</td>
  <td>{{{field|line21|mandatory|input type=radiobutton}}}</td>
</tr>
<tr>
  <td>Line 25 (AWIPS) Connected</td>
  <td>{{{field|line25|mandatory|input type=radiobutton}}}</td>
</tr>
<tr><th colspan=2>Environmental Data</th></tr>
<tr>
  <td>0 Deg Height</td>
  <td>{{{field|0deg|mandatory}}} KFeet</td>
</tr>
<tr>
  <td>-20 Deg Height</td>
  <td>{{{field|20deg|mandatory}}} KFeet</td>
</tr>
<tr><th colspan=2>Data Availability</th></tr>
<tr>
  <td>BDDS (Archive II) KSFX Green</td>
  <td>{{{field|bdds|mandatory|input type=radiobutton}}}</td>
</tr>
<tr>
  <td>AWIPS D2D KSFX Current</td>
  <td>{{{field|ksfxcurrent|mandatory|input type=radiobutton}}}</td>
</tr>
<tr>
  <td>AWIPS D2D KMTX Current</td>
  <td>{{{field|kmtxcurrent|mandatory|input type=radiobutton}}}</td>
</tr>
</table>

Date/Time: {{{field|timestamp|mandatory|input type=datetime}}}
{{{end template}}}
Comment 1 Yaron Koren 2008-09-12 00:11:32 UTC
Hi, sorry for the long delay. Is this still an issue?
Comment 2 Yaron Koren 2008-09-19 21:16:42 UTC
I believe that this is fixed in version 1.3.1. Feel free to re-open this bug if it's still not working correctly.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links