mirror of
https://github.com/processwire/processwire.git
synced 2025-08-14 02:34:24 +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)) {
|
if(is_null($value)) {
|
||||||
$this->mail['attachments'] = array();
|
$this->mail['attachments'] = array();
|
||||||
} else if(is_file($value)) {
|
} else if(is_file($value)) {
|
||||||
$filename = $filename ?: basename($value);
|
$filename = $filename ? basename($filename) : basename($value);
|
||||||
$this->mail['attachments'][$filename] = $value;
|
$this->mail['attachments'][$filename] = $value;
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
|
@@ -384,9 +384,9 @@ class WireMailTools extends Wire {
|
|||||||
return $this->new()->subject($subject);
|
return $this->new()->subject($subject);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __get($key) {
|
public function __get($name) {
|
||||||
if($key === 'new') return $this->new();
|
if($name === 'new') return $this->new();
|
||||||
return parent::__get($key);
|
return parent::__get($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -51,6 +51,11 @@ class FieldtypeTextareaHelper extends Wire {
|
|||||||
$f->label = $this->_('Inputfield Type');
|
$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->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->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";
|
$baseClass = "InputfieldTextarea";
|
||||||
foreach($modules->find("className^=Inputfield") as $fm) {
|
foreach($modules->find("className^=Inputfield") as $fm) {
|
||||||
@@ -270,7 +275,7 @@ class FieldtypeTextareaHelper extends Wire {
|
|||||||
public function getInputfieldError(Field $field) {
|
public function getInputfieldError(Field $field) {
|
||||||
$config = $this->wire()->config;
|
$config = $this->wire()->config;
|
||||||
|
|
||||||
$editURL = $config->urls->admin . "setup/field/edit?id=$field->id";
|
$editURL = $field->editUrl();
|
||||||
$modulesURL = $config->urls->admin . "module/";
|
$modulesURL = $config->urls->admin . "module/";
|
||||||
$inputfieldClass = $field->get('inputfieldClass');
|
$inputfieldClass = $field->get('inputfieldClass');
|
||||||
$findURL = "https://processwire.com/search/?q=$inputfieldClass&t=Modules";
|
$findURL = "https://processwire.com/search/?q=$inputfieldClass&t=Modules";
|
||||||
|
@@ -288,6 +288,7 @@ class LanguageSupportInstall extends Wire {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function getModuleConfigInputfields() {
|
public function getModuleConfigInputfields() {
|
||||||
|
$modules = $this->wire()->modules;
|
||||||
$install = $this->_('Click to install:') . ' ';
|
$install = $this->_('Click to install:') . ' ';
|
||||||
|
|
||||||
$form = $this->wire(new InputfieldWrapper());
|
$form = $this->wire(new InputfieldWrapper());
|
||||||
@@ -300,17 +301,17 @@ class LanguageSupportInstall extends Wire {
|
|||||||
$list = array();
|
$list = array();
|
||||||
|
|
||||||
foreach($names as $name) {
|
foreach($names as $name) {
|
||||||
if($this->wire('modules')->isInstalled($name)) continue;
|
if($modules->isInstalled($name)) continue;
|
||||||
$list["./installConfirm?name=$name"] = "$install $name";
|
$list[$modules->getModuleInstallUrl($name)] = "$install $name";
|
||||||
$installed[$name] = true;
|
$installed[$name] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$list["../setup/languages/"] =
|
$list["../setup/languages/"] =
|
||||||
$this->_('Add and configure new 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) {
|
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)"') . ' *';
|
$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)"') . ' *';
|
$this->_('Change the type of any other desired "Textarea" fields to "Textarea (Multi-language)"') . ' *';
|
||||||
|
|
||||||
if(count($list)) {
|
if(count($list)) {
|
||||||
$this->wire('modules')->get('JqueryUI')->use('modal');
|
$jQueryUI = $modules->get('JqueryUI'); /** @var JqueryUI $jQueryUI */
|
||||||
$f = $this->wire('modules')->get('InputfieldMarkup');
|
$jQueryUI->use('modal');
|
||||||
|
/** @var InputfieldMarkup $f */
|
||||||
|
$f = $modules->get('InputfieldMarkup');
|
||||||
$f->attr('name', '_next_steps');
|
$f->attr('name', '_next_steps');
|
||||||
$f->label = $this->_('Next steps');
|
$f->label = $this->_('Next steps');
|
||||||
$f->value = "<ul>";
|
$f->value = "<ul>";
|
||||||
|
@@ -1490,7 +1490,7 @@ class ProcessField extends Process implements ConfigurableModule {
|
|||||||
$fieldset->add($f);
|
$fieldset->add($f);
|
||||||
/** @var InputfieldButton $button */
|
/** @var InputfieldButton $button */
|
||||||
$button = $modules->get('InputfieldButton');
|
$button = $modules->get('InputfieldButton');
|
||||||
$button->href = $config->urls->admin . 'module/installConfirm?name=PageFrontEdit';
|
$button->href = $modules->getModuleInstallUrl('PageFrontEdit');
|
||||||
$button->value = $this->_('Install');
|
$button->value = $this->_('Install');
|
||||||
$button->icon = 'sign-in';
|
$button->icon = 'sign-in';
|
||||||
$button->target = '_blank';
|
$button->target = '_blank';
|
||||||
@@ -3529,4 +3529,3 @@ class ProcessField extends Process implements ConfigurableModule {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user