Modifying the labels in the login boxes
Permalink
Hi,
I'm trying to modify the "Username" and "Password" text in the login boxes on the login page and can't seem to find where to change this. Can anyone point me in the right direction?
Thanks,
btroyi
I'm trying to modify the "Username" and "Password" text in the login boxes on the login page and can't seem to find where to change this. Can anyone point me in the right direction?
Thanks,
btroyi
Thank you for answering, but I looked at the login single page code before posting and cannot find the source of the text in the login boxes. Is it a javascript? And if so where is it located? I need to change what shows in the boxes to be in compliance with another system.
Thanks,
btroyi
Thanks,
btroyi
@wwwbtroyi
I updated the instructions.
I updated the instructions.
Do I need to modify the login.php page to get it to see the override? Here is the code that shows in the form.php (which doesn't show the same line you show in your example, however there is a similar line) and the single page login.php.
form.php original:
login.php original:
My assumption is that I need to modify this line to point concrete to the override:
Thank you for your help
wwwbtroyi
form.php original:
<?php defined('C5_EXECUTE') or die('Access denied.'); $form = Core::make('helper/form'); /** @var Concrete\Core\Form\Service\Form $form */ ?> <form method="post" action="<?php echo URL::to('/login', 'authenticate', $this->getAuthenticationTypeHandle()) ?>"> <div class="form-group"> <input name="uName" class="form-control col-sm-12" placeholder="<?php echo Config::get('concrete.user.registration.email_registration') ? t('Email Address') : t('Username')?>" autofocus="autofocus" /> </div> <div class="form-group"> <label> </label> <input name="uPassword" class="form-control" type="password" placeholder="<?php echo t('Password')?>" /> </div> <div class="checkbox"> <label style="font-weight:normal"> <input type="checkbox" name="uMaintainLogin" value="1">
Viewing 15 lines of 35 lines. View entire code block.
login.php original:
<?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); }
Viewing 15 lines of 198 lines. View entire code block.
My assumption is that I need to modify this line to point concrete to the override:
$form = Loader::helper('form');
Thank you for your help
wwwbtroyi
@wwwbtroyi
Since you needed to modify the text inside the login form itself, and not the login page, I updated the override instructions.
Since you needed to modify the text inside the login form itself, and not the login page, I updated the override instructions.
Trying to do this from a package... thought maybe <package>/authentication or <package>/application/authentication might work but no joy.
Can this be done?
Can this be done?
To customize the login form labels, you need to override the login form:
- copy form.php
concrete\authentication\concrete\form.php
- paste form.php into application\authentication\concrete
application\authentication\concrete\form.php
- this line contains the "Username" text
- this line contains the "Password" text