|
288 | 288 |
|
289 | 289 | </div> |
290 | 290 | </div> |
| 291 | + |
| 292 | + <!-- Send welcome email to user --> |
| 293 | + @if (!$user->id) |
| 294 | + <div class="form-group" id="email_user_row"> |
| 295 | + |
| 296 | + <div class="col-md-8 col-md-offset-3"> |
| 297 | + <label class="form-control form-control--disabled"> |
| 298 | + {{ Form::checkbox('send_welcome', '1', old('send_welcome'), ['id' => "email_user_checkbox", 'aria-label'=>'send_welcome']) }} |
| 299 | + {{ trans('general.send_welcome_email_to_users') }} |
| 300 | + </label> |
| 301 | + |
| 302 | + <p class="help-block"> {{ trans('general.send_welcome_email_help') }}</p> |
| 303 | + |
| 304 | + </div> |
| 305 | + </div> <!--/form-group--> |
| 306 | + @endif |
| 307 | + |
291 | 308 |
|
292 | 309 | @include ('partials.forms.edit.image-upload', ['fieldname' => 'avatar', 'image_path' => app('users_upload_path')]) |
293 | 310 |
|
@@ -685,7 +702,28 @@ class="form-control"> |
685 | 702 | $(document).ready(function() { |
686 | 703 |
|
687 | 704 |
|
| 705 | + // Set some defaults |
| 706 | + $('#email_user_checkbox').prop("disabled", true); |
| 707 | + $('#email_user_checkbox').prop("checked", false); |
| 708 | + $("#email_user_checkbox").removeAttr('checked'); |
688 | 709 |
|
| 710 | + // If the email address is longer than 5 characters, enable the "send email" checkbox |
| 711 | + $('#email').on('keyup',function(){ |
| 712 | + //event.preventDefault(); |
| 713 | +
|
| 714 | + @if (!config('app.lock_passwords')) |
| 715 | +
|
| 716 | + if (this.value.length > 5) { |
| 717 | + $('#email_user_checkbox').prop("disabled", false); |
| 718 | + $("#email_user_checkbox").parent().removeClass("form-control--disabled"); |
| 719 | + } else { |
| 720 | + $('#email_user_checkbox').prop("disabled", true); |
| 721 | + $('#email_user_checkbox').prop("checked", false); |
| 722 | + $("#email_user_checkbox").parent().addClass("form-control--disabled"); |
| 723 | + } |
| 724 | +
|
| 725 | + @endif |
| 726 | + }); |
689 | 727 |
|
690 | 728 |
|
691 | 729 | // Check/Uncheck all radio buttons in the group |
|
0 commit comments