hide/delete "Create Account" link 来自 Meteor 注册实用程序
hide/delete "Create Account" link from Meteor signup utility
如何从 Meteor 帐户实用程序中隐藏或永久删除 "Create Account" link?
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
accounts-password@1.3.6
下面是图片。
要隐藏 "Create Account" 按钮,您可以使用(在服务器上):
Accounts.config({forbidClientAccountCreation: true});
不过,这只会在客户端禁止它,如here所述。
Documentation on AccountsCommon.config
.
已添加:
另一个选项是使用 CSS:
隐藏它
#login-other-options { display: none !important; }
如何从 Meteor 帐户实用程序中隐藏或永久删除 "Create Account" link?
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
accounts-password@1.3.6
下面是图片。
要隐藏 "Create Account" 按钮,您可以使用(在服务器上):
Accounts.config({forbidClientAccountCreation: true});
不过,这只会在客户端禁止它,如here所述。
Documentation on AccountsCommon.config
.
已添加:
另一个选项是使用 CSS:
隐藏它#login-other-options { display: none !important; }