2016-09-13 22:31:07 +08:00
|
|
|
<div class="row">
|
2016-10-24 16:53:59 +08:00
|
|
|
<div class="col-xs-12 col-md-4">
|
2016-12-20 06:51:15 +08:00
|
|
|
<label>{{ 'field.label' | translate}}</label>
|
2016-09-13 22:31:07 +08:00
|
|
|
<input type="text" ng-model="new_custom_field.label">
|
|
|
|
</div>
|
2016-10-24 16:53:59 +08:00
|
|
|
|
|
|
|
<div class="col-xs-10 col-md-6 field-value">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
2016-12-20 06:51:15 +08:00
|
|
|
<label>{{ 'field.value' | translate}}</label>
|
2016-10-24 16:53:59 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-8 valueInput">
|
2017-01-16 20:13:54 +08:00
|
|
|
<input type="text" ng-model="new_custom_field.value" ng-show="new_custom_field.field_type === 'text'">
|
|
|
|
<password-gen ng-model="new_custom_field.value" ng-show="new_custom_field.field_type ==='password'"
|
2016-10-24 16:53:59 +08:00
|
|
|
settings="{generateOnCreate: false }" ></password-gen>
|
2017-01-16 20:13:54 +08:00
|
|
|
<span ng-show="new_custom_field.field_type ==='file'">
|
2016-10-24 16:53:59 +08:00
|
|
|
<input id="custom_field_file" class="inputfile" type="file" file-select success="addFileToCustomField" error="fileLoadError" progress="fileSelectProgress">
|
2016-12-20 06:51:15 +08:00
|
|
|
<label for="custom_field_file"><i class="fa fa-upload" aria-hidden="true"></i> {{ new_custom_field.value.filename || 'select.file' | translate}}</label>
|
2016-10-24 16:53:59 +08:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-4 selectType">
|
2016-12-28 23:20:45 +08:00
|
|
|
<select class="form-control" ng-model="new_custom_field.field_type">
|
2016-12-20 06:51:15 +08:00
|
|
|
<option value="text">{{ 'text' | translate}}</option>
|
|
|
|
<option value="password">{{ 'password' | translate}}</option>
|
|
|
|
<option value="file">{{ 'file' | translate}}</option>
|
2016-10-24 16:53:59 +08:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
2016-12-28 23:20:45 +08:00
|
|
|
<ng-password-meter ng-if="new_custom_field.field_type ==='password'"
|
2016-10-24 16:53:59 +08:00
|
|
|
password="new_custom_field.value"></ng-password-meter>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-09-13 22:31:07 +08:00
|
|
|
</div>
|
2016-10-24 16:53:59 +08:00
|
|
|
<div class="col-xs-2 col-md-2">
|
2016-12-20 06:51:15 +08:00
|
|
|
<label class="invisible">{{'add' | translate}}</label>
|
2016-09-13 22:31:07 +08:00
|
|
|
<button ng-click="addCustomField()">+</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row custom_fields" ng-if="storedCredential.custom_fields.length > 0">
|
2016-09-14 05:03:12 +08:00
|
|
|
<div class="col-xs-12 table">
|
2016-09-13 22:31:07 +08:00
|
|
|
<table>
|
|
|
|
<thead>
|
2016-09-14 21:09:55 +08:00
|
|
|
<tr use-theme>
|
2016-10-24 16:53:59 +08:00
|
|
|
<td class="dragger"></td>
|
2016-12-20 06:51:15 +08:00
|
|
|
<th class="field_label">{{ 'label' | translate}}</th>
|
|
|
|
<th class="field_value">{{ 'value' | translate}}</th>
|
|
|
|
<th class="field_secret">{{ 'type' | translate}}</th>
|
|
|
|
<th class="field_actions">{{ 'actions' | translate}}</th>
|
2016-09-13 22:31:07 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2016-10-24 16:53:59 +08:00
|
|
|
<tbody ui-sortable ng-model="storedCredential.custom_fields">
|
2016-09-13 22:31:07 +08:00
|
|
|
<tr ng-repeat="field in storedCredential.custom_fields">
|
2016-10-24 16:53:59 +08:00
|
|
|
<td class="dragger">
|
|
|
|
<i class="fa fa-arrows-v"></i>
|
|
|
|
</td>
|
2016-09-13 22:31:07 +08:00
|
|
|
<td>
|
2016-09-14 05:03:12 +08:00
|
|
|
<a href="#" editable-text="field.label">{{ field.label || "empty" }}</a>
|
2016-09-13 22:31:07 +08:00
|
|
|
</td>
|
|
|
|
<td>
|
2016-12-20 06:51:15 +08:00
|
|
|
<span ng-if="field.field_type === 'text'"><a href="#" editable-text="field.value">{{ field.value || 'empty' | translate }}</a></span>
|
2016-10-24 16:53:59 +08:00
|
|
|
<span ng-if="field.field_type === 'password'"><a href="#" editable-password="field.value"><span ng-repeat="n in [] | range:field.value.length">*</span></a></span>
|
|
|
|
<span ng-if="field.field_type === 'file'">{{field.value.filename}} ({{field.value.size | bytes}})</span>
|
2016-09-13 22:31:07 +08:00
|
|
|
</td>
|
2016-10-24 16:53:59 +08:00
|
|
|
<td>{{ field.field_type }}</td>
|
2016-09-13 22:31:07 +08:00
|
|
|
<td class="field_actions">
|
2016-09-14 05:03:12 +08:00
|
|
|
<i class="fa fa-trash" ng-click="deleteCustomField(field)"></i>
|
2016-09-13 22:31:07 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
2016-10-24 16:53:59 +08:00
|
|
|
</tbody>
|
2016-09-13 22:31:07 +08:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|