extension config can edited from extension mgr

This commit is contained in:
Uwe Steinmann 2025-04-02 08:10:44 +02:00
parent 1bff379d84
commit 3bed5b0d68

View File

@ -55,6 +55,25 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
});
*/
});
$('body').on('click', '#btn_save_config', function(ev){
var element = $(this);
ev.preventDefault();
$.ajax({url: '../op/op.Settings.php',
type: 'POST',
dataType: "json",
data: data = $('#formconfig').serializeArray(),
success: function(data) {
noty({
text: data.msg,
type: (data.error) ? 'error' : 'success',
dismissQueue: true,
layout: 'topRight',
theme: 'defaultTheme',
timeout: 1500,
});
}
});
});
$('body').on('click', 'a.toggle', function(ev){
// $('a.toggle').click(function(ev){
var element = $(this);
@ -247,8 +266,10 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
if(!empty($extconf['changelog']) && file_exists($extdir."/".$extname."/".$extconf['changelog'])) {
echo $this->getModalBoxLink(array('target'=>'extensionChangelog', 'remote'=>'out.ExtensionMgr.php?action=changelog&extensionname='.$extname, 'class'=>'', 'title'=>'<i class="fa fa-reorder"></i>', 'attributes'=>array('title'=>getMLText('show_extension_changelog'))));
}
if($extconf['config'])
echo "<a href=\"../out/out.Settings.php?currenttab=extensions#".$extname."\" title=\"".getMLText('configure_extension')."\"><i class=\"fa fa-cogs\"></i></a>";
if($extconf['config']) {
// echo "<a href=\"../out/out.Settings.php?currenttab=extensions#".$extname."\" title=\"".getMLText('configure_extension')."\"><i class=\"fa fa-cogs\"></i></a>";
echo $this->getModalBoxLink(array('target'=>'extensionConfig', 'remote'=>'out.Settings.php?action=extension&extensionname='.$extname, 'class'=>'', 'title'=>'<i class="fa fa-cogs"></i>', 'attributes'=>array('title'=>getMLText('show_extension_changelog'), 'data-modal-title'=>$extname)));
}
if($settings->_enableExtensionDownload)
echo "<form style=\"display: inline-block; margin: 0px;\" method=\"post\" action=\"../op/op.ExtensionMgr.php\" id=\"".$extname."-download\">".createHiddenFieldWithKey('extensionmgr')."<input type=\"hidden\" name=\"action\" value=\"download\" /><input type=\"hidden\" name=\"extname\" value=\"".$extname."\" /><a class=\"download\" data-extname=\"".$extname."\" title=\"".getMLText('download_extension')."\"><i class=\"fa fa-download\"></i></a></form>";
if(is_writeable($settings->_configFilePath) && $check) {
@ -389,6 +410,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
echo $this->getModalBox(array('id'=>'extensionInfo', 'title'=>getMLText('extension_version_list'), 'content'=>'<p>'.getMLText('extension_loading').'</p>', 'buttons'=>array(array('title'=>getMLText('close')))));
echo $this->getModalBox(array('id'=>'extensionChangelog', 'title'=>getMLText('extension_changelog'), 'content'=>'<p>'.getMLText('changelog_loading').'</p>', 'buttons'=>array(array('title'=>getMLText('close')))));
echo $this->getModalBox(array('id'=>'extensionReadme', 'title'=>getMLText('extension_readme'), 'content'=>'<p>'.getMLText('readme_loading').'</p>', 'buttons'=>array(array('title'=>getMLText('close')))));
echo $this->getModalBox(array('id'=>'extensionConfig', 'title'=>getMLText('extension_config'), 'content'=>'<p>'.getMLText('readme_loading').'</p>', 'buttons'=>array(array('title'=>getMLText('close')), array('id'=>'btn_save_config', 'title'=>getMLText('set')))));
$this->contentEnd();
$this->htmlEndPage();
} /* }}} */