diff --git a/_config/html.yml b/_config/html.yml index 72f432228..f44a5dc91 100644 --- a/_config/html.yml +++ b/_config/html.yml @@ -1,5 +1,5 @@ Injector: HTMLValue: class: SS_HTML4Value - HtmlEditorConfig: + HTMLEditorConfig: class: TinyMCEConfig diff --git a/admin/_config.php b/admin/_config.php index 49d50149a..f48f1aeca 100644 --- a/admin/_config.php +++ b/admin/_config.php @@ -1,7 +1,7 @@ setOptions(array( +HTMLEditorConfig::get('cms')->setOptions(array( 'friendly_name' => 'Default CMS', 'priority' => '50', @@ -28,7 +28,7 @@ HtmlEditorConfig::get('cms')->setOptions(array( . "object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]" )); -HtmlEditorConfig::get('cms') +HTMLEditorConfig::get('cms') ->enablePlugins(array( 'contextmenu' => null, 'image' => null, diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index c203e7b12..279a217c8 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -427,12 +427,12 @@ class LeftAndMain extends Controller implements PermissionProvider { // Set the members html editor config if(Member::currentUser()) { - HtmlEditorConfig::set_active_identifier(Member::currentUser()->getHtmlEditorConfigForCMS()); + HTMLEditorConfig::set_active_identifier(Member::currentUser()->getHtmlEditorConfigForCMS()); } // Set default values in the config if missing. These things can't be defined in the config // file because insufficient information exists when that is being processed - $htmlEditorConfig = HtmlEditorConfig::get_active(); + $htmlEditorConfig = HTMLEditorConfig::get_active(); $htmlEditorConfig->setOption('language', i18n::get_tinymce_lang()); if(!$htmlEditorConfig->getOption('content_css')) { $cssFiles = array(); @@ -1564,7 +1564,7 @@ class LeftAndMain extends Controller implements PermissionProvider { * Return the CMS's HTML-editor toolbar */ public function EditorToolbar() { - return HtmlEditorField_Toolbar::create($this, "EditorToolbar"); + return HTMLEditorField_Toolbar::create($this, "EditorToolbar"); } /** diff --git a/forms/HtmlEditorSanitiser.php b/forms/HTMLEditorSanitiser.php similarity index 97% rename from forms/HtmlEditorSanitiser.php rename to forms/HTMLEditorSanitiser.php index 920a750c8..0fd56b3a8 100644 --- a/forms/HtmlEditorSanitiser.php +++ b/forms/HTMLEditorSanitiser.php @@ -10,7 +10,7 @@ * @package forms * @subpackage fields-formattedinput */ -class HtmlEditorSanitiser { +class HTMLEditorSanitiser { /** @var [stdClass] - $element => $rule hash for whitelist element rules where the element name isn't a pattern */ protected $elements = array(); @@ -21,14 +21,14 @@ class HtmlEditorSanitiser { protected $globalAttributes = array(); /** - * Construct a sanitiser from a given HtmlEditorConfig + * Construct a sanitiser from a given HTMLEditorConfig * - * Note that we build data structures from the current state of HtmlEditorConfig - later changes to + * Note that we build data structures from the current state of HTMLEditorConfig - later changes to * the passed instance won't cause this instance to update it's whitelist * - * @param HtmlEditorConfig $config + * @param HTMLEditorConfig $config */ - public function __construct(HtmlEditorConfig $config) { + public function __construct(HTMLEditorConfig $config) { $valid = $config->getOption('valid_elements'); if ($valid) $this->addValidElements($valid); diff --git a/forms/UploadField.php b/forms/UploadField.php index f0178c913..9172115c0 100644 --- a/forms/UploadField.php +++ b/forms/UploadField.php @@ -1601,7 +1601,7 @@ class UploadField_SelectHandler extends RequestHandler { */ protected function getListField($folderID) { // Generate the folder selection field. - $folderField = new TreeDropdownField('ParentID', _t('HtmlEditorField.FOLDER', 'Folder'), 'Folder'); + $folderField = new TreeDropdownField('ParentID', _t('HTMLEditorField.FOLDER', 'Folder'), 'Folder'); $folderField->setValue($folderID); // Generate the file list field. diff --git a/forms/htmleditor/HtmlEditorConfig.php b/forms/htmleditor/HTMLEditorConfig.php similarity index 82% rename from forms/htmleditor/HtmlEditorConfig.php rename to forms/htmleditor/HTMLEditorConfig.php index 6048da64d..ed09fee26 100644 --- a/forms/htmleditor/HtmlEditorConfig.php +++ b/forms/htmleditor/HTMLEditorConfig.php @@ -3,29 +3,29 @@ /** * A PHP version of TinyMCE's configuration, to allow various parameters to be configured on a site or section basis * - * There can be multiple HtmlEditorConfig's, which should always be created / accessed using HtmlEditorConfig::get. + * There can be multiple HTMLEditorConfig's, which should always be created / accessed using HTMLEditorConfig::get. * You can then set the currently active config using set_active. * The order of precendence for which config is used is (lowest to highest): * * - default_config config setting * - Active config assigned - * - Config name assigned to HtmlEditorField - * - Config instance assigned to HtmlEditorField + * - Config name assigned to HTMLEditorField + * - Config instance assigned to HTMLEditorField * * Typically global config changes should set the active config. * - * The defaut config class can be changed via dependency injection to replace HtmlEditorConfig. + * The defaut config class can be changed via dependency injection to replace HTMLEditorConfig. * * @author "Hamish Friedlander" * @package forms * @subpackage fields-formattedinput */ -abstract class HtmlEditorConfig extends Object { +abstract class HTMLEditorConfig extends Object { /** * Array of registered configurations * - * @var HtmlEditorConfig[] + * @var HTMLEditorConfig[] */ protected static $configs = array(); @@ -46,11 +46,11 @@ abstract class HtmlEditorConfig extends Object { private static $default_config = 'default'; /** - * Get the HtmlEditorConfig object for the given identifier. This is a correct way to get an HtmlEditorConfig + * Get the HTMLEditorConfig object for the given identifier. This is a correct way to get an HTMLEditorConfig * instance - do not call 'new' * * @param string $identifier The identifier for the config set. If omitted, the active config is returned. - * @return HtmlEditorConfig The configuration object. + * @return HTMLEditorConfig The configuration object. * This will be created if it does not yet exist for that identifier */ public static function get($identifier = null) { @@ -68,10 +68,10 @@ abstract class HtmlEditorConfig extends Object { * Assign a new config for the given identifier * * @param string $identifier A specific identifier - * @param HtmlEditorConfig $config - * @return HtmlEditorConfig The assigned config + * @param HTMLEditorConfig $config + * @return HTMLEditorConfig The assigned config */ - public static function set_config($identifier, HtmlEditorConfig $config) { + public static function set_config($identifier, HTMLEditorConfig $config) { self::$configs[$identifier] = $config; return $config; } @@ -100,7 +100,7 @@ abstract class HtmlEditorConfig extends Object { /** * Get the currently active configuration object * - * @return HtmlEditorConfig The active configuration object + * @return HTMLEditorConfig The active configuration object */ public static function get_active() { $identifier = self::get_active_identifier(); @@ -110,10 +110,10 @@ abstract class HtmlEditorConfig extends Object { /** * Assigns the currently active config an explicit instance * - * @param HtmlEditorConfig $config - * @return HtmlEditorConfig The given config + * @param HTMLEditorConfig $config + * @return HTMLEditorConfig The given config */ - public static function set_active(HtmlEditorConfig $config) { + public static function set_active(HTMLEditorConfig $config) { $identifier = static::get_active_identifier(); return static::set_config($identifier, $config); } diff --git a/forms/htmleditor/HtmlEditorField.php b/forms/htmleditor/HTMLEditorField.php similarity index 88% rename from forms/htmleditor/HtmlEditorField.php rename to forms/htmleditor/HTMLEditorField.php index a22ef8451..516f94ecb 100644 --- a/forms/htmleditor/HtmlEditorField.php +++ b/forms/htmleditor/HTMLEditorField.php @@ -6,7 +6,7 @@ * @package forms * @subpackage fields-formattedinput */ -class HtmlEditorField extends TextareaField { +class HTMLEditorField extends TextareaField { /** * Use TinyMCE's GZIP compressor @@ -17,7 +17,7 @@ class HtmlEditorField extends TextareaField { private static $use_gzip = true; /** - * Should we check the valid_elements (& extended_valid_elements) rules from HtmlEditorConfig server side? + * Should we check the valid_elements (& extended_valid_elements) rules from HTMLEditorConfig server side? * * @config * @var bool @@ -35,29 +35,29 @@ class HtmlEditorField extends TextareaField { /** * ID or instance of editorconfig * - * @var string|HtmlEditorConfig + * @var string|HTMLEditorConfig */ protected $editorConfig = null; /** - * Gets the HtmlEditorConfig instance + * Gets the HTMLEditorConfig instance * - * @return HtmlEditorConfig + * @return HTMLEditorConfig */ public function getEditorConfig() { // Instance override - if($this->editorConfig instanceof HtmlEditorConfig) { + if($this->editorConfig instanceof HTMLEditorConfig) { return $this->editorConfig; } // Get named / active config - return HtmlEditorConfig::get($this->editorConfig); + return HTMLEditorConfig::get($this->editorConfig); } /** * Assign a new configuration instance or identifier * - * @param string|HtmlEditorConfig $config + * @param string|HTMLEditorConfig $config * @return $this */ public function setEditorConfig($config) { @@ -72,7 +72,7 @@ class HtmlEditorField extends TextareaField { * @param string $name The internal field name, passed to forms. * @param string $title The human-readable field label. * @param mixed $value The value of the field. - * @param string $config HtmlEditorConfig identifier to be used. Default to the active one. + * @param string $config HTMLEditorConfig identifier to be used. Default to the active one. */ public function __construct($name, $title = null, $value = '', $config = null) { parent::__construct($name, $title, $value); @@ -94,14 +94,14 @@ class HtmlEditorField extends TextareaField { public function saveInto(DataObjectInterface $record) { if($record->hasField($this->name) && $record->escapeTypeForField($this->name) != 'xml') { throw new Exception ( - 'HtmlEditorField->saveInto(): This field should save into a HTMLText or HTMLVarchar field.' + 'HTMLEditorField->saveInto(): This field should save into a HTMLText or HTMLVarchar field.' ); } // Sanitise if requested $htmlValue = Injector::inst()->create('HTMLValue', $this->Value()); if($this->config()->sanitise_server_side) { - $santiser = Injector::inst()->create('HtmlEditorSanitiser', HtmlEditorConfig::get_active()); + $santiser = Injector::inst()->create('HTMLEditorSanitiser', HTMLEditorConfig::get_active()); $santiser->sanitise($htmlValue); } @@ -119,10 +119,10 @@ class HtmlEditorField extends TextareaField { } /** - * @return HtmlEditorField_Readonly + * @return HTMLEditorField_Readonly */ public function performReadonlyTransformation() { - $field = $this->castedCopy('HtmlEditorField_Readonly'); + $field = $this->castedCopy('HTMLEditorField_Readonly'); $field->dontEscape = true; return $field; @@ -144,7 +144,7 @@ class HtmlEditorField extends TextareaField { * @package forms * @subpackage fields-formattedinput */ -class HtmlEditorField_Readonly extends ReadonlyField { +class HTMLEditorField_Readonly extends ReadonlyField { public function Field($properties = array()) { $valforInput = $this->value ? Convert::raw2att($this->value) : ""; return "id() . "\">" @@ -163,7 +163,7 @@ class HtmlEditorField_Readonly extends ReadonlyField { * @package forms * @subpackage fields-formattedinput */ -class HtmlEditorField_Toolbar extends RequestHandler { +class HTMLEditorField_Toolbar extends RequestHandler { private static $allowed_actions = array( 'LinkForm', @@ -175,7 +175,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { /** * @var string */ - protected $templateViewFile = 'HtmlEditorField_viewfile'; + protected $templateViewFile = 'HTMLEditorField_viewfile'; protected $controller, $name; @@ -213,7 +213,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { * @return Form */ public function LinkForm() { - $siteTree = TreeDropdownField::create('internal', _t('HtmlEditorField.PAGE', "Page"), + $siteTree = TreeDropdownField::create('internal', _t('HTMLEditorField.PAGE', "Page"), 'SiteTree', 'ID', 'MenuTitle', true); // mimic the SiteTree::getMenuTitle(), which is bypassed when the search is performed $siteTree->setSearchFunction(array($this, 'siteTreeSearchCallback')); @@ -228,35 +228,35 @@ class HtmlEditorField_Toolbar extends RequestHandler { new LiteralField( 'Heading', sprintf('

%s

', - _t('HtmlEditorField.LINK', 'Insert Link')) + _t('HTMLEditorField.LINK', 'Insert Link')) ) ), $contentComposite = new CompositeField( OptionsetField::create( 'LinkType', - sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.LINKTO', 'Link to')), + sprintf($numericLabelTmpl, '1', _t('HTMLEditorField.LINKTO', 'Link to')), array( - 'internal' => _t('HtmlEditorField.LINKINTERNAL', 'Page on the site'), - 'external' => _t('HtmlEditorField.LINKEXTERNAL', 'Another website'), - 'anchor' => _t('HtmlEditorField.LINKANCHOR', 'Anchor on this page'), - 'email' => _t('HtmlEditorField.LINKEMAIL', 'Email address'), - 'file' => _t('HtmlEditorField.LINKFILE', 'Download a file'), + 'internal' => _t('HTMLEditorField.LINKINTERNAL', 'Page on the site'), + 'external' => _t('HTMLEditorField.LINKEXTERNAL', 'Another website'), + 'anchor' => _t('HTMLEditorField.LINKANCHOR', 'Anchor on this page'), + 'email' => _t('HTMLEditorField.LINKEMAIL', 'Email address'), + 'file' => _t('HTMLEditorField.LINKFILE', 'Download a file'), ), 'internal' ), LiteralField::create('Step2', '
' - . sprintf($numericLabelTmpl, '2', _t('HtmlEditorField.DETAILS', 'Details')) . '
' + . sprintf($numericLabelTmpl, '2', _t('HTMLEditorField.DETAILS', 'Details')) . '' ), $siteTree, - TextField::create('external', _t('HtmlEditorField.URL', 'URL'), 'http://'), - EmailField::create('email', _t('HtmlEditorField.EMAIL', 'Email address')), - $fileField = UploadField::create('file', _t('HtmlEditorField.FILE', 'File')), - TextField::create('Anchor', _t('HtmlEditorField.ANCHORVALUE', 'Anchor')), - TextField::create('Subject', _t('HtmlEditorField.SUBJECT', 'Email subject')), - TextField::create('Description', _t('HtmlEditorField.LINKDESCR', 'Link description')), + TextField::create('external', _t('HTMLEditorField.URL', 'URL'), 'http://'), + EmailField::create('email', _t('HTMLEditorField.EMAIL', 'Email address')), + $fileField = UploadField::create('file', _t('HTMLEditorField.FILE', 'File')), + TextField::create('Anchor', _t('HTMLEditorField.ANCHORVALUE', 'Anchor')), + TextField::create('Subject', _t('HTMLEditorField.SUBJECT', 'Email subject')), + TextField::create('Description', _t('HTMLEditorField.LINKDESCR', 'Link description')), CheckboxField::create('TargetBlank', - _t('HtmlEditorField.LINKOPENNEWWIN', 'Open link in a new window?')), + _t('HTMLEditorField.LINKOPENNEWWIN', 'Open link in a new window?')), HiddenField::create('Locale', null, $this->controller->Locale) ) ), @@ -333,13 +333,13 @@ class HtmlEditorField_Toolbar extends RequestHandler { $select->addExtraClass('content-select'); - $URLDescription = _t('HtmlEditorField.URLDESCRIPTION', 'Insert videos and images from the web into your page simply by entering the URL of the file. Make sure you have the rights or permissions before sharing media directly from the web.

Please note that files are not added to the file store of the CMS but embeds the file from its original location, if for some reason the file is no longer available in its original location it will no longer be viewable on this page.'); + $URLDescription = _t('HTMLEditorField.URLDESCRIPTION', 'Insert videos and images from the web into your page simply by entering the URL of the file. Make sure you have the rights or permissions before sharing media directly from the web.

Please note that files are not added to the file store of the CMS but embeds the file from its original location, if for some reason the file is no longer available in its original location it will no longer be viewable on this page.'); $fromWeb = new CompositeField( $description = new LiteralField('URLDescription', '
' . $URLDescription . '
'), $remoteURL = new TextField('RemoteURL', 'http://'), new LiteralField('addURLImage', '') + _t('HTMLEditorField.BUTTONADDURL', 'Add url').'') ); $remoteURL->addExtraClass('remoteurl'); @@ -351,7 +351,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { $computerUploadField->setConfig('previewMaxHeight', 30); $computerUploadField->addExtraClass('ss-assetuploadfield htmleditorfield-from-computer'); $computerUploadField->removeExtraClass('ss-uploadfield'); - $computerUploadField->setTemplate('HtmlEditorField_UploadField'); + $computerUploadField->setTemplate('HTMLEditorField_UploadField'); $computerUploadField->setFolderName(Config::inst()->get('Upload', 'uploads_folder')); $defaultPanel = new CompositeField( @@ -380,9 +380,9 @@ class HtmlEditorField_Toolbar extends RequestHandler { new LiteralField( 'Heading', sprintf('

%s

', - _t('HtmlEditorField.INSERTMEDIA', 'Insert media from')). + _t('HTMLEditorField.INSERTMEDIA', 'Insert media from')). sprintf('

%s

', - _t('HtmlEditorField.UpdateMEDIA', 'Update media')) + _t('HTMLEditorField.UpdateMEDIA', 'Update media')) ) ); @@ -454,7 +454,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { protected function viewfile_getRemoteFileByURL($fileUrl) { if(!Director::is_absolute_url($fileUrl)) { throw $this->getErrorFor(_t( - "HtmlEditorField_Toolbar.ERROR_ABSOLUTE", + "HTMLEditorField_Toolbar.ERROR_ABSOLUTE", "Only absolute urls can be embedded" )); } @@ -462,7 +462,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { $allowed_schemes = self::config()->fileurl_scheme_whitelist; if (!$scheme || ($allowed_schemes && !in_array($scheme, $allowed_schemes))) { throw $this->getErrorFor(_t( - "HtmlEditorField_Toolbar.ERROR_SCHEME", + "HTMLEditorField_Toolbar.ERROR_SCHEME", "This file scheme is not included in the whitelist" )); } @@ -470,7 +470,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { $allowed_domains = self::config()->fileurl_domain_whitelist; if (!$domain || ($allowed_domains && !in_array($domain, $allowed_domains))) { throw $this->getErrorFor(_t( - "HtmlEditorField_Toolbar.ERROR_HOSTNAME", + "HTMLEditorField_Toolbar.ERROR_HOSTNAME", "This file hostname is not included in the whitelist" )); } @@ -510,7 +510,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { } else { // Or we could have been passed nothing, in which case panic throw $this->getErrorFor(_t( - "HtmlEditorField_Toolbar.ERROR_ID", + "HTMLEditorField_Toolbar.ERROR_ID", 'Need either "ID" or "FileURL" parameter to identify the file' )); } @@ -518,7 +518,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { // Validate file exists if(!$url) { throw $this->getErrorFor(_t( - "HtmlEditorField_Toolbar.ERROR_NOTFOUND", + "HTMLEditorField_Toolbar.ERROR_NOTFOUND", 'Unable to find file to view' )); } @@ -530,23 +530,23 @@ class HtmlEditorField_Toolbar extends RequestHandler { switch($fileCategory) { case 'image': case 'image/supported': - $fileWrapper = new HtmlEditorField_Image($url, $file); + $fileWrapper = new HTMLEditorField_Image($url, $file); break; case 'flash': - $fileWrapper = new HtmlEditorField_Flash($url, $file); + $fileWrapper = new HTMLEditorField_Flash($url, $file); break; default: // Only remote files can be linked via o-embed - // {@see HtmlEditorField_Toolbar::getAllowedExtensions()) + // {@see HTMLEditorField_Toolbar::getAllowedExtensions()) if($file) { throw $this->getErrorFor(_t( - "HtmlEditorField_Toolbar.ERROR_OEMBED_REMOTE", + "HTMLEditorField_Toolbar.ERROR_OEMBED_REMOTE", "Oembed is only compatible with remote files" )); } // Other files should fallback to oembed - $fileWrapper = new HtmlEditorField_Embed($url, $file); + $fileWrapper = new HTMLEditorField_Embed($url, $file); break; } @@ -588,14 +588,14 @@ class HtmlEditorField_Toolbar extends RequestHandler { if (!$page->canView()) { throw new SS_HTTPResponse_Exception( _t( - 'HtmlEditorField.ANCHORSCANNOTACCESSPAGE', + 'HTMLEditorField.ANCHORSCANNOTACCESSPAGE', 'You are not permitted to access the content of the target page.' ), 403 ); } - // Similar to the regex found in HtmlEditorField.js / getAnchors method. + // Similar to the regex found in HTMLEditorField.js / getAnchors method. if (preg_match_all( "/\\s+(name|id)\\s*=\\s*([\"'])([^\\2\\s>]*?)\\2|\\s+(name|id)\\s*=\\s*([^\"']+)[\\s +>]/im", $page->Content, @@ -608,7 +608,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { } else { throw new SS_HTTPResponse_Exception( - _t('HtmlEditorField.ANCHORSPAGENOTFOUND', 'Target page not found.'), + _t('HTMLEditorField.ANCHORSPAGENOTFOUND', 'Target page not found.'), 404 ); } @@ -622,10 +622,10 @@ class HtmlEditorField_Toolbar extends RequestHandler { * not the "master record" in the database - hence there's no form or saving logic. * * @param string $url Abolute URL to asset - * @param HtmlEditorField_File $file Asset wrapper + * @param HTMLEditorField_File $file Asset wrapper * @return FieldList */ - protected function getFieldsForFile($url, HtmlEditorField_File $file) { + protected function getFieldsForFile($url, HTMLEditorField_File $file) { $fields = $this->extend('getFieldsForFile', $url, $file); if(!$fields) { $fields = $file->getFields(); @@ -677,7 +677,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { * @package forms * @subpackage fields-formattedinput */ -abstract class HtmlEditorField_File extends ViewableData { +abstract class HTMLEditorField_File extends ViewableData { /** * Default insertion width for Images and Media @@ -758,26 +758,26 @@ abstract class HtmlEditorField_File extends ViewableData { ) ->setName("FilePreview") ->addExtraClass('cms-file-info'), - TextField::create('CaptionText', _t('HtmlEditorField.CAPTIONTEXT', 'Caption text')), + TextField::create('CaptionText', _t('HTMLEditorField.CAPTIONTEXT', 'Caption text')), DropdownField::create( 'CSSClass', - _t('HtmlEditorField.CSSCLASS', 'Alignment / style'), + _t('HTMLEditorField.CSSCLASS', 'Alignment / style'), array( - 'leftAlone' => _t('HtmlEditorField.CSSCLASSLEFTALONE', 'On the left, on its own.'), - 'center' => _t('HtmlEditorField.CSSCLASSCENTER', 'Centered, on its own.'), - 'left' => _t('HtmlEditorField.CSSCLASSLEFT', 'On the left, with text wrapping around.'), - 'right' => _t('HtmlEditorField.CSSCLASSRIGHT', 'On the right, with text wrapping around.') + 'leftAlone' => _t('HTMLEditorField.CSSCLASSLEFTALONE', 'On the left, on its own.'), + 'center' => _t('HTMLEditorField.CSSCLASSCENTER', 'Centered, on its own.'), + 'left' => _t('HTMLEditorField.CSSCLASSLEFT', 'On the left, with text wrapping around.'), + 'right' => _t('HTMLEditorField.CSSCLASSRIGHT', 'On the right, with text wrapping around.') ) ), - FieldGroup::create(_t('HtmlEditorField.IMAGEDIMENSIONS', 'Dimensions'), + FieldGroup::create(_t('HTMLEditorField.IMAGEDIMENSIONS', 'Dimensions'), TextField::create( 'Width', - _t('HtmlEditorField.IMAGEWIDTHPX', 'Width'), + _t('HTMLEditorField.IMAGEWIDTHPX', 'Width'), $this->getInsertWidth() )->setMaxLength(5), TextField::create( 'Height', - " x " . _t('HtmlEditorField.IMAGEHEIGHTPX', 'Height'), + " x " . _t('HTMLEditorField.IMAGEHEIGHTPX', 'Height'), $this->getInsertHeight() )->setMaxLength(5) )->addExtraClass('dimensions last'), @@ -1037,7 +1037,7 @@ abstract class HtmlEditorField_File extends ViewableData { * @package forms * @subpackage fields-formattedinput */ -class HtmlEditorField_Embed extends HtmlEditorField_File { +class HTMLEditorField_Embed extends HTMLEditorField_File { private static $casting = array( 'Type' => 'Varchar', @@ -1059,7 +1059,7 @@ class HtmlEditorField_Embed extends HtmlEditorField_File { $response = $controller->getResponse(); $response->addHeader('X-Status', rawurlencode(_t( - 'HtmlEditorField.URLNOTANOEMBEDRESOURCE', + 'HTMLEditorField.URLNOTANOEMBEDRESOURCE', "The URL '{url}' could not be turned into a media resource.", "The given URL is not a valid Oembed resource; the embed element couldn't be created.", array('url' => $url) @@ -1080,13 +1080,13 @@ class HtmlEditorField_Embed extends HtmlEditorField_File { if($this->Type === 'photo') { $fields->insertBefore('CaptionText', new TextField( 'AltText', - _t('HtmlEditorField.IMAGEALTTEXT', 'Alternative text (alt) - shown if image can\'t be displayed'), + _t('HTMLEditorField.IMAGEALTTEXT', 'Alternative text (alt) - shown if image can\'t be displayed'), $this->Title, 80 )); $fields->insertBefore('CaptionText', new TextField( 'Title', - _t('HtmlEditorField.IMAGETITLE', 'Title text (tooltip) - for additional information about the image') + _t('HTMLEditorField.IMAGETITLE', 'Title text (tooltip) - for additional information about the image') )); } return $fields; @@ -1174,7 +1174,7 @@ class HtmlEditorField_Embed extends HtmlEditorField_File { * @package forms * @subpackage fields-formattedinput */ -class HtmlEditorField_Image extends HtmlEditorField_File { +class HTMLEditorField_Image extends HTMLEditorField_File { /** * @var int @@ -1222,11 +1222,11 @@ class HtmlEditorField_Image extends HtmlEditorField_File { 'CaptionText', TextField::create( 'AltText', - _t('HtmlEditorField.IMAGEALT', 'Alternative text (alt)'), + _t('HTMLEditorField.IMAGEALT', 'Alternative text (alt)'), $this->Title, 80 )->setDescription( - _t('HtmlEditorField.IMAGEALTTEXTDESC', 'Shown to screen readers or if image can\'t be displayed') + _t('HTMLEditorField.IMAGEALTTEXTDESC', 'Shown to screen readers or if image can\'t be displayed') ) ); @@ -1235,9 +1235,9 @@ class HtmlEditorField_Image extends HtmlEditorField_File { 'AltText', TextField::create( 'Title', - _t('HtmlEditorField.IMAGETITLETEXT', 'Title text (tooltip)') + _t('HTMLEditorField.IMAGETITLETEXT', 'Title text (tooltip)') )->setDescription( - _t('HtmlEditorField.IMAGETITLETEXTDESC', 'For additional information about the image') + _t('HTMLEditorField.IMAGETITLETEXTDESC', 'For additional information about the image') ) ); @@ -1366,7 +1366,7 @@ class HtmlEditorField_Image extends HtmlEditorField_File { /** * Generate flash file embed */ -class HtmlEditorField_Flash extends HtmlEditorField_File { +class HTMLEditorField_Flash extends HTMLEditorField_File { public function getFields() { $fields = parent::getFields(); diff --git a/forms/htmleditor/TinyMCEConfig.php b/forms/htmleditor/TinyMCEConfig.php index f65137800..fea517b8e 100644 --- a/forms/htmleditor/TinyMCEConfig.php +++ b/forms/htmleditor/TinyMCEConfig.php @@ -3,7 +3,7 @@ /** * Default configuration for HtmlEditor specific to tinymce */ -class TinyMCEConfig extends HtmlEditorConfig { +class TinyMCEConfig extends HTMLEditorConfig { /** * Location of module relative to BASE_DIR. This must contain the following dirs @@ -440,7 +440,7 @@ class TinyMCEConfig extends HtmlEditorConfig { */ public function getScriptURL() { // If gzip is disabled just return core script url - $useGzip = Config::inst()->get('HtmlEditorField', 'use_gzip'); + $useGzip = Config::inst()->get('HTMLEditorField', 'use_gzip'); if(!$useGzip) { return THIRDPARTY_DIR . '/tinymce/tinymce.min.js'; } diff --git a/lang/af.yml b/lang/af.yml index 9d9c34d26..37a71c4b3 100644 --- a/lang/af.yml +++ b/lang/af.yml @@ -178,7 +178,7 @@ af: Help1: '

Voer een of meer groepe in CSVformaat (komma geskeide waardes). Wys gevorderde gebruike

' ResultDeleted: 'Verwyderde %d groepe' ResultUpdated: '%d Groepe was opgedateer' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Voeg URL by' ANCHORVALUE: Anker BUTTONINSERT: Plaas in diff --git a/lang/ar.yml b/lang/ar.yml index 76e5a78dd..15e9fb8fe 100644 --- a/lang/ar.yml +++ b/lang/ar.yml @@ -237,7 +237,7 @@ ar: ResultUpdated: 'تحديث مجموعات %d ' Hierarchy: InfiniteLoopNotAllowed: 'العثور على حلقة لا نهائية ضمن "{نوع}" التسلسل الهرمي . الرجاء تغيير الأصل لحل هذه' - HtmlEditorField: + HTMLEditorField: ADDURL: 'أضف رابط الموقع URL' ADJUSTDETAILSDIMENSIONS: 'التفاصيل & و الأبعاد' ANCHORVALUE: رابط diff --git a/lang/az.yml b/lang/az.yml index 6b894bffa..f8c42c178 100644 --- a/lang/az.yml +++ b/lang/az.yml @@ -84,7 +84,7 @@ az: Sort: 'Sıralama' has_many_Permissions: Səlahiyyətlər many_many_Members: Üzvlər - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Ankor BUTTONINSERTLINK: 'Link əlavə et' BUTTONREMOVELINK: 'Linki sil' diff --git a/lang/bg.yml b/lang/bg.yml index 8f49ecdd5..b70d20179 100644 --- a/lang/bg.yml +++ b/lang/bg.yml @@ -167,7 +167,7 @@ bg: ResultCreated: 'Бяха създадени {count} група/и' ResultDeleted: 'Бяха изтрити %d групи' ResultUpdated: 'Бяха обновени %d групи' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Добави URL' ADJUSTDETAILSDIMENSIONS: 'Детайли и размери' ANCHORVALUE: Котва diff --git a/lang/bs.yml b/lang/bs.yml index 6fef3709b..8e60cf279 100644 --- a/lang/bs.yml +++ b/lang/bs.yml @@ -80,7 +80,7 @@ bs: NONE: ništa GridFieldDetailForm: Create: Kreiraj - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Sidro BUTTONINSERTLINK: 'Ubaci link' BUTTONREMOVELINK: 'Ukloni link' diff --git a/lang/ca.yml b/lang/ca.yml index eb314caea..240232ab8 100644 --- a/lang/ca.yml +++ b/lang/ca.yml @@ -91,7 +91,7 @@ ca: Sort: 'Ordre' has_many_Permissions: Permisos many_many_Members: Membres - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Ancla BUTTONINSERTLINK: 'Insereix un enllaç' BUTTONREMOVELINK: 'Suprimeix un enllaç' diff --git a/lang/cs.yml b/lang/cs.yml index 6245a3427..2324d0095 100644 --- a/lang/cs.yml +++ b/lang/cs.yml @@ -275,7 +275,7 @@ cs: ResultUpdated: 'Aktualizováno %d skupin' Hierarchy: InfiniteLoopNotAllowed: 'Nekonečná smyčka se nachází v "{type}" hierarchii. Prosím změňte rodiče pro vyřešení tohoto problému' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Přidat URL' ADJUSTDETAILSDIMENSIONS: 'Detaily & rozměry' ANCHORSCANNOTACCESSPAGE: 'Nemáte povolen přístup k obsahu cílové stránky.' diff --git a/lang/de.yml b/lang/de.yml index 6bfc998b4..8da19d3dc 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -274,7 +274,7 @@ de: ResultUpdated: '%d Gruppe(n) aktualisiert' Hierarchy: InfiniteLoopNotAllowed: 'Es wurde eine Endlosschleife innerhalb der "{type}"-Hierarchie gefunden. Bitte ändern Sie die übergeordnete Seite, um den Fehler zu beheben' - HtmlEditorField: + HTMLEditorField: ADDURL: 'URL hinzufügen' ADJUSTDETAILSDIMENSIONS: 'Details & Dimensionen' ANCHORSCANNOTACCESSPAGE: 'Sie haben keine Berechtigungen, den Inhalt dieser Seite zu sehen.' diff --git a/lang/en.yml b/lang/en.yml index e596cf97c..0d3367cc9 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -278,7 +278,7 @@ en: ResultUpdated: 'Updated %d groups' Hierarchy: InfiniteLoopNotAllowed: 'Infinite loop found within the "{type}" hierarchy. Please change the parent to resolve this' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Add URL' ADJUSTDETAILSDIMENSIONS: 'Details & dimensions' ANCHORSCANNOTACCESSPAGE: 'You are not permitted to access the content of the target page.' diff --git a/lang/en_GB.yml b/lang/en_GB.yml index 8518f4957..b353f8db0 100644 --- a/lang/en_GB.yml +++ b/lang/en_GB.yml @@ -11,7 +11,7 @@ en_GB: NOFILESIZE: 'File size is zero bytes.' ForgotPasswordEmail_ss: HELLO: Hello - HtmlEditorField: + HTMLEditorField: CSSCLASSCENTER: 'Centred, on its own.' LINK: 'Link' LeftAndMain: diff --git a/lang/eo.yml b/lang/eo.yml index 0dc9dcd40..059877f6e 100644 --- a/lang/eo.yml +++ b/lang/eo.yml @@ -267,7 +267,7 @@ eo: ResultUpdated: 'Aktualigis %d grupojn' Hierarchy: InfiniteLoopNotAllowed: 'Senfina iteracio troviĝis en la "{type}"-hierarkio. Bonvole ŝanĝu la patron por solvi tion.' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Aldoni je URL' ADJUSTDETAILSDIMENSIONS: 'Detaloj kaj dimensioj' ANCHORSCANNOTACCESSPAGE: 'Vi ne rajtas aliri la enhavon de la cela paĝo.' diff --git a/lang/es.yml b/lang/es.yml index 144c826fe..c1c2f89e5 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -275,7 +275,7 @@ es: ResultUpdated: 'Actualizados grupos %d' Hierarchy: InfiniteLoopNotAllowed: 'Bucle infinito encontrado dentro de la jerarquía "{type}". Por favor, cambie el padre para resolver el problema' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Añadir URL' ADJUSTDETAILSDIMENSIONS: 'Detalles & dimensiones' ANCHORSCANNOTACCESSPAGE: 'No se le permite acceder al contenido de la página destino.' diff --git a/lang/es_AR.yml b/lang/es_AR.yml index ba83b2b4b..1e32c8f34 100644 --- a/lang/es_AR.yml +++ b/lang/es_AR.yml @@ -102,7 +102,7 @@ es_AR: Help1: '

Importar uno o más grupos en formato CSV (valores separados por comas). Mostrar uso avanzado

' ResultDeleted: 'Se eliminaron %d grupos' ResultUpdated: 'Se actualizaron %d grupos' - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Anclar BUTTONINSERTLINK: 'Insertar enlace' BUTTONREMOVELINK: 'Quitar enlace' diff --git a/lang/es_MX.yml b/lang/es_MX.yml index 272d24ad0..dadc55bd9 100644 --- a/lang/es_MX.yml +++ b/lang/es_MX.yml @@ -147,7 +147,7 @@ es_MX: Help1: '

Importar usuarios en formato CSV (valores separados por comas). Mostrar uso avanzado

\n' ResultDeleted: '%d grupos eliminados' ResultUpdated: '%d grupos actualizados' - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Anclar BUTTONINSERT: Insertar BUTTONINSERTLINK: 'Insertar enlace' diff --git a/lang/et_EE.yml b/lang/et_EE.yml index 200f6eef7..d4c8f70a6 100644 --- a/lang/et_EE.yml +++ b/lang/et_EE.yml @@ -224,7 +224,7 @@ et_EE: ResultCreated: '{count} gruppi on loodud' ResultDeleted: '%d gruppi on kustutatud' ResultUpdated: '%d gruppi on uuendatud' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Lisa URL' ADJUSTDETAILSDIMENSIONS: 'Üksikasjad ja mõõtmed' ANCHORVALUE: Link diff --git a/lang/fa_IR.yml b/lang/fa_IR.yml index 148e24ac8..719ba3e4e 100644 --- a/lang/fa_IR.yml +++ b/lang/fa_IR.yml @@ -272,7 +272,7 @@ fa_IR: ResultCreated: '{count} گروه ایجاد شده' ResultDeleted: 'گروه‌های %d حذف شد' ResultUpdated: 'گروه‌های %d به‌روز شد' - HtmlEditorField: + HTMLEditorField: ADDURL: 'افزودن URL' ADJUSTDETAILSDIMENSIONS: 'جزئیات و ابعاد' ANCHORSCANNOTACCESSPAGE: 'شما مجاز به دسترسی به محتوای صفحه مورد نظر نیستید.' diff --git a/lang/fi.yml b/lang/fi.yml index 3afb0ba3e..abb97bcf2 100644 --- a/lang/fi.yml +++ b/lang/fi.yml @@ -275,7 +275,7 @@ fi: ResultUpdated: 'Päivitetty %d ryhmää' Hierarchy: InfiniteLoopNotAllowed: '"{type}" -hierarkiasta löytyi loputon silmukka. Ole hyvä ja muuta isäntää korjataksesi ongelman.' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Lisää URL-osoite' ADJUSTDETAILSDIMENSIONS: 'Tarkat tiedot & mitat' ANCHORSCANNOTACCESSPAGE: 'Sinulla ei ole oikeuksia tarkastella tämän sivun sisältöä.' diff --git a/lang/fo.yml b/lang/fo.yml index 490a5b5ef..0e60068bb 100644 --- a/lang/fo.yml +++ b/lang/fo.yml @@ -67,7 +67,7 @@ fo: Sort: 'Raða eftir' has_many_Permissions: Loyvir many_many_Members: Limir - HtmlEditorField: + HTMLEditorField: BUTTONINSERTLINK: 'Stovna leinku' BUTTONREMOVELINK: 'Strika leinku' CSSCLASSCENTER: 'Í miðuni, einsamalt.' diff --git a/lang/fr.yml b/lang/fr.yml index 1630fd8ea..5319483f6 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -238,7 +238,7 @@ fr: ResultUpdated: '%d groupes mises à jour' Hierarchy: InfiniteLoopNotAllowed: 'Une boucle infinie s’est produite dans la hiérarchie « {type} ». Modifiez le parent pour le résoudre.' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Ajouter URL' ADJUSTDETAILSDIMENSIONS: 'Détails & dimensions' ANCHORVALUE: Ancre diff --git a/lang/gl_ES.yml b/lang/gl_ES.yml index 75ca90b7d..85d23086b 100644 --- a/lang/gl_ES.yml +++ b/lang/gl_ES.yml @@ -122,7 +122,7 @@ gl_ES: Help1: '

Importar un ou máis grupos no formato CSV (valores separados por comas). Amosar uso avanzado

' ResultDeleted: 'Eliminados %d grupos' ResultUpdated: 'Actualizados %d grupos' - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Áncora BUTTONINSERT: Inserir BUTTONINSERTLINK: 'Inserir ligazón' diff --git a/lang/he_IL.yml b/lang/he_IL.yml index b892f30e5..333fce625 100644 --- a/lang/he_IL.yml +++ b/lang/he_IL.yml @@ -44,7 +44,7 @@ he_IL: Parent: 'קבוצת אב' has_many_Permissions: הרשאות many_many_Members: חברים רשומים - HtmlEditorField: + HTMLEditorField: BUTTONINSERTLINK: 'הכנס קישור' BUTTONREMOVELINK: 'הסר קישור' CSSCLASS: 'יישור/סגנון' diff --git a/lang/hr.yml b/lang/hr.yml index de353f065..5f1786875 100644 --- a/lang/hr.yml +++ b/lang/hr.yml @@ -88,7 +88,7 @@ hr: Parent: 'Roditeljska grupa' has_many_Permissions: Dozvole many_many_Members: Članovi - HtmlEditorField: + HTMLEditorField: BUTTONINSERTLINK: 'Ubaci vezu' BUTTONREMOVELINK: 'Obriši vezu' CSSCLASS: 'Poravnanje / Stil' diff --git a/lang/hu.yml b/lang/hu.yml index faa8013a5..9c5f52821 100644 --- a/lang/hu.yml +++ b/lang/hu.yml @@ -41,7 +41,7 @@ hu: Parent: 'Szülő csoport' has_many_Permissions: Jogosultságok many_many_Members: Tagok - HtmlEditorField: + HTMLEditorField: BUTTONINSERTLINK: 'Link beszúrása' BUTTONREMOVELINK: 'Link eltávolítása' CSSCLASS: 'Elhelyezkedés / stílus' diff --git a/lang/id.yml b/lang/id.yml index c0522318a..5e79d4a52 100644 --- a/lang/id.yml +++ b/lang/id.yml @@ -263,7 +263,7 @@ id: ResultUpdated: '%d kelompok diperbarui' Hierarchy: InfiniteLoopNotAllowed: 'Putaran berulang ditemukan pada hirarki "{type}". Mohon ganti induk untuk mengatasi masalah ini' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Tambah URL' ADJUSTDETAILSDIMENSIONS: 'Rincian & dimensi' ANCHORSCANNOTACCESSPAGE: 'Anda tidak dijinkan mengakses konten laman yang diminta.' diff --git a/lang/id_ID.yml b/lang/id_ID.yml index 5b8ddb403..6e74b1927 100644 --- a/lang/id_ID.yml +++ b/lang/id_ID.yml @@ -263,7 +263,7 @@ id_ID: ResultUpdated: '%d kelompok diperbarui' Hierarchy: InfiniteLoopNotAllowed: 'Putaran berulang ditemukan pada hirarki "{type}". Mohon ganti induk untuk mengatasi masalah ini' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Tambah URL' ADJUSTDETAILSDIMENSIONS: 'Rincian & dimensi' ANCHORSCANNOTACCESSPAGE: 'Anda tidak dijinkan mengakses konten laman yang diminta.' diff --git a/lang/is.yml b/lang/is.yml index cd6c5d869..f292b15d7 100644 --- a/lang/is.yml +++ b/lang/is.yml @@ -84,7 +84,7 @@ is: Sort: 'Röðun' has_many_Permissions: Leyfi many_many_Members: Félagar - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Markstikla BUTTONINSERTLINK: 'Bæta við hlekk' BUTTONREMOVELINK: 'Fjarlægja hlekk' diff --git a/lang/it.yml b/lang/it.yml index d4660af67..c3e12486e 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -273,7 +273,7 @@ it: ResultUpdated: 'Aggiornati %d gruppi' Hierarchy: InfiniteLoopNotAllowed: 'Trovato loop infinito nella gerarchia di "{type}". Cambia il padre per risolvere il problema' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Aggiungi URL' ADJUSTDETAILSDIMENSIONS: 'Dettagli e dimensioni' ANCHORSCANNOTACCESSPAGE: 'Non ti è consentito accedere al contenuto della pagina di destinazione.' diff --git a/lang/ja.yml b/lang/ja.yml index 67c65ba45..f064d3f67 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -236,7 +236,7 @@ ja: ResultUpdated: '%dグループを更新しました' Hierarchy: InfiniteLoopNotAllowed: '無限ループが"{型}"階層内で見つかりました。 これを解決するために親を変更してください。' - HtmlEditorField: + HTMLEditorField: ADDURL: 'URLを追加' ADJUSTDETAILSDIMENSIONS: '詳細 & 大きさ' ANCHORVALUE: アンカー diff --git a/lang/lt.yml b/lang/lt.yml index 2a06f3eb5..dd66fb1aa 100644 --- a/lang/lt.yml +++ b/lang/lt.yml @@ -275,7 +275,7 @@ lt: ResultUpdated: 'Atnaujinta %d grupių' Hierarchy: InfiniteLoopNotAllowed: 'Rastas begalinis sąryšis "{type}" hierarchijoje. Prašome patikrinti tėvinius sąryšius' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Pridėti URL' ADJUSTDETAILSDIMENSIONS: 'Detalesnė inf. ir matmenys' ANCHORSCANNOTACCESSPAGE: 'Neturite teisių pasiekti pasirinkto puslapio turinį.' diff --git a/lang/lv.yml b/lang/lv.yml index 0662c528c..54de0c978 100644 --- a/lang/lv.yml +++ b/lang/lv.yml @@ -88,7 +88,7 @@ lv: Sort: 'Kārtošanas secība' has_many_Permissions: Atļaujas many_many_Members: Dalībnieki - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Enkurs BUTTONINSERTLINK: 'Ievietot saiti' BUTTONREMOVELINK: 'Noņemt saiti' diff --git a/lang/mi.yml b/lang/mi.yml index ee682ebc2..3bf5b7fe1 100644 --- a/lang/mi.yml +++ b/lang/mi.yml @@ -238,7 +238,7 @@ mi: ResultUpdated: 'Kua whakahōutia e %d ngā rōpū' Hierarchy: InfiniteLoopNotAllowed: 'Kua kitea he koromeke mutunga kore i roto i te aroākapanga "{type}". Hurihia te matua hei whakaea i tēnei' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Tāpiri PRO' ADJUSTDETAILSDIMENSIONS: 'Ngā taipitopito & ngā rahinga' ANCHORVALUE: Punga diff --git a/lang/ms.yml b/lang/ms.yml index c32cb3ecf..a5ae3f390 100644 --- a/lang/ms.yml +++ b/lang/ms.yml @@ -40,7 +40,7 @@ ms: Parent: 'Kumpulan Induk' has_many_Permissions: Keizinan many_many_Members: Ahli-ahli - HtmlEditorField: + HTMLEditorField: BUTTONINSERTLINK: 'Masukkan pautan' BUTTONREMOVELINK: 'Hapuskan pautan' CSSCLASS: 'Penjajaran / gaya' diff --git a/lang/nb.yml b/lang/nb.yml index 058b5a482..0e249633a 100644 --- a/lang/nb.yml +++ b/lang/nb.yml @@ -239,7 +239,7 @@ nb: ResultUpdated: 'Oppdaterte %d grupper' Hierarchy: InfiniteLoopNotAllowed: 'Uendelig løkke ble funnet i hierarkiet til "{type}". Vennligst skift ut overordnet type for å løse dette.' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Legg til nettadresse' ADJUSTDETAILSDIMENSIONS: 'Detaljer og dimensjoner' ANCHORVALUE: Lenke diff --git a/lang/ne.yml b/lang/ne.yml index 041974b9b..b71b02810 100644 --- a/lang/ne.yml +++ b/lang/ne.yml @@ -15,7 +15,7 @@ ne: VALIDATIONNOTUNIQUE: 'लेखिएको मान भिन्न छैन ' VALIDATIONPASSWORDSDONTMATCH: 'पासओडहरु मिल्दैन्नन' VALIDATIONPASSWORDSNOTEMPTY: 'पासओडहरु खालि छोड्न मिल्दैन' - HtmlEditorField: + HTMLEditorField: BUTTONINSERTLINK: 'लिन्क राखनुहोस्' BUTTONREMOVELINK: 'लिन्क हटाउनुहोस्' CSSCLASS: 'समरेखिन / स्टाईल' diff --git a/lang/nl.yml b/lang/nl.yml index 7fec01078..540a8d128 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -240,7 +240,7 @@ nl: ResultUpdated: '%d groepen aangepast' Hierarchy: InfiniteLoopNotAllowed: 'Oneindige lus gevonden in "{type}" hiërarchie. Wijzig het hogere niveau om dit op te lossen' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Voeg URL toe' ADJUSTDETAILSDIMENSIONS: 'Details en afmetingen' ANCHORVALUE: Anker diff --git a/lang/pa.yml b/lang/pa.yml index 9611bedba..52dbeb119 100644 --- a/lang/pa.yml +++ b/lang/pa.yml @@ -12,7 +12,7 @@ pa: Form: VALIDATIONPASSWORDSDONTMATCH: 'Passwords ਮੇਲ ਨਹੀ ਖਾਦੇ ' VALIDATIONPASSWORDSNOTEMPTY: 'Passwords ਖ਼ਾਲੀ ਨਹੀ ਹੋ ਸਕਦੇ ' - HtmlEditorField: + HTMLEditorField: BUTTONINSERTLINK: 'ਿਲੰਕ ਪਾਉ' BUTTONREMOVELINK: 'ਿਲੰਕ ਕੱਟੋਂ' EMAIL: 'ਈਮੇਲ ਪਤਾ' diff --git a/lang/pl.yml b/lang/pl.yml index f1f29b8e8..2f6e0e31a 100644 --- a/lang/pl.yml +++ b/lang/pl.yml @@ -239,7 +239,7 @@ pl: ResultUpdated: 'Zaktualizowano grup: %d' Hierarchy: InfiniteLoopNotAllowed: 'Znaleziono nieskończoną pętlę wewnątrz hierarchii "{type}". Proszę zmień rodzica by to rozwiązać.' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Dodaj adres URL' ADJUSTDETAILSDIMENSIONS: 'Szczegóły i rozmiar' ANCHORVALUE: Odnośnik diff --git a/lang/pt.yml b/lang/pt.yml index c160c2637..b96f04baf 100644 --- a/lang/pt.yml +++ b/lang/pt.yml @@ -110,7 +110,7 @@ pt: many_many_Members: Membros GroupImportForm: ResultDeleted: 'Apagados %d grupos' - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Âncora BUTTONINSERT: Inserir BUTTONINSERTLINK: 'Inserir link' diff --git a/lang/pt_BR.yml b/lang/pt_BR.yml index 81265adde..b60d49a2c 100644 --- a/lang/pt_BR.yml +++ b/lang/pt_BR.yml @@ -90,7 +90,7 @@ pt_BR: Sort: 'Ordenação' has_many_Permissions: Permissões many_many_Members: Membros - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Âncora BUTTONINSERTLINK: 'Inserir link' BUTTONREMOVELINK: 'Remover link' diff --git a/lang/ro.yml b/lang/ro.yml index fa94eb96b..c1459b654 100644 --- a/lang/ro.yml +++ b/lang/ro.yml @@ -84,7 +84,7 @@ ro: Parent: 'Grup de Baza' has_many_Permissions: Permisiuni many_many_Members: Membri - HtmlEditorField: + HTMLEditorField: BUTTONINSERTLINK: 'Insereaza link' BUTTONREMOVELINK: 'Indeparteaza link' CSSCLASS: 'Aliniere / stil' diff --git a/lang/ru.yml b/lang/ru.yml index f77b537a5..79853e505 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -239,7 +239,7 @@ ru: ResultUpdated: 'Обновлено %d групп' Hierarchy: InfiniteLoopNotAllowed: 'Обнаружен бесконечный цикл в иерархической структуре "{type}". Для исправления ошибки измените страницу, находящуюся уровнем выше' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Добавить URL' ADJUSTDETAILSDIMENSIONS: 'Дополнительные сведения и размеры' ANCHORVALUE: Якорь diff --git a/lang/si.yml b/lang/si.yml index 66ad35e3c..4ab399c18 100644 --- a/lang/si.yml +++ b/lang/si.yml @@ -53,7 +53,7 @@ si: Parent: 'මවු කාන්ඩය' has_many_Permissions: අවසර many_many_Members: සාමාජිකයින් - HtmlEditorField: + HTMLEditorField: BUTTONINSERTLINK: 'බැදීමක් යොදන්න' BUTTONREMOVELINK: 'බැදීම ගලවන්න' CSSCLASS: 'අලයින්මන්ට් / ස්ටයිල්' diff --git a/lang/sk.yml b/lang/sk.yml index 4fcd1081a..c582cd3b2 100644 --- a/lang/sk.yml +++ b/lang/sk.yml @@ -275,7 +275,7 @@ sk: ResultUpdated: 'Aktualizované %d skupiny' Hierarchy: InfiniteLoopNotAllowed: 'Nekonečná smyčka sa nachádza v {type} hierarchii. Prosím zmeňte rodiča pre vyriešenie tohto problému' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Pridať URL' ADJUSTDETAILSDIMENSIONS: 'Detaily & rozmery' ANCHORSCANNOTACCESSPAGE: 'Nemáte povolený prístup k obsahu cieľovej stránky.' diff --git a/lang/sl.yml b/lang/sl.yml index 752595c40..18370e83c 100644 --- a/lang/sl.yml +++ b/lang/sl.yml @@ -230,7 +230,7 @@ sl: ResultCreated: 'Ustvarjenih je {count} skupin' ResultDeleted: 'Število izbrisanih skupin %d' ResultUpdated: 'Število ponastavljenih skupin %d' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Dodaj URL' ANCHORVALUE: Sidro BUTTONADDURL: 'Dodaj url' diff --git a/lang/sr.yml b/lang/sr.yml index 0ebb641bc..2329ae09e 100644 --- a/lang/sr.yml +++ b/lang/sr.yml @@ -239,7 +239,7 @@ sr: ResultUpdated: 'Ажурирано %d група' Hierarchy: InfiniteLoopNotAllowed: 'Откривена је бесконачна петља у оквиру "{type}" хијерархије. Промените родитеља да би сте разрешили ситуацију' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Додај URL' ADJUSTDETAILSDIMENSIONS: 'Детаљи & димензије' ANCHORVALUE: Сидро diff --git a/lang/sr@latin.yml b/lang/sr@latin.yml index 24c3f5487..5046b94a1 100644 --- a/lang/sr@latin.yml +++ b/lang/sr@latin.yml @@ -239,7 +239,7 @@ sr@latin: ResultUpdated: 'Ažurirano %d grupa' Hierarchy: InfiniteLoopNotAllowed: 'Otkrivena je beskonačna petlja u okviru "{type}" hijerarhije. Promenite roditelja da bi ste razrešili situaciju' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Dodaj URL' ADJUSTDETAILSDIMENSIONS: 'Detalji & dimenzije' ANCHORVALUE: Sidro diff --git a/lang/sr_RS.yml b/lang/sr_RS.yml index 71d35e882..46a5239d5 100644 --- a/lang/sr_RS.yml +++ b/lang/sr_RS.yml @@ -239,7 +239,7 @@ sr_RS: ResultUpdated: 'Ажурирано %d група' Hierarchy: InfiniteLoopNotAllowed: 'Откривена је бесконачна петља у оквиру "{type}" хијерархије. Промените родитеља да би сте разрешили ситуацију' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Додај URL' ADJUSTDETAILSDIMENSIONS: 'Детаљи & димензије' ANCHORVALUE: Сидро diff --git a/lang/sr_RS@latin.yml b/lang/sr_RS@latin.yml index 960261002..8526e2320 100644 --- a/lang/sr_RS@latin.yml +++ b/lang/sr_RS@latin.yml @@ -239,7 +239,7 @@ sr_RS@latin: ResultUpdated: 'Ažurirano %d grupa' Hierarchy: InfiniteLoopNotAllowed: 'Otkrivena je beskonačna petlja u okviru "{type}" hijerarhije. Promenite roditelja da bi ste razrešili situaciju' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Dodaj URL' ADJUSTDETAILSDIMENSIONS: 'Detalji & dimenzije' ANCHORVALUE: Sidro diff --git a/lang/sv.yml b/lang/sv.yml index c35e712ce..3ff553b55 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -267,7 +267,7 @@ sv: ResultUpdated: 'Uppdaterade %d grupper' Hierarchy: InfiniteLoopNotAllowed: 'Oändlig loop hittades i hierarkin "{type}". Var vänlig ändra föräldern för att lösa detta' - HtmlEditorField: + HTMLEditorField: ADDURL: 'Lägg till URL' ADJUSTDETAILSDIMENSIONS: 'Detaljer & dimensioner' ANCHORSCANNOTACCESSPAGE: 'Du har inte tillåtelse att se innehållet på sidan' diff --git a/lang/th.yml b/lang/th.yml index 167b51136..da6674dd2 100644 --- a/lang/th.yml +++ b/lang/th.yml @@ -161,7 +161,7 @@ th: ResultCreated: 'สร้างกลุ่มแล้ว {count} กลุ่ม' ResultDeleted: 'ลบกลุ่มแล้ว %d กลุ่ม' ResultUpdated: 'อัพเดทแล้ว %d กลุ่ม' - HtmlEditorField: + HTMLEditorField: ADDURL: 'เพิ่ม URL' ADJUSTDETAILSDIMENSIONS: 'รายละเอียด & ขนาดสัดส่วน' BUTTONINSERT: แทรก diff --git a/lang/tr.yml b/lang/tr.yml index 7a564d58a..858e745f4 100644 --- a/lang/tr.yml +++ b/lang/tr.yml @@ -109,7 +109,7 @@ tr: Sort: 'Sırala' has_many_Permissions: İzinler many_many_Members: Üyeler - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Çapa BUTTONINSERTLINK: 'Bağlantı ekle' BUTTONREMOVELINK: 'Bağlantıyı sil' diff --git a/lang/uk.yml b/lang/uk.yml index f37040682..fe5e6d98f 100644 --- a/lang/uk.yml +++ b/lang/uk.yml @@ -101,7 +101,7 @@ uk: RolesAddEditLink: 'Керувати ролями' has_many_Permissions: Права many_many_Members: Члени - HtmlEditorField: + HTMLEditorField: ANCHORVALUE: Якір BUTTONINSERTLINK: 'Вставити посилання' BUTTONREMOVELINK: 'Вмдалити посилання' diff --git a/lang/zh.yml b/lang/zh.yml index 694edf6e7..be25c9ed0 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -262,7 +262,7 @@ zh: ResultUpdated: '已更新 %d 小组' Hierarchy: InfiniteLoopNotAllowed: '"{type}" 层次结构中发现无限循环。请更改父类型来解决此问题' - HtmlEditorField: + HTMLEditorField: ADDURL: '添加网址' ADJUSTDETAILSDIMENSIONS: '详情 & 体积' ANCHORSCANNOTACCESSPAGE: '您不允许访问该页面的内容。' diff --git a/lang/zh_CN.yml b/lang/zh_CN.yml index 913f2ff1d..fd2bf21f6 100644 --- a/lang/zh_CN.yml +++ b/lang/zh_CN.yml @@ -42,7 +42,7 @@ zh_CN: Parent: '主团队' has_many_Permissions: 权限 many_many_Members: 成员 - HtmlEditorField: + HTMLEditorField: BUTTONINSERTLINK: '插入链接' BUTTONREMOVELINK: '删除链接' CSSCLASS: '对齐/样式' diff --git a/lang/zh_TW.yml b/lang/zh_TW.yml index 9a4b5893d..795cec2ef 100644 --- a/lang/zh_TW.yml +++ b/lang/zh_TW.yml @@ -28,7 +28,7 @@ zh_TW: VALIDATIONNOTUNIQUE: '您輸入的數值並不是獨特的。' VALIDATIONPASSWORDSDONTMATCH: '密碼不相配' VALIDATIONPASSWORDSNOTEMPTY: '密碼不能是空的' - HtmlEditorField: + HTMLEditorField: BUTTONINSERTLINK: '插入連結' BUTTONREMOVELINK: '移除連結' CSSCLASS: '對齊/樣式' diff --git a/model/FieldType/DBHTMLText.php b/model/FieldType/DBHTMLText.php index d7f671cd0..4da71a994 100644 --- a/model/FieldType/DBHTMLText.php +++ b/model/FieldType/DBHTMLText.php @@ -6,7 +6,7 @@ use Injector; use HTTP; use ShortcodeParser; use DOMDocument; -use HtmlEditorField; +use HTMLEditorField; use TextField; use Exception; @@ -264,7 +264,7 @@ class DBHTMLText extends DBText { } public function scaffoldFormField($title = null, $params = null) { - return new HtmlEditorField($this->name, $title); + return new HTMLEditorField($this->name, $title); } public function scaffoldSearchField($title = null, $params = null) { diff --git a/model/FieldType/DBHTMLVarchar.php b/model/FieldType/DBHTMLVarchar.php index f1697eaec..29d8c034a 100644 --- a/model/FieldType/DBHTMLVarchar.php +++ b/model/FieldType/DBHTMLVarchar.php @@ -3,7 +3,7 @@ namespace SilverStripe\Model\FieldType; use ShortcodeParser; -use HtmlEditorField; +use HTMLEditorField; use TextField; /** @@ -41,7 +41,7 @@ class DBHTMLVarchar extends DBVarchar { } public function scaffoldFormField($title = null, $params = null) { - return new HtmlEditorField($this->name, $title, 1); + return new HTMLEditorField($this->name, $title, 1); } public function scaffoldSearchField($title = null) { diff --git a/security/Group.php b/security/Group.php index 9acae8ed4..931a31879 100755 --- a/security/Group.php +++ b/security/Group.php @@ -141,7 +141,7 @@ class Group extends DataObject { // Only add a dropdown for HTML editor configurations if more than one is available. // Otherwise Member->getHtmlEditorConfigForCMS() will default to the 'cms' configuration. - $editorConfigMap = HtmlEditorConfig::get_available_configs_map(); + $editorConfigMap = HTMLEditorConfig::get_available_configs_map(); if(count($editorConfigMap) > 1) { $fields->addFieldToTab('Root.Permissions', new DropdownField( diff --git a/security/Member.php b/security/Member.php index 5426b299f..9060820c8 100644 --- a/security/Member.php +++ b/security/Member.php @@ -1647,7 +1647,7 @@ class Member extends DataObject implements TemplateGlobalProvider { foreach($this->Groups() as $group) { $configName = $group->HtmlEditorConfig; if($configName) { - $config = HtmlEditorConfig::get($group->HtmlEditorConfig); + $config = HTMLEditorConfig::get($group->HtmlEditorConfig); if($config && $config->getOption('priority') > $currentPriority) { $currentName = $configName; $currentPriority = $config->getOption('priority'); diff --git a/templates/HtmlEditorField_UploadField.ss b/templates/HTMLEditorField_UploadField.ss similarity index 100% rename from templates/HtmlEditorField_UploadField.ss rename to templates/HTMLEditorField_UploadField.ss diff --git a/templates/Includes/HtmlEditorField_viewfile.ss b/templates/Includes/HTMLEditorField_viewfile.ss similarity index 100% rename from templates/Includes/HtmlEditorField_viewfile.ss rename to templates/Includes/HTMLEditorField_viewfile.ss diff --git a/tests/forms/FormScaffolderTest.php b/tests/forms/FormScaffolderTest.php index 95e1ed532..025aca7db 100644 --- a/tests/forms/FormScaffolderTest.php +++ b/tests/forms/FormScaffolderTest.php @@ -89,7 +89,7 @@ class FormScaffolderTest extends SapphireTest { $article1 = $this->objFromFixture('FormScaffolderTest_Article', 'article1'); $fields = $article1->scaffoldFormFields(array( - 'fieldClasses' => array('Title' => 'HtmlEditorField') + 'fieldClasses' => array('Title' => 'HTMLEditorField') )); $form = new Form(new Controller(), 'TestForm', $fields, new FieldList()); $form->loadDataFrom($article1); @@ -99,7 +99,7 @@ class FormScaffolderTest extends SapphireTest { ); $this->assertEquals( get_class($fields->dataFieldByName('Title')), - 'HtmlEditorField', + 'HTMLEditorField', 'getCMSFields() doesnt include fields left out in a "restrictFields" definition' ); } diff --git a/tests/forms/HtmlEditorConfigTest.php b/tests/forms/HTMLEditorConfigTest.php similarity index 94% rename from tests/forms/HtmlEditorConfigTest.php rename to tests/forms/HTMLEditorConfigTest.php index 8223b535c..90b5bc820 100644 --- a/tests/forms/HtmlEditorConfigTest.php +++ b/tests/forms/HTMLEditorConfigTest.php @@ -3,7 +3,7 @@ * @package framework * @subpackage tests */ -class HtmlEditorConfigTest extends SapphireTest { +class HTMLEditorConfigTest extends SapphireTest { public function testEnablePluginsByString() { $c = new TinyMCEConfig(); @@ -75,14 +75,14 @@ class HtmlEditorConfigTest extends SapphireTest { $this->assertEquals(['plugin4', 'plugin5'], $c->getInternalPlugins()); // Test plugins included via gzip compresser - Config::inst()->update('HtmlEditorField', 'use_gzip', true); + Config::inst()->update('HTMLEditorField', 'use_gzip', true); $this->assertEquals( 'framework/thirdparty/tinymce/tiny_mce_gzip.php?js=1&plugins=plugin4,plugin5&themes=modern&languages=es&diskcache=true&src=true', $c->getScriptURL() ); // If gzip is disabled only the core plugin is loaded - Config::inst()->remove('HtmlEditorField', 'use_gzip'); + Config::inst()->remove('HTMLEditorField', 'use_gzip'); $this->assertEquals( 'framework/thirdparty/tinymce/tinymce.min.js', $c->getScriptURL() @@ -122,8 +122,8 @@ class HtmlEditorConfigTest extends SapphireTest { } public function testRequireJSIncludesAllConfigs() { - $a = HtmlEditorConfig::get('configA'); - $c = HtmlEditorConfig::get('configB'); + $a = HTMLEditorConfig::get('configA'); + $c = HTMLEditorConfig::get('configB'); $aAttributes = $a->getAttributes(); $cAttributes = $c->getAttributes(); diff --git a/tests/forms/HtmlEditorFieldTest.php b/tests/forms/HTMLEditorFieldTest.php similarity index 78% rename from tests/forms/HtmlEditorFieldTest.php rename to tests/forms/HTMLEditorFieldTest.php index bcdfcecde..bb3ca8211 100644 --- a/tests/forms/HtmlEditorFieldTest.php +++ b/tests/forms/HTMLEditorFieldTest.php @@ -6,23 +6,23 @@ use Filesystem as SS_Filesystem; * @package framework * @subpackage tests */ -class HtmlEditorFieldTest extends FunctionalTest { +class HTMLEditorFieldTest extends FunctionalTest { - protected static $fixture_file = 'HtmlEditorFieldTest.yml'; + protected static $fixture_file = 'HTMLEditorFieldTest.yml'; protected static $use_draft_site = true; protected $requiredExtensions = array( - 'HtmlEditorField_Toolbar' => array('HtmlEditorFieldTest_DummyMediaFormFieldExtension') + 'HTMLEditorField_Toolbar' => array('HTMLEditorFieldTest_DummyMediaFormFieldExtension') ); - protected $extraDataObjects = array('HtmlEditorFieldTest_Object'); + protected $extraDataObjects = array('HTMLEditorFieldTest_Object'); public function setUp() { parent::setUp(); - // Set backend root to /HtmlEditorFieldTest - AssetStoreTest_SpyStore::activate('HtmlEditorFieldTest'); + // Set backend root to /HTMLEditorFieldTest + AssetStoreTest_SpyStore::activate('HTMLEditorFieldTest'); // Create a test files for each of the fixture references $files = File::get()->exclude('ClassName', 'Folder'); @@ -40,8 +40,8 @@ class HtmlEditorFieldTest extends FunctionalTest { } public function testBasicSaving() { - $obj = new HtmlEditorFieldTest_Object(); - $editor = new HtmlEditorField('Content'); + $obj = new HTMLEditorFieldTest_Object(); + $editor = new HTMLEditorField('Content'); $editor->setValue('

Simple Content

'); $editor->saveInto($obj); @@ -53,8 +53,8 @@ class HtmlEditorFieldTest extends FunctionalTest { } public function testNullSaving() { - $obj = new HtmlEditorFieldTest_Object(); - $editor = new HtmlEditorField('Content'); + $obj = new HTMLEditorFieldTest_Object(); + $editor = new HTMLEditorField('Content'); $editor->setValue(null); $editor->saveInto($obj); @@ -62,8 +62,8 @@ class HtmlEditorFieldTest extends FunctionalTest { } public function testResizedImageInsertion() { - $obj = new HtmlEditorFieldTest_Object(); - $editor = new HtmlEditorField('Content'); + $obj = new HTMLEditorFieldTest_Object(); + $editor = new HTMLEditorField('Content'); $fileID = $this->idFromFixture('Image', 'example_image'); $editor->setValue(sprintf( @@ -84,24 +84,24 @@ class HtmlEditorFieldTest extends FunctionalTest { $this->assertEquals(20, (int)$xml[0]['height'], 'Height tag of resized image is set.'); $neededFilename - = '/assets/HtmlEditorFieldTest/f5c7c2f814/HTMLEditorFieldTest-example__ResizedImageWyIxMCIsIjIwIl0.jpg'; - + = '/assets/HTMLEditorFieldTest/f5c7c2f814/HTMLEditorFieldTest-example__ResizedImageWyIxMCIsIjIwIl0.jpg'; + $this->assertEquals($neededFilename, (string)$xml[0]['src'], 'Correct URL of resized image is set.'); $this->assertTrue(file_exists(BASE_PATH.DIRECTORY_SEPARATOR.$neededFilename), 'File for resized image exists'); $this->assertEquals(false, $obj->HasBrokenFile, 'Referenced image file exists.'); } public function testMultiLineSaving() { - $obj = $this->objFromFixture('HtmlEditorFieldTest_Object', 'home'); - $editor = new HtmlEditorField('Content'); + $obj = $this->objFromFixture('HTMLEditorFieldTest_Object', 'home'); + $editor = new HTMLEditorField('Content'); $editor->setValue('

First Paragraph

Second Paragraph

'); $editor->saveInto($obj); $this->assertEquals('

First Paragraph

Second Paragraph

', $obj->Content); } public function testSavingLinksWithoutHref() { - $obj = $this->objFromFixture('HtmlEditorFieldTest_Object', 'home'); - $editor = new HtmlEditorField('Content'); + $obj = $this->objFromFixture('HTMLEditorFieldTest_Object', 'home'); + $editor = new HTMLEditorField('Content'); $editor->setValue('

'); $editor->saveInto($obj); @@ -140,24 +140,24 @@ class HtmlEditorFieldTest extends FunctionalTest { 'PageID' => $page->ID, )); - $toolBar = new HtmlEditorField_Toolbar(new Controller(), 'test'); + $toolBar = new HTMLEditorField_Toolbar(new Controller(), 'test'); $toolBar->setRequest($request); $results = json_decode($toolBar->getanchors(), true); $this->assertEquals($expected, $results); } - public function testHtmlEditorFieldFileLocal() { - $file = new HtmlEditorField_Image('http://domain.com/folder/my_image.jpg?foo=bar'); + public function testHTMLEditorFieldFileLocal() { + $file = new HTMLEditorField_Image('http://domain.com/folder/my_image.jpg?foo=bar'); $this->assertEquals('http://domain.com/folder/my_image.jpg?foo=bar', $file->URL); $this->assertEquals('my_image.jpg', $file->Name); $this->assertEquals('jpg', $file->Extension); // TODO Can't easily test remote file dimensions } - public function testHtmlEditorFieldFileRemote() { + public function testHTMLEditorFieldFileRemote() { $fileFixture = new File(array('Name' => 'my_local_image.jpg', 'Filename' => 'folder/my_local_image.jpg')); - $file = new HtmlEditorField_Image('http://localdomain.com/folder/my_local_image.jpg', $fileFixture); + $file = new HTMLEditorField_Image('http://localdomain.com/folder/my_local_image.jpg', $fileFixture); $this->assertEquals('http://localdomain.com/folder/my_local_image.jpg', $file->URL); $this->assertEquals('my_local_image.jpg', $file->Name); $this->assertEquals('jpg', $file->Extension); @@ -168,7 +168,7 @@ class HtmlEditorFieldTest extends FunctionalTest { * @package framework * @subpackage tests */ -class HtmlEditorFieldTest_DummyMediaFormFieldExtension extends Extension implements TestOnly { +class HTMLEditorFieldTest_DummyMediaFormFieldExtension extends Extension implements TestOnly { public static $fields = null; public static $update_called = false; @@ -178,7 +178,7 @@ class HtmlEditorFieldTest_DummyMediaFormFieldExtension extends Extension impleme } } -class HtmlEditorFieldTest_Object extends DataObject implements TestOnly { +class HTMLEditorFieldTest_Object extends DataObject implements TestOnly { private static $db = array( 'Title' => 'Varchar', 'Content' => 'HTMLText', diff --git a/tests/forms/HtmlEditorFieldTest.yml b/tests/forms/HTMLEditorFieldTest.yml similarity index 90% rename from tests/forms/HtmlEditorFieldTest.yml rename to tests/forms/HTMLEditorFieldTest.yml index eb055c700..c4c3b0cdd 100644 --- a/tests/forms/HtmlEditorFieldTest.yml +++ b/tests/forms/HTMLEditorFieldTest.yml @@ -4,7 +4,7 @@ Image: FileHash: f5c7c2f814b0f20ceb30b72edbac220d6eff65ed Name: HTMLEditorFieldTest_example.jpg -HtmlEditorFieldTest_Object: +HTMLEditorFieldTest_Object: home: Title: Home Page about: diff --git a/tests/forms/HtmlEditorFieldToolbarTest.php b/tests/forms/HTMLEditorFieldToolbarTest.php similarity index 81% rename from tests/forms/HtmlEditorFieldToolbarTest.php rename to tests/forms/HTMLEditorFieldToolbarTest.php index 69fd72401..debc8a3fd 100644 --- a/tests/forms/HtmlEditorFieldToolbarTest.php +++ b/tests/forms/HTMLEditorFieldToolbarTest.php @@ -1,6 +1,6 @@ update('HtmlEditorField_Toolbar', 'fileurl_scheme_whitelist', array('http')); - Config::inst()->update('HtmlEditorField_Toolbar', 'fileurl_domain_whitelist', array('example.com')); + Config::inst()->update('HTMLEditorField_Toolbar', 'fileurl_scheme_whitelist', array('http')); + Config::inst()->update('HTMLEditorField_Toolbar', 'fileurl_domain_whitelist', array('example.com')); // Filesystem mock AssetStoreTest_SpyStore::activate(__CLASS__); @@ -49,7 +49,7 @@ class HtmlEditorFieldToolbarTest extends SapphireTest { /** @var File $exampleFile */ $exampleFile = $this->objFromFixture('File', 'example_file'); $expectedUrl = $exampleFile->AbsoluteLink(); - Config::inst()->update('HtmlEditorField_Toolbar', 'fileurl_domain_whitelist', array( + Config::inst()->update('HTMLEditorField_Toolbar', 'fileurl_domain_whitelist', array( 'example.com', strtolower(parse_url($expectedUrl, PHP_URL_HOST)) )); diff --git a/tests/forms/HtmlEditorFieldToolbarTest.yml b/tests/forms/HTMLEditorFieldToolbarTest.yml similarity index 100% rename from tests/forms/HtmlEditorFieldToolbarTest.yml rename to tests/forms/HTMLEditorFieldToolbarTest.yml diff --git a/tests/forms/HtmlEditorSanitiserTest.php b/tests/forms/HTMLEditorSanitiserTest.php similarity index 93% rename from tests/forms/HtmlEditorSanitiserTest.php rename to tests/forms/HTMLEditorSanitiserTest.php index d17360ffe..b0f47fd13 100644 --- a/tests/forms/HtmlEditorSanitiserTest.php +++ b/tests/forms/HTMLEditorSanitiserTest.php @@ -3,7 +3,7 @@ * @package framework * @subpackage tests */ -class HtmlEditorSanitiserTest extends FunctionalTest { +class HTMLEditorSanitiserTest extends FunctionalTest { public function testSanitisation() { $tests = array( @@ -39,7 +39,7 @@ class HtmlEditorSanitiserTest extends FunctionalTest { ) ); - $config = HtmlEditorConfig::get('htmleditorsanitisertest'); + $config = HTMLEditorConfig::get('htmleditorsanitisertest'); foreach($tests as $test) { list($validElements, $input, $output, $desc) = $test;