FIX Update requirements paths to match webpack dists

This commit is contained in:
Robbie Averill 2017-08-23 09:27:12 +12:00
parent 12aad64972
commit d90d54186e
4 changed files with 5 additions and 4 deletions

View File

@ -67,7 +67,7 @@ class UserFormFieldEditorExtension extends DataExtension
public function getFieldEditorGrid()
{
$module = ModuleLoader::getModule('silverstripe/userforms');
Requirements::javascript($module->getRelativeResourcePath('javascript/FieldEditor.js'));
Requirements::javascript($module->getRelativeResourcePath('client/dist/js/userforms-cms.js'));
$fields = $this->owner->Fields();

View File

@ -175,7 +175,7 @@ class EmailRecipient extends DataObject
public function getCMSFields()
{
Requirements::javascript(
ModuleLoader::getModule('silverstripe/userforms')->getRelativeResourcePath('javascript/Recipient.js')
ModuleLoader::getModule('silverstripe/userforms')->getRelativeResourcePath('client/dist/js/userforms-cms.js')
);
// Determine optional field values

View File

@ -179,7 +179,8 @@ class UserDefinedForm extends Page
public function getCMSFields()
{
Requirements::css(
ModuleLoader::getModule('silverstripe/userforms')->getRelativeResourcePath('css/UserForm_cms.css')
ModuleLoader::getModule('silverstripe/userforms')
->getRelativeResourcePath('client/dist/styles/userforms-cms.css')
);
$this->beforeUpdateCMSFields(function ($fields) {

View File

@ -58,7 +58,7 @@ class UserDefinedFormController extends PageController
Requirements::javascript(
$userforms->getRelativeResourcePath('client/thirdparty/jquery-validate/jquery.validate.min.js')
);
Requirements::add_i18n_javascript($userforms->getRelativeResourcePath('javascript/lang'));
Requirements::add_i18n_javascript($userforms->getRelativeResourcePath('client/lang'));
Requirements::javascript($userforms->getRelativeResourcePath('client/dist/js/userforms.js'));
$this->addUserFormsValidatei18n($userforms);