forked from jayallen/melody
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PATCH 20/24] Initial commit of refactoring system settings into a si…
…ngle screen as well. This commit: * makes necessary style changes * added javascript to show and hide system settings fieldsets * refactors fieldset/form elements into includes (prefs/sys_*.tmpl) * adds necessary menu items to CMS * removes obsolete menu items from CMS * adds method handler to Tools.pm Signed-off-by: Open Melody Software Group <admin@openmelody.org>
- Loading branch information
1 parent
d6189fc
commit 30d28ce
Showing
11 changed files
with
487 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
} | ||
|
||
/* Redesign Blog Settings */ | ||
.sys-preferences, | ||
.blog-preferences { | ||
display: none; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<mt:setvar name="page_title" value="<__trans phrase="System Settings">"> | ||
<$mt:setvar name="position_actions_bottom" value="1"$> | ||
<mt:setvar name="system-general-settings" value="1"> | ||
<MTSetVarBlock name="system_msg"> | ||
<mt:if name="error"> | ||
<mtapp:statusmsg | ||
id="generic-error" | ||
class="error"> | ||
<mt:var name="error"> | ||
</mtapp:statusmsg> | ||
</mt:if> | ||
<mt:if name="test_mail_sent"> | ||
<mtapp:statusmsg | ||
id="saved" | ||
class="success"> | ||
<__trans phrase="Test email was sent."> | ||
</mtapp:statusmsg> | ||
</mt:if> | ||
<mt:if name="saved"> | ||
<mtapp:statusmsg | ||
id="saved" | ||
class="success"> | ||
<__trans phrase="Your settings have been saved."> | ||
</mtapp:statusmsg> | ||
</mt:if> | ||
<mt:if name="config_warning"> | ||
<mtapp:statusmsg | ||
id="error" | ||
class="error"> | ||
<mt:var name="config_warning"> | ||
</mtapp:statusmsg> | ||
</mt:if> | ||
</MTSetVarBlock> | ||
<MTSetVarBlock name="content_nav"> | ||
<mt:include name="include/cfg_system_content_nav.tmpl"> | ||
</MTSetVarBlock> | ||
<mt:include name="include/header.tmpl"> | ||
|
||
<script type="text/javascript"> | ||
/* <![CDATA[ */ | ||
function validate (f) { | ||
return true; | ||
} | ||
/* ]]> */ | ||
</script> | ||
|
||
<form action="<mt:var name="script_url">" method="post" onsubmit="return validate(this);"> | ||
<input type="hidden" name="__mode" value="save_cfg_system_general" /> | ||
<input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" /> | ||
<input type="hidden" name="magic_token" value="<mt:var name="magic_token">" /> | ||
|
||
<div id="general" class="sys-preferences"> | ||
<$mt:include name="prefs/sys_general.tmpl"$> | ||
</div> | ||
<div id="users" class="sys-preferences"> | ||
<$mt:include name="prefs/sys_users.tmpl"$> | ||
</div> | ||
<div id="feedback" class="sys-preferences"> | ||
<$mt:include name="prefs/sys_feedback.tmpl"$> | ||
</div> | ||
|
||
<mt:setvarblock name="action_buttons"> | ||
<button | ||
type="submit" | ||
accesskey="s" | ||
title="<__trans phrase="Save changes to these settings (s)">" | ||
class="primary-button" | ||
><__trans phrase="Save Changes"></button> | ||
</mt:setvarblock> | ||
<mt:include name="include/actions_bar.tmpl" bar_position="bottom" hide_pager="1" settings_bar="1"> | ||
|
||
</form> | ||
|
||
<br><br> | ||
|
||
<form id="send-test-email" action="<mt:var name="script_url">" method="post" onsubmit="return validate(this);"> | ||
<input type="hidden" name="__mode" value="cfg_system" /> | ||
<input type="hidden" name="magic_token" value="<mt:var name="magic_token">" /> | ||
<input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" /> | ||
<fieldset> | ||
<mtapp:setting | ||
id="to_email_address" | ||
label="<__trans phrase="Send Email To">" | ||
hint="<__trans phrase="The email address where you want to send test email to.">" | ||
show_hint="1"> | ||
<div class="textarea-wrapper"> | ||
<input id="to_email_address" name="to_email_address" class="full-width" /> | ||
</div> | ||
</mt:app:setting> | ||
</fieldset> | ||
<mt:setvarblock name="action_buttons"> | ||
<button | ||
type="submit" | ||
class="primary-button" | ||
><__trans phrase="Send Test Email"></button> | ||
</mt:setvarblock> | ||
<mt:include name="include/actions_bar.tmpl" bar_position="bottom" hide_pager="1" settings_bar="1"> | ||
</form> | ||
|
||
<mt:include name="include/footer.tmpl"> |
Oops, something went wrong.