Skip to content

Commit

Permalink
Changed modal IDs so manager creation modal works on user creation ma…
Browse files Browse the repository at this point in the history
…in page
  • Loading branch information
snipe committed Aug 5, 2020
1 parent 24c4305 commit df17a85
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions resources/views/modals/user.blade.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
{{-- See snipeit_modals.js for what powers this --}}
<script src="/js/pGenerator.jquery.js"></script>


<script nonce="{{ csrf_token() }}">
$(document).ready(function () {
console.log('Fart');
window.setTimeout(function () {
$('#genPassword').pGenerator({
console.log('Dom is ready');
$('#modal-genPassword').pGenerator({
'bind': 'click',
'passwordElement': '#modal-password',
'displayElement': '#generated-password',
'displayElement': '#modal-generated-password',
'passwordLength': 16,
'uppercase': true,
'lowercase': true,
'numbers': true,
'specialChars': true,
'onPasswordGenerated': function (generatedPassword) {
console.log('WTF?');
$('#modal-password_confirmation').val($('#modal-password').val());
}
});
});
}, 1000);
</script>

<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h2 class="modal-title">{{ trans('admin/users/table.createuser') }}</h4>
<h2 class="modal-title">{{ trans('admin/users/table.createuser') }}</h2>
</div>
<div class="modal-body">
<form action="{{ route('api.users.store') }}" onsubmit="return false">
Expand All @@ -47,14 +52,14 @@
<div class="dynamic-form-row">
<div class="col-md-4 col-xs-12"><label for="modal-password">{{ trans('admin/users/table.password') }}:</label></div>
<div class="col-md-8 col-xs-12 required"><input type='password' name="password" id='modal-password' class="form-control">
<a href="#" class="left" id="genPassword">Generate</a>
<a href="#" class="left" id="modal-genPassword">Generate</a>
</div>
</div>

<div class="dynamic-form-row">
<div class="col-md-4 col-xs-12"><label for="modal-password_confirmation">{{ trans('admin/users/table.password_confirm') }}:</label></div>
<div class="col-md-8 col-xs-12 required"><input type='password' name="password_confirmation" id='modal-password_confirmation' class="form-control">
<div id="generated-password"></div>
<div id="modal-generated-password"></div>
</div>
</div>
</form>
Expand Down

0 comments on commit df17a85

Please sign in to comment.