Remove email credentials chexkbox

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-07-15 14:08:36 +01:00
parent 2be343ea1c
commit b9834231f3

View File

@@ -250,26 +250,7 @@
{!! $errors->first('email', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
<!-- Email user -->
@if (!$user->id)
<div class="form-group" id="email_user_row">
<div class="col-md-8 col-md-offset-3">
<label class="form-control form-control--disabled">
<input type="checkbox" name="email_user" value="1" id="email_user_checkbox" @checked(old('email_user')) aria-label="email_user">
{{ trans('admin/users/general.email_user_creds_on_create') }}
</label>
<p class="help-block"> {{ trans('admin/users/general.send_email_help') }}</p>
</div>
</div> <!--/form-group-->
@endif
@include ('partials.forms.edit.image-upload', ['fieldname' => 'avatar', 'image_path' => app('users_upload_path')])
@@ -617,39 +598,8 @@
$(document).ready(function() {
// If the "user can login" check box is checked, show them the ability to email the user credentials
$("#activated").change(function() {
if (this.checked) {
$("#email_user_row").show();
} else {
$("#email_user_row").hide();
}
});
// Set some defaults
$('#email_user_checkbox').prop("disabled", true);
$('#email_user_checkbox').prop("checked", false);
$("#email_user_checkbox").removeAttr('checked');
// If the email address is longer than 5 characters, enable the "send email" checkbox
$('#email').on('keyup',function(){
//event.preventDefault();
@if (!config('app.lock_passwords'))
if (this.value.length > 5){
$('#email_user_checkbox').prop("disabled", false);
$("#email_user_checkbox").parent().removeClass("form-control--disabled");
} else {
$('#email_user_checkbox').prop("disabled", true);
$('#email_user_checkbox').prop("checked", false);
$("#email_user_checkbox").parent().addClass("form-control--disabled");
}
@endif
});
// Check/Uncheck all radio buttons in the group
$('tr.header-row input:radio').change(function() {