小编Eri*_*rik的帖子

工具提示弹出框内的 Bootstrap 输入字段从输出 html 中删除

您好,我正在使用 boostrap 4.3.1 并包含 popper 1.14.7。

通常我可以在弹出窗口/工具提示的内容中添加输入字段。从什么时候开始我就没有,但是在我将输入字段放入内容的那一刻,只有文本可见。

当我查看源代码(编译后的 html)时,我可以看到 popper 或 bootstrap 删除了输入字段。我有什么问题吗?

    var options = {
        html: true,
        // content: function(){ return $(".amountElec.popup").html();},
        placement: "bottom",
        container: "body"
    };
    
    $(function(){
        $('#manualinput').popover(options);
    })
Run Code Online (Sandbox Code Playgroud)
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>


<div id="manualinput" 
     data-container="body" 
     data-toggle="popover"  
     data-content="test <input name='test' type='text' value='2'>" 
     data-html="true" 
     data-placement="bottom">
     
     OPEN TOOLTUP
</div>
Run Code Online (Sandbox Code Playgroud)

input tooltip popover bootstrap-4

9
推荐指数
2
解决办法
2895
查看次数

Symfony 4 AuthenticationUtils

我正在尝试根据symfony.com的教程创建一个使用symfony 4的用户登录.

我使用了以下代码的基本services.yaml文件.

https://symfony.com/doc/current/security/form_login_setup.html

public function loginAction(Request $request, \Twig_Environment $twigRenderer,AuthenticationUtils $authUtils)
{

    // get the login error if there is one
    $error = $authUtils->getLastAuthenticationError();

    // last username entered by the user
    $lastUsername = $authUtils->getLastUsername();


    return new response($twigRenderer->render('security/login.html.twig', array(
        'last_username' => $lastUsername,
        'error'         => $error,
        )
    ));
}
Run Code Online (Sandbox Code Playgroud)

Errror:

控制器"App\Controller\SecurityController :: loginAction()"要求您为"$ authUtils"参数提供值.参数可以为空,并且没有提供空值,没有提供默认值,或者因为在此之后存在非可选参数.

我不知道如何解决这个问题.有人有建议吗?

php authentication service symfony4

5
推荐指数
1
解决办法
3419
查看次数

标签 统计

authentication ×1

bootstrap-4 ×1

input ×1

php ×1

popover ×1

service ×1

symfony4 ×1

tooltip ×1