admin: add a button to edit the raw flag value instead of the checksum

This commit is contained in:
nemunaire 2019-01-21 13:35:09 +01:00
commit eee2cd6a2f
4 changed files with 46 additions and 18 deletions

View file

@ -126,8 +126,13 @@
</div>
</div>
<div class="row">
<input type="text" id="kvalue{{flag.id}}" ng-model="flag.value" class="col form-control form-control-sm" placeholder="Condensat" ng-if="flag.id" title="Condensat">
<input type="text" id="kflag{{flag.id}}" ng-model="flag.flag" class="col form-control form-control-sm" placeholder="Chaîne brute à valider" ng-if="!flag.id" title="Chaîne brute à valider">
<div class="col input-group" ng-if="flag.id && !flag.show_raw" style="padding:0">
<input type="text" id="kvalue{{flag.id}}" ng-model="flag.value" class="form-control form-control-sm" placeholder="Condensat" title="Condensat">
<div class="input-group-append">
<button class="btn btn-sm btn-outline-secondary" ng-click="changeValue(flag)" title="Cliquez pour éditer la valeur brute du flag, au lieu du checksum" type="button"><span class="glyphicon glyphicon-erase" aria-hidden="true"></span></button>
</div>
</div>
<input type="text" id="kflag{{flag.id}}" ng-model="flag.flag" class="col form-control form-control-sm" placeholder="Chaîne brute à valider" ng-if="!flag.id || flag.show_raw" title="Chaîne brute à valider">
<div class="col-auto custom-control custom-checkbox ml-1">
<input type="checkbox" class="custom-control-input" id="kicase{{flag.id}}" ng-model="flag.ignorecase">
<label class="custom-control-label" for="kicase{{flag.id}}">Ignore case</label>
@ -138,8 +143,8 @@
</div>
</form>
<form ng-submit="testFlag(flag)">
<div class="input-group">
<input type="text" id="ktest{{flag.id}}" ng-model="flag.test_str" class="col form-control form-control-sm" placeholder="Test the flag">
<div class="input-group row">
<input type="text" id="ktest{{flag.id}}" ng-model="flag.test_str" class="form-control form-control-sm" placeholder="Test the flag">
<div class="input-group-append">
<button class="btn btn-sm btn-warning" type="submit"><span class="glyphicon glyphicon-play" aria-hidden="true"></span></button>
</div>