create creation account form

This commit is contained in:
Manuel Raynaud
2013-07-01 16:16:24 +02:00
parent 6e29294418
commit 62a3dc3074
3 changed files with 41 additions and 39 deletions

View File

@@ -37,26 +37,34 @@ class CustomerCreation extends BaseForm
->add("firstname", "text", array(
"constraints" => array(
new Constraints\NotBlank()
)
),
"label" => "firstname"
))
->add("lastname", "text", array(
"constraints" => array(
new Constraints\NotBlank()
)
),
"label" => "lastname"
))
->add("email", "email", array(
"constraints" => array(
new Constraints\NotBlank(),
new Constraints\Email()
)
),
"label" => "email"
))
->add("address1", "text", array(
"constraints" => array(
new Constraints\NotBlank()
)
),
"label" => "address"
))
->add("address2", "text", array(
"label" => "Address Line 2"
))
->add("address3", "text", array(
"label" => "Address Line 3"
))
->add("address2", "text")
->add("address3", "text")
->add("zipcode", "text", array(
"constraints" => array(
new Constraints\NotBlank()

View File

@@ -0,0 +1,27 @@
{include file="includes/header.html"}
{form name="thelia.customer.creation"}
<form method="post" action="index_dev.php?action=createCustomer" {form_enctype form=$form} >
{form_field_hidden form=$form}
{form_field form=$form.firstname}
{form_error form=$form.firstname}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" {$attr} >
{/form_field}
{form_field form=$form.lastname}
{form_error form=$form.lastname}
{$message}
{/form_error}
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" {$attr} >
{/form_field}
<input type="submit" value="valider">
</form>
{/form}
{include file="includes/footer.html"}

View File

@@ -7,41 +7,8 @@ An image from asset directory :
<div>
{intl l='An internationalized string'}
</div>
{form name="thelia.customer.creation"}
<form method="post" action="index_dev.php?action=createCustomer" {form_enctype form=$form} >
{form_field_hidden form=$form}
{form_field form=$form.email}
{form_error form=$form.email}
{$message}
{/form_error}
{intl l="{$label}"} : <input type="text" name="{$name}" {$attr} >
{/form_field}
{form_field form=$form.name}
{intl l='name'} : <input type="text" name="{$name}" >
{/form_field}
{form_field form=$form.age}
{intl l='age'} : <input type="text" name="{$name}">
{/form_field}
<input type="submit" value="valider">
</form>
{/form}
<br />
{form name="thelia.admin_login"}
<form method="post" action="#" {form_enctype form=$form} >
{form_field_hidden form=$form}
{form_field form=$form.username}
username : <input type="text" name="{$name}" {$attr}>
{/form_field}
{form_field form=$form.password}
password : <input type="password" name="{$name}" {$attr}>
{/form_field}
</form>
{/form}
<div>
jQuery data: <span id="jquery_block"></span>
</div>