mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Changed modal IDs so manager creation modal works on user creation main page
This commit is contained in:
parent
24c43056ba
commit
df17a859bf
|
@ -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');
|
||||
|
||||
$('#genPassword').pGenerator({
|
||||
window.setTimeout(function () {
|
||||
|
||||
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">×</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">
|
||||
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue