cacert-testmgr/external/ZendFramework-1.9.5/externals/dojo/demos/form/demo.html

166 lines
5.9 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Dojo Form Widgets Test</title>
<link rel="stylesheet" href="demo.css">
<script type="text/javascript" src="../../dojo/dojo.js" charset="utf-8" djConfig="parseOnLoad: true"></script>
<script type="text/javascript" src="src.js" charset="utf-8"></script>
</head>
<body class="tundra">
<div dojoType="dojo.data.ItemFileReadStore" jsId="stateStore"
url="states.json"></div>
<h2 class="pageSubContentTitle">Job Application Form</h2>
<p>This is just a little demo of dijit's form widgets</p>
<form dojoType="dijit.form.Form" id="myForm"
onsubmit="alert('Execute form w/values:\n'+dojo.toJson(this.getValues(),true));return confirm('Show form values in the URL?')">
<div class="formQuestion">
<span class="noticeMessage">
As you type in the text below, notice how your input is auto
corrected and also the auto completion on the state field.
</span>
<span>Name And Address</span>
</div>
<div class="formAnswer">
<label class="firstLabel" for="name">Name *</label>
<input type="text" id="name" name="name" class="medium"
dojoType="dijit.form.ValidationTextBox"
required="true"
ucfirst="true" invalidMessage=""/>
<br>
<label class="firstLabel" for="address">Address *</label>
<input type="text" id="address" name="address" class="long"
dojoType="dijit.form.ValidationTextBox"
required="true"
trim="true"
ucfirst="true" />
<br>
<label class="firstLabel" for="city">City *</label>
<select dojoType="dijit.form.ComboBox"
value=""
autocomplete="true"
hasDownArrow="false"
>
<option></option>
<option>Chicago</option>
<option>Los Angeles</option>
<option>New York</option>
<option>San Francisco</option>
<option>Seattle</option>
</select>
<label class="secondLabel" for="state">State</label>
<input dojoType="dijit.form.FilteringSelect"
store="stateStore" class="medium" id="state" name="state" />
<label class="secondLabel" for="zip">Zip *</label>
<input type="text" id="zip" name="zip" class="short"
dojoType="dijit.form.ValidationTextBox"
trim="true"
required="true"
regExp="[0-9][0-9][0-9][0-9][0-9]"
invalidMessage="5 digit zipcode (ex: 23245)"/>
<br>
<label class="firstLabel" for="dob">DOB *</label>
<input id="dob" name="dateOfBirth" dojoType="dijit.form.DateTextBox" required=true/>
</div>
<div class="formQuestion">
<span class="noticeMessage">Custom checkboxes and radio buttons...</span>
<span>Desired position</span>
</div>
<div class="formAnswer">
<label class="firstLabel" for="position">Position</label>
<fieldset id="position" class="dijitInline">
<input type="checkBox" name="position" id="it" value="it" dojoType="dijit.form.CheckBox" /> <label for="it">IT</label>
<input type="checkBox" name="position" id="marketing" value="marketing" dojoType="dijit.form.CheckBox" /> <label for="marketing">Marketing</label>
<input type="checkBox" name="position" id="business" value="business" dojoType="dijit.form.CheckBox" /> <label for="business" style="margin-right: 7em;">Business</label>
</fieldset>
<label class="secondLabel" for="hours">Hours</label>
<fieldset id="hours" class="dijitInline">
<input type="radio" name="hours" id="full" value="full" dojoType="dijit.form.RadioButton" /> <label for="full">Full time</label>
<input type="radio" name="hours" id="part" value="part" dojoType="dijit.form.RadioButton" /> <label for="part">Part time</label>
</fieldset>
</div>
<div class="formQuestion">
<span class="noticeMessage">slider and spinner ...</span>
<span>Education and Experience</span>
</div>
<div class="formAnswer">
<table class="dijitReset">
<tr>
<td>
<label class="firstLabel" for="school">Education level</label>
</td>
<td style="padding-left: 2em;">
<div dojoType="dijit.form.HorizontalSlider" id="school" name="school"
minimum="1"
value="2"
maximum="4"
discreteValues="4"
showButtons="false"
style="width:200px; height: 40px;"
>
<span dojoType="dijit.form.HorizontalRule" container="bottomDecoration" count=4 style="height:5px;"></span>
<ol dojoType="dijit.form.HorizontalRuleLabels" container="bottomDecoration"style="height:1em;font-size:75%;color:gray;">
<li>high school</li>
<li>college</li>
<li>masters</li>
<li>PhD</li>
</ol>
</div>
</td>
<td>
<label class="secondLabel" for="experience">Work experience (years, 0-40)</label>
</td>
<td>
<input dojoType="dijit.form.NumberSpinner"
id="experience" name="experience" class="short"
value="1"
constraints="{min: 0, max:40, places:0}"
size=3>
</td>
</tr>
</table>
</div>
<div class="formQuestion">
<span class="noticeMessage">Rich text editor that expands as you type in text</span>
<label for="description">Self description</label>
</div>
<div class="formAnswer">
<textarea dojoType="dijit.Editor" extraPlugins="['|', 'formatBlock']" minHeight="5em" id="description" name="description">
Write a brief summary of &lt;i&gt;your&lt;/i&gt; job skills... using &lt;b&gt;rich&lt;/b&gt; text.
</textarea>
</div>
<div class="formQuestion">
<span class="noticeMessage">Text area that expands as you type in text</span>
<label for="references">References</label>
</div>
<div class="formAnswer">
<textarea dojoType="dijit.form.Textarea" id="references" name="references">
Write your references here (plain text)
</textarea>
</div>
<center>
<button dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconSave" type=submit>
OK
</button>
</center>
</form>
</body>
</html>