Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
joomla登录表单上的警告消息_Joomla_Joomla3.0 - Fatal编程技术网

joomla登录表单上的警告消息

joomla登录表单上的警告消息,joomla,joomla3.0,Joomla,Joomla3.0,我使用了joomla登录表单。但当我提交空表单时,它只显示密码错误消息,而不显示用户名。登录表单代码- <form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form" class="form-inline index-login"> <?php if ($params->get('

我使用了joomla登录表单。但当我提交空表单时,它只显示密码错误消息,而不显示用户名。登录表单代码-

<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form" class="form-inline index-login">
    <?php if ($params->get('pretext')) : ?>
        <div class="pretext">
            <p><?php echo $params->get('pretext'); ?></p>
        </div>
    <?php endif; ?>
        <div class="form-group">
            <?php if (!$params->get('usetext')) : ?>
                <label class="sr-only" for="exampleInputEmail2">Email address</label>                       
                <input id="modlgn-username" type="text" name="username" class="form-control"  placeholder="<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME') ?>" />
            <?php else: ?>
                <input id="modlgn-username" type="text" name="username" class="form-control"  placeholder="<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME') ?>" />
            <?php endif; ?>
            <?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
            <div class="checkbox">
                <label>
                    <input id="modlgn-remember" type="checkbox" name="remember" class="inputbox" value="yes"/><?php echo JText::_('MOD_LOGIN_REMEMBER_ME') ?>
                </label> 
            </div>
            <?php endif; ?>
        </div>
        <div class="form-group">
            <?php if (!$params->get('usetext')) : ?>
            <input id="modlgn-passwd" type="password" name="password" class="form-control" placeholder="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" />
            <?php else: ?>
            <label for="modlgn-passwd"><?php echo JText::_('JGLOBAL_PASSWORD') ?></label>
            <input id="modlgn-passwd" type="password" name="password" class="form-control" placeholder="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" />
                <?php endif; ?>
                <div>
                    <a class="forgot-password" href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>"><?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?></a></div>
            </div>
        <?php if (count($twofactormethods) > 1):?>
        <div id="form-login-secretkey" class="control-group">
            <div class="controls">
                <?php if (!$params->get('usetext')) : ?>
                    <div class="input-prepend input-append">
                        <span class="add-on">
                            <span class="icon-star hasTooltip" title="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>">
                            </span>
                                <label for="modlgn-secretkey" class="element-invisible"><?php echo JText::_('JGLOBAL_SECRETKEY'); ?>
                            </label>
                        </span>
                        <input id="modlgn-secretkey" type="text" name="secretkey" class="input-small" tabindex="0" size="18" placeholder="<?php echo JText::_('JGLOBAL_SECRETKEY') ?>" />
                        <span class="btn width-auto hasTooltip" title="<?php echo JText::_('JGLOBAL_SECRETKEY_HELP'); ?>">
                            <span class="icon-help"></span>
                        </span>
                </div>
                <?php else: ?>
                    <label for="modlgn-secretkey"><?php echo JText::_('JGLOBAL_SECRETKEY') ?></label>
                    <input id="modlgn-secretkey" type="text" name="secretkey" class="input-small" tabindex="0" size="18" placeholder="<?php echo JText::_('JGLOBAL_SECRETKEY') ?>" />
                    <span class="btn width-auto hasTooltip" title="<?php echo JText::_('JGLOBAL_SECRETKEY_HELP'); ?>">
                        <span class="icon-help"></span>
                    </span>
                <?php endif; ?>

            </div>
        </div>
        <?php endif; ?>

        <button type="submit" tabindex="0" name="Submit" class="btn"><?php echo JText::_('JLOGIN') ?></button>
        <?php
            $usersConfig = JComponentHelper::getParams('com_users'); ?>

        <input type="hidden" name="option" value="com_users" />
        <input type="hidden" name="task" value="user.login" />
        <input type="hidden" name="return" value="<?php echo $return; ?>" />
        <?php echo JHtml::_('form.token'); ?>
    <?php if ($params->get('posttext')) : ?>
        <div class="posttext">
            <p><?php echo $params->get('posttext'); ?></p>
        </div>
    <?php endif; ?>
</form>

我正在索引页面上使用简单的joomla登录模块。我想要简单的空用户名消息,但消息仅显示为password@PreetiBisht您必须调试登录模块,因为默认情况下,它没有提供用户名为空警告!登录模块正常,问题是登录表单在用户名之前验证密码。问题在于com_用户登录控制器,您可以对其进行验证,或为登录表单添加第三方jquery验证程序。在第一次检测到错误时,即未填写必填字段时,处理停止。如果您想覆盖字符串(在语言管理器中),这样它就表示您必须同时提供用户名和密码,您可以这样做,但我个人认为这有点侮辱用户。它已经表明这两个字段都是必需的,有多少用户对登录web站点如此缺乏经验,以至于他们认为自己不需要姓名和密码就可以登录?