Merge pull request #7368 from open-sausages/pulls/4.0/fix-bad-requirement

BUG Incorrect path for requirements file
This commit is contained in:
Daniel Hensby 2017-09-12 11:10:40 +01:00 committed by GitHub
commit c7c0ee39f1
2 changed files with 4 additions and 6 deletions

View File

@ -3,11 +3,10 @@
namespace SilverStripe\Security;
use SilverStripe\Admin\AdminRootController;
use SilverStripe\Admin\LeftAndMain;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Admin\LeftAndMain;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\Session;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Manifest\ModuleLoader;
use SilverStripe\ORM\FieldType\DBField;
@ -22,7 +21,6 @@ class CMSSecurity extends Security
{
private static $allowed_actions = array(
'login',
'LoginForm',
'success'
);
@ -43,8 +41,8 @@ class CMSSecurity extends Security
// Core styles / vendor scripts
$admin = ModuleLoader::getModule('silverstripe/admin');
Requirements::javascript($admin->getResourcePath('client/dist/js/vendor.js'));
Requirements::css($admin->getResourcePath('client/dist/styles/bundle.css'));
Requirements::javascript($admin->getRelativeResourcePath('client/dist/js/vendor.js'));
Requirements::css($admin->getRelativeResourcePath('client/dist/styles/bundle.css'));
}
public function login($request = null, $service = Authenticator::CMS_LOGIN)

View File

@ -99,7 +99,7 @@ class CMSMemberLoginForm extends MemberLoginForm
LiteralField::create(
'forgotPassword',
sprintf(
'<p class="cms-security__container__form__forgotPassword"><a href="%s" target="_top">%s</a></p>',
'<a href="%s" class="cms-security__container__form__forgotPassword btn btn-secondary" target="_top">%s</a>',
$this->getExternalLink('lostpassword'),
_t(__CLASS__.'.BUTTONFORGOTPASSWORD', "Forgot password")
)