@using (Html.BeginForm(null, null, FormMethod.Get, new { name = "recoverForm" }))
{
<fieldset>
<div class="editor-label">
Email Address
</div>
<div class="input-group" ng-class="{'has-error':
IsValid(recoverForm.email.$error)}">
<span class="input-group-addon">@</span>
<input type="email" ng-model="email" name="email" class="form-control" placeholder="Enter Email Address" maxlength="255" required />
</div>
<br /><br />
<p>
<a href="javascript:void(0);" class="btn btn-primary" ng-click="RecoverPassword()">Recover Password</a>
</p>
</fieldset>
}
<script>
....
$scope.IsValid = function (input) {
if (input.required) {
return true;
}
if (input.email) {
return true;
}
return false;
}
....
</script>
No comments:
Post a Comment