mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 08:44:46 +02:00
Other minor unrelated updates
This commit is contained in:
@@ -550,7 +550,7 @@ class WireMail extends WireData implements WireMailInterface {
|
||||
if(is_null($value)) {
|
||||
$this->mail['attachments'] = array();
|
||||
} else if(is_file($value)) {
|
||||
$filename = $filename ?: basename($value);
|
||||
$filename = $filename ? basename($filename) : basename($value);
|
||||
$this->mail['attachments'][$filename] = $value;
|
||||
}
|
||||
return $this;
|
||||
|
@@ -384,9 +384,9 @@ class WireMailTools extends Wire {
|
||||
return $this->new()->subject($subject);
|
||||
}
|
||||
|
||||
public function __get($key) {
|
||||
if($key === 'new') return $this->new();
|
||||
return parent::__get($key);
|
||||
public function __get($name) {
|
||||
if($name === 'new') return $this->new();
|
||||
return parent::__get($name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -51,6 +51,11 @@ class FieldtypeTextareaHelper extends Wire {
|
||||
$f->label = $this->_('Inputfield Type');
|
||||
$f->description = $this->_('The type of field that will be used to collect input (Textarea is the default). Note that if you change this and submit, the available configuration options in the "input" tab section may change.'); // Inputfield type description
|
||||
$f->required = true;
|
||||
$f->notes = $this->_('We recommend using TinyMCE over CKEditor when creating new rich text fields.');
|
||||
if(!$modules->isInstalled('InputfieldTinyMCE')) {
|
||||
$installUrl = $modules->getModuleInstallUrl('InputfieldTinyMCE');
|
||||
$f->notes .= ' [' . $this->_('Click here to install TinyMCE') . "]($installUrl)";
|
||||
}
|
||||
|
||||
$baseClass = "InputfieldTextarea";
|
||||
foreach($modules->find("className^=Inputfield") as $fm) {
|
||||
@@ -270,7 +275,7 @@ class FieldtypeTextareaHelper extends Wire {
|
||||
public function getInputfieldError(Field $field) {
|
||||
$config = $this->wire()->config;
|
||||
|
||||
$editURL = $config->urls->admin . "setup/field/edit?id=$field->id";
|
||||
$editURL = $field->editUrl();
|
||||
$modulesURL = $config->urls->admin . "module/";
|
||||
$inputfieldClass = $field->get('inputfieldClass');
|
||||
$findURL = "https://processwire.com/search/?q=$inputfieldClass&t=Modules";
|
||||
|
@@ -288,6 +288,7 @@ class LanguageSupportInstall extends Wire {
|
||||
*
|
||||
*/
|
||||
public function getModuleConfigInputfields() {
|
||||
$modules = $this->wire()->modules;
|
||||
$install = $this->_('Click to install:') . ' ';
|
||||
|
||||
$form = $this->wire(new InputfieldWrapper());
|
||||
@@ -300,17 +301,17 @@ class LanguageSupportInstall extends Wire {
|
||||
$list = array();
|
||||
|
||||
foreach($names as $name) {
|
||||
if($this->wire('modules')->isInstalled($name)) continue;
|
||||
$list["./installConfirm?name=$name"] = "$install $name";
|
||||
if($modules->isInstalled($name)) continue;
|
||||
$list[$modules->getModuleInstallUrl($name)] = "$install $name";
|
||||
$installed[$name] = true;
|
||||
}
|
||||
|
||||
$list["../setup/languages/"] =
|
||||
$this->_('Add and configure new languages');
|
||||
|
||||
$title = $this->wire('fields')->get('title');
|
||||
$title = $this->wire()->fields->get('title');
|
||||
if($title && strpos($title->type->className(), 'Language') === false) {
|
||||
$list["../setup/field/edit?id=$title->id"] =
|
||||
$list[$title->editUrl()] =
|
||||
$this->_('Change the type of your "title" field from "Page Title" to "Page Title (Multi-language)"') . ' *';
|
||||
}
|
||||
|
||||
@@ -320,8 +321,10 @@ class LanguageSupportInstall extends Wire {
|
||||
$this->_('Change the type of any other desired "Textarea" fields to "Textarea (Multi-language)"') . ' *';
|
||||
|
||||
if(count($list)) {
|
||||
$this->wire('modules')->get('JqueryUI')->use('modal');
|
||||
$f = $this->wire('modules')->get('InputfieldMarkup');
|
||||
$jQueryUI = $modules->get('JqueryUI'); /** @var JqueryUI $jQueryUI */
|
||||
$jQueryUI->use('modal');
|
||||
/** @var InputfieldMarkup $f */
|
||||
$f = $modules->get('InputfieldMarkup');
|
||||
$f->attr('name', '_next_steps');
|
||||
$f->label = $this->_('Next steps');
|
||||
$f->value = "<ul>";
|
||||
|
@@ -1490,7 +1490,7 @@ class ProcessField extends Process implements ConfigurableModule {
|
||||
$fieldset->add($f);
|
||||
/** @var InputfieldButton $button */
|
||||
$button = $modules->get('InputfieldButton');
|
||||
$button->href = $config->urls->admin . 'module/installConfirm?name=PageFrontEdit';
|
||||
$button->href = $modules->getModuleInstallUrl('PageFrontEdit');
|
||||
$button->value = $this->_('Install');
|
||||
$button->icon = 'sign-in';
|
||||
$button->target = '_blank';
|
||||
@@ -3529,4 +3529,3 @@ class ProcessField extends Process implements ConfigurableModule {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user