wefra/themes/default/views/edit-translation.php

59 lines
2.5 KiB
PHP
Raw Normal View History

<div class="container">
<?php
if(!isset($_SESSION['user'])){
?>
<div class="row">
<div class="col-md-12">
<div class="panel panel-danger">
<div class="panel-body text-center">
<h4>
<?php
echo $oTrans->getTranslationWithData(
'message_noRightToAccessToThisPage',
$_SESSION['config']['default_lang_code'],
array(
'<a href="'.$oTrans->getTranslation('webpage_register_url', $_SESSION['config']['default_lang_code']).'">'.
$oTrans->getTranslation('webpage_register_name', $_SESSION['config']['default_lang_code']).'
</a>'
)
);
?>
<h4>
</div>
</div>
</div>
</div>
<?php
} else {
?>
<div class="row">
<h1><?php echo $oTrans->getTranslation('webpage_editTranslation_title', $_SESSION['user']['lang_code']); ?></h1>
<div class="col-md-12">
<?php
echo "session lang = ".$_SESSION['config']['default_lang_code']."<br/>";
echo "user lang = ".$_SESSION['user']['lang_code']."<br/>";
?>
<!--<form method="post" action="< ?php echo $oConf->getURLRoot('list-translations'); ?>">-->
<form method="post" action="#">
<input type="hidden" id="translation_id" name="translation_id" value="<?php echo $_REQUEST['reference']; ?>" />
<div class="col-sm-6">
<div class="form-group">
<label class="reverted" for="source"><?php echo $oTrans->getTranslation('webpage_editTranslation_sourceLabel', $_SESSION['user']['lang_code']); ?></label>
<textarea class="form-control" id="source" name="source" style="min-height: 400px;"><?php echo $translation['source']; ?></textarea>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="reverted" for="translation"><?php echo $oTrans->getTranslation('webpage_editTranslation_translationLabel', $_SESSION['user']['lang_code']); ?></label>
<textarea class="form-control" id="translation" name="translation" style="min-height: 400px;"><?php echo $translation[$_SESSION['user']['lang_code']]; ?></textarea>
</div>
</div>
<input class="btn btn-primary" type="submit" id="submit_translation" name="submit_translation" value="<?php echo $oTrans->getTranslation('webpage_editTranslation_saveButton', $_SESSION['user']['lang_code']); ?>"/>
</form>
</div>
</div>
<?php
} //ENDOF else
?>
</div>