saimod locale strings rdy - now with add and delete and edit! Texts for login mod are now all alike
This commit is contained in:
parent
efe6c102a8
commit
d8e16ee98d
@ -16,7 +16,8 @@ class locale_string {
|
||||
|
||||
const VALUE_CATEGORY_SYSTEM = 10;
|
||||
const VALUE_CATEGORY_SYSTEM_ERROR = 11;
|
||||
const VALUE_CATEGORY_SYSTEM_SAI = 12;
|
||||
const VALUE_CATEGORY_SYSTEM_SAI = 42;
|
||||
const VALUE_CATEGORY_SYSTEM_SAI_ERROR = 43;
|
||||
|
||||
const VALUE_CATEGORY_SYSTEM_ENDCAT = 99;
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB |
15
sai/modules/saimod_sys_locale/add.tpl
Normal file
15
sai/modules/saimod_sys_locale/add.tpl
Normal file
@ -0,0 +1,15 @@
|
||||
<h3>Add new text</h3>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td><b>ID: </b></td>
|
||||
<td><input type="text" id="content_new_id" value=""/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Category: </b></td>
|
||||
<td><input type="text" id="content_new_cat" value=""/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<input type="submit" class="btn localeMain" value="back">
|
||||
<input type="submit" class="btn add" value="save">
|
||||
20
sai/modules/saimod_sys_locale/edit.tpl
Normal file
20
sai/modules/saimod_sys_locale/edit.tpl
Normal file
@ -0,0 +1,20 @@
|
||||
<h3>${entry}</h3>
|
||||
<table class="table table-hover table-condensed" style="overflow: auto;">
|
||||
<tr>${langhead}</tr>
|
||||
<tr>${content}</tr>
|
||||
</table>
|
||||
<br>
|
||||
<input type="submit" class="btn localeMain" value="back">
|
||||
<script>tinymce.init({ selector: "textarea",
|
||||
force_p_newlines : false,
|
||||
forced_root_block : false,
|
||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
||||
plugins: [
|
||||
"advlist autolink lists link image charmap print preview anchor",
|
||||
"searchreplace visualblocks code fullscreen",
|
||||
"insertdatetime media table contextmenu paste moxiemanager",
|
||||
"textcolor"
|
||||
],
|
||||
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
|
||||
});
|
||||
</script>
|
||||
7
sai/modules/saimod_sys_locale/edit_entry.tpl
Normal file
7
sai/modules/saimod_sys_locale/edit_entry.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
<td>
|
||||
<div class="dialog" style="padding-bottom: 5px;">
|
||||
<textarea name="content" class="tinymce" style="width: 100%" id="edit_field_${id}_${lang}">${value}</textarea>
|
||||
</div>
|
||||
<input type="submit" class="btn edit_content" value="edit" lang="${lang}" name="${id}">
|
||||
<br>
|
||||
</td>
|
||||
8
sai/modules/saimod_sys_locale/list.tpl
Normal file
8
sai/modules/saimod_sys_locale/list.tpl
Normal file
@ -0,0 +1,8 @@
|
||||
<h3>Locale String <input type="submit" value="Add" class="btn content_add"></h3>
|
||||
<br>
|
||||
<table class="table table-hover table-condensed" style="overflow: auto;">
|
||||
<tr>
|
||||
<th>ID</th><th>Category</th>${langhead}
|
||||
</tr>
|
||||
${content}
|
||||
</table>
|
||||
9
sai/modules/saimod_sys_locale/list_entry.tpl
Normal file
9
sai/modules/saimod_sys_locale/list_entry.tpl
Normal file
@ -0,0 +1,9 @@
|
||||
<tr>
|
||||
<td style="padding-bottom: 5px;">
|
||||
${id}<br><br>
|
||||
<input type="submit" class="btn-danger content_delete" value="delete" name="${id}">
|
||||
<input type="submit" class="btn content_edit" value="edit" style="margin-left: 3px;" name="${id}">
|
||||
</td>
|
||||
<td>${category}</td>
|
||||
${content}
|
||||
</tr>
|
||||
64
sai/modules/saimod_sys_locale/saimod_sys_locale.js
Normal file
64
sai/modules/saimod_sys_locale/saimod_sys_locale.js
Normal file
@ -0,0 +1,64 @@
|
||||
function init__SYSTEM_SAI_saimod_sys_locale() {
|
||||
$('.content_edit').click(function () {saimod_sys_locale_edit($(this).attr('name'));});
|
||||
$('.content_delete').click(function(){saimod_sys_locale_delete($(this).attr('name'));});
|
||||
$('.content_add').click(function(){saimod_sys_locale_add();});
|
||||
}
|
||||
function saimod_sys_locale_add(){
|
||||
$('div#content-wrapper').load(SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_locale&action=addmode',function(){
|
||||
$('.localeMain').click(function(){
|
||||
loadModuleContent('.SYSTEM.SAI.saimod_sys_locale');
|
||||
});
|
||||
$('.add').click(function(){
|
||||
$.ajax({ url: SAI_ENDPOINT,
|
||||
data: { sai_mod: '.SYSTEM.SAI.saimod_sys_locale',
|
||||
action: 'add',
|
||||
id: $('#content_new_id').val(),
|
||||
category: $('#content_new_cat').val()},
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
if (data.status == false){
|
||||
alert("Addition could not be applied.");
|
||||
} else {
|
||||
alert("Addition has been saved.");}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
//
|
||||
//window.location = SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_locale&action=add&id='+$('#new').attr('value')+'&lang=deDE&newtext='+$('#areacontent').val();
|
||||
//window.location = SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_locale';
|
||||
//function(data){
|
||||
// if (data.status == false){ alert("false"); } else { alert("true");}
|
||||
//});
|
||||
// });
|
||||
}
|
||||
|
||||
function saimod_sys_locale_delete(buttonID){
|
||||
$.getJSON(SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_locale&action=delete&id='+buttonID,
|
||||
function(data){if (data.status == false){ alert("false"); } else { alert("true");}});
|
||||
}
|
||||
|
||||
function saimod_sys_locale_edit(buttonID){
|
||||
$('div#content-wrapper').load(SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_locale&action=editmode&entry='+buttonID, function(){
|
||||
$('.localeMain').click(function(){
|
||||
loadModuleContent('.SYSTEM.SAI.saimod_sys_locale');
|
||||
});
|
||||
$('.edit_content').click(function(){
|
||||
tinyMCE.triggerSave();
|
||||
$.ajax({ url: SAI_ENDPOINT,
|
||||
data: { sai_mod: '.SYSTEM.SAI.saimod_sys_locale',
|
||||
action: 'edit',
|
||||
id: $(this).attr('name'),
|
||||
lang: $(this).attr('lang'),
|
||||
newtext: $('#edit_field_'+$(this).attr('name')+'_'+$(this).attr('lang')).val()},
|
||||
type: 'POST',
|
||||
success: function(data) {
|
||||
if (data.status == false){
|
||||
alert("Changes could not be applied.");
|
||||
} else {
|
||||
alert("Changes has been saved.");}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -8,36 +8,31 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule {
|
||||
}
|
||||
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale(){
|
||||
$result = '<h3>Locale String</h3>'.
|
||||
//<input type="submit" value="Add" class="btn add_form">
|
||||
'<br><table class="table table-hover table-condensed" style="overflow: auto;">'.
|
||||
'<tr>'.'<th>'.'ID'.'</th>'.'<th>'.'Category'.'</th>';
|
||||
|
||||
foreach (self::getLanguages() as $lang){
|
||||
$result .= '<th>'.$lang.'</th>';
|
||||
$languages[] = $lang;
|
||||
}
|
||||
|
||||
$result .= '</tr>';
|
||||
|
||||
$vars = array();
|
||||
|
||||
$vars['langhead'] = '';
|
||||
foreach (self::getLanguages() as $lang){
|
||||
$vars['langhead'] .= '<th>'.$lang.'</th>';
|
||||
$languages[] = $lang;
|
||||
}
|
||||
|
||||
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
|
||||
if(\SYSTEM\system::isSystemDbInfoPG()){
|
||||
$res = $con->query('SELECT * FROM system.locale_string ORDER BY "category" ASC;');
|
||||
} else {
|
||||
$res = $con->query('SELECT * FROM system_locale_string ORDER BY category ASC;');
|
||||
}
|
||||
$vars['content'] = '';
|
||||
while($r = $res->next()){
|
||||
$result .= '<tr>'.'<td style="padding-bottom: 5px;">'.$r["id"].'<br><br><input type="submit" class="btn-danger delete_content" value="delete" id="'.$r["id"].'">'.'<input type="submit" class="btn" value="edit" style="margin-left: 3px;" name="'.$r["id"].'">'.'</td>'.'<td>'.$r["category"].'</td>';
|
||||
foreach ($languages as $columns){
|
||||
$result .= '<td>'.$r[$columns].'</td>';
|
||||
}
|
||||
|
||||
$result .= '</tr>';
|
||||
|
||||
$content = '';
|
||||
foreach ($languages as $columns){
|
||||
$content .= '<td>'.$r[$columns].'</td>';
|
||||
}
|
||||
$result .= '</table>';
|
||||
$r['content'] = $content;
|
||||
$vars['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/list_entry.tpl'), $r);
|
||||
}
|
||||
|
||||
return $result;
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/list.tpl'), $vars);
|
||||
}
|
||||
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_edit($id, $lang, $newtext){
|
||||
@ -52,25 +47,19 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule {
|
||||
return $res->affectedRows() == 0 ? \SYSTEM\LOG\JsonResult::error(new \SYSTEM\LOG\WARNING("no rows affected")) : \SYSTEM\LOG\JsonResult::ok();
|
||||
}
|
||||
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_add($id, $lang, $newtext){
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_add($id, $category){
|
||||
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
|
||||
$res = null;
|
||||
if(\SYSTEM\system::isSystemDbInfoPG()){
|
||||
throw new \SYSTEM\LOG\ERROR("action_edit failed");
|
||||
} else {
|
||||
$res = $con->prepare('addText' ,'INSERT INTO system_locale_string (id, '.$lang.', category) VALUES (?, ?, 100);', array($id, $newtext));
|
||||
$res = $con->prepare('addText' ,'INSERT INTO system_locale_string (id, category) VALUES (?, ?);', array($id, $category));
|
||||
}
|
||||
return $res->affectedRows() == 0 ? \SYSTEM\LOG\JsonResult::error(new \SYSTEM\LOG\WARNING("no data added")) : \SYSTEM\LOG\JsonResult::ok();
|
||||
}
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_addcontent(){
|
||||
$result = "<h3>Add new text</h3><br>";
|
||||
$result .= '<input type="text" id="new" value=""><br><select id="langselect" size="1">';
|
||||
foreach (self::getLanguages() as $lang){
|
||||
$result .= '<option>'.$lang.'</option>';
|
||||
$languages[] = $lang;
|
||||
}
|
||||
$result .= '</select><br><textarea class="tinymce" name="content" id="areacontent" style="width: 100%"></textarea><br><input type="submit" class="btn add" value="save">'.'<script>tinymce.init({selector:\'textarea\'});</script>';
|
||||
return $result;
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_addmode(){
|
||||
$vars = array();
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/add.tpl'), $vars);
|
||||
}
|
||||
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_delete($id){
|
||||
@ -85,16 +74,6 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule {
|
||||
}
|
||||
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_editmode($entry){
|
||||
$result = '<h3>'.$entry.'</h3>'.
|
||||
'<table class="table table-hover table-condensed" style="overflow: auto;">'.
|
||||
'<tr>';
|
||||
|
||||
foreach (self::getLanguages() as $lang){
|
||||
$result .= '<th>'.$lang.'</th>';
|
||||
$languages[] = $lang;
|
||||
}
|
||||
|
||||
$result .= '</tr>';
|
||||
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
|
||||
$res = null;
|
||||
if(\SYSTEM\system::isSystemDbInfoPG()){
|
||||
@ -105,33 +84,25 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule {
|
||||
$res = $con->prepare( 'edit',
|
||||
'SELECT * FROM system_locale_string WHERE id = ? ORDER BY "category" ASC;',
|
||||
array($entry));
|
||||
}
|
||||
while($r = $res->next()){
|
||||
$result .= "<tr>";
|
||||
$fu = 0;
|
||||
foreach ($languages as $columns){
|
||||
$result .= '<td>
|
||||
<div class="dialog" style="padding-bottom: 5px;">'.
|
||||
'<textarea name="content" class="tinymce" style="width: 100%" id="edit_field_'.$r["id"].'_'.$columns.'">'.$r[$columns].'</textarea>'.
|
||||
'</div>
|
||||
<input type="submit" class="btn edit_content" value="edit" lang="'.$columns.'" name="'.$r["id"].'"><br></td>';
|
||||
}
|
||||
$result .= "</tr></table>";
|
||||
}
|
||||
$result .= '<br><input type="submit" class="btn localeMain" value="back">'.'<script>tinymce.init({
|
||||
selector: "textarea",
|
||||
force_p_newlines : false,
|
||||
forced_root_block : false,
|
||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
||||
plugins: [
|
||||
"advlist autolink lists link image charmap print preview anchor",
|
||||
"searchreplace visualblocks code fullscreen",
|
||||
"insertdatetime media table contextmenu paste moxiemanager",
|
||||
"textcolor"
|
||||
],
|
||||
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
|
||||
});</script>';
|
||||
return $result;
|
||||
if(!$r = $res->next()){
|
||||
throw new \SYSTEM\LOG\ERROR("No such Entry found!");}
|
||||
|
||||
$vars = array();
|
||||
$vars['entry'] = $entry;
|
||||
$vars['langhead'] = '';
|
||||
|
||||
foreach (self::getLanguages() as $lang){
|
||||
$vars['langhead'] .= '<th>'.$lang.'</th>';
|
||||
$languages[] = $lang;
|
||||
}
|
||||
$vars['content'] = '';
|
||||
foreach ($languages as $lang){
|
||||
$r['lang'] = $lang;
|
||||
$r['value'] = $r[$lang];
|
||||
$vars['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/edit_entry.tpl'), $r);}
|
||||
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/edit.tpl'), $vars);
|
||||
}
|
||||
|
||||
public static function html_li_menu(){return '<li><a href="#" saimenu=".SYSTEM.SAI.saimod_sys_locale">DB Text</a></li>';}
|
||||
@ -141,5 +112,5 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule {
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_flag_css(){}
|
||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_flag_js(){
|
||||
return \SYSTEM\LOG\JsonResult::toString(
|
||||
array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/saimod_sys_locale_submit.js')));}
|
||||
array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/saimod_sys_locale.js')));}
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
function init__SYSTEM_SAI_saimod_sys_locale() {
|
||||
// handle navigation link click
|
||||
$('.btn').click(function () {
|
||||
loadEntry($(this).attr('name'));
|
||||
});
|
||||
$('.delete_content').click(function(){
|
||||
$.getJSON(SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_locale&action=delete&id='+$(this).attr('id'),
|
||||
function(data){
|
||||
if (data.status == false){ alert("false"); } else { alert("true");}
|
||||
});
|
||||
});
|
||||
$('.add_form').click(function(){
|
||||
$('div#content-wrapper').load(SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_locale&action=addcontent',
|
||||
function(data){
|
||||
if (data.status == false){ alert("false"); } else { alert("true");}
|
||||
});
|
||||
});
|
||||
}
|
||||
function add(){
|
||||
//$('.add').click(function(){
|
||||
window.location = SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_locale&action=add&id='+$('#new').attr('value')+'&lang=deDE&newtext='+$('#areacontent').val();
|
||||
window.location = SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_locale';
|
||||
//function(data){
|
||||
// if (data.status == false){ alert("false"); } else { alert("true");}
|
||||
//});
|
||||
// });
|
||||
}
|
||||
function loadEntry(buttonID) {
|
||||
|
||||
$('div#content-wrapper').load(SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_locale&action=editmode&entry='+buttonID, function(){
|
||||
init__SYSTEM_SAI_saimod_sys_locale_edit();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function init__SYSTEM_SAI_saimod_sys_locale_edit(){
|
||||
$('.localeMain').click(function(){
|
||||
loadModuleContent('.SYSTEM.SAI.saimod_sys_locale');
|
||||
});
|
||||
$('.edit_content').click(function(){
|
||||
tinyMCE.triggerSave();
|
||||
$.ajax({
|
||||
url: SAI_ENDPOINT,
|
||||
data: { sai_mod: '.SYSTEM.SAI.saimod_sys_locale',
|
||||
action: 'edit',
|
||||
id: $(this).attr('name'),
|
||||
lang: $(this).attr('lang'),
|
||||
newtext: $('#edit_field_'+$(this).attr('name')+'_'+$(this).attr('lang')).val()},
|
||||
type: 'POST',
|
||||
success: function(data) {
|
||||
if (data.status == false){ alert("Changes could not be changed."); } else { alert("Changes has been saved.");}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -9,26 +9,26 @@
|
||||
size="30"
|
||||
style="margin-bottom: 15px;"
|
||||
id="bt_login_user"
|
||||
placeholder="${loginUsername}"
|
||||
minlength="3" data-validation-minlength-message="${login_username_too_short}"
|
||||
maxlength="16" data-validation-maxlength-message="${login_username_too_long}"
|
||||
required data-validation-required-message="${login_username_required}"/>
|
||||
placeholder="${sai_mod_login_username}"
|
||||
minlength="3" data-validation-minlength-message="${sai_error_mod_login_username_too_short}"
|
||||
maxlength="16" data-validation-maxlength-message="${sai_error_mod_login_username_too_long}"
|
||||
required data-validation-required-message="${sai_error_mod_login_username_required}"/>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="password"
|
||||
size="30"
|
||||
style="margin-bottom: 15px;"
|
||||
id="bt_login_password"
|
||||
placeholder="${loginPassword}"
|
||||
minlength="5" data-validation-minlength-message="${login_password_too_short}"
|
||||
maxlength="16" data-validation-maxlength-message="${login_password_too_short}"
|
||||
required data-validation-required-message="${login_password_required}"/>
|
||||
placeholder="${sai_mod_login_password}"
|
||||
minlength="5" data-validation-minlength-message="${sai_error_mod_login_password_too_short}"
|
||||
maxlength="16" data-validation-maxlength-message="${sai_error_mod_login_password_too_long}"
|
||||
required data-validation-required-message="${sai_error_mod_login_password_required}"/>
|
||||
</div>
|
||||
<div class="help-block"></div>
|
||||
<input type="hidden" />
|
||||
<button class="btn btn-primary" style="clear: left; height: 32px; font-size: 13px;"
|
||||
type="submit"
|
||||
id="login_submit">${login}</button>
|
||||
id="login_submit">${sai_mod_login_login}</button>
|
||||
</div>
|
||||
</form>
|
||||
<a href="#" id="register_link">Register an Account</a></br>
|
||||
|
||||
@ -6,11 +6,11 @@
|
||||
<table id="userDetailsTable" class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="width: 200px;">${ua_name}</th>
|
||||
<th style="width: 200px;">${sai_mod_login_username}</th>
|
||||
<td><span id="user_username" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>${ua_email}</th>
|
||||
<th>${sai_mod_login_email}</th>
|
||||
<td>
|
||||
<span id="user_email" />
|
||||
<div class="control-group" id="change_user_email" style="display: none;">
|
||||
@ -27,7 +27,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>${ua_password}</th>
|
||||
<th>${sai_mod_login_password}</th>
|
||||
<td>
|
||||
<span id="user_password">****</span>
|
||||
<div class="control-group" id="change_user_password" style="display: none;">
|
||||
@ -66,15 +66,15 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>${ua_last_active}</th>
|
||||
<th>${sai_mod_login_last_active}</th>
|
||||
<td><span id="user_last_active"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>${ua_joindate}</th>
|
||||
<th>${sai_mod_login_join_date}</th>
|
||||
<td><span id="user_joindate"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>${ua_locale}</th>
|
||||
<th>${sai_mod_login_locale}</th>
|
||||
<td>
|
||||
<span id="user_locale"></span>
|
||||
<div id="change_user_locale" style="display: none;">
|
||||
@ -86,7 +86,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">Admin Rights</th>
|
||||
<th style="width: 200px;">${sai_mod_login_admin_rights}</th>
|
||||
<td><span id="user_adminrights" />${isadmin}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -13,6 +13,7 @@ class saimod_sys_login extends \SYSTEM\SAI\SaiModule {
|
||||
$vars['login_password_too_short'] = 'Password to short.';
|
||||
$vars['isadmin'] = \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI) ? "yes" : "no";
|
||||
$vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\locale_string::VALUE_CATEGORY_SYSTEM_SAI));
|
||||
$vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\locale_string::VALUE_CATEGORY_SYSTEM_SAI_ERROR));
|
||||
|
||||
if(\SYSTEM\SECURITY\Security::isLoggedIn()){
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/logout.tpl'), $vars);
|
||||
|
||||
@ -58,6 +58,7 @@ class default_page extends \SYSTEM\PAGE\Page {
|
||||
$vars['title'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_TITLE); //da_sense | Developer Center
|
||||
$vars['copyright'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_COPYRIGHT); //© <a href="http://www.da-sense.de" target="_blank">da_sense</a>, TU Darmstadt 2013
|
||||
|
||||
$vars = array_merge($vars,\SYSTEM\locale::getStrings(\SYSTEM\DBD\locale_string::VALUE_CATEGORY_SYSTEM_SAI));
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'page/default_page/sai.tpl'), $vars);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user