Skip to content

Commit

Permalink
[WebUI IntelliHome#7] Modified form for popover add
Browse files Browse the repository at this point in the history
  • Loading branch information
skullbocks committed Aug 19, 2014
1 parent d12280f commit 28c9410
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions assets/templates/components/pins_popover.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,25 @@
<tr class="pin" id="<%= $_->pinid %>">
<td class="pin-pin"><%= $_->pin %></td>
<td class="pin-type"><%= $_->type %></td>
<td><a href="#" class="delete-pin"><span class="glyphicon glyphicon-trash"></span></a></td>
<td><a href="#" class="delete-pin" data-type="pin"><span class="glyphicon glyphicon-trash"></span></a></td>
</tr>
% }
</tbody>
</table>
<div class="form-data-body col-sm-12 hide">
<div class="form-wrapper">
<form class="form-horizontal add-pin-form" role="form" data-gpioid="<%= $gpioid %>">
<input name="new-gpioid" type="hidden" value="<%= $gpioid %>">
<div class="form-group">
<label for="new-pin" class="col-sm-2 control-label">Pin</label>
<div class="col-sm-10">
<input type="text" name="new-pin" placeholder="ex.: 23" class="form-control" id="new-pin">
</div>
</div>
<div class="form-group">
<label for="new-pin-type" class="col-sm-2 control-label">Type</label>
<label for="new-type" class="col-sm-2 control-label">Type</label>
<div class="col-sm-10">
<select class="form-control" name="new-pin-type">
<select class="form-control" name="new-type">
% my @gpio_types=@{stash("gpio_types")} if (defined stash("gpio_types"));
% if (scalar @gpio_types > 0){
% foreach (@gpio_types) {
Expand All @@ -43,7 +44,7 @@
<span class="glyphicon glyphicon-remove"></span>
<span>Close</span>
</button>
<button type="button" class="btn btn-primary modal-add is-popover" data-action="add-pin">
<button type="button" class="btn btn-primary modal-add is-popover" data-action="add_pin">
<i id="add-tag-spinner"></i>
<span>Add Pin</span>
</button>
Expand Down
5 changes: 3 additions & 2 deletions assets/templates/components/tags_popover.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
<div class="form-data-body col-sm-12 hide">
<div class="form-wrapper">
<form class="form-horizontal add-tag-form" role="form" data-gpioid="<%= $gpioid %>">
<input name="new-gpioid" type="hidden" value="<%= $gpioid %>">
<div class="form-group">
<div class="col-sm-12">
<input type="text" name="new-tag" placeholder="Tag Name (ex.: bedroom)" class="form-control" id="new-tag">
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<input type="text" name="new-tag-description" placeholder="Tag Description" class="form-control" id="new-tag-description">
<input type="text" name="new-description" placeholder="Tag Description" class="form-control" id="new-tag-description">
</div>
</div>
</form>
Expand All @@ -34,7 +35,7 @@
<span class="glyphicon glyphicon-remove"></span>
<span>Close</span>
</button>
<button type="button" class="btn btn-primary modal-add is-popover" data-action="add-tag">
<button type="button" class="btn btn-primary modal-add is-popover" data-action="add_tag">
<i id="add-tag-spinner"></i>
<span>Add Tag</span>
</button>
Expand Down

0 comments on commit 28c9410

Please sign in to comment.