Last active
December 31, 2015 17:59
-
-
Save PinkyJie/8023432 to your computer and use it in GitHub Desktop.
template
This file contains 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
<script type="text/template" id="item-template"> | |
<tr> | |
<td><%- id %></td> | |
<td><%- name %></td> | |
<td><%- gender %></td> | |
<td><%- age %></td> | |
<td> | |
<a href="#" title="edit"><i class="icon-edit"></i></a> | |
<a href="#" title="remove"><i class="icon-remove"></i></a> | |
</td> | |
</tr> | |
</script> | |
<script type="text/template" id="form-template"> | |
<form class="form-horizontal"> | |
<div class="control-group"> | |
<label class="control-label" for="input-name">Name:</label> | |
<div class="controls"> | |
<input type="text" id="input-name" name="name" value="<%- name %>" /> | |
</div> | |
</div> | |
<div class="control-group"> | |
<label class="control-label" for="input-gender">Gender:</label> | |
<div class="controls"> | |
<label class="radio inline"> | |
<input type="radio" name="gender" value="boy" | |
<% if(gender === 'boy') {%>checked <% } %> />Boy | |
</label> | |
<label class="radio inline"> | |
<input type="radio" name="gender" value="girl" | |
<% if(gender === 'girl') {%>checked <% } %> />Girl | |
</label> | |
</div> | |
</div> | |
<div class="control-group"> | |
<lable class="control-label" for="input-age">Age:</lable> | |
<div class="controls"> | |
<input type="number" name="age" id="input-age" value="<%- age %>" /> | |
</div> | |
</div> | |
<div class="text-center"> | |
<button type="submit" class="btn">Save</button> | |
</div> | |
</form> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment