mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
hide encryption option for checkbox and radio
This commit is contained in:
parent
ad0f873ece
commit
af06b1cd06
|
@ -135,7 +135,7 @@
|
||||||
|
|
||||||
@if (!$field->id)
|
@if (!$field->id)
|
||||||
<!-- Encrypted -->
|
<!-- 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">
|
<label class="form-control">
|
||||||
<input type="checkbox" value="1" name="field_encrypted" id="field_encrypted"{{ (Request::old('field_encrypted') || $field->field_encrypted) ? ' checked="checked"' : '' }}>
|
<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') }}
|
{{ 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>
|
<p><i class="fas fa-exclamation-triangle" aria-hidden="true"></i> {{ trans('admin/custom_fields/general.encrypt_field_help') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -302,11 +301,21 @@
|
||||||
$(this).find("option:selected").each(function(){
|
$(this).find("option:selected").each(function(){
|
||||||
if (($(this).attr("value")!="text") && ($(this).attr("value")!="textarea")){
|
if (($(this).attr("value")!="text") && ($(this).attr("value")!="textarea")){
|
||||||
$("#field_values_text").show();
|
$("#field_values_text").show();
|
||||||
|
if ($(this).attr("value") == "checkbox" || $(this).attr("value") == "radio") {
|
||||||
|
$("#encryption_section").hide();
|
||||||
|
}
|
||||||
} else{
|
} else{
|
||||||
|
$("#encryption_section").show();
|
||||||
$("#field_values_text").hide();
|
$("#field_values_text").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).change();
|
}).change();
|
||||||
|
// $(".field_element").change(function(){
|
||||||
|
// $(this).find("option:selected").each(function(){
|
||||||
|
// if
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue