diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php
index 595452b583..9cf4eb6a30 100755
--- a/resources/views/users/edit.blade.php
+++ b/resources/views/users/edit.blade.php
@@ -288,6 +288,23 @@
+
+
+ @if (!$user->id)
+
+ @endif
+
@include ('partials.forms.edit.image-upload', ['fieldname' => 'avatar', 'image_path' => app('users_upload_path')])
@@ -685,7 +702,28 @@
$(document).ready(function() {
+ // 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