[Legacy] Fix cancel button redirecting to old admin page

This commit is contained in:
y.yerli 2023-11-03 13:30:56 +03:00 committed by Jack Anderson
parent 1b4932561b
commit 15c0621540
7 changed files with 80 additions and 56 deletions

View file

@ -43,15 +43,15 @@
*/
*}
<form name="Diagnostic" method="POST" action="index.php">
<form name="Diagnostic" method="GET" action="index.php">
<input type="hidden" name="module" value="Administration">
<input type="hidden" name="action" value="DiagnosticRun">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="actionsContainer">
<tr>
<td class="action-button">
<input title="{$MOD.LBL_DIAG_EXECUTE_BUTTON}" class="button" onclick="this.form.action.value='DiagnosticRun';" type="submit" name="button" value=" {$MOD.LBL_DIAG_EXECUTE_BUTTON} " >
<input title="{$MOD.LBL_DIAG_CANCEL_BUTTON}" class="button" onclick="this.form.action.value='index'; this.form.module.value='Administration'; " type="submit" name="button" value=" {$MOD.LBL_DIAG_CANCEL_BUTTON} "></td>
<input title="{$MOD.LBL_DIAG_CANCEL_BUTTON}" class="button" onclick="this.form.action.value='index'; this.form.module.value='Administration'; this.form.submit();" type="button" name="button" value=" {$MOD.LBL_DIAG_CANCEL_BUTTON}">
</tr>
</table>
@ -126,4 +126,4 @@
}
}
</script>
{/literal}
{/literal}

View file

@ -42,7 +42,7 @@
<link rel="stylesheet" type="text/css" href="{sugar_getjspath file='modules/Connectors/tpls/tabs.css'}"/>
<script type="text/javascript" src="cache/include/javascript/sugar_grp_yui_widgets.js"></script>
<div class="display-modules-config">
<form name="ConfigureTabs" method="POST" method="POST" action="index.php">
<form name="ConfigureTabs" method="GET" action="index.php">
<input type="hidden" name="module" value="Administration">
<input type="hidden" name="action" value="SaveTabs">
<input type="hidden" id="enabled_tabs" name="enabled_tabs" value="">
@ -62,12 +62,12 @@
<table border="0" cellspacing="1" cellpadding="1" class="actionsContainer action-button">
<tr>
<td>
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.saveConfigureTabs();this.form.action.value='SaveTabs'; " type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}" >
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='index'; this.form.module.value='Administration';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.saveConfigureTabs();this.form.action.value='SaveTabs'; " type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}" >
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="clearQueryParamsAndNavigate();" type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
</td>
</tr>
</table>
<div class='add_table'>
<table id="ConfigureTabs" class="themeSettings edit view" style='margin-bottom:0px;' border="0" cellspacing="0" cellpadding="0">
<tr class="config-text">
@ -89,12 +89,12 @@
</tr>
</table>
</div>
<div class='add_subpanels' style='margin-bottom:5px'>
<table id="ConfigureSubPanels" class="themeSettings edit view" style='margin-bottom:0px;' border="0" cellspacing="0" cellpadding="0">
<tr class="enabled-tab mobile-tab-subpanel">
<td width='1%' class="mobile-enabled">
<div id="enabled_subpanels_div"></div>
<div id="enabled_subpanels_div"></div>
</td>
<td class="mobile-disabled">
<div id="disabled_subpanels_div"></div>
@ -102,7 +102,7 @@
</tr>
</table>
</div>
<table border="0" cellspacing="1" cellpadding="1" class="actionsContainer hide-btn">
<tr>
<td>
@ -112,7 +112,7 @@
</tr>
</table>
</td></tr>
</table>
</table>
</form>
</div>
@ -122,7 +122,11 @@
var lblEnabled = '{sugar_translate label="LBL_VISIBLE_TABS"}';
var lblDisabled = '{sugar_translate label="LBL_HIDDEN_TABS"}';
{literal}
function clearQueryParamsAndNavigate() {
let currentURL = window.location.href;
let baseURL = currentURL.split('?')[0];
window.location.href = baseURL + '?module=Administration&action=index';
}
SUGAR.enabledTabsTable = new YAHOO.SUGAR.DragDropTable(
"enabled_div",
[{key:"label", label: lblEnabled, width: 200, sortable: false},
@ -132,7 +136,7 @@
resultsList : "modules",
fields : [{key : "module"}, {key : "label"}]
}
}),
}),
{
height: "300px",
group: ["enabled_div", "disabled_div"]
@ -173,7 +177,7 @@
responseSchema: {
fields : [{key : "module"}, {key : "label"}]
}
}),
}),
{
height: "300px",
group: ["enabled_subpanels_div", "disabled_subpanels_div"]
@ -199,7 +203,7 @@
SUGAR.subDisabledTable.addRow({module: "", label: ""});
SUGAR.subEnabledTable.render();
SUGAR.subDisabledTable.render();
SUGAR.saveConfigureTabs = function()
{
var enabledTable = SUGAR.enabledTabsTable;
@ -210,7 +214,7 @@
modules[i] = data.module;
}
YAHOO.util.Dom.get('enabled_tabs').value = YAHOO.lang.JSON.stringify(modules);
var disabledTable = SUGAR.subDisabledTable;
var modules = [];
for(var i=0; i < disabledTable.getRecordSet().getLength(); i++){
@ -221,4 +225,4 @@
YAHOO.util.Dom.get('disabled_tabs').value = YAHOO.lang.JSON.stringify(modules);
}
{/literal}
</script>
</script>

View file

@ -50,7 +50,7 @@
</div>
<tr><td><br></td></tr><tr><td colspan='100'>
<form name="ConfigureLangs" method="POST" method="POST" action="index.php">
<form name="ConfigureLangs" method="GET" method="POST" action="index.php">
<input type="hidden" name="module" value="Administration">
<input type="hidden" name="action" value="SaveLanguages">
<input type="hidden" id="enabled_langs" name="enabled_langs" value="">
@ -62,7 +62,7 @@
<tr>
<td>
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.saveConfigureLangs();this.form.action.value='SaveLanguages'; " type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}" >
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='index'; this.form.module.value='Administration';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="clearQueryParamsAndNavigate();" type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
</td>
</tr>
</table>
@ -153,5 +153,10 @@
YAHOO.util.Dom.get('disabled_langs').value = YAHOO.lang.JSON.stringify(modules);
}
})();
function clearQueryParamsAndNavigate() {
let currentURL = window.location.href;
let baseURL = currentURL.split('?')[0];
window.location.href = baseURL + '?module=Administration&action=index';
}
{/literal}
</script>

View file

@ -39,16 +39,15 @@
*/
*}
<form name="themeSettings" method="POST">
<form name="themeSettings" method="GET">
<input type="hidden" name="module" value="Administration">
<input type="hidden" name="action" value="ThemeSettings">
<input type="hidden" name="disabled_themes" value="">
<table border="0" cellspacing="1" cellpadding="1" class="actionsContainer action-button">
<tr>
<td>
<input title="{$APP.LBL_SAVE_BUTTON_LABEL}" accessKey="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button primary" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">
<input title="{$APP.LBL_CANCEL_BUTTON_LABEL}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="document.themeSettings.action.value='';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
<input title="{$APP.LBL_CANCEL_BUTTON_LABEL}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="clearQueryParamsAndNavigate();" type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
</td>
</tr>
</table>
@ -81,7 +80,7 @@
</tbody>
</table>
</div>
<table border="0" cellspacing="1" cellpadding="1" class="actionsContainer hide-btn">
<tr>
<td>
@ -111,5 +110,10 @@
});
});
function clearQueryParamsAndNavigate() {
let currentURL = window.location.href;
let baseURL = currentURL.split('?')[0];
window.location.href = baseURL + '?module=Administration&action=index';
}
{/literal}
</script>
</script>

View file

@ -47,21 +47,26 @@
<script type="text/javascript">
<!--
{literal}
function change_state(radiobutton)
function change_state(radiobutton)
{
if (radiobutton.value == '1') {
radiobutton.form['massemailer_tracking_entities_location'].disabled=true;
radiobutton.form['massemailer_tracking_entities_location'].value='{/literal}{$MOD.TRACKING_ENTRIES_LOCATION_DEFAULT_VALUE}{literal}';
}
}
else {
radiobutton.form['massemailer_tracking_entities_location'].disabled=false;
radiobutton.form['massemailer_tracking_entities_location'].value='{/literal}{$SITEURL}{literal}';
}
}
function clearQueryParamsAndNavigate() {
let currentURL = window.location.href;
let baseURL = currentURL.split('?')[0];
window.location.href = baseURL + '?module=Administration&action=index';
}
{/literal}
-->
</script>
<form name="ConfigureSettings" id="EditView" method="POST">
<form name="ConfigureSettings" id="EditView" method="GET">
<input type="hidden" name="module" value="EmailMan">
<input type="hidden" name="campaignConfig" value="true">
<input type="hidden" name="action">
@ -71,7 +76,7 @@ function change_state(radiobutton)
<div class="action-button">
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button" onclick="this.form.action.value='Save';return verify_data(this);" type="submit" name="button" value=" {$APP.LBL_SAVE_BUTTON_LABEL} ">
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" class="button" onclick="this.form.action.value='{$RETURN_ACTION}'; this.form.module.value='{$RETURN_MODULE}';" type="submit" name="button" value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" class="button" onclick="clearQueryParamsAndNavigate();" type="button" name="button" value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
@ -99,7 +104,7 @@ function change_state(radiobutton)
</td>
<td >
<input type='radio' onclick="change_state(this);" name='massemailer_tracking_entities_location_type' value="1" {$default_checked}>
{$MOD.LBL_DEFAULT_LOCATION}&nbsp;<input type='radio' {$userdefined_checked} onclick="change_state(this);" name='massemailer_tracking_entities_location_type' value="2">{$MOD.LBL_CUSTOM_LOCATION}
{$MOD.LBL_DEFAULT_LOCATION}&nbsp;<input type='radio' {$userdefined_checked} onclick="change_state(this);" name='massemailer_tracking_entities_location_type' value="2">{$MOD.LBL_CUSTOM_LOCATION}
</tr>
<tr>
<td scope="row" class="mobile-hide">
@ -117,7 +122,7 @@ function change_state(radiobutton)
</td>
<td >
<input type='radio' name='massemailer_email_copy' value="1" {$yes_checked}>
{$MOD.LBL_YES}&nbsp;<input type='radio' {$no_checked} name='massemailer_email_copy' value="2">{$MOD.LBL_NO}
{$MOD.LBL_YES}&nbsp;<input type='radio' {$no_checked} name='massemailer_email_copy' value="2">{$MOD.LBL_NO}
</td>
</tr>
@ -136,4 +141,4 @@ function change_state(radiobutton)
</table>
</form>
{$JAVASCRIPT}
{$JAVASCRIPT}

View file

@ -46,6 +46,12 @@
{literal}
<script type="text/javascript" >
<!--
function clearQueryParamsAndNavigate() {
let currentURL = window.location.href;
let baseURL = currentURL.split('?')[0];
window.location.href = baseURL + '?module=Administration&action=index';
}
function change_state(radiobutton) {
if (radiobutton.value == '1') {
@ -60,7 +66,7 @@ function change_state(radiobutton) {
</script>
{/literal}
{$ROLLOVER}
<form name="ConfigureSettings" id="EditView" method="POST" >
<form name="ConfigureSettings" id="EditView" method="GET" >
<input type="hidden" name="module" value="EmailMan">
<input type="hidden" name="action">
<input type="hidden" name="return_module" value="{$RETURN_MODULE}">
@ -71,7 +77,7 @@ function change_state(radiobutton) {
<tr>
<td class="action-btn-top">
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="this.form.action.value='Save';return verify_data(this);" type="submit" name="button" id="btn_save" value=" {$APP.LBL_SAVE_BUTTON_LABEL} ">
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='{$RETURN_ACTION}'; this.form.module.value='{$RETURN_MODULE}';" type="submit" name="button" value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="clearQueryParamsAndNavigate();" type="button" name="button" value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
</td>
</tr>
<tr>
@ -319,9 +325,9 @@ function change_state(radiobutton) {
</div>
<div class="panel-body applet-content">
<div class="tab-content">
<div>{$MOD.LBL_SECURITY_DESC}</div>
<div class="flex">
<div>{$MOD.LBL_SECURITY_DESC}</div>
<div class="flex">
<div>{$MOD.LBL_SECURITY_OUTLOOK_DEFAULTS}</div>
<div style="margin-left: 3em;">
<input type="checkbox" value="1" name="set_outlook_defaults" id="set_outlook_defaults" onclick="setOutlookDefaults();">&nbsp;
@ -387,12 +393,12 @@ function change_state(radiobutton) {
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_APPLET}</div>
<div><input type="checkbox" value="1" name="applet" id="applet" {$appletChecked}></div>
<div>&nbsp; &lt;applet&gt;</div>
<div>&nbsp; &lt;applet&gt;</div>
</div>
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_BASE}</div>
<div><input type="checkbox" value="1" name="base" id="base" {$baseChecked}></div>
<div>&nbsp; &lt;base&gt</div>
<div>&nbsp; &lt;base&gt</div>
</div>
</div>
@ -400,12 +406,12 @@ function change_state(radiobutton) {
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_EMBED}</div>
<div><input type="checkbox" value="1" name="embed" id="embed" {$embedChecked}></div>
<div>&nbsp; &lt;embed&gt;</div>
<div>&nbsp; &lt;embed&gt;</div>
</div>
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_FORM}</div>
<div><input type="checkbox" value="1" name="form" id="form" {$formChecked}></div>
<div>&nbsp; &lt;form&gt;</div>
<div>&nbsp; &lt;form&gt;</div>
</div>
</div>
@ -413,12 +419,12 @@ function change_state(radiobutton) {
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_FRAME}</div>
<div><input type="checkbox" value="1" name="frame" id="frame" {$frameChecked}></div>
<div>&nbsp; &lt;frame&gt;</div>
<div>&nbsp; &lt;frame&gt;</div>
</div>
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_FRAMESET}</div>
<div><input type="checkbox" value="1" name="frameset" id="frameset" {$framesetChecked}></div>
<div>&nbsp; &lt;frameset&gt;</div>
<div>&nbsp; &lt;frameset&gt;</div>
</div>
</div>
@ -426,12 +432,12 @@ function change_state(radiobutton) {
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_IFRAME}</div>
<div><input type="checkbox" value="1" name="iframe" id="iframe" {$iframeChecked}></div>
<div>&nbsp; &lt;iframe&gt;</div>
<div>&nbsp; &lt;iframe&gt;</div>
</div>
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_IMPORT}</div>
<div><input type="checkbox" value="1" name="import" id="import" {$importChecked}></div>
<div>&nbsp; &lt;import&gt;</div>
<div>&nbsp; &lt;import&gt;</div>
</div>
</div>
@ -439,12 +445,12 @@ function change_state(radiobutton) {
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_LAYER}</div>
<div><input type="checkbox" value="1" name="layer" id="layer" {$layerChecked}></div>
<div>&nbsp; &lt;layer&gt;</div>
<div>&nbsp; &lt;layer&gt;</div>
</div>
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_LINK}</div>
<div><input type="checkbox" value="1" name="link" id="link" {$linkChecked}></div>
<div>&nbsp; &lt;link&gt;</div>
<div>&nbsp; &lt;link&gt;</div>
</div>
</div>
@ -452,12 +458,12 @@ function change_state(radiobutton) {
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_OBJECT}</div>
<div><input type="checkbox" value="1" name="object" id="object" {$objectChecked}></div>
<div>&nbsp; &lt;object&gt;</div>
<div>&nbsp; &lt;object&gt;</div>
</div>
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_STYLE}</div>
<div><input type="checkbox" value="1" name="style" id="style" {if isset($styleChecked)}{$styleChecked}{else}{log msg="styleChecked is not set"}{/if}></div>
<div>&nbsp; &lt;style&gt;</div>
<div>&nbsp; &lt;style&gt;</div>
</div>
</div>
@ -465,7 +471,7 @@ function change_state(radiobutton) {
<div class="flex-child">
<div class="lbl-space">{$MOD.LBL_SECURITY_XMP}</div>
<div><input type="checkbox" value="1" name="xmp" id="xmp" {$xmpChecked}></div>
<div>&nbsp; &lt;xmp&gt;</div>
<div>&nbsp; &lt;xmp&gt;</div>
</div>
<div class="flex-child">
<div>&nbsp;</div>
@ -473,7 +479,7 @@ function change_state(radiobutton) {
</div>
</div>
</div>
</div>
</div>
@ -818,4 +824,4 @@ changeEmailScreenDisplay("{/literal}{$mail_smtptype}{literal}", false);
</script>
{/literal}
</div>
</div>

View file

@ -70,11 +70,11 @@
<table cellspacing="2">
<tr>
<td colspan="3">{$MOD.LBL_RENAME_MOD_SAVE_HELP}</td>
</tr>
</tr>
<tr>
<td colspan="3" class='action-button'>
<input type="button" class="button primary" value="{$MOD.LBL_BTN_SAVE}" id="renameSaveBttn" onclick='validateForm();'name="{$MOD.LBL_BTN_SAVE}" />
<input type="button" class="button" value="{$MOD.LBL_BTN_CANCEL}" id="renameCancelBttn" name="{$MOD.LBL_BTN_CANCEL}" onclick="document.editdropdown.action.value='index'; document.editdropdown.module.value='Administration';document.editdropdown.submit()" />
<input type="button" class="button" value="{$MOD.LBL_BTN_CANCEL}" id="renameCancelBttn" name="{$MOD.LBL_BTN_CANCEL}" onclick="document.location.href='index.php?module=Administration&action=index'" />
</td>
</tr>
</table>
@ -103,7 +103,7 @@
</tr>
<tr>
<td>
<form method='post' action='index.php' name='editdropdown'>
<form method='GET' action='index.php' name='editdropdown'>
<input type='hidden' name='action' value='wizard'>
<input type='hidden' name='wizard' value='RenameModules'>
<input type='hidden' name='option' value='SaveDropDown'>
@ -276,4 +276,4 @@
</form>
</td></tr>
</table>
</div>
</div>