File: D:/HostingSpaces/SBogers84/zuiderbos.nl/workbench/komma/kms/src/views/attributes/password.blade.php
<div class="entity-attribute entity-attribute-password{{{ count($attribute->errors) == 0 ? '' : ' error' }}} {{{$attribute->class}}} @if( !in_array(\Auth::user()->get()->user_role, $attribute->roles) ) hidden @endif photo " id="kms-password_{{$attribute->key}}" data-uk-tooltip="{pos:'bottom-right'}" title="{{{ $attribute->errors[0] or '' }}}">
{{ Form::label($attribute->key, $attribute->label) }}
@if(! $attribute->section->isCreatingEntity())
<div class="password-enabler">
<a href="#">{{Config::get('kms::'.$lang.'/translations.changePassword')}}</a>
</div>
@endif
<div class="password-field">
{{ Form::password($attribute->key, ['placeholder' => $attribute->placeholder]) }}
</div>
@if(! $attribute->section->isCreatingEntity())
<script>
$(function(){
var $passwordEnabler = $('#kms-password_{{$attribute->key}} .password-enabler');
var $passwordField = $('#kms-password_{{$attribute->key}} .password-field');
// The password input field needs to be removed, so it won't be saved when it hasn't changed
var passwordFieldInner = $('#kms-password_{{$attribute->key}} .password-field').html();
$('#kms-password_{{$attribute->key}} .password-field').html('');
// Show the password field
$('#kms-password_{{$attribute->key}} .password-enabler a').click(function(){
$('#kms-password_{{$attribute->key}} .password-enabler').css('display', 'none');
$('#kms-password_{{$attribute->key}} .password-field').css('display', 'block');
$('#kms-password_{{$attribute->key}} .password-field').html(passwordFieldInner);
// Hide the password field if empty on blur
$('#kms-password_{{$attribute->key}} .password-field input').blur(function(){
if(! $(this).val()){
$('#kms-password_{{$attribute->key}} .password-enabler').css('display', 'block');
$('#kms-password_{{$attribute->key}} .password-field').css('display', 'none');
$('#kms-password_{{$attribute->key}} .password-field').html('');
}
});
$('#kms-password_{{$attribute->key}} .password-field input').focus();
});
});
</script>
@endif
</div>