Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @(field: Field, label: String = "CHANGEME", optionMap: List[String], help: String = "")
- <div class="form-group @if(field.hasErrors) {has-error}">
- <label class="col-sm-2 control-label" for="@field.id">@label</label>
- <div class="col-sm-10 multi-field-wrapper">
- <div class="multi-fields">
- <div class="multi-field">
- <div class="col-sm-5 gsn-data-input">
- <input type="text"
- class="form-control"
- name="@field.name"
- value="@field.value.getOrElse("")"/>
- </div>
- <div class="col-sm-5">
- <select
- class="form-control"
- name="@field.name-type">
- <option class="blank" value="">Please select a value</option>
- @for((optionName) <- optionMap) {
- <option id="@optionName" value="@optionName">@optionName</option>
- }
- </select>
- </div>
- <button type="button" class="btn btn-default remove-field col-sm-push-10">Delete</button>
- </div>
- </div>
- <span class="help-block">@help</span>
- <span class="help-block">@{field.error.map { error => error.message }}</span>
- <button type="button" class="btn btn-default add-field">Add field</button>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement