Created
October 1, 2013 06:04
-
-
Save franzgranlund/6774441 to your computer and use it in GitHub Desktop.
Bootstrap 3 Play Framework Field Constructor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@(elements: views.html.helper.FieldElements) | |
<div class="form-group @elements.args.get('_class) @if(elements.hasErrors) {has-error}" id="@elements.args.get('_id).getOrElse(elements.id + "_field")"> | |
<label for="@elements.id" class="col-lg-2 control-label">@elements.label(elements.lang)</label> | |
<div class="col-lg-10"> | |
@elements.input | |
@if(!elements.errors.isEmpty) { | |
<span class="help-inline">@elements.errors(elements.lang).mkString(", ")</span> | |
} else { | |
<span class="help-block">@elements.infos(elements.lang).mkString(", ")</span> | |
} | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It doesn't add the
form-control
class