mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 18:24:57 +02:00
Fix issue processwire/processwire-issues#188 to provide more detailed warning message when installing module that doesn't meet requirements
This commit is contained in:
@@ -649,7 +649,7 @@ class ProcessModule extends Process {
|
||||
if($summary) $summary = "<p class='module-summary'>$summary</p>";
|
||||
$buttons = '';
|
||||
$confirmDeleteJS = "return confirm('" . sprintf($this->_('Delete %s?'), $name) . "')";
|
||||
$confirmInstallJS = "return confirm('" . sprintf($this->_('Installing may cause problems. Are you sure you want to install?'), $name) . "')";
|
||||
$confirmInstallJS = "return confirm('" . sprintf($this->_('Module requirements are not fulfilled so installing may cause problems. Are you sure you want to install?'), $name) . "')";
|
||||
$editUrl = "edit?name={$name}";
|
||||
|
||||
if(!$installed) {
|
||||
|
@@ -386,15 +386,18 @@ var ProcessWireAdmin = {
|
||||
|
||||
if(typeof ProcessWire != "undefined") {
|
||||
ProcessWire.confirm = function(message, func) {
|
||||
if(typeof vex != "undefined") {
|
||||
if(typeof vex != "undefined" && typeof func != "undefined") {
|
||||
vex.dialog.confirm({
|
||||
message: message,
|
||||
callback: function(v) {
|
||||
if(v) func();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
} else if(typeof func != "undefined") {
|
||||
if(confirm(message)) func();
|
||||
} else {
|
||||
// regular JS confirm behavior
|
||||
return confirm(message);
|
||||
}
|
||||
};
|
||||
|
||||
|
2
wire/templates-admin/scripts/main.min.js
vendored
2
wire/templates-admin/scripts/main.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user