質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
concrete5

concrete5は、Webサーバー上でホームページが作成できるソフトです。手軽で直感的に操作することができる上、PHP/MySQLなどで動くCMS(コンテンツ管理システム)のメリットも兼ね備えています。

Webサイト

一つのドメイン上に存在するWebページの集合体をWebサイトと呼びます。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

Q&A

解決済

1回答

1799閲覧

concrete5のログイン画面に表示される「パスワード再発行」を削除したい。

katekin

総合スコア10

concrete5

concrete5は、Webサーバー上でホームページが作成できるソフトです。手軽で直感的に操作することができる上、PHP/MySQLなどで動くCMS(コンテンツ管理システム)のメリットも兼ね備えています。

Webサイト

一つのドメイン上に存在するWebページの集合体をWebサイトと呼びます。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

0グッド

0クリップ

投稿2018/11/26 04:14

前提・実現したいこと

concrete5で作った会員サイトのログイン画面に表示される「パスワード再発行」をタグを削除したい。

会員サイトを制作しているのですが、複数名の方がログインされることもあり、パスワード再発行のタグを消したいと思っています。
イメージ説明

上記、画像の赤枠の部分です。

現在は、concreteフォルダ内single_pagesページフォルダのlogin.phpに、CSSでdisplay: none;として該当ボタンを消しているのですが、可能であれば、ブラウザでソースを見た際もわからないよう削除したいと考えています。

login.phpを探しても、それらしいコードは見当たらず
どこのファイルを変更すればよいかわからず困っております。

login.phpのソースが以下になります。h1の表記の変更などはこちらのファイルで対応することができました。

何卒、ご教示のほど、よろしくお願いいたします。

login.phpのソース(CSS部分のみ消しております。)

<?php use Concrete\Core\Attribute\Key\Key; use Concrete\Core\Http\ResponseAssetGroup; defined('C5_EXECUTE') or die('Access denied.'); $r = ResponseAssetGroup::get(); $r->requireAsset('javascript', 'underscore'); $r->requireAsset('javascript', 'core/events'); $form = Loader::helper('form'); if (isset($authType) && $authType) { $active = $authType; $activeAuths = array($authType); } else { $active = null; $activeAuths = AuthenticationType::getList(true, true); } if (!isset($authTypeElement)) { $authTypeElement = null; } if (!isset($authTypeParams)) { $authTypeParams = null; } $image = date('Ymd') . '.jpg'; /* @var Key[] $required_attributes */ $attribute_mode = (isset($required_attributes) && count($required_attributes)); ?> <div class="login-page">
<?php $disclaimer = new Area('Disclaimer'); if ($disclaimer->getTotalBlocksInArea($c) || $c->isEditMode()) { ?> <div class="ccm-login-disclaimer"> <?=$disclaimer->display($c);?> </div> <?php } ?> <div class="col-sm-6 col-sm-offset-3"> <h1><?= !$attribute_mode ? t('Sign In') : t('Required Attributes') ?></h1> </div> <div class="col-sm-6 col-sm-offset-3 login-form"> <div class="row"> <div class="visible-xs ccm-authentication-type-select form-group text-center"> <?php if ($attribute_mode) { ?> <i class="fa fa-question"></i> <span><?= t('Attributes') ?></span> <?php } elseif (count($activeAuths) > 1) { ?> <select class="form-control col-xs-12"> <?php foreach ($activeAuths as $auth) { ?> <option value="<?= $auth->getAuthenticationTypeHandle() ?>"> <?= $auth->getAuthenticationTypeDisplayName() ?> </option> <?php } ?> </select> <?php } ?> <label>&nbsp;</label> </div> </div> <div class="row login-row"> <div <?php if (count($activeAuths) < 2) { ?>style="display: none" <?php

} ?> class="types col-sm-4 hidden-xs">
<ul class="auth-types">
<?php if ($attribute_mode) { ?>
<li data-handle="required_attributes">
<i class="fa fa-question"></i>
<span><?= t('Attributes') ?></span>
</li>
<?php

} else { /** @var AuthenticationType[] $activeAuths */ foreach ($activeAuths as $auth) { ?> <li data-handle="<?= $auth->getAuthenticationTypeHandle() ?>"> <?= $auth->getAuthenticationTypeIconHTML() ?> <span><?= $auth->getAuthenticationTypeDisplayName() ?></span> </li> <?php } } ?> </ul> </div> <div class="controls <?php if (count($activeAuths) < 2) { ?>col-sm-12<?php

} else {
?>col-sm-8<?php } ?> col-xs-12">
<?php if ($attribute_mode) { $attribute_helper = new Concrete\Core\Form\Service\Widget\Attribute(); ?>
<form action="<?= View::action('fill_attributes') ?>" method="POST">
<div data-handle="required_attributes" class="authentication-type authentication-type-required-attributes">
<div class="ccm-required-attribute-form" style="height:340px;overflow:auto;margin-bottom:20px;">
<?php foreach ($required_attributes as $key) { echo $attribute_helper->display($key, true); } ?>
</div>
<div class="form-group">
<button class="btn btn-primary pull-right"><?= t('Submit') ?></button>
</div>

</div> </form> <?php } else { /** @var AuthenticationType[] $activeAuths */ foreach ($activeAuths as $auth) { ?> <div data-handle="<?= $auth->getAuthenticationTypeHandle() ?>" class="authentication-type authentication-type-<?= $auth->getAuthenticationTypeHandle() ?>"> <?php $auth->renderForm($authTypeElement ?: 'form', $authTypeParams ?: array()) ?> </div> <?php } } ?> </div> </div> </div> <div style="clear:both"></div> <script type="text/javascript"> (function ($) { "use strict"; var forms = $('div.controls').find('div.authentication-type').hide(), select = $('div.ccm-authentication-type-select > select'); var types = $('ul.auth-types > li').each(function () { var me = $(this), form = forms.filter('[data-handle="' + me.data('handle') + '"]'); me.click(function () { select.val(me.data('handle')); if (typeof Concrete !== 'undefined') { Concrete.event.fire('AuthenticationTypeSelected', me.data('handle')); } if (form.hasClass('active')) return; types.removeClass('active'); me.addClass('active'); if (forms.filter('.active').length) { forms.stop().filter('.active').removeClass('active').fadeOut(250, function () { form.addClass('active').fadeIn(250); }); } else { form.addClass('active').show(); } }); }); select.change(function() { types.filter('[data-handle="' + $(this).val() + '"]').click(); }); types.first().click(); $('ul.nav.nav-tabs > li > a').on('click', function () { var me = $(this); if (me.parent().hasClass('active')) return false; $('ul.nav.nav-tabs > li.active').removeClass('active'); var at = me.attr('data-authType'); me.parent().addClass('active'); $('div.authTypes > div').hide().filter('[data-authType="' + at + '"]').show(); return false; }); <?php if (isset($lastAuthType)) { ?> $("ul.auth-types > li[data-handle='<?= $lastAuthType->getAuthenticationTypeHandle() ?>']") .trigger("click"); <?php } ?> })(jQuery); </script>
</div>

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

どのように探したのかわかりませんが....

CMS のソースコードを改変するのであれば、まず、構造を理解しましょう。

ソースコードを眺めた感じでは、form.php

<div class="form-group"> <button class="btn btn-primary"><?= t('Log in') ?></button> <a href="<?= URL::to('/login', 'concrete', 'forgot_password')?>" class="btn pull-right"><?= t('Forgot Password') ?></a> </div>

の部分が、ログインボタンとリンクでしょうね。

投稿2018/11/26 06:47

CHERRY

総合スコア25171

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問