-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditar.template
26 lines (25 loc) · 1.02 KB
/
editar.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// template for add form view
<div ng-controller="Editar{{entity.name|capitalize}}Ctrl">
<div class="jumbotron text-center">
<h2>{{'{{'}} title {{'}}'}}</h2>
<hr>
<p>{{'{{'}} message {{'}}'}}</p>
<form name="{{entity.name}}Form" class="form-horizontal" ng-init="load(id)">
{% for property in entity.properties %}
<div class="form-group">
<label for="{{property.name}}" class="col-sm-2 control-label">{{property.name|capitalize}}</label>
<div class="col-sm-10">
<input name="{{property.name}}" type="text" ng-model="{{entity.name}}.{{property.name}}" class="form-control"/>
</div>
</div>
{% endfor %}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit" ng-click="cancel()" value="Cancelar" class="btn btn-primary"/>
<input type="submit" ng-click="edit(id)" value="Guardar" class="btn btn-success"/>
</div>
</div>
</form>
<pre>{{entity.name|capitalize}} = {{ '{{' }}{{entity.name}}{{ '}}' }} | json}}</pre>
</div>
</div>