2017-09-26 47 views
2

如何隐藏或永久删除流星账户工具中的“创建账户”链接?隐藏/删除流星注册工具中的“创建账户”链接

它的HTML代码如下;

<div class="dropdown-menu"> 
    <input id="login-username" type="text" placeholder="Username" class="form-control"> 
    <input id="login-password" type="password" placeholder="Password" class="form-control"> 

    <button class="btn btn-primary col-xs-12 col-sm-12" id="login-buttons-password" type="button"> 
     Sign in 
    </button> 

    <div id="login-other-options"> 
    <a id="signup-link" class="pull-right">Create account</a> 
    </div> 
</div> 

我使用的代码$("#login-other-options").remove();它适用于Chrome,但不适用于Firefox。那么任何通用技术?

我安装了下面的软件包。

ian:accounts-ui-bootstrap-3 
[email protected] 

下面是图像。

enter image description here

+0

是否'$( “#注册链接”),删除();'的工作? – charlesreid1

+0

@ charlesreid1:不适用于Firefox。 –

回答

0

要隐藏 “创建帐户” 按钮,您可以使用(在服务器上):

Accounts.config({forbidClientAccountCreation: true}); 

虽然,这将禁止它仅在客户端,作为解释here

Documentation on AccountsCommon.config

新增

另一种选择将只是隐藏它使用CSS:

#login-other-options { display: none !important; } 
+0

错误:Accounts.ui.config:无效的键:forbidClientAccountCreation –

+0

@AnkurSoni对不起,修复我的答案。应该有'AccountsCommon'来代替。 – Styx

+0

我想我没有那个包。它说'未捕获的ReferenceError:AccountsCommon未定义' –