Commit 8e291fc1 authored by lphuberdeau's avatar lphuberdeau

[MOD] Usability fix, move language switching away from the edit UI

parent 4ea21869
......@@ -730,7 +730,6 @@ class MultilingualLib extends TikiLib {
}
return $flags;
}
}
global $dbTiki;
$multilinguallib = new MultilingualLib($dbTiki);
......
......@@ -83,6 +83,20 @@
{/if}
{/if}
<h3>{tr}Change language for this page{/tr}</h3>
<form method="post" action="tiki-edit_translation.php">
<div>
<select name="langpage">
<option value="">{tr}Select from available options...{/tr}</option>
{foreach item=lang from=$languages}
<option value="{$lang.value|escape}">{$lang.name}</option>
{/foreach}
</select>
<input type="hidden" name="page" value="{$name|escape}"/>
<input type="submit" name="switch" value="{tr}Change Language{/tr}"/>
</div>
</form>
{* end of if !isset($allowed_for_staging_only)}
{else}
<div class="simplebox">
......
......@@ -295,6 +295,7 @@ function searchrep() {
{/if}
{/if}
{if $prefs.feature_multilingual eq 'y'}
{if not($data.page_id)}
<tr class="formcolor"><td>{tr}Language{/tr}:</td><td>
<select name="lang">
<option value="">{tr}Unknown{/tr}</option>
......@@ -312,14 +313,17 @@ function searchrep() {
<input type="hidden" name="source_page" value="{$source_page|escape}"/>
{/if}
</td></tr>
{else}
<tr class="formcolor">
<td>{tr}Translation request{/tr}:</td>
<td>
<input type="hidden" name="lang" value="{$lang|escape}"/>
<input type="checkbox" name="translation_critical" id="translation_critical"{if $translation_critical} checked="checked"{/if}/>
<label for="translation_critical">{tr}Send urgent translation request.{/tr}</label>
</td>
</tr>
{/if}
{/if}
{if $page|lower neq 'sandbox'}
<tr class="formcolor" id="input_edit_summary"><td>{tr}Edit Summary{/tr}:</td><td><input style="width:98%;" class="wikiedit" type="text" name="comment" value="{$commentdata|escape}" /></td></tr>
{if $prefs.wiki_feature_copyrights eq 'y'}
......
......@@ -52,7 +52,6 @@ if ((!isset($_REQUEST['type']) || $_REQUEST['type'] == 'wiki page' || $_REQUEST[
$edit_data = $info['data'];
$smarty->assign('pagedata', TikiLib::htmldecode($edit_data));
$smarty->assign('translate_message', tra('Translation in progress.', $langpage));
}
else if ($_REQUEST['id']) {
if (!isset($_REQUEST['type'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment