<?xml version="1.0" encoding="UTF-8"?>
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<html xmlns:wicket="http://wicket.apache.org" xmlns="http://www.w3.org/1999/html">
<wicket:head>
    <title>Wicket Examples - forminput</title>
</wicket:head>
<body>
    <wicket:extend>
    <form wicket:id="inputForm" class="inputForm">
     <div>
        <wicket:message key="use.locale">Use locale:</wicket:message>
        <select wicket:id="localeSelect"></select>
        <wicket:link><img src="flag.gif" /></wicket:link>
        <a href="#" wicket:id="defaultLocaleLink">[<wicket:message key="default" />]</a>
     </div>
     <p></p>
      <fieldset>
        <legend><wicket:message key="input" /></legend>
        <table id="inputFormTable">
          <tr>
          <td valign="top">
              <label for="stringProperty"><wicket:message key="string" /></label>
              <input wicket:id="stringProperty" id="stringProperty" type="text" size="40"/>
              <label for="integerProperty"><wicket:message key="integer" /></label>
              <input wicket:id="integerProperty" id="integerProperty" type="text" size="40"/>
              <label for="doubleProperty"><wicket:message key="double" /></label>
              <input wicket:id="doubleProperty" id="doubleProperty" type="text" size="40"/>   
              
              <label>ListView</label>             
              <ul>
               <li wicket:id="lines">
                <input type="text" wicket:id="lineEdit" /> 
               </li>
              </ul>
              <label for="booleanProperty"><wicket:message key="boolean" /></label>
              <input wicket:id="booleanProperty" id="booleanProperty" type="checkbox"/>
              <br /><br />
              <span wicket:id="multiply">[multiply]</span>
              = <span wicket:id="multiplyLabel">[result]</span>
          </td>
          <td valign="top">
              
              <label for="integerInRangeProperty"><wicket:message key="value.between.0.and.100" /></label>
              <input wicket:id="integerInRangeProperty" id="integerInRangeProperty" type="text" size="40"/>
              <label for="urlProperty"><wicket:message key="valid.url" /></label>
              <input wicket:id="urlProperty" id="urlProperty" type="text" size="40"/>
              <label for="phoneNumberUS"><wicket:message key="us.phone.number.mask" /></label>
              <input wicket:id="phoneNumberUS" id="phoneNumberUS" type="text" size="40"/>        
              <label for="numberRadioChoice"><wicket:message key="select.a.number" /> (RadioChoice)</label>
              <span valign="top" wicket:id="numberRadioChoice" id="numberRadioChoice">
                <input type="radio">foo</input>
                <input type="radio">bar</input>
              </span>
              <span wicket:id="numbersGroup">
              <label><wicket:message key="select.a.number" /> (RadioGroup)</label>            
                <span wicket:id="numbers">
                    <input type="radio" wicket:id="radio"/><label wicket:id="number" class="display-inline"></label>
                </span>
              </span>
              <span wicket:id="numbersCheckGroup">
              <label><wicket:message key="select.one.or.more.numbers" /> (CheckGroup)</label>             
                <span wicket:id="numbers">
                    <input type="checkbox" wicket:id="check"/><label wicket:id="number" class="display-inline"></label>
                </span>
              </span>
              <label for="siteSelection"><wicket:message key="your.favorite.sites" /></label>
              <select wicket:id="siteSelection" id="siteSelection">
                <option>foo</option>
                <option>bar</option>
              </select>
          </td>
          </tr>
          <tr>
          <td colspan="2">
              <input type="submit" wicket:id="saveButton" value="save" />
              <input type="submit" wicket:id="resetButton" value="reset" />
          </td>
          </tr>
         </table>
      </fieldset>
    </form>

    <h2 class="example-title"><wicket:message key="FormInput.formHierarchyExample"/></h2>

    <form wicket:id="parentForm" class="parent-form">
        <h3><wicket:message key="FormInput.parentForm"/></h3>

        <div class="gap-1">
            <label for="parentText"><wicket:message key="FormInput.parentTextLabel"/></label>
            <input type="text" wicket:id="parentText" id="parentText"/>

            <label for="parentTextarea"><wicket:message key="FormInput.parentTextareaLabel"/></label>
            <textarea wicket:id="parentTextarea" id="parentTextarea"></textarea>

            <input type="submit" wicket:id="parentSubmit" wicket:message="value:FormInput.parentSubmit"/>
        </div>

        <form wicket:id="childForm" class="child-form">
            <h3><wicket:message key="FormInput.childForm"/></h3>

            <div class="gap-1">
                <label for="childText"><wicket:message key="FormInput.childTextLabel"/></label>
                <input type="text" wicket:id="childText" id="childText"/>

                <label for="childTextarea"><wicket:message key="FormInput.childTextareaLabel"/></label>
                <textarea wicket:id="childTextarea" id="childTextarea"></textarea>

                <input type="submit" wicket:id="childSubmit" wicket:message="value:FormInput.childSubmit"/>
            </div>
        </form>

        <div wicket:id="parentFormDataTable" class="parent-data-table">
            <h3><wicket:message key="FormInput.submittedData"/></h3>
            <div class="gap-1">
                <wicket:message key="FormInput.parentTextLabel"/>
                <span wicket:id="parentData"/>
            </div>
            <div class="gap-1">
                <wicket:message key="FormInput.parentTextareaLabel"/>
                <span wicket:id="parentTextarea"/>
            </div>
            <div class="gap-1">
                <wicket:message key="FormInput.childTextLabel"/>
                <span wicket:id="childData"/>
            </div>
            <div class="gap-1">
                <wicket:message key="FormInput.childTextareaLabel"/>
                <span wicket:id="childTextarea"/>
            </div>
        </div>
    </form>

    <div id="feedbackPanel">
        <span wicket:id="feedback"/>
    </div>

</wicket:extend>
</body>
</html>