add part of customer form in customer admin template
This commit is contained in:
@@ -62,7 +62,7 @@ class CustomerCreation extends BaseForm
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank()
|
||||
),
|
||||
"label_for" => array(
|
||||
"label_attr" => array(
|
||||
"for" => "address"
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Street Address")
|
||||
@@ -79,6 +79,12 @@ class CustomerCreation extends BaseForm
|
||||
"for" => "address3"
|
||||
)
|
||||
))
|
||||
->add("company", "text", array(
|
||||
"label" => Translator::getInstance()->trans("Company name"),
|
||||
"label_attr" => array(
|
||||
"for" => "company"
|
||||
)
|
||||
))
|
||||
->add("phone", "text", array(
|
||||
"label" => Translator::getInstance()->trans("Phone"),
|
||||
"label_attr" => array(
|
||||
@@ -172,7 +178,10 @@ class CustomerCreation extends BaseForm
|
||||
array($this, "verifyPasswordField")
|
||||
)))
|
||||
),
|
||||
"label" => "password confirmation"
|
||||
"label" => "Password confirmation",
|
||||
"label_attr" => array(
|
||||
"for" => "password_confirmation"
|
||||
)
|
||||
))
|
||||
|
||||
;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<h1 id="main-label" class="page-header">{intl l="Create New Account"}</h1>
|
||||
{form name="thelia.customer.creation"}
|
||||
<form id="form-register" class="form-horizontal" action="" method="post" role="form">
|
||||
<form id="form-register" class="form-horizontal" action="{url path="/customer/create"}" method="post" role="form">
|
||||
|
||||
<fieldset id="register-info" class="panel panel">
|
||||
<div class="panel-heading">
|
||||
@@ -26,49 +26,77 @@
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="form-group group-firstname has-success">
|
||||
<label class="control-label" for="firstname">First Name: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="firstname" id="firstname" class="form-control" placeholder="John" autofocus required>
|
||||
<span class="help-block"><i class="icon-ok"></i> Available input!</span>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-lastname has-error">
|
||||
<label class="control-label " for="lastname">Last Name: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="lastname" id="lastname" class="form-control" placeholder="Doe" required>
|
||||
<span class="help-block"><i class="icon-remove"></i> Invalid input!</span>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
{form_field form=$form field="email"}
|
||||
<div class="form-group group-email">
|
||||
{form_field form=$form field="firstname"}
|
||||
<div class="form-group group-firstname {if $error}has-error{else if $value != "" && !$error}has_success{/if}">
|
||||
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="email" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="johndoe@domain.com" required value="">
|
||||
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="John" value="{$value}" autofocus required>
|
||||
{if $error }
|
||||
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
|
||||
{elseif $value != "" && !$error}
|
||||
<span class="help-block"><i class="icon-ok"></i></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
{/form_field}
|
||||
|
||||
<div class="form-group group-phone">
|
||||
<label class="control-label" for="phone">Telephone: <span class="required">*</span></label>
|
||||
{form_field form=$form field="lastname"}
|
||||
<div class="form-group group-lastname {if $error}has-error{else if $value != "" && !$error}has_success{/if}">
|
||||
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="John" value="{$value}" autofocus required>
|
||||
{if $error }
|
||||
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
|
||||
{elseif $value != "" && !$error}
|
||||
<span class="help-block"><i class="icon-ok"></i></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
{/form_field}
|
||||
{form_field form=$form field="email"}
|
||||
<div class="form-group group-email {if $error}has-error{else if $value != "" && !$error}has_success{/if}">
|
||||
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="tel" name="phone" id="phone" class="form-control" placeholder="(01) 02 03 04 05 " required>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-fax">
|
||||
<label class="control-label" for="fax">Fax: </label>
|
||||
<div class="control-input">
|
||||
<input type="tel" name="fax" id="fax" class="form-control" placeholder="(01) 02 03 04 05 ">
|
||||
<input type="email" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="johndoe@domain.com" required value="{$smarty.get.email|default:$value}">
|
||||
{if $error }
|
||||
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
|
||||
{elseif $value != "" && !$error}
|
||||
<span class="help-block"><i class="icon-ok"></i></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
{/form_field}
|
||||
{form_field form=$form field="phone"}
|
||||
<div class="form-group group-phone {if $error}has-error{else if $value != "" && !$error}has_success{/if}">
|
||||
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="John" value="{$value}" autofocus>
|
||||
{if $error }
|
||||
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
|
||||
{elseif $value != "" && !$error}
|
||||
<span class="help-block"><i class="icon-ok"></i></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
{/form_field}
|
||||
{form_field form=$form field="cellphone"}
|
||||
<div class="form-group group-cellphone {if $error}has-error{else if $value != "" && !$error}has_success{/if}">
|
||||
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="John" value="{$value}" autofocus>
|
||||
{if $error }
|
||||
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
|
||||
{elseif $value != "" && !$error}
|
||||
<span class="help-block"><i class="icon-ok"></i></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
{/form_field}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="register-delivery" class="panel">
|
||||
<div class="panel-heading">
|
||||
2. Delivery Informations
|
||||
2. {intl l="Delivery Informations"}
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
Reference in New Issue
Block a user