1

I am trying to overwrite the form.php file for the 'concrete' authentification type. I can make it work if I place the form.php file in the /application/authentication/concrete directory, but not from within my theme package directory.

<?php 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 endforeach; ?>

If I try to load another form (by replacing the second parameter in the renderForm method) nothing happens.

Any ideas how to make c5 aware of the override?

Jakob Fuchs
  • 386
  • 2
  • 4
  • 12

1 Answers1

1

You can't. I have developed a package that needed to do that and it can't be overridden from a package. You have to do it from the application directory.

My package has an "install" option that copies the modified form from the package's directory to the application one.

Nour Akalay
  • 429
  • 3
  • 4
  • Yes I know it sucks. If it's ok to say, why do you need to override the form? – Nour Akalay Jan 03 '17 at 01:09
  • The styling needed to be highly customized and I prefer having a clean view and not having to reset all the BS styles. Also had to replace the labels with icons which is hard to pull off without JS – Jakob Fuchs Jan 03 '17 at 02:33
  • Since we are already chatting here, do you have any idea why, if I put a login.php file in my theme directory it doesn't use my theme's view.php file as any single page should and instead I have to include my header and footer manually? – Jakob Fuchs Jan 03 '17 at 02:43
  • For system single pages you have to "declare" their use of your theme as explained here: http://documentation.concrete5.org/developers/designing-for-concrete5/applying-your-theme-to-single-pages-with-theme-paths – Nour Akalay Jan 04 '17 at 06:38