Add multiplicators to certain inputs, closes #154

Allows for users to enter `10g` into a memory field and have it
converted to 10GB equivalent in MB.
This commit is contained in:
Dane Everitt 2016-11-26 19:56:19 -05:00
parent 90cd2b677e
commit e47bb6ef0f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 29 additions and 9 deletions

View file

@ -92,14 +92,14 @@
<div class="form-group col-md-6 col-xs-6">
<label for="memory" class="control-label">Total Memory</label>
<div class="input-group">
<input type="text" name="memory" class="form-control" value="{{ old('memory') }}"/>
<input type="text" name="memory" data-multiplicator="true" class="form-control" value="{{ old('memory') }}"/>
<span class="input-group-addon">MB</span>
</div>
</div>
<div class="form-group col-md-6 col-xs-6">
<label for="memory_overallocate" class="control-label">Overallocate</label>
<div class="input-group">
<input type="text" name="memory_overallocate" class="form-control" value="{{ old('memory_overallocate', 0) }}"/>
<input type="text" name="memory_overallocate" data-multiplicator="true" class="form-control" value="{{ old('memory_overallocate', 0) }}"/>
<span class="input-group-addon">%</span>
</div>
</div>

View file

@ -183,7 +183,7 @@
<div class="form-group col-md-3 col-xs-6">
<label for="memory" class="control-label">Total Memory</label>
<div class="input-group">
<input type="text" name="memory" class="form-control" value="{{ old('memory', $node->memory) }}"/>
<input type="text" name="memory" class="form-control" data-multiplicator="true" value="{{ old('memory', $node->memory) }}"/>
<span class="input-group-addon">MB</span>
</div>
</div>
@ -197,7 +197,7 @@
<div class="form-group col-md-3 col-xs-6">
<label for="disk" class="control-label">Disk Space</label>
<div class="input-group">
<input type="text" name="disk" class="form-control" value="{{ old('disk', $node->disk) }}"/>
<input type="text" name="disk" class="form-control" data-multiplicator="true" value="{{ old('disk', $node->disk) }}"/>
<span class="input-group-addon">MB</span>
</div>
</div>