From fb1b6755a9ecd43601dc4fbef9166d11d8a86f24 Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Tue, 14 Oct 2014 16:25:10 +0000
Subject: [PATCH] #2021 config - Added application Metadata management

---
 securis/src/main/resources/static/admin.html |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/securis/src/main/resources/static/admin.html b/securis/src/main/resources/static/admin.html
index bc71148..37c07ef 100644
--- a/securis/src/main/resources/static/admin.html
+++ b/securis/src/main/resources/static/admin.html
@@ -58,6 +58,36 @@
 									<select chosen multiple ng-switch-when="multiselect" class="form-control" ng-required="field.mandatory" ng-model="formu[field.name]"
 										ng-options="o.id as o.label for o in refs[field.name]" data-placeholder="...">
 									</select>
+									<div ng-switch-when="metadata" >
+										<table class="table table-hover table-condensed">
+										<thead>
+											<tr>
+												<th i18n >Key</th>
+												<th i18n >Value</th>
+												<th i18n >Mandatory</th>
+												<th ng-if="field.allow_creation"><span ng-click="createMetadataRow()" id="md_add" class="btn btn-success btn-xs glyphicon glyphicon-plus"></span></th>
+											</tr>
+										</thead>
+										<tbody>
+											<tr ng-repeat="row_md in formu['metadata']" >
+											  <td><input type="text" id="md_key" name="md_key" placeholder="" ng-readonly="!field.allow_creation"
+													class="form-control" ng-model="row_md['key']" ng-required="true" ng-maxlength="150" />
+											  </td>
+											  <td>
+												<input type="text" id="md_value" name="md_value" placeholder=""
+													class="form-control" ng-model="row_md['value']" ng-required="false" ng-maxlength="150" />
+											  </td>
+											  <td>
+												<input type="checkbox" id="md_mandatory" name="md_mandatory"
+													class="form-control" ng-model="row_md['mandatory']" />
+											  </td>
+											  <td ng-if="field.allow_creation">											  
+											  <span ng-click="removeMetadataKey(row_md)" id="md_delete" class="btn btn-danger btn-xs glyphicon glyphicon-trash"></span>
+											  </td>
+ 										    </tr>
+										</tbody>
+										</table>				
+									</div>
 									
 									
 								</div>

--
Gitblit v1.3.2