Example #1
0
     header('Location:index.php?p=' . PAGE_ID_APPS_PUB . '&app=' . Helper::getHTTPGetStringValue('app', 0));
     break;
     //////// SAVE TRANSLATION
 //////// SAVE TRANSLATION
 case 'saveTranslation':
     require_once BASE_PATH . 'includes/appdesc.class.php';
     $mAppDesc = new ApplicationDesc($_POST['package']);
     if ($mAppDesc->loadTranslation($_POST['code'])) {
         foreach ($_POST as $k => $value) {
             $tmp = explode('-', $k);
             if (count($tmp) == 2 && strcmp($tmp[0], "prop") == 0) {
                 $mAppDesc->setProperty($tmp[1], $value);
             }
         }
         $mAppDesc->commit();
         echo $mAppDesc->buildTranslatedDescription();
     } else {
         echo 'Invalid language code !';
     }
     break;
     //////// GET TMPL EDITOR
 //////// GET TMPL EDITOR
 case 'getTmplEditor':
     require_once BASE_PATH . 'pages/apps_pub_tmpl_editor_dialog.php';
     break;
     //////// UPDATE TEMPLATE
 //////// UPDATE TEMPLATE
 case 'updateTemplate':
     require_once BASE_PATH . 'includes/appdesc.class.php';
     $error = null;
     $package = $_POST['package'];
		<div class="control-group">
    	<label class="control-label" for="inputEmail">Language name</label>
    	<div class="controls">
      	<input type="text" name="lang-name" class="input-large" placeholder="language name" />
      	<input type="text" name="lang-code" class="input-medium" placeholder="code ie en-US" />
    	</div>
    	
  	</div>
  	<?php 
}
?>
	
		<center><textarea name="template" style="width:640px; height:<?php 
echo $isNew ? '480' : '500';
?>
px;" ><?php 
if (!$isNew) {
    echo htmlspecialchars($mAppDesc->buildTranslatedDescription(true));
}
?>
</textarea></center>
	</form>
</div>


<div class="modal-footer">
  <a href="javascript:closeTmplEditor()" class="btn" >Close</a>
 	
  <a href="javascript:saveTmpl()" class="btn btn-success" ><i class="icon-ok icon-white" ></i>&nbsp;Save changes</a>
</div>