| 1 | <mt:setvar name="page_title" value="<__trans phrase="System: General Settings">"> |
|---|
| 2 | <$mt:setvar name="position_actions_bottom" value="1"$> |
|---|
| 3 | <mt:setvar name="system-general-settings" value="1"> |
|---|
| 4 | <MTSetVarBlock name="system_msg"> |
|---|
| 5 | <mt:if name="error"> |
|---|
| 6 | <mtapp:statusmsg |
|---|
| 7 | id="generic-error" |
|---|
| 8 | class="error"> |
|---|
| 9 | <mt:var name="error"> |
|---|
| 10 | </mtapp:statusmsg> |
|---|
| 11 | </mt:if> |
|---|
| 12 | <mt:if name="saved"> |
|---|
| 13 | <mtapp:statusmsg |
|---|
| 14 | id="saved" |
|---|
| 15 | class="success"> |
|---|
| 16 | <__trans phrase="Your settings have been saved."> |
|---|
| 17 | </mtapp:statusmsg> |
|---|
| 18 | </mt:if> |
|---|
| 19 | </MTSetVarBlock> |
|---|
| 20 | <MTSetVarBlock name="content_nav"> |
|---|
| 21 | <mt:include name="include/cfg_system_content_nav.tmpl"> |
|---|
| 22 | </MTSetVarBlock> |
|---|
| 23 | <mt:include name="include/header.tmpl"> |
|---|
| 24 | |
|---|
| 25 | <script type="text/javascript"> |
|---|
| 26 | /* <![CDATA[ */ |
|---|
| 27 | function clearWeblogCloneSource() { |
|---|
| 28 | var el_name = getByID("new_user_template_blog_name"); |
|---|
| 29 | var el_id = getByID("new_user_template_blog_id"); |
|---|
| 30 | if (el_name && el_id) { |
|---|
| 31 | el_id.value = ""; |
|---|
| 32 | el_name.innerHTML = "<__trans phrase="(No blog selected)">"; |
|---|
| 33 | } |
|---|
| 34 | var el_id_link = getByID("select-blog-link"); |
|---|
| 35 | if (el_id_link) { |
|---|
| 36 | el_id_link.innerHTML = "<__trans phrase="Select blog">"; |
|---|
| 37 | } |
|---|
| 38 | } |
|---|
| 39 | function validate (f) { |
|---|
| 40 | if (f.default_site_url.value && !is_valid_url(f.default_site_url.value)){ |
|---|
| 41 | alert('<__trans phrase="You must set a valid Default Site URL." escape="singlequotes">'); |
|---|
| 42 | return false; |
|---|
| 43 | } else if (f.default_site_root.value && !is_valid_path(f.default_site_root.value)) { |
|---|
| 44 | alert('<__trans phrase="You must set a valid Default Site Root." escape="singlequotes">'); |
|---|
| 45 | return false; |
|---|
| 46 | } |
|---|
| 47 | return true; |
|---|
| 48 | } |
|---|
| 49 | function is_valid_url(url_){ |
|---|
| 50 | return url_.match( /^https?:\/\/[A-Za-z0-9!$%()=_.:,;@~-]+/ ); |
|---|
| 51 | } |
|---|
| 52 | function is_valid_path(path_){ |
|---|
| 53 | for(i = 0; i < path_.length; i++){ |
|---|
| 54 | var buf = escape(path_.substr(i, 1)); |
|---|
| 55 | if (buf.match(/^%u.*/)){ |
|---|
| 56 | return false; |
|---|
| 57 | } |
|---|
| 58 | if (buf.match(/(%.{2}){2}?/)){ |
|---|
| 59 | return false; |
|---|
| 60 | } |
|---|
| 61 | } |
|---|
| 62 | return true; |
|---|
| 63 | } |
|---|
| 64 | /* ]]> */ |
|---|
| 65 | </script> |
|---|
| 66 | |
|---|
| 67 | <form action="<mt:var name="script_url">" method="post" onsubmit="return validate(this);"> |
|---|
| 68 | <input type="hidden" name="__mode" value="save_cfg_system_general" /> |
|---|
| 69 | <input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" /> |
|---|
| 70 | <input type="hidden" name="magic_token" value="<mt:var name="magic_token">" /> |
|---|
| 71 | |
|---|
| 72 | <fieldset> |
|---|
| 73 | |
|---|
| 74 | <mtapp:setting |
|---|
| 75 | id="system_email_address" |
|---|
| 76 | label="<__trans phrase="System Email">" |
|---|
| 77 | hint="<__trans phrase="The email address used in the From: header of each email sent from the system. The address is used in password recovery, commenter registration, comment, trackback notification and a few other minor events.">" |
|---|
| 78 | show_hint="1"> |
|---|
| 79 | <div class="textarea-wrapper"> |
|---|
| 80 | <input id="system_email_address" name="system_email_address"<mt:if name="system_email_address"> value="<mt:var name="system_email_address">"</mt:if> class="full-width" /> |
|---|
| 81 | </div> |
|---|
| 82 | </mt:app:setting> |
|---|
| 83 | |
|---|
| 84 | </fieldset> |
|---|
| 85 | |
|---|
| 86 | <mt:setvarblock name="action_buttons"> |
|---|
| 87 | <button |
|---|
| 88 | type="submit" |
|---|
| 89 | accesskey="s" |
|---|
| 90 | title="<__trans phrase="Save changes to these settings (s)">" |
|---|
| 91 | class="primary-button" |
|---|
| 92 | ><__trans phrase="Save Changes"></button> |
|---|
| 93 | </mt:setvarblock> |
|---|
| 94 | <mt:include name="include/actions_bar.tmpl" bar_position="bottom" hide_pager="1" settings_bar="1"> |
|---|
| 95 | |
|---|
| 96 | </form> |
|---|
| 97 | |
|---|
| 98 | <mt:include name="include/footer.tmpl"> |
|---|