rsanchez
2014-10-14 fb1b6755a9ecd43601dc4fbef9166d11d8a86f24
securis/src/main/resources/static/admin.html
....@@ -58,6 +58,36 @@
5858 <select chosen multiple ng-switch-when="multiselect" class="form-control" ng-required="field.mandatory" ng-model="formu[field.name]"
5959 ng-options="o.id as o.label for o in refs[field.name]" data-placeholder="...">
6060 </select>
61
+ <div ng-switch-when="metadata" >
62
+ <table class="table table-hover table-condensed">
63
+ <thead>
64
+ <tr>
65
+ <th i18n >Key</th>
66
+ <th i18n >Value</th>
67
+ <th i18n >Mandatory</th>
68
+ <th ng-if="field.allow_creation"><span ng-click="createMetadataRow()" id="md_add" class="btn btn-success btn-xs glyphicon glyphicon-plus"></span></th>
69
+ </tr>
70
+ </thead>
71
+ <tbody>
72
+ <tr ng-repeat="row_md in formu['metadata']" >
73
+ <td><input type="text" id="md_key" name="md_key" placeholder="" ng-readonly="!field.allow_creation"
74
+ class="form-control" ng-model="row_md['key']" ng-required="true" ng-maxlength="150" />
75
+ </td>
76
+ <td>
77
+ <input type="text" id="md_value" name="md_value" placeholder=""
78
+ class="form-control" ng-model="row_md['value']" ng-required="false" ng-maxlength="150" />
79
+ </td>
80
+ <td>
81
+ <input type="checkbox" id="md_mandatory" name="md_mandatory"
82
+ class="form-control" ng-model="row_md['mandatory']" />
83
+ </td>
84
+ <td ng-if="field.allow_creation">
85
+ <span ng-click="removeMetadataKey(row_md)" id="md_delete" class="btn btn-danger btn-xs glyphicon glyphicon-trash"></span>
86
+ </td>
87
+ </tr>
88
+ </tbody>
89
+ </table>
90
+ </div>
6191
6292
6393 </div>