-1
I have this command that checks the database and checks if the user is locked, in case it shows an error message, if it is not locked it continues the normal execution. What I’m wanting is when it checks change the error message to a box, that when the user clicks the login button and if it is locked will appear this box.
Follow the code of the "box":
<div id="mod-danger" tabindex="-1" role="dialog" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" data-dismiss="modal" aria-hidden="true" class="close"><span class="mdi mdi-close"></span></button>
</div>
<div class="modal-body">
<div class="text-center">
<div class="text-danger"><span class="modal-main-icon mdi mdi-close-circle-o"></span></div>
<h3>Atenção!</h3>
<p><h1>Usuario Bloqueado</h1><br><h2>PorFavor contatar algum adm para resolver.</h2></p>
<div class="xs-mt-50">
</div>
</div>
</div>
<div class="modal-footer"></div>
</div>
</div>
</div>
and I want to put that div in that function where it checks the lock
public function bloqueado(){
$model = self::findByUsuLogin($this->usu_login);
if ($model->usu_block){
$this->addError('usu_login', "Usuario Bloqueado, por favor entrar em contato com algum adm.");
return false;
}else{
return true;
}
}
want to change the error mensg that appears that is to that screen with the error mensg
If anyone can help me I’d be grateful.
Sorry friend, I did not understand your question very well, can you explain a little better??? thanks.
– Thiago Silva
you said to make echo to appear this box in case I want that box I put in the example and the first code just put it in echo would be this?
– andre fidelis
Oops, I read your comment and that’s right, because once the function is called it will call the modal and show as it wants.
– Thiago Silva
Uai, exchange message line by
$("#mod-danger").modal('show');
– user60252
Mark the answer as accepted, see https://i.stack.Imgur.com/jx7Ts.png and because https://pt.meta.stackoverflow.com/questions/1078/como-e-por-que-aceitar-uma-resposta/1079#1079
– user60252