File: D:/HostingSpaces/SBogers10/topswtw.komma.pro/app/storage/views/52e31587e80e8dad073664f83c9bfd5d
<div class="entity-attribute entity-attribute-password<?php echo e(count($attribute->errors) == 0 ? '' : ' error'); ?> <?php echo e($attribute->class); ?>" id="kms-password_<?php echo $attribute->key; ?>" data-uk-tooltip="{pos:'bottom-right'}" title="<?php echo e(isset($attribute->errors[0]) ? $attribute->errors[0] : ''); ?>">
<?php echo Form::label($attribute->key, $attribute->label); ?>
<?php if(! $attribute->section->isCreatingEntity()): ?>
<div class="password-enabler">
<a href="#">Change the password</a>
</div>
<?php endif; ?>
<div class="password-field">
<?php echo Form::password($attribute->key, ['placeholder' => $attribute->placeholder]); ?>
</div>
<?php if(! $attribute->section->isCreatingEntity()): ?>
<script>
$(function(){
var $passwordEnabler = $('#kms-password_<?php echo $attribute->key; ?> .password-enabler');
var $passwordField = $('#kms-password_<?php echo $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_<?php echo $attribute->key; ?> .password-field').html();
$('#kms-password_<?php echo $attribute->key; ?> .password-field').html('');
// Show the password field
$('#kms-password_<?php echo $attribute->key; ?> .password-enabler a').click(function(){
$('#kms-password_<?php echo $attribute->key; ?> .password-enabler').css('display', 'none');
$('#kms-password_<?php echo $attribute->key; ?> .password-field').css('display', 'block');
$('#kms-password_<?php echo $attribute->key; ?> .password-field').html(passwordFieldInner);
// Hide the password field if empty on blur
$('#kms-password_<?php echo $attribute->key; ?> .password-field input').blur(function(){
if(! $(this).val()){
$('#kms-password_<?php echo $attribute->key; ?> .password-enabler').css('display', 'block');
$('#kms-password_<?php echo $attribute->key; ?> .password-field').css('display', 'none');
$('#kms-password_<?php echo $attribute->key; ?> .password-field').html('');
}
});
$('#kms-password_<?php echo $attribute->key; ?> .password-field input').focus();
});
});
</script>
<?php endif; ?>
</div>