PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 1ms

/SampleApplication/ColdBox3/views/artist/form.cfm

http://github.com/bobsilverberg/ValidateThisColdBoxPlugin
ColdFusion | 67 lines | 64 code | 3 blank | 0 comment | 0 complexity | 8a10ad60d72d96410492dde5b79fe3cb MD5 | raw file
 1<cfoutput>
 2<h1>User Maintain</h1>
 3
 4<cfif rc.ValidationResult.hasErrors()>
 5	<div class="messagebox">
 6		The following problems were found with your form submission:
 7		<ul>
 8			<cfloop array="#rc.ValidationResult.getFailures()#" index="failure">
 9				<li>#failure.Message#</li>
10			</cfloop>
11		</ul>
12	</div>
13</cfif>
14
15<form action="#Event.BuildLink( 'artist.save' )#" method="post">
16	<table>
17		<tr>
18			<th>Firstname <cfif StructKeyExists( rc.RequiredFields, "firstname" )><span class="required">*</span></cfif></th>
19			<td><input type="text" name="firstname" id="firstname" value="#HtmlEditFormat( rc.Artist.getFirstname() )#" /> <cfif rc.ValidationResult.hasErrors( "firstname" )>Error!</cfif></td>
20		</tr>
21		<tr>
22			<th>Surname <cfif StructKeyExists( rc.RequiredFields, "lastname" )><span class="required">*</span></cfif></th>
23			<td><input type="text" name="lastname" id="lastname" value="#HtmlEditFormat( rc.Artist.getLastname() )#" /> <cfif rc.ValidationResult.hasErrors( "lastname" )>Error!</cfif></td>
24		</tr>
25		<tr>
26			<th>Address <cfif StructKeyExists( rc.RequiredFields, "address" )><span class="required">*</span></cfif></th>
27			<td><input type="text" name="address" id="address" value="#HtmlEditFormat( rc.Artist.getAddress() )#" /> <cfif rc.ValidationResult.hasErrors( "address" )>Error!</cfif></td>
28		</tr>
29		<tr>
30			<th>City <cfif StructKeyExists( rc.RequiredFields, "city" )><span class="required">*</span></cfif></th>
31			<td><input type="text" name="city" id="city" value="#HtmlEditFormat( rc.Artist.getCity() )#" /> <cfif rc.ValidationResult.hasErrors( "city" )>Error!</cfif></td>
32		</tr>
33		<tr>
34			<th>State <cfif StructKeyExists( rc.RequiredFields, "state" )><span class="required">*</span></cfif></th>
35			<td><input type="text" name="state" id="state" value="#HtmlEditFormat( rc.Artist.getState() )#" /> <cfif rc.ValidationResult.hasErrors( "state" )>Error!</cfif></td>
36		</tr>
37		<tr>
38			<th>PostalCode <cfif StructKeyExists( rc.RequiredFields, "postalcode" )><span class="required">*</span></cfif></th>
39			<td><input type="text" name="postalcode" id="postalcode" value="#HtmlEditFormat( rc.Artist.getPostalCode() )#" /> <cfif rc.ValidationResult.hasErrors( "postalcode" )>Error!</cfif></td>
40		</tr>
41		<tr>
42			<th>Email <cfif StructKeyExists( rc.RequiredFields, "email" )><span class="required">*</span></cfif></th>
43			<td><input type="text" name="email" id="email" value="#HtmlEditFormat( rc.Artist.getEmail() )#" /> <cfif rc.ValidationResult.hasErrors( "email" )>Error!</cfif></td>
44		</tr>
45		<tr>
46			<th>Phone <cfif StructKeyExists( rc.RequiredFields, "phone" )><span class="required">*</span></cfif></th>
47			<td><input type="text" name="phone" id="phone" value="#HtmlEditFormat( rc.Artist.getPhone() )#" /> <cfif rc.ValidationResult.hasErrors( "phone" )>Error!</cfif></td>
48		</tr>
49		<tr>
50			<th <cfif rc.ValidationResult.hasErrors( "fax" )>Error!</cfif>>Fax <cfif StructKeyExists( rc.RequiredFields, "fax" )><span class="required">*</span></cfif></th>
51			<td><input type="text" name="fax" id="fax" value="#HtmlEditFormat( rc.Artist.getFax() )#" /></td>
52		</tr>
53		<tr>
54			<th>Password <cfif StructKeyExists( rc.RequiredFields, "password" )><span class="required">*</span></cfif></th>
55			<td><input type="text" name="password" id="password" value="#HtmlEditFormat( rc.Artist.getPassword() )#" /> <cfif rc.ValidationResult.hasErrors( "password" )>Error!</cfif></td>
56		</tr>
57		<tr>
58			<th>&nbsp;</th>
59			<td>
60				<input type="submit" name="save" id="save" value="save" />
61				<input type="hidden" name="entityid" id="entityid" value="#HtmlEditFormat( rc.Artist.getArtistId() )#" />
62			</td>
63		</tr>
64	</table>
65</form>
66
67</cfoutput>