Skip to content

A free open source IT asset/license management system

hide encryption option for checkbox and radio

spencerrlonggaf06b1cd06fb
diff --git a/resources/views/custom_fields/fields/edit.blade.php b/resources/views/custom_fields/fields/edit.blade.php
index 504b556faa..fa869bc372 100644
--- a/resources/views/custom_fields/fields/edit.blade.php
+++ b/resources/views/custom_fields/fields/edit.blade.php
@@ -135,7 +135,7 @@
@if (!$field->id)
<!-- Encrypted -->
- <div class="col-md-9 col-md-offset-3">
+ <div class="col-md-9 col-md-offset-3" id="encryption_section">
<label class="form-control">
<input type="checkbox" value="1" name="field_encrypted" id="field_encrypted"{{ (Request::old('field_encrypted') || $field->field_encrypted) ? ' checked="checked"' : '' }}>
{{ trans('admin/custom_fields/general.encrypt_field') }}
@@ -146,7 +146,6 @@
<p><i class="fas fa-exclamation-triangle" aria-hidden="true"></i> {{ trans('admin/custom_fields/general.encrypt_field_help') }}</p>
</div>
</div>
-
@endif
@@ -302,11 +301,21 @@
$(this).find("option:selected").each(function(){
if (($(this).attr("value")!="text") && ($(this).attr("value")!="textarea")){
$("#field_values_text").show();
+ if ($(this).attr("value") == "checkbox" || $(this).attr("value") == "radio") {
+ $("#encryption_section").hide();
+ }
} else{
+ $("#encryption_section").show();
$("#field_values_text").hide();
}
});
}).change();
+ // $(".field_element").change(function(){
+ // $(this).find("option:selected").each(function(){
+ // if
+ // })
+ // })
+
});