2017-09-26 5 views
2

Meteor Accountsユーティリティから「アカウント作成」リンクを非表示にするか、完全に削除するにはどうすればいいですか?Meteor登録ユーティリティから「アカウント作成」リンクを隠す/削除する

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

は '$( "#サインアップリンク")い(削除;'働く:

別のオプションは、単にCSSを使用してそれを隠すだろうか。? – charlesreid1

+0

@ charlesreid1:Firefoxではありません。 –

答えて

0

(サーバー上の)あなたが使用することができ、 "アカウントを作成" ボタンを非表示にするには:hereが説明したように

Accounts.config({forbidClientAccountCreation: true}); 

けれども、これは、唯一のクライアント側でそれを禁止します。

Documentation on AccountsCommon.config

追加:)

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

エラー:Accounts.ui.config:無効なキー:forbidClientAccountCreation –

+0

@AnkurSoni申し訳ありませんが、私の答えを修正しました。代わりに 'AccountsCommon'が必要です。 – Styx

+0

私はそのパッケージを持っていないと思います。 'Uncaught ReferenceError:AccountsCommon is defined'と書かれています –

関連する問題