Segundo o meu código abaixo, quando clico no botão Ver senha
na web está fazendo um GET
quando na verdade quero apenas que mostre o campo senha. O que pode estar de errado?
$('.passwordShowLabel').hide();
$('#passwordShow').hide();
$('#password').removeAttr("required");
$('#confirmPassword').removeAttr("required");
$('#btnPasswordEditDesistir').hide();
var checkbox = $('#chkPassword');
var checked = checkbox.prop("checked");
$('#btnPasswordEdit').click(function() {
$(this).hide();
$('#btnPasswordEditDesistir').show("slow");
$('#passwordSection').show("slow");
$('#password').attr('required', 'true');
$('#confirmPassword').attr('required', 'true');
});
$('#btnPasswordEditDesistir').click(function() {
$(this).hide();
$('#btnPasswordEdit').show("slow");
$('#passwordSection').hide("slow");
$('#password').removeAttr("required");
$('#confirmPassword').removeAttr("required");
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="col-xl-12">
<div class="pull-left">
<button id="btnPasswordEdit" class="btn btn-info">
Editar
</button>
<button id="btnPasswordEditDesistir" class="btn btn-secondary">
Desistir
</button>
<button id="btnPasswordView" class="btn btn-info">
Ver Senha
</button>
</div>
</div>
<div class="form-group">
<label class="passwordShowLabel control-label" for="passwordShow" title="" style="display: none;">Senha atual </label>
<div class="">
<input title="" id="passwordShow" name="object.passwordRoundTripV1" type="text" class="form-control readonly " placeholder="" value="12345678a" style="display: none;" readonly="readonly">
<span class="help-block"> </span>
</div>
</div>
<section id="passwordSection" style="display: none;">
<div class="col-xl-12">
<div class="form-group">
<label class=" control-label" for="password" title="">Senha </label>
<div class="">
<input title="" id="password" name="password" type="password" class="form-control" placeholder="" value="">
<span class="help-block"> </span>
</div>
</div>
<div class="form-group">
<label class=" control-label" for="confirmPassword" title="">Confirmar senha </label>
<div class="">
<input title="" id="confirmPassword" name="confirmPassword" type="password" class="form-control " placeholder="" value="">
<span class="help-block"> </span>
</div>
</div>
</div>
</section>
<form>
?