Refactor contact management functions and remove phpinfo.php
- Updated formatting and structure of functions in edit_contact.inc.php for better readability and consistency. - Added comments to clarify the purpose of certain code sections, especially regarding mandant handling. - Removed the deprecated phpinfo.php file to clean up the codebase.
This commit is contained in:
@@ -564,18 +564,24 @@ function getFormData(_form) {
|
||||
* @param _confirmtext
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
function sendRequest(_action, _load_without_check, _confirmtext) {
|
||||
function sendRequest(_action, _load_without_check, _confirmtext, sub_get = "") {
|
||||
// variable zum pruefen ob in einer linkliste ein element markiert wurde
|
||||
var load_without_check = _load_without_check || false;
|
||||
|
||||
if (load_without_check === false) {
|
||||
var currentMarkedLinklistRow = jQuery('.linklist_active', jQuery('#' + dc.current_formname));
|
||||
var currentMarkedLinklistRow = jQuery(
|
||||
".linklist_active",
|
||||
jQuery("#" + dc.current_formname)
|
||||
);
|
||||
|
||||
if (dc.current_linklist === null || currentMarkedLinklistRow.length <= 0) {
|
||||
return;
|
||||
}
|
||||
var input_id = currentMarkedLinklistRow.data('inputid');
|
||||
jQuery('input.selected_linklist_row', jQuery('#' + dc.current_formname)).val(input_id);
|
||||
var input_id = currentMarkedLinklistRow.data("inputid");
|
||||
jQuery(
|
||||
"input.selected_linklist_row",
|
||||
jQuery("#" + dc.current_formname)
|
||||
).val(input_id);
|
||||
}
|
||||
|
||||
var confirmtext = _confirmtext || false;
|
||||
@@ -585,14 +591,21 @@ function sendRequest(_action, _load_without_check, _confirmtext) {
|
||||
}
|
||||
}
|
||||
|
||||
if (dc.overlay_mode === true) {
|
||||
jQuery('#overlayLoader').show();
|
||||
} else {
|
||||
jQuery('#mainContent').find('.requestLoader').show();
|
||||
// Проверка обязательных полей
|
||||
var form = document.getElementById(dc.current_formname);
|
||||
if (!form.checkValidity()) {
|
||||
form.reportValidity();
|
||||
return false;
|
||||
}
|
||||
|
||||
jQuery('#' + dc.current_formname).attr("action", "?action=" + _action);
|
||||
jQuery('#' + dc.current_formname).submit();
|
||||
if (dc.overlay_mode === true) {
|
||||
jQuery("#overlayLoader").show();
|
||||
} else {
|
||||
jQuery("#mainContent").find(".requestLoader").show();
|
||||
}
|
||||
|
||||
jQuery('#' + dc.current_formname).attr("action", "?action=" + _action + "&sub_get=" + sub_get);
|
||||
jQuery("#" + dc.current_formname).submit();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -832,11 +845,16 @@ function myFunction(counter) {
|
||||
console.log("myDropdown" + counter);
|
||||
}
|
||||
|
||||
function openGallery(input_id, image_id, type){
|
||||
function openGallery(input_id, image_id, type, select_mode){
|
||||
var currentDate = new Date();
|
||||
var unixTimestamp = Math.floor(currentDate.getTime() / 1000);
|
||||
var selectionMode = select_mode || '';
|
||||
|
||||
var popupURL = '/components/files/filegallery_content.inc.php?input_id='+input_id+'&image_id='+image_id+'&type='+type+'&time='+unixTimestamp;
|
||||
if (selectionMode !== 'single' && selectionMode !== 'multi') {
|
||||
selectionMode = (type === 'filegallery') ? 'single' : 'multi';
|
||||
}
|
||||
|
||||
var popupURL = '/components/files/filegallery_content.inc.php?input_id='+input_id+'&image_id='+image_id+'&type='+type+'&select_mode='+selectionMode+'&time='+unixTimestamp;
|
||||
var popup = window.open(popupURL, 'Popup-Fenster', 'width=1080,height=720');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user