Skip to content

Commit

Permalink
Merge pull request #766 from coral-erm/development
Browse files Browse the repository at this point in the history
2024.04 release
  • Loading branch information
andyp-uk authored Apr 26, 2024
2 parents 4a62197 + 75bf718 commit 68e7feb
Show file tree
Hide file tree
Showing 249 changed files with 5,055 additions and 5,096 deletions.
5 changes: 3 additions & 2 deletions auth/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@
<link rel="SHORTCUT ICON" href="images/favicon.ico" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:100,400,300,600,700' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="../js/plugins/jquery-1.8.0.js"></script>
<script type="text/javascript" src="js/plugins/thickbox.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="../js/plugins/Gettext.js"></script>
<?php
Expand Down
1 change: 0 additions & 1 deletion auth/admin/classes/common/DynamicObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
**************************************************************************************************************************
*/


class DynamicObject extends Base_Object {

protected $properties = array();
Expand Down
2 changes: 1 addition & 1 deletion auth/ajax_forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<table class='noBorderTable' style='width:125px;'>
<tr>
<td style='text-align:left;'><input type='button' value='<?php echo _("submit");?>' id ='submitUser' class='submitButton' /></td>
<td style='text-align:right;'><input type='button' value='<?php echo _("cancel");?>' onclick="window.parent.tb_remove(); return false;" class='submitButton' /></td>
<td style='text-align:right;'><input type='button' value='<?php echo _("cancel");?>' onclick="myCloseDialog(); return false;" class='submitButton' /></td>
</tr>
</table>

Expand Down
6 changes: 3 additions & 3 deletions auth/ajax_htmldata.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@
echo "<tr>";
echo "<td>" . $userArray['loginID'] . "</td>";
echo "<td>" . $isAdmin . "</td>";
echo "<td><a href='ajax_forms.php?action=getAdminUserUpdateForm&loginID=" . $userArray['loginID'] . "&height=230&width=315&modal=true' class='thickbox'><img src='images/edit.gif' alt='"._("edit password or admin status")."' title='"._("edit password or admin status")."'></a></td>";
echo "<td><a href='javascript:void(0)' onclick='javascript:myDialog(\"ajax_forms.php?action=getAdminUserUpdateForm&loginID=" . $userArray['loginID'] . "&height=230&width=315&modal=true\",400,350)' class='thickbox'><img src='images/edit.gif' alt='"._("edit password or admin status")."' title='"._("edit password or admin status")."'></a></td>";
echo "<td><a href='javascript:void(0);' class='deleteUser' id='" . $userArray['loginID'] . "'><img src='images/cross.gif' alt='"._("remove")."' title='"._("remove")."'></a></td>";
echo "</tr>";
}

?>
</table>
<a href='ajax_forms.php?action=getAdminUserUpdateForm&loginID=&height=215&width=315&modal=true' class='thickbox' id='addUser'><?php echo _("add new user")?></a>
<a href='javascript:void(0)' onclick='javascript:myDialog("ajax_forms.php?action=getAdminUserUpdateForm&loginID=&height=215&width=315&modal=true",400,350)' class='thickbox' id='addUser'><?php echo _("add new user")?></a>
<?php

}else{
echo "(none found)<br /><a href='ajax_forms.php?action=getUserUpdateForm&loginID=&height=275&width=315&modal=true' class='thickbox' id='addUser'>"._("add new user")."</a>";
echo "(none found)<br /><a href='javascript:void(0)' onclick='javascript:myDialog(\"ajax_forms.php?action=getUserUpdateForm&loginID=&height=275&width=315&modal=true\",300,350)' class='thickbox' id='addUser'>"._("add new user")."</a>";
}

break;
Expand Down
2 changes: 1 addition & 1 deletion auth/ajax_processing.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
$sUser->passwordPrefix = $prefix;
}

if ($_POST['adminInd'] == "1"){
if ($_POST['adminInd'] == "1" || $_POST['adminInd'] == "Y"){
$sUser->adminInd = "Y";
}else{
$sUser->adminInd = "N";
Expand Down
6 changes: 5 additions & 1 deletion auth/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ table.surroundBox {
border-color: #e6e5e9;
border-collapse: collapse;
border-spacing: 0;
font-size:100%;
font-size:90%;
width: 100% !important;
}

Expand Down Expand Up @@ -442,3 +442,7 @@ p.fontText {
border: solid 1px #306d9c;
padding: 20px;
}

.no-titlebar .ui-dialog-titlebar {
display: none;
}
5 changes: 3 additions & 2 deletions auth/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,9 @@
<link rel="SHORTCUT ICON" href="images/favicon.ico" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:100,400,300,600,700' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="../js/plugins/jquery-1.8.0.js"></script>
<script type="text/javascript" src="js/plugins/thickbox.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="../js/plugins/Gettext.js"></script>
<?php
Expand Down
13 changes: 12 additions & 1 deletion auth/install/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function register_auth_provider()
"default_value" => "coral_auth"
],
"config_file" => [
"path" => $protected_module_data{"config_file_path"},
"path" => $protected_module_data["config_file_path"],
]
],
"function" => function($shared_module_info) use ($MODULE_VARS, $protected_module_data, $version) {
Expand Down Expand Up @@ -362,6 +362,17 @@ function register_auth_provider()
];

case "2020.09":
return [
"function" => function($shared_module_info) {
$return = new stdClass();
$return->yield = new stdClass();
$return->success = true;
$return->yield->title = _("Auth Module");
return $return;
}
];

case "2024.04":
return [
"function" => function($shared_module_info) {
$return = new stdClass();
Expand Down
3 changes: 1 addition & 2 deletions auth/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ function updateUsers() {
data: "action=getUsers",
success: function(html) {
$("#div_users").html(html);
tb_reinit();
bind_removes();
}

Expand All @@ -51,7 +50,7 @@ function submitUserForm(){
// ajax call to add/update
$.post("ajax_processing.php?action=submitUser", { loginID: $("#textLoginID").val(), editLoginID: $("#editLoginID").val(), password: $("#password").val(), adminInd: getCheckboxValue('adminInd') } ,
function(data){
tb_remove();
myCloseDialog();
updateUsers();
return false;
}
Expand Down
30 changes: 29 additions & 1 deletion auth/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ if (!Array.prototype.indexOf)
}

function getCheckboxValue(field){
if ($('#' + field + ':checked').attr('checked')) {
if ($('#' + field)[0].checked) {
return 1;
}else{
return 0;
Expand Down Expand Up @@ -155,3 +155,31 @@ function postwith (to,p) {
myForm.submit() ;
document.body.removeChild(myForm) ;
}


function myDialog(loadForm, h,w){
if (h < 800) h = 'auto';
if (w < 800) w = w * 1.2;

$('<div/>').dialog({
modal: true,
open: function ()
{
if ($(this).is(':empty')) {
$(this).load(loadForm);
}
},
height: h,
width: w,
// title:"JQuery Dialog"
dialogClass: "no-titlebar"
});
}

function myCloseDialog(){
//$(this).dialog('close')
//$(this).closest('.ui-dialog-content').dialog('close');
// $(formName).dialog( "close" )
$('.ui-dialog-content').dialog('destroy');
}

Loading

0 comments on commit 68e7feb

Please sign in to comment.