Compare commits

...

26 Commits

Author SHA1 Message Date
John Crisp
35c2efaf4b update spec to 11.0.0-19 2025-05-16 12:11:41 +02:00
John Crisp
613f17bb4f More group updates and quots done 2025-05-16 11:57:27 +02:00
John Crisp
f90583b285 More groups pseudonyms clamav and useraccounts work 2025-05-15 20:32:05 +02:00
John Crisp
e7f8f7b289 Cleanup more usr and add host templates 2025-05-14 09:33:36 -04:00
John Crisp
07731ba442 Update usr and add host files 2025-05-03 18:00:27 +02:00
John Crisp
43f790de99 More cleanup with _usr_list 2025-05-01 18:11:13 +02:00
John Crisp
ab587d4944 convert tabs to space and format group add 2025-05-01 13:00:17 +02:00
John Crisp
e0dd4db0d9 cleanup group add file 2025-05-01 12:46:01 +02:00
John Crisp
e88cf07647 format group file 2025-05-01 12:43:53 +02:00
John Crisp
77d3e10bce fix user add and update group files 2025-05-01 12:38:55 +02:00
John Crisp
8ab480abfd Updated CSS 2025-04-25 19:12:10 +02:00
John Crisp
295c6b3ff3 User files finished and groups started 2025-04-25 19:01:25 +02:00
John Crisp
dbeacddd96 More tidying user accounts files 2025-04-25 14:30:30 +02:00
John Crisp
1a4c172969 Tidy User list 2025-04-24 11:34:16 +02:00
John Crisp
cd6c752805 Move around and add css/js files 2025-04-23 15:34:07 +02:00
John Crisp
95dedd2f38 Sidebar scrolling 2025-04-23 15:33:16 +02:00
John Crisp
50edcdee9c Move work on forms 2025-04-19 02:18:01 +02:00
John Crisp
0d7f87c6aa Move more code to html and work on forms 2025-04-19 01:39:57 +02:00
John Crisp
b42afb227a More cleanup and add card support 2025-04-18 15:11:03 +02:00
John Crisp
767cf3bc19 More review template fixes 2025-04-17 17:53:04 +02:00
John Crisp
dbdd5217d9 Update review template and fix typo 2025-04-17 17:27:15 +02:00
John Crisp
f516d2b759 Update review template and fix typo 2025-04-17 17:26:55 +02:00
John Crisp
4551efc1ed Remove template and update breadcrumbs 2025-04-16 20:06:58 +02:00
John Crisp
79b2e7f492 Fix remote Access remove network 2025-04-16 18:40:51 +02:00
John Crisp
93b8d4cb6f Fix form syntax issues and more cleaning 2025-04-16 18:09:49 +02:00
John Crisp
cc4e08b14a Finish template tidy 2025-04-15 20:43:24 +02:00
139 changed files with 4951 additions and 3722 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
*.log
*spec-20*
*.tar.gz
*.workspace

View File

@@ -0,0 +1 @@
/usr/share/javascript/jquery-ui/jquery-ui.min.css

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
/usr/share/javascript/jquery-ui/jquery-ui.min.js

View File

@@ -0,0 +1 @@
/usr/share/javascript/jquery/jquery.min.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -51,6 +51,7 @@
.login-page {
min-height: 10vh;
vertical-align: top !important;
}
.nav-icon {
@@ -88,3 +89,22 @@
cursor: default; /* Prevent text cursor */
}
/* TD and buttons in user lists */
.user-td-no-right {
border-left-width: 0px;
}
.user-td-no-left {
border-left-width: 0px;
}
.user-valign-center {
text-align: center;
}
.user-table-max-wdith {
max-width: 50%;
}

View File

@@ -0,0 +1,298 @@
document.addEventListener('DOMContentLoaded', () => {
const flagContainer = document.getElementById('flag-container');
// Mapping of language codes to country codes and their names
const languageToCountryMap = {
"af": { code: "NA", name: "Namibia" },
"agq": { code: "CM", name: "Cameroon" },
"ak": { code: "GH", name: "Ghana" },
"am": { code: "ET", name: "Ethiopia" },
"ar": { code: "SA", name: "Saudi Arabia" },
"as": { code: "IN", name: "India" },
"asa": { code: "TZ", name: "Tanzania" },
"ast": { code: "ES", name: "Spain" },
"az": { code: "AZ", name: "Azerbaijan" },
"bas": { code: "CM", name: "Cameroon" },
"be": { code: "BY", name: "Belarus" },
"bem": { code: "ZM", name: "Zambia" },
"bez": { code: "TZ", name: "Tanzania" },
"bg": { code: "BG", name: "Bulgaria" },
"bm": { code: "ML", name: "Mali" },
"bn": { code: "BD", name: "Bangladesh" },
"bo": { code: "CN", name: "China" },
"br": { code: "FR", name: "France" },
"brx": { code: "IN", name: "India" },
"bs": { code: "BA", name: "Bosnia and Herzegovina" },
"ca": { code: "AD", name: "Andorra" },
"ccp": { code: "BD", name: "Bangladesh" },
"ce": { code: "RU", name: "Russia" },
"cgg": { code: "UG", name: "Uganda" },
"chr": { code: "US", name: "United States" },
"ckb": { code: "IQ", name: "Iraq" },
"cs": { code: "CZ", name: "Czech Republic" },
"cy": { code: "GB", name: "United Kingdom" },
"da": { code: "DK", name: "Denmark" },
"dav": { code: "KE", name: "Kenya" },
"de": { code: "DE", name: "Germany" },
"dje": { code: "NE", name: "Niger" },
"dsb": { code: "DE", name: "Germany" },
"dua": { code: "CM", name: "Cameroon" },
"dyo": { code: "SN", name: "Senegal" },
"dz": { code: "BT", name: "Bhutan" },
"ebu": { code: "KE", name: "Kenya" },
"ee": { code: "GH", name: "Ghana" },
"el": { code: "CY", name: "Cyprus" },
"en": { code: "US", name: "United States" }, // Assume US for English if unspecified
"es": { code: "ES", name: "Spain" },
"et": { code: "EE", name: "Estonia" },
"eu": { code: "ES", name: "Spain" },
"ewo": { code: "CM", name: "Cameroon" },
"fa": { code: "AF", name: "Afghanistan" },
"ff": { code: "CM", name: "Cameroon" },
"fi": { code: "FI", name: "Finland" },
"fil": { code: "PH", name: "Philippines" },
"fo": { code: "FO", name: "Faroe Islands" },
"fr": { code: "FR", name: "France" },
"fur": { code: "IT", name: "Italy" },
"fy": { code: "NL", name: "Netherlands" },
"ga": { code: "IE", name: "Ireland" },
"gd": { code: "GB", name: "United Kingdom" },
"gl": { code: "ES", name: "Spain" },
"gsw": { code: "CH", name: "Switzerland" },
"gu": { code: "IN", name: "India" },
"guz": { code: "KE", name: "Kenya" },
"gv": { code: "IM", name: "Isle of Man" },
"ha": { code: "GH", name: "Ghana" },
"haw": { code: "US", name: "United States" },
"he": { code: "IL", name: "Israel" },
"hi": { code: "IN", name: "India" },
"hr": { code: "HR", name: "Croatia" },
"hsb": { code: "DE", name: "Germany" },
"hu": { code: "HU", name: "Hungary" },
"hy": { code: "AM", name: "Armenia" },
"id": { code: "ID", name: "Indonesia" },
"ig": { code: "NG", name: "Nigeria" },
"ii": { code: "CN", name: "China" },
"is": { code: "IS", name: "Iceland" },
"it": { code: "IT", name: "Italy" },
"ja": { code: "JP", name: "Japan" },
"jgo": { code: "CM", name: "Cameroon" },
"jmc": { code: "TZ", name: "Tanzania" },
"ka": { code: "GE", name: "Georgia" },
"kab": { code: "DZ", name: "Algeria" },
"kam": { code: "KE", name: "Kenya" },
"kde": { code: "TZ", name: "Tanzania" },
"kea": { code: "CV", name: "Cabo Verde" },
"khq": { code: "ML", name: "Mali" },
"ki": { code: "KE", name: "Kenya" },
"kk": { code: "KZ", name: "Kazakhstan" },
"kkj": { code: "CM", name: "Cameroon" },
"kl": { code: "GL", name: "Greenland" },
"kln": { code: "KE", name: "Kenya" },
"km": { code: "KH", name: "Cambodia" },
"kn": { code: "IN", name: "India" },
"ko": { code: "KP", name: "North Korea" },
"kok": { code: "IN", name: "India" },
"ks": { code: "IN", name: "India" },
"ksb": { code: "TZ", name: "Tanzania" },
"ksf": { code: "CM", name: "Cameroon" },
"ksh": { code: "DE", name: "Germany" },
"kw": { code: "GB", name: "United Kingdom" },
"ky": { code: "KG", name: "Kyrgyzstan" },
"lag": { code: "TZ", name: "Tanzania" },
"lb": { code: "LU", name: "Luxembourg" },
"lg": { code: "UG", name: "Uganda" },
"lkt": { code: "US", name: "United States" },
"ln": { code: "AO", name: "Angola" },
"lo": { code: "LA", name: "Laos" },
"lrc": { code: "IQ", name: "Iraq" },
"lt": { code: "LT", name: "Lithuania" },
"lu": { code: "CD", name: "Democratic Republic of the Congo" },
"luo": { code: "KE", name: "Kenya" },
"Luo": { code: "KE", name: "Kenya" },
"luy": { code: "KE", name: "Kenya" },
"lv": { code: "LV", name: "Latvia" },
"mas": { code: "KE", name: "Kenya" },
"mer": { code: "KE", name: "Kenya" },
"mfe": { code: "MU", name: "Mauritius" },
"mg": { code: "MG", name: "Madagascar" },
"mgh": { code: "MZ", name: "Mozambique" },
"mgo": { code: "CM", name: "Cameroon" },
"mk": { code: "MK", name: "North Macedonia" },
"ml": { code: "IN", name: "India" },
"mn": { code: "MN", name: "Mongolia" },
"mr": { code: "IN", name: "India" },
"ms": { code: "BN", name: "Brunei" },
"mt": { code: "MT", name: "Malta" },
"mua": { code: "CM", name: "Cameroon" },
"my": { code: "MM", name: "Myanmar" },
"mzn": { code: "IR", name: "Iran" },
"naq": { code: "NA", name: "Namibia" },
"nb": { code: "NO", name: "Norway" },
"nd": { code: "ZW", name: "Zimbabwe" },
"nds": { code: "DE", name: "Germany" },
"ne": { code: "IN", name: "India" },
"nl": { code: "NL", name: "Netherlands" },
"nmg": { code: "CM", name: "Cameroon" },
"nn": { code: "NO", name: "Norway" },
"nnh": { code: "CM", name: "Cameroon" },
"nus": { code: "SS", name: "South Sudan" },
"nyn": { code: "UG", name: "Uganda" },
"om": { code: "ET", name: "Ethiopia" },
"or": { code: "IN", name: "India" },
"os": { code: "GE", name: "Georgia" },
"pa": { code: "PK", name: "Pakistan" },
"pl": { code: "PL", name: "Poland" },
"ps": { code: "AF", name: "Afghanistan" },
"pt": { code: "PT", name: "Portugal" },
"qu": { code: "BO", name: "Bolivia" },
"rm": { code: "CH", name: "Switzerland" },
"rn": { code: "BI", name: "Burundi" },
"ro": { code: "RO", name: "Romania" },
"rof": { code: "TZ", name: "Tanzania" },
"ru": { code: "RU", name: "Russia" },
"rw": { code: "RW", name: "Rwanda" },
"rwk": { code: "TZ", name: "Tanzania" },
"sah": { code: "RU", name: "Russia" },
"saq": { code: "KE", name: "Kenya" },
"sbp": { code: "TZ", name: "Tanzania" },
"se": { code: "SE", name: "Sweden" },
"seh": { code: "MZ", name: "Mozambique" },
"ses": { code: "ML", name: "Mali" },
"sg": { code: "CF", name: "Central African Republic" },
"shi": { code: "TN", name: "Tunisia" },
"si": { code: "LK", name: "Sri Lanka" },
"sk": { code: "SK", name: "Slovakia" },
"sl": { code: "SI", name: "Slovenia" },
"smn": { code: "FI", name: "Finland" },
"sn": { code: "ZW", name: "Zimbabwe" },
"so": { code: "SO", name: "Somalia" },
"sq": { code: "AL", name: "Albania" },
"sr": { code: "RS", name: "Serbia" },
"sv": { code: "SE", name: "Sweden" },
"sw": { code: "CD", name: "Democratic Republic of the Congo" },
"ta": { code: "IN", name: "India" },
"te": { code: "IN", name: "India" },
"teo": { code: "KE", name: "Kenya" },
"tg": { code: "TJ", name: "Tajikistan" },
"th": { code: "TH", name: "Thailand" },
"ti": { code: "ER", name: "Eritrea" },
"to": { code: "TO", name: "Tonga" },
"tr": { code: "TR", name: "Turkey" },
"tt": { code: "RU", name: "Russia" },
"twq": { code: "NE", name: "Niger" },
"tzm": { code: "MA", name: "Morocco" },
"ug": { code: "CN", name: "China" },
"uk": { code: "UA", name: "Ukraine" },
"ur": { code: "IN", name: "India" },
"uz": { code: "UZ", name: "Uzbekistan" },
"vai": { code: "TN", name: "Tunisia" },
"Vai": { code: "TN", name: "Tunisia" },
"vi": { code: "VN", name: "Vietnam" },
"vun": { code: "TZ", name: "Tanzania" },
"wae": { code: "CH", name: "Switzerland" },
"wo": { code: "SN", name: "Senegal" },
"xog": { code: "UG", name: "Uganda" },
"yav": { code: "CM", name: "Cameroon" },
"yi": { code: "01", name: "Unknown" }, // Placeholder for unspecified region
"yo": { code: "BJ", name: "Benin" },
"yue": { code: "CN", name: "China" },
"zgh": { code: "MA", name: "Morocco" },
"zh": { code: "CN", name: "China" },
"zu": { code: "ZA", name: "South Africa" },
};
//async function getCountryName(countryCode) {
//try {
//const response = await fetch(`https://restcountries.com/v3.1/alpha/${countryCode}`);
//if (!response.ok) throw new Error('Country not found');
//const data = await response.json();
//// Return the name in the native language
//return data[0].name.common;
//} catch (error) {
//console.error(error);
//return 'Unknown Country';
//}
//}
function getCountryNameFromLanguage(language) {
return languageToCountryMap[language] ? languageToCountryMap[language].name : null;
}
function getCountryCodeFromLanguage(language) {
return languageToCountryMap[language] ? languageToCountryMap[language].code : null;
}
function getCountryNameFromCountryCode(countryCode) {
//alert(`Country code: ${countryCode}`);
for (const language in languageToCountryMap) {
if (languageToCountryMap.hasOwnProperty(language)) {
if (languageToCountryMap[language].code === countryCode) {
return languageToCountryMap[language].name;
}
}
}
return null; // Return null if country code not found
}
function getFlagEmoji(locale) {
// Split the locale to get the language and country code
const parts = locale.split('-');
let countryCode;
// Handle single subtag (language only) or double subtag (language-country)
if (parts.length === 1) {
countryCode = getCountryCodeFromLanguage(parts[0]);
} else if (parts.length === 2) {
countryCode = parts[1].toLowerCase(); // Use the country code
}
// If country code is not found, set a fallback output
if (!countryCode) {
const fallback = `? ${locale.toUpperCase()}`; // Just a question mark and the full locale
return { flag: fallback, isUnknown: true, countryName: 'Unknown Country' };
}
// Convert the country code to a flag emoji
return {
flag: String.fromCodePoint(...[...countryCode.toUpperCase()].map(char => 0x1F1E6 + char.charCodeAt(0) - 'A'.charCodeAt(0))),
isUnknown: false,
countryCode: countryCode
};
}
function displayLocaleAndFlag() {
// Get the browser locale
const userLocale = navigator.language || navigator.userLanguage;
//alert(`User Locale: ${userLocale}`); // Alert the detected locale
const { flag, isUnknown, countryCode } = getFlagEmoji(userLocale);
//alert(`Country Code: ${countryCode}, Is Unknown: ${isUnknown}`); // Debug country code and unknown flag status
// Display the locale and the corresponding flag (or fallback)
//document.getElementById('locale').textContent = `Your Locale: ${userLocale}`;
if (isUnknown) {
const fallbackDiv = document.createElement('div');
fallbackDiv.className = 'fallback-box';
fallbackDiv.textContent = `? ${userLocale.toUpperCase()}`; // Show ? and locale code inside the box
document.getElementById('flag-container').appendChild(fallbackDiv);
// Tooltip for fallback
fallbackDiv.title = "Unknown Country"; // Tooltip for fallback
//alert('Fallback triggered: Unknown Country'); // Debug fallback
} else {
const countryName = getCountryNameFromCountryCode(countryCode.toUpperCase());
//alert(`Country Name from Country Code: ${countryName}`); // Alert the country name
const flagSpan = document.createElement('span');
flagSpan.textContent = flag; // Use flag emoji
flagSpan.title = countryName; // Tooltip for the flag in country language
document.getElementById('flag-container').appendChild(flagSpan);
//alert(`Flag Emoji: ${flag}`); // Debug flag emoji display
}
}
displayLocaleAndFlag();
});

View File

@@ -0,0 +1,28 @@
$(document).ready(function() {
function toggleUPSClasses() {
var selectedOption = $('#Nutmode_select').val();
$('.masterups').toggle(selectedOption === 'netserver' || selectedOption === 'standalone'); // Show/Hide masterups based on Net Server or Standalone
$('.slaveups').toggle(selectedOption === 'netclient'); // Show/Hide slaveups based on Net Client
// Enable/Disable inputs based on the selected option
$('.masterups input').prop('disabled', !(selectedOption === 'netserver' || selectedOption === 'standalone'));
$('.slaveups input').prop('disabled', selectedOption !== 'netclient');
}
function toggleGenerics() {
var upsModelValue = $('#UPS_Model_select').val().toLowerCase(); // Get the current value from UPS_Model
var isGenericUps = upsModelValue === 'genericups'; // Check if it's 'genericups'
// Show/Hide generics section and enable/disable inputs
$('.generics').toggle(isGenericUps);
$('.generics input').prop('disabled', !isGenericUps); // Enable/Disable inputs based on the value
}
// Event listener for the selections
$('#Nutmode_select').change(toggleUPSClasses);
$('#UPS_Model_select').change(toggleGenerics); // Listen for changes in the UPS_Model dropdown
// Set the initial state based on current selections
toggleGenerics();
toggleUPSClasses();
});

View File

@@ -0,0 +1,51 @@
/*
This should work on class sidebar-wrapper
*/
const SELECTOR_SIDEBAR_WRAPPER = '.sidebar-wrapper';
const Default = {
scrollbarTheme: 'os-theme-light',
scrollbarAutoHide: 'leave',
scrollbarClickScroll: true,
};
document.addEventListener('DOMContentLoaded', function () {
const sidebarWrapper = document.querySelector(SELECTOR_SIDEBAR_WRAPPER);
if (sidebarWrapper && typeof OverlayScrollbarsGlobal?.OverlayScrollbars !== 'undefined') {
OverlayScrollbarsGlobal.OverlayScrollbars(sidebarWrapper, {
scrollbars: {
theme: Default.scrollbarTheme,
autoHide: Default.scrollbarAutoHide,
clickScroll: Default.scrollbarClickScroll,
},
overflow: {
x: 'hidden',
y: 'scroll',
},
});
}
});
/* This should work with class=data-overlayscrollbars-initialize and id=scrolltarget */
/* https://kingsora.github.io/OverlayScrollbars/ */
/* const { OverlayScrollbars, ClickScrollPlugin } = OverlayScrollbarsGlobal;
// optional: use the ClickScrollPlugin to make the option "scrollbars.clickScroll: true" available
OverlayScrollbars.plugin(ClickScrollPlugin);
OverlayScrollbars(document.body, {
scrollbars: {
clickScroll: true,
},
overflow: {
x: 'hidden',
y: 'scroll',
},
});
OverlayScrollbars(document.getElementById('scrollTarget'), {});
*/

View File

@@ -0,0 +1,25 @@
document.addEventListener('DOMContentLoaded', function() {
const analysisType = document.getElementById('analysis_type');
const messageIdGroup = document.getElementById('message_id_group');
const emailAddressGroup = document.getElementById('email_address_group');
// Initially hide both controls
messageIdGroup.style.display = 'none';
emailAddressGroup.style.display = 'none';
analysisType.addEventListener('change', function() {
// Hide both controls first
messageIdGroup.style.display = 'none';
emailAddressGroup.style.display = 'none';
// Show the relevant control based on the selected option
switch(this.value) {
case 'trace_message':
messageIdGroup.style.display = 'block';
break;
case 'user_activity':
emailAddressGroup.style.display = 'block';
break;
}
});
});

View File

@@ -0,0 +1,33 @@
// js/sme-password.js
$(document).ready(function() {
/* // For each password input
$('.sme-password').each(function() {
// Create a new container
//alert("sme-password");
var $inputContainer = $('<div class="input-container"></div>');
// Move the input into the new container
$(this).wrap($inputContainer);
// Create the toggle image
var $togglePassword = $('<img src="images/visible.png" alt="Show Password" class="toggle-password" />');
// Append the toggle image to the container
$(this).after($togglePassword);
}); */
$('.toggle-password').on('click', function() {
// Find the associated password field
var input = $(this).siblings('.sme-password');
// Toggle the type attribute between password and text
var inputType = input.attr('type') === 'password' ? 'text' : 'password';
input.attr('type', inputType);
// Toggle the icon source based on the input type
// Check boostrap colours?
// var iconSrc = inputType === 'password' ? 'images/visible.png' : 'images/visible-slash.png';
// $(this).attr('src', iconSrc);
});
});

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
@@ -29,7 +29,8 @@
<p>
<span class="">
%=l 'bac_ENABLE_TAPE_BACKUP'
</span><span class="">
</span>
<span class="">
% if ( $bac_datas->{status} eq 'checked' ) {
<input type='checkbox' name='Tapebackup' checked >
%} else {
@@ -42,7 +43,8 @@
<p>
<span class="">
%=l 'bac_TAPE_BACKUP_TIME'
</span><span class="">
</span>
<span class="">
% param 'BackupHour' => $bac_datas->{backupHour} unless param 'BackupHour';
%= text_field 'BackupHour', size => '2'
% param 'BackupMin' => $bac_datas->{backupMin} unless param 'BackupMin';
@@ -50,7 +52,8 @@
</span>
<!--span class="">
%=l 'AM/PM:'
<!--/span--><span class="">
<!--/span-->
<span class="">
% param 'BackupAMPM' => $bac_datas->{backupAMPM} unless param 'BackupAMPM';
%= select_field 'BackupAMPM' => ['AM', 'PM'], class => ""
</span>
@@ -59,7 +62,8 @@
<p>
<span class="">
%=l 'bac_LOAD_TAPE_REMINDER_TIME'
</span><span class="">
</span>
<span class="">
% param 'ReminderHour' => $bac_datas->{reminderHour} unless param 'ReminderHour';
%= text_field 'ReminderHour', size => '2'
% param 'ReminderMin' => $bac_datas->{reminderMin} unless param 'ReminderMin';
@@ -67,7 +71,8 @@
</span>
<!--span class="">
%=l 'AM/PM:'
<!--/span--><span class="">
<!--/span-->
<span class="">
% param 'ReminderAMPM' => $bac_datas->{reminderAMPM} unless param 'ReminderAMPM';
%= select_field 'ReminderAMPM' => ['AM', 'PM'], class => ""
</span>

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
@@ -13,7 +14,7 @@
% if ( stash 'error' ) {
<br><div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
</div>
%}
<h1><%= $title%></h1>

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
@@ -29,19 +30,24 @@
%=l 'bac_WORKSTN_BACKUP_ENABLED'
<span class="">
%= $bac_datas->{status}
</span><br>
</span>
<br>
%= $c->render_to_string(inline => $c->workstnBackupConfig())
<p><h3>
<p>
<h3>
%= l 'bac_WORKSTATION_BACKUP_SETCONF'
</h3><br>
</h3>
<br>
<span class="">
%=l 'bac_SELECT_VFS_TYPE'
</span><span class="">
</span>
<span class="">
% param 'VFSType' => $bac_datas->{vfstype} unless param 'VFSType';
%= select_field 'VFSType' => $c->get_VFSType_options(), class => ""
</span></p>
</span>
</p>
%= hidden_field 'Function' => $bac_datas->{'function'} . '1'
%= submit_button $c->l('NEXT'), class => ""

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
@@ -11,7 +12,7 @@
% }
% if ( stash 'error' ) {
<br><div class="">
<br><div>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
@@ -29,7 +30,8 @@
<p>
<span class="">
%=l 'bac_ENABLE_WORKSTN_BACKUP'
</span><span class="">
</span>
<span class="">
% if ( $bac_datas->{status} eq 'checked' ) {
<input type='checkbox' name='Workstnbackup' checked >
%} else {
@@ -38,60 +40,73 @@
</span>
</p>
<p><h3>
<p>
<h3>
%= l 'bac_WORKSTATION_BACKUP_DEST'
</h3><br>
</h3>
<br>
% if ( $bac_datas->{vfstype} =~ m/cifs|nfs/s ) {
<span class="">
%=l 'bac_WORKSTN_NAME'
</span><span class="">
% param 'BackupwkStation' => $bac_datas->{station} unless param 'BackupwkStation';
%= text_field 'BackupwkStation', size => 20, class => ""
</span><br>
<span class="">
%=l 'bac_WORKSTN_NAME'
</span>
<span class="">
% param 'BackupwkStation' => $bac_datas->{station} unless param 'BackupwkStation';
%= text_field 'BackupwkStation', size => 20, class => ""
</span>
<br>
%}
% if ( $bac_datas->{vfstype} eq 'usb' ) {
<span class="">
%=l 'bac_local removable disk'
</span><span class="">
% param 'BackupwkFolder' => $bac_datas->{mount} unless param 'BackupwkFolder';
%= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype}), class => ""
</span><br>
<span class="">
%=l 'bac_local removable disk'
</span>
<span class="">
% param 'BackupwkFolder' => $bac_datas->{mount} unless param 'BackupwkFolder';
%= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype}), class => ""
</span>
<br>
% } elsif ( $bac_datas->{vfstype} eq 'mnt') {
<span class="">
%=l 'bac_Mounted disk'
</span><span class="">
% param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder';
%= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype}), class => ""
</span><br>
%=l 'bac_Mounted disk'
</span>
<span class="">
% param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder';
%= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype}), class => ""
</span>
<br>
% } else {
<span class="">
%=l 'bac_SHARED_FOLDER_NAME'
</span><span class="">
% param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder';
%= text_field 'BackupwkFolder', size => 20, class => ""
</span><br>
<span class="">
%=l 'bac_SHARED_FOLDER_NAME'
</span><span class="">
% param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder';
%= text_field 'BackupwkFolder', size => 20, class => ""
</span>
<br>
%}
% if ( $bac_datas->{vfstype} eq 'cifs' ) {
<span class="">
%=l 'bac_WORKSTN_LOGIN'
</span><span class="">
% param 'BackupwkLogin' => $bac_datas->{login} unless param 'BackupwkLogin';
%= text_field 'BackupwkLogin', size => 12, class => ""
</span><br><span class="">
%=l 'bac_PASSWORD'
</span><span class="">
% param 'BackupwkPassword' => $bac_datas->{password} unless param 'BackupwkPassword';
%= password_field 'BackupwkPassword', size => 12, class => ""
</span>
<span class="">
%=l 'bac_WORKSTN_LOGIN'
</span><span class="">
% param 'BackupwkLogin' => $bac_datas->{login} unless param 'BackupwkLogin';
%= text_field 'BackupwkLogin', size => 12, class => ""
</span>
<br>
<span class="">
%=l 'bac_PASSWORD'
</span><span class="">
% param 'BackupwkPassword' => $bac_datas->{password} unless param 'BackupwkPassword';
%= password_field 'BackupwkPassword', size => 12, class => ""
</span>
%}
</p><br><h3>
%= l 'bac_WORKSTN_BACKUP_SETTINGS'
</h3><br>
<p><span class="">
<p>
<span class="">
%=l 'bac_NUMBER_OF_SETS'
</span><span class="">
</span>
<span class="">
% param 'SetsNumber' => $bac_datas->{setsNumber} unless param 'SetsNumber';
%= text_field 'SetsNumber', size => '3'
</span>
@@ -104,7 +119,8 @@
<p>
<span class="">
%=l 'bac_WORKSTN_BACKUP_TIME'
</span><span class="">
</span>
<span class="">
% param 'BackupwkHour' => $bac_datas->{hour} unless param 'BackupwkHour';
%= text_field 'BackupwkHour', size => '2'
% param 'BackupwkMin' => $bac_datas->{min} unless param 'BackupwkMin';
@@ -119,23 +135,25 @@
<p><span class="">
%=l 'bac_WORKSTN_TIMEOUT'
</span><span class="">
</span>
<span class="">
% param 'BackupwkTimeout' => $bac_datas->{timeout} unless param 'BackupwkTimeout';
%= text_field 'BackupwkTimeout', size => '2'
</span>
%=l 'bac_INC_ONLY_TIMEOUT'
<span class="">
% if ( $bac_datas->{incOnlyTimeout} eq 'checked' ) {
<input type='checkbox' name='IncOnlyTimeout' checked >
<input type='checkbox' name='IncOnlyTimeout' checked >
%} else {
%= check_box 'IncOnlyTimeout'
%= check_box 'IncOnlyTimeout'
%}
</span></p>
<p>
<span class="">
%=l 'bac_COMPRESSION_LEVEL'
</span><span class="">
</span>
<span class="">
% param 'Compression' => $bac_datas->{compression} unless param 'Compression';
%= text_field 'Compression', size => '1'
</span>
@@ -143,7 +161,8 @@
<span class="">
% param 'Dof' => $bac_datas->{dof} unless param 'Dof';
%= select_field 'Dof' => $c->get_dow_list(), class => ""
</p><br>
</p>
<br>
%= hidden_field 'Function' => $bac_datas->{function}

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
@@ -33,7 +34,8 @@
<br><br><span class="">
%=l 'bac_SELECT_BACKUP_FILE'
</span><span class="">
</span>
<span class="">
%= select_field 'Backupset' => $c->get_Backupset_options(), class => ""
</span><br><br>

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
@@ -26,17 +27,22 @@
<h3><%=l 'bac_BACKUP_CHOICE' %></h3>
<br><span class="">
<br>
<span class="">
%=l 'bac_SELECT_BACKUP_FILE'
</span><span class="">
</span>
<span class="">
%= select_field 'Backupset' => $c->get_Restoreset_options(), class => ""
</span><br>
<br><span class="">
</span>
<br>
<br>
<span class="">
%=l 'bac_FILTER_EXPRESSION'
</span><span class="">
</span>
<span class="">
%= text_field 'Filterexp', size => 32, class => ""
</span><br>
</span>
<br>
<br>
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('PERFORM'), class => ""

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
@@ -19,7 +20,8 @@
<h1><%= $title%></h1>
<h2><%=l 'bac_WORKSTN_SELECTIVE_RESTORE' %></h2><br>
<h2><%=l 'bac_WORKSTN_SELECTIVE_RESTORE' %></h2>
<br>
%= $c->render_to_string(inline => (l 'bac_READ_COMPLETE'))
@@ -27,15 +29,19 @@
<br><span class="">
%=l 'bac_SELECT_FILES_TO_RESTORE'
</span><span class="">
</span>
<span class="">
%= select_field 'Restorefiles' => $c->get_Restorefiles_options($bac_datas->{'filterexp'},$bac_datas->{'backupset'}), class => "", multiple => 1, size => 15
</span><br>
<br><span class="">
</span>
<br>
<br>
<span class="">
%=l 'bac_SELECT_DATE_BEFORE'
</span><span class="">
</span>
<span class="">
%= text_field 'Seldatebefore', size => 32, class => ""
</span><br>
</span>
<br>
<br>
%= hidden_field 'Function' => $bac_datas->{'function'}
%= hidden_field 'Backupset' => $bac_datas->{'backupset'}

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
@@ -11,9 +12,10 @@
% }
% if ( stash 'error' ) {
<br><div class="">
<br>
<div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
</div>
%}
<h1><%= $title%></h1>

View File

@@ -1,18 +1,20 @@
% layout 'AdminLTE', title => "Sme server 2 - backup - verify";
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class="">
<br>
<div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
</div>
%}
<h1><%= $title%></h1>
@@ -24,25 +26,34 @@
%= form_for '/backup' => (method => 'POST') => begin
% if ($bac_datas->{status} ne 'enabled') {
%= $c->render_to_string(inline => (l 'bac_CONFIGURATION_TO_BE_DONE'))
%= $c->render_to_string(inline => (l 'bac_CONFIGURATION_TO_BE_DONE'))
% } else {
%= $c->render_to_string(inline => (l 'bac_VERIFY_WORKSTN_BACKUP_DESC') . ' ' . $c->get_shared_folder_to_verify())
%= $c->render_to_string(inline => (l 'bac_VERIFY_WORKSTN_BACKUP_DESC') . ' ' . $c->get_shared_folder_to_verify())
%}
<br><br><span class="">
<br>
<br>
<span class="">
%=l 'bac_SELECT_BACKUP_FILE'
</span><span class="">
</span>
<span class="">
%= select_field 'Backupset' => $c->get_Backupset_options(), class => ""
</span><br>
</span>
<br>
<p><span class="">
<p>
<span class="">
%=l 'bac_CHECK_TO_VERIFY_FULL_RESTORE'
</span><span class="">
</span>
<span class="">
%= check_box 'Verifyall'
</span></p><br>
</span>
</p>
<br>
%=l 'bac_CHECK_INTEGRITY_WARNING'
<br><br>
<br>
<br>
%= hidden_field 'Function' => $bac_datas->{'function'} . '1'
%= submit_button $c->l('bac_VERIFY'), class => ""

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - backup - verify";
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
@@ -11,9 +12,10 @@
% }
% if ( stash 'error' ) {
<br><div class="">
<br>
<div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
</div>
%}
<h1><%= $title%></h1>

View File

@@ -3,8 +3,8 @@
my $backups = esmith::BackupHistoryDB->open;
my $now = time();
my $backup_rec = $backups->new_record($now, {
type => 'backup_record', BackupType => 'desktop',
StartEpochTime => $now,
type => 'backup_record', BackupType => 'desktop',
StartEpochTime => $now,
});
# Dump the current mysql tables so that they are part of the image.

View File

@@ -2,23 +2,26 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<div>
%= dumper $c->current_route
%= dumper $bac_datas
</div>
% }
% if ( stash 'warning' ) {
<br><div class="">
<br>
<div>
%= $c->render_to_string(inline => stash 'warning')
</div>
</div>
%}
% if ( stash 'error' ) {
<br><div class="">
<br>
<div>
%= $c->render_to_string(inline => stash 'error')
</div>
</div>
%}
<h1><%= $title%></h1>
@@ -29,49 +32,47 @@
<%= $c->render_to_string(inline => (l 'bac_BACKUP_DESC_DAR', $bac_datas->{module},
$bac_datas->{dumpsize}, $bac_datas->{tarsize})) %>
%= form_for '/backup' => (method => 'POST') => begin
<form action="/smanager/backup" method="POST">
%#= form_for '/backup' => (method => 'POST') => begin
<h2><%= l 'bac_BACKUP_CONFIG_STATUS' %></h2>
<h2>
%=l 'bac_BACKUP_CONFIG_STATUS'
</h2>
<div>
<%= l 'bac_TAPE_BACKUPS' %>,
<%= $c->l(uc($bac_datas->{'backupStatus'})).'.' %>
<p><span class="">
%=l 'bac_TAPE_BACKUPS',
</span><span class="">
%= $c->l(uc($bac_datas->{'backupStatus'})).'.'
</span>
% if ( $bac_datas->{'backupStatus'} eq 'enabled' ) {
%= $c->l('bac_BACKUPS_RUN_AT')
<span class="">
%= $bac_datas->{'backupTime'}
</span>
%= $c->l('bac_REMINDER_MESSAGE_AT')
<span class="">
%= $bac_datas->{'reminderTime'}
</span>
%}
<p><span class="">
%=l 'bac_WORKSTN_BACKUPS',
</span><span class="">
%= $c->l(uc($bac_datas->{'backupwkStatus'})).'.'
</span>
% if ( $bac_datas->{'backupwkStatus'} eq 'enabled' ) {
%= $c->l('bac_WKBACKUPS_RUN_AT')
<b>
%= $bac_datas->{'backupwkTime'}
</b>
%}
%= $c->l('bac_BACKUPS_RUN_AT')
%= $bac_datas->{'backupTime'}
%= $c->l('bac_REMINDER_MESSAGE_AT')
%= $bac_datas->{'reminderTime'}
% }
</div>
<div>
<p><span class="">
%=l 'bac_SELECT_AN_ACTION'
</span><span class="">
<%=l 'bac_WORKSTN_BACKUPS' %>,
<%= $c->l(uc($bac_datas->{'backupwkStatus'})) . '.' %>
% if ( $bac_datas->{'backupwkStatus'} eq 'enabled' ) {
<%= $c->l('bac_WKBACKUPS_RUN_AT') %>
<%= $bac_datas->{'backupwkTime'} %>
% }
</div>
<div>
<%= l 'bac_SELECT_AN_ACTION' %>
% param 'Function' => $bac_datas->{function} unless param 'Function';
%= select_field 'Function' => $c->get_function_options(), class => ""
</span></p>
<%= select_field 'Function' => $c->get_function_options() %>
</div>
<br>
%= submit_button $c->l('PERFORM'), class => ""
<% my $btn = $c->l('PERFORM'); %>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
% end
</div>

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
@@ -15,39 +15,53 @@
<!--br><%= $modul %><br-->
<b>
%=l ('bugr_DO_NOT_PANIC')
%=l ('bugr_DO_NOT_PANIC')
</b>
<p>
%=l ('bugr_SME_EXPERIENCE')
</p><p>
%=l ('bugr_SME_EXPERIENCE')
</p>
<p>
%=l ('bugr_USE_TEMPLATE')
: <a href="https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs"
target="_blank">https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs</a>.
</p><p>
</p>
<p>
%=l ('bugr_PLEASE_REPORT_HERE')
: <a href="https://bugs.koozali.org" target="_blank">https://bugs.koozali.org</a>.
</p><p>
%=l ('bugr_FOLLOWING_REPORT_MIGHT_HELP')
</p><p>
%=l ('bugr_REPORT_CONTENT')
<br><ul><li>
%=l ('bugr_SME_VERSION')
</li><li>
%=l ('bugr_SERVER_MODE')
</li><li>
%=l ('bugr_PREVIOUS_SERVER_MODE')
</li><li>
%=l ('bugr_KERNEL_AND_ARCH')
</li><li>
%=l ('bugr_INSTALLED_RPMS')
</li><li>
%=l ('bugr_ALTERED_TEMPLATES')
</li><li>
%=l ('bugr_ALTERED_EVENTS')
</li><li>
%=l ('bugr_YUM_REPOS')
</li><br></ul>
%=l ('bugr_PRIVACY')
</p>
<p>
%=l ('bugr_FOLLOWING_REPORT_MIGHT_HELP')
</p>
<p>
%=l ('bugr_REPORT_CONTENT')
<br>
<ul>
<li>
%=l ('bugr_SME_VERSION')
</li>
<li>
%=l ('bugr_SERVER_MODE')
</li>
<li>
%=l ('bugr_PREVIOUS_SERVER_MODE')
</li>
<li>
%=l ('bugr_KERNEL_AND_ARCH')
</li>
<li>
%=l ('bugr_INSTALLED_RPMS')
</li>
<li>
%=l ('bugr_ALTERED_TEMPLATES')
</li>
<li>
%=l ('bugr_ALTERED_EVENTS')
</li> <li>
%=l ('bugr_YUM_REPOS')
</li>
<br>
</ul>
%=l ('bugr_PRIVACY')
</p>
<% my $btn = l('bugr_CREATE_REPORT'); %>
@@ -57,14 +71,17 @@
% end
<p><b>
%=l ('bugr_DONATING')
</b><br><br>
%=l ('bugr_AWARE_SME')
<br><br><b>
%=l ('bugr_YOUR_HELP')
</b><br><br>
%=l ('bugr_CONSIDER_DONATING')
<br><br>
%=l ('bugr_DONATING')
</b>
<br><br>
%=l ('bugr_AWARE_SME')
<br><br>
<b>
%=l ('bugr_YOUR_HELP')
</b>
<br><br>
%=l ('bugr_CONSIDER_DONATING')
<br><br>
</p>
%= link_to 'https://wiki.koozali.org/Donate' => begin

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>

View File

@@ -1,45 +1,59 @@
% layout 'AdminLTE', title => "Sme server 2 - clamav";
% content_for 'module' => begin
<div id="" class="">
%if (config->{debug} == 1) {
<p>(DBG)route: <%= $c->current_route %><br>
(DBG)FsS stat: <%= $clm_datas->{FilesystemScan}%> <br>
(DBG)Quar stat: <%=$clm_datas->{Quarantine} %>
</p>
%}
<div class="card-body">
% if (config->{debug} == 1) {
<div>
(DBG)route: <%= $c->current_route %><br>
(DBG)FsS stat: <%= $clm_datas->{FilesystemScan}%> <br>
(DBG)Quar stat: <%=$clm_datas->{Quarantine} %>
</div>
% }
<h1><%= $title %></h1>
<br>
<%= $modul %>
<% my $btn = l('SAVE'); %>
%= form_for 'clamav' => (method => 'POST') => begin
<p>
<span class="">
%=l 'clm_LABEL_FILESYSTEM_SCAN_PERIOD'
</span><span class="">
% param 'FilesystemScan' => $clm_datas->{FilesystemScan} unless param 'FilesystemScan';
%= select_field 'FilesystemScan' => [[ (l 'clm_DAILY') => 'daily'], [ (l 'clm_NEVER') => 'disabled'], [ (l 'clm_WEEKLY') => 'weekly']], class => ""
</span>
</p>
<p>
<span class="">
%=l 'clm_LABEL_QUARANTINE'
</span><span class="">
% param 'Quarantine' => $clm_datas->{Quarantine} unless param 'Quarantine';
%= select_field 'Quarantine' => [[ (l 'ENABLED') => 'enabled'], [ (l 'DISABLED') => 'disabled']], class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l 'clm_LABEL_CLAM_VERSIONS'
</span><span class="">
%= $clm_datas->{clam_versions}
<br>
</span>
</p>
%= submit_button "$btn", class => ""
% end
<%= $modul %>
<% my $btn = l('SAVE'); %>
<br><br>
<form action="/smanager/clamav" method="POST">
<div class="row g-3 align-items-center">
<div class="col-auto">
<h6><%= l 'clm_LABEL_FILESYSTEM_SCAN_PERIOD' %>:</h6>
% param 'FilesystemScan' => $clm_datas->{FilesystemScan} unless param 'FilesystemScan';
<%= select_field 'FilesystemScan' => [[ (l 'clm_DAILY') => 'daily'], [ (l 'clm_NEVER') => 'disabled'], [ (l 'clm_WEEKLY') => 'weekly']], class => "form-select" %>
</div>
</div>
<br>
<div class="row g-3 align-items-center">
<br>
<div class="col-auto">
<h6><%= l 'clm_LABEL_QUARANTINE' %>:</h6>
% param 'Quarantine' => $clm_datas->{Quarantine} unless param 'Quarantine';
<%= select_field 'Quarantine' => [[ (l 'ENABLED') => 'enabled'], [ (l 'DISABLED') => 'disabled']], class => "form-select" %>
<br>
</div>
</div>
<div>
<div>
<h6><%= l 'clm_LABEL_CLAM_VERSIONS' %>:</h6>
</div>
<div>
<%= $clm_datas->{clam_versions} %>
</div>
</div>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
</form>
</div>
%end

View File

@@ -1,7 +1,9 @@
<!-- common_css.html.ep -->
%= stylesheet 'css/sme-jquery-overrides.css'
%= stylesheet 'dist/css/adminlte.min.css'
%= stylesheet 'koozali/css/adminlte.koozali.css'
%= stylesheet 'koozali/css/flag-icon.min.css'
%#= stylesheet 'css/sme-jquery-overrides.css'
%= stylesheet 'dist/css/adminlte.min.css'
%= stylesheet 'dist/icons/font/bootstrap-icons.min.css'
%#= stylesheet 'dist/css/overlayscrollbars.min.css'

View File

@@ -1,6 +1,9 @@
<!-- Include files across the whole site -->
%= javascript 'js/jquery.min.js'
<!-- common_js.html.ep -->
%= javascript 'dist/js/jquery.min.js'
%= javascript 'dist/js/bootstrap.min.js'
%= javascript 'dist/js/popper.min.js'
%= javascript 'dist/js/adminlte.min.js'
%= javascript '/js/flag-by-locale.js'
%= javascript '/js/sme-password.js'
%= javascript 'koozali/js/flag-by-locale.js'
%= javascript 'koozali/js/sme-password.js'

View File

@@ -1,8 +1,9 @@
% layout 'AdminLTE', title => "Sme server 2 - err 400";
% content_for 'module' => begin
<div id="" class="">
<div class="">
<div class="card-body">
<div class="text-danger">
%= l 'CSRF_VALIDATION_FAILURE'
</div>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - datetime";
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
@@ -11,7 +12,8 @@
% }
% if ( stash 'error' ) {
<br><div class="">
<br>
<div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
%}
@@ -49,7 +51,8 @@
<br>
<span class="">
%=l 'dat_NTP_SERVER'
</span><span class="">
</span>
<span class="">
%= text_field 'Ntpserver' => $dat_datas->{ntpserver}, class => ""
</span>
</p>
@@ -78,36 +81,44 @@
<br>
<span class="">
%=l 'dat_NEW_M/D/Y'
</span><span class="">
</span>
<span class="">
% param 'Month' => $dat_datas->{month} unless param 'Month';
%= select_field 'Month' => $c->getMonth_list(), class => ""
</span><span class="">
</span>
<span class="">
% param 'Day' => $dat_datas->{day} unless param 'Day';
%= text_field 'Day', size => '2', class => ""
</span><span class="">
</span>
<span class="">
% param 'Year' => $dat_datas->{year} unless param 'Year';
%= text_field 'Year', size => '4', class => ""
</span>
<br>
<span class="">
%=l 'dat_NEW_H/M/S'
</span><span class="">
</span>
<span class="">
% param 'Hour' => $dat_datas->{hour} unless param 'Hour';
%= text_field 'Hour', size => '2', class => ""
</span><span class="">
</span>
<span class="">
% param 'Minute' => $dat_datas->{minute} unless param 'Minute';
%= text_field 'Minute', size => '2', class => ""
</span><span class="">
</span>
<span class="">
% param 'Second' => $dat_datas->{second} unless param 'Second';
%= text_field 'Second', size => '2', class => ""
</span>
<br>
<span class="">
%=l 'dat_AM/PM_AND_TZ'
</span><span class="">
</span>
<span class="">
% param 'Ampm' => $dat_datas->{ampm} unless param 'Ampm';
%= select_field 'Ampm' => ['AM', 'PM'], class => ""
</span><span class="">
</span>
<span class="">
% param 'Timezone' => $c->getTimezone() unless param 'Timezone';
%= select_field 'Timezone' => $c->getZone_list(), class => ""
</span>

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
<p><%= $title %></p>
<%= $modul %>
<p>

View File

@@ -1,90 +1,68 @@
% layout 'AdminLTE', title => "Sme server 2 - directory";
% content_for 'module' => begin
<div>
<div class="card-body">
%if (config->{debug} == 1) {
<p>
(DBG)route: <%= $c->current_route %><br>
(DBG)dir. access: <%= $dir_datas->{access}%><br>
</p>
%}
<div>
(DBG)route: <%= $c->current_route %><br>
(DBG)dir. access: <%= $dir_datas->{access}%><br>
</div>
% }
<h1><%= $title %></h1>
<br>
<%= $modul %>
<% my $btn = l('SAVE');
%>
<% my $btn = l('SAVE'); %>
%= form_for 'directory' => (method => 'POST') => begin
<form action="/smanager/directory" method="POST">
<br>
<p>
<span class="">
%= l('dir_LABEL_ROOT'), class => ""
</span>
<span class="">
%= $dir_datas->{root}, class => ""
</span>
</p>
<p>
%=l 'dir_DESC_DIRECTORY_ACCESS', class => ""
<br>
<span class="">
%=l 'dir_DIRECTORY_ACCESS', class => ""
</span>
<span class="">
% param 'access' => $dir_datas->{access} unless param 'access';
%= select_field 'access' => [[ (l 'NETWORKS_ALLOW_LOCAL') => 'private'], [ (l 'NETWORKS_ALLOW_PUBLIC') => 'public']], class => "", id => ""
</span>
</p>
<p>
%=l 'dir_DESC_DEPARTMENT', class => ""
<br><br>
<span class="">
%=l 'dir_DEPARTMENT', class => ""
</span><span class="">
%= text_field 'department' => $dir_datas->{department}, class => ""
</span>
</p><p>
<span class="">
%=l 'dir_COMPANY', class => ""
</span><span class="">
%= text_field 'company', $dir_datas->{company}, class => ""
</span>
</p><p>
<span class="">
%=l 'dir_STREET', class => ""
</span><span class="">
%= text_field 'street' => $dir_datas->{street}, class => ""
</span>
</p><p>
<span class="">
%=l 'dir_CITY', class => ""
</span><span class="">
%= text_field 'city', $dir_datas->{city}, class => ""
</span>
</p><p>
<span class="">
%=l 'dir_PHONENUMBER', class => ""
</span><span class="">
%= text_field 'phonenumber', $dir_datas->{phonenumber}, class => ""
</span>
</p>
<p>
%=l 'dir_DESC_EXISTING', class => ""
<br><br>
<span class="">
%=l 'dir_EXISTING', class => ""
</span><span class="">
%= select_field 'existing'=> [[ (l 'dir_LEAVE') => 'leave'], [ (l 'dir_UPDATE') => 'update' ]], class => ""
</span>
</p>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
% end
<div>
<div>
<%= l('dir_LABEL_ROOT') %>
<%= $dir_datas->{root} %>
</div>
<div>
<%= l 'dir_DESC_DIRECTORY_ACCESS' %>
<br>
<%= l 'dir_DIRECTORY_ACCESS' %>
% param 'access' => $dir_datas->{access} unless param 'access';
<%= select_field 'access' => [[ (l 'NETWORKS_ALLOW_LOCAL') => 'private'], [ (l 'NETWORKS_ALLOW_PUBLIC') => 'public']] %>
</div>
<div>
<%= l 'dir_DESC_DEPARTMENT' %>
<br><br>
<%= l 'dir_DEPARTMENT' %>
%= text_field 'department' => $dir_datas->{department}
</div>
<div>
<%= l 'dir_COMPANY' %>
<%= text_field 'company', $dir_datas->{company} %>
</div>
<div>
<%= l 'dir_STREET'
<%= text_field 'street' => $dir_datas->{street} %>
</div>
<div>
<%= l 'dir_CITY' %>
<%= text_field 'city', $dir_datas->{city} %>
</div>
<div>
<%= l 'dir_PHONENUMBER' %>
<%= text_field 'phonenumber', $dir_datas->{phonenumber} %>
</div>
<div>
<%= l 'dir_DESC_EXISTING' %>
<br><br>
<%= l 'dir_EXISTING' %>
<%= select_field 'existing'=> [[ (l 'dir_LEAVE') => 'leave'], [ (l 'dir_UPDATE') => 'update' ]] %>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
</div>
%end

View File

@@ -1,13 +1,14 @@
% layout 'AdminLTE', title => "Sme server 2 - domains";
% content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $dom_datas
</p>
<div>
%= dumper $c->current_route
%= dumper $dom_datas
</div>
% }
% if ( stash 'error' ) {
@@ -19,14 +20,14 @@
<h1><%= $title%></h1>
% if ($dom_datas->{trt} eq 'ADD' or $dom_datas->{trt} eq 'UPD') {
%= include 'partials/_dom_upd'
%} elsif ($dom_datas->{trt} eq 'DEL') {
%= include 'partials/_dom_upd'
% } elsif ($dom_datas->{trt} eq 'DEL') {
%= include 'partials/_dom_del'
%} elsif ($dom_datas->{trt} eq 'UP2') {
% } elsif ($dom_datas->{trt} eq 'UP2') {
%= include 'partials/_dom_up2'
%} else {
% } else {
%= include 'partials/_dom_list'
%}
% }
</div>
%end

View File

@@ -1,57 +1,76 @@
% layout 'AdminLTE', title => "Sme server 2 - emailaccess";
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $mai_datas
</p>
<div>
%= dumper $c->current_route
%= dumper $mai_datas
</div>
% }
% if ( stash 'error' ) {
<br><div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<br>
<div class="">
<%= $c->render_to_string(inline => stash 'error') %>
</div>
% }
<h1><%= $title%></h1>
%= form_for '/emailsettingd' => (method => 'POST') => begin
<form action="/smanager/emailsettingd" method="POST">
%#= form_for '/emailsettingd' => (method => 'POST') => begin
%=l 'mai_DESC_POP_ACCESS_CONTROL'
<p><span class="">
%=l 'mai_LABEL_POP_ACCESS_CONTROL'
</span><span class="">
% param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess';
%= select_field 'POPAccess' => $c->get_pop_opt(), class => ""
</span></p>
%=l 'mai_DESC_IMAP_ACCESS_CONTROL'
<p><span class="">
%=l 'mai_LABEL_IMAP_ACCESS_CONTROL'
</span><span class="">
% param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess';
%= select_field 'IMAPAccess' => $c->get_imap_opt(), class => ""
</span></p>
%=l 'mai_DESC_WEBMAIL'
<p><span class="">
%=l 'mai_LABEL_WEBMAIL'
</span><span class="">
% param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail';
%= select_field 'WebMail' => $c->get_webmail_opt(), class => ""
</span></p>
% my $btn = l('SAVE');
%= submit_button "$btn", class => ""
%= hidden_field 'trt' => 'ACC'
% end
<%= l 'mai_DESC_POP_ACCESS_CONTROL' %>
<div>
<%=l 'mai_LABEL_POP_ACCESS_CONTROL' %>
</div>
<div>
% param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess';
<%= select_field 'POPAccess' => $c->get_pop_opt() %>
</div>
<div>
<%=l 'mai_DESC_IMAP_ACCESS_CONTROL' %>
</div>
<div>
<%=l 'mai_LABEL_IMAP_ACCESS_CONTROL' %>
</div>
<div>
% param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess';
<%= select_field 'IMAPAccess' => $c->get_imap_opt() %>
</div>
<div>
<%= l 'mai_DESC_WEBMAIL' %>
<div>
<div>
<%=l 'mai_LABEL_WEBMAIL' %>
</div>
<div>
% param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail';
<%= select_field 'WebMail' => $c->get_webmail_opt() %>
</div>
% my $btn = l('SAVE');
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
%= hidden_field 'trt' => 'ACC'
%# end
</form>
</div>
%end

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - emaildeliver";
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
@@ -11,9 +12,10 @@
% }
% if ( stash 'error' ) {
<br><div class="">
<br>
<div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
</div>
%}
<h1><%= $title%></h1>
@@ -26,12 +28,15 @@
%=l 'mai_DESC_UNKNOWN'
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_UNKNOWN'
</span><span class="">
</span>
<span class="">
% param 'EmailUnknownUser' => $mai_datas->{emailunknownuser} unless param 'EmailUnknownUser';
%= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => ""
</span></p>
</span>
</p>
<!--<hr class="" />-->
<h2>
@@ -40,12 +45,15 @@
%=l 'mai_DESC_DELEGATE'
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_DELEGATE'
</span><span class="">
</span>
<span class="">
% param 'DelegateMailServer' => $mai_datas->{delegatemailserver} unless param 'DelegateMailServer';
%= text_field 'DelegateMailServer', class => ""
</span></p>
</span>
</p>
<!--<hr class="" />-->
<h2>
@@ -54,33 +62,45 @@
%=l 'mai_DESC_SMARTHOST'
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SMARTHOST'
</span><span class="">
</span>
<span class="">
% param 'SMTPSmartHost' => $mai_datas->{smtpsmarthost} unless param 'SMTPSmartHost';
%= text_field 'SMTPSmartHost', class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS'
</span><span class="">
</span>
<span class="">
% param 'SMTPAUTHPROXY_status' => $mai_datas->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status';
%= select_field 'SMTPAUTHPROXY_status' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_USERID'
</span><span class="">
</span>
<span class="">
% param 'SMTPAUTHPROXY_Userid' => $mai_datas->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid';
%= text_field 'SMTPAUTHPROXY_Userid', class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD'
</span><span class="">
</span>
<span class="">
% param 'SMTPAUTHPROXY_Passwd' => $mai_datas->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd';
%= password_field 'SMTPAUTHPROXY_Passwd', class => ""
</span></p>
</span>
</p>
% my $btn = l('SAVE');
%= submit_button "$btn", class => ""

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - emailfilter";
% content_for 'module' => begin
<div id="" class="">
<div class="card-body"
% if (config->{debug} == 1) {
<p>
@@ -11,9 +12,10 @@
% }
% if ( stash 'error' ) {
<br><div class="">
<br>
<div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
</div>
%}
<h1><%= $title%></h1>
@@ -22,74 +24,102 @@
%=l 'mai_DESC_VIRUS_SCAN'
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_VIRUS_SCAN'
</span><span class="">
</span>
<span class="">
% param 'VirusStatus' => $mai_datas->{virusstatus} unless param 'VirusStatus';
%= select_field 'VirusStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => ""
</span><br></p>
</span>
<br>
</p>
%=l 'mai_DESC_SPAM_SCAN'
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SPAM_SCAN'
</span><span class="">
</span>
<span class="">
% param 'Spamstatus' => $mai_datas->{spamstatus} unless param 'Spamstatus';
%= select_field 'Spamstatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SPAM_SENSITIVITY'
</span><span class="">
</span>
<span class="">
% param 'SpamSensitivity' => $mai_datas->{spamsensitivity} unless param 'SpamSensitivity';
%= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SPAM_TAGLEVEL'
</span><span class="">
</span>
<span class="">
% param 'SpamTagLevel' => $mai_datas->{spamtaglevel} unless param 'SpamTagLevel';
%= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SPAM_REJECTLEVEL'
</span><span class="">
</span>
<span class="">
% param 'SpamRejectLevel' => $mai_datas->{spamrejectlevel} unless param 'SpamRejectLevel';
%= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SORTSPAM'
</span><span class="">
</span>
<span class="">
% param 'SpamSortSpam' => $mai_datas->{spamsortspam} unless param 'SpamSortSpam';
%= select_field 'SpamSortSpam' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => ""
</span></p>
</span>
</p>
%=l 'mai_DESC_SPAM_SUBJECT'
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SPAM_SUBJECTTAG'
</span><span class="">
</span>
<span class="">
% param 'SpamSubjectTag' => $mai_datas->{spamsubjecttag} unless param 'SpamSubjectTag';
%= select_field 'SpamSubjectTag' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SPAM_SUBJECT'
</span><span class="">
</span>
<span class="">
% param 'SpamSubject' => $mai_datas->{spamsubject} unless param 'SpamSubject';
%= text_field 'SpamSubject' => class => ""
</span></p>
</span>
</p>
%=l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT'
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_CONTENT_TO_BLOCK'
</span><span class="">
</span>
<span class="">
% param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent';
%= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => "", multiple => "1"
</span></p>
</span>
</p>
% my $btn = l('SAVE');
%= submit_button "$btn", class => ""

View File

@@ -5,7 +5,7 @@
% use constant FALSE => 0;
% use constant TRUE => 1;
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
@@ -16,9 +16,10 @@
% }
% if ( stash 'error' ) {
<br><div class="">
<br>
<div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
</div>
%}
<h1><%= $title%></h1>
@@ -27,9 +28,11 @@
%=l 'mai_DESC_MODE'
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_MODE'
</span><span class="">
</span>
<span class="">
% param 'FetchmailMethod' => $mai_datas->{fetchmailmethod} unless param 'FetchmailMethod';
<!--
<pre>
@@ -39,7 +42,8 @@
</pre>
-->
%= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class => ""
</span></p>
</span>
</p>
%#=l 'mai_DESC_SMTP_AUTH_CONTROL'
<br />
@@ -51,9 +55,11 @@
<br />
% my $smtp_mesg=l('SMTP port %u allow client to authenticate:');
<p><span class="">
<p>
<span class="">
%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25));
</span><span class="">
</span>
<span class="">
% param 'SMTPAuth' => $c->get_current_smtp_auth( FALSE ) unless param 'SMTPAuth';
<!--
<pre>
@@ -64,23 +70,28 @@
</pre>
-->
%= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => ""
</span></p>
</span>
</p>
% my $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:');
<p><span class="">
<p>
<span class="">
%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465));
</span><span class="">
% param 'sSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE) unless param 'sSMTPAuth';
</span>
<span class="">
% param 'sSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE) unless param 'sSMTPAuth';
%= select_field 'sSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => ""
</span></p>
</span>
</p>
%my $smtp_mesg=l('Submission port %u status:');
<p><span class="">
<p>
<span class="">
%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587));
</span><span class="">
</span>
<span class="">
% param 'uSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE) unless param 'uSMTPAuth';
<!--
<!--
<pre>
%= dumper $c->get_smtp_ssl_auth_opt()
%= dumper $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE)
@@ -88,9 +99,10 @@
%= dumper $c->get_db_prop("uqpsmtpd","access")
%= param 'uSMTPAuth'
</pre>
-->
-->
%= select_field 'uSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => ""
</span></p>
</span>
</p>
<!--<hr class="" />-->
<h2>
@@ -99,63 +111,87 @@
%=l 'mai_DESC_SECONDARY'
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SECONDARY'
</span><span class="">
</span>
<span class="">
% param 'SecondaryMailServer' => $mai_datas->{secondarymailserver} unless param 'SecondaryMailServer';
%= text_field 'SecondaryMailServer', class => ""
</span></p>
</span>
</p>
%=l 'mai_DESC_FETCH_PERIOD'
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_FETCH_PERIOD'
</span><span class="">
</span>
<span class="">
% param 'FreqOffice' => $mai_datas->{freqoffice} unless param 'FreqOffice';
%= select_field 'FreqOffice' => $c->fetchmail_freq(), class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_FETCH_PERIOD_NIGHTS'
</span><span class="">
</span>
<span class="">
% param 'FreqOutside' => $mai_datas->{freqoutside} unless param 'FreqOutside';
%= select_field 'FreqOutside' => $c->fetchmail_freq(), class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_FETCH_PERIOD_WEEKENDS'
</span><span class="">
</span>
<span class="">
% param 'FreqWeekend' => $mai_datas->{freqweekend} unless param 'FreqWeekend';
%= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_POP_ACCOUNT'
</span><span class="">
</span>
<span class="">
% param 'SecondaryMailAccount' => $mai_datas->{secondarymailaccount} unless param 'SecondaryMailAccount';
%= text_field 'SecondaryMailAccount', class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_POP_PASS'
</span><span class="">
</span>
<span class="">
% param 'SecondaryMailPassword' => $mai_datas->{secondarymailpassword} unless param 'SecondaryMailPassword';
%= password_field 'SecondaryMailPassword', class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SORT_METHOD'
</span><span class="">
</span>
<span class="">
% param 'SpecifyHeader' => $mai_datas->{specifyheader} unless param 'SpecifyHeader';
%= select_field 'SpecifyHeader' => [[(l 'mai_DEFAULT') => 'off'], [(l 'mai_SPECIFY_BELOW') => 'on']], class => ""
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SORT_HEADER'
</span><span class="">
</span>
<span class="">
% param 'SecondaryMailEnvelope' => $mai_datas->{secondarymailenvelope} unless param 'SecondaryMailEnvelope';
%= text_field 'SecondaryMailEnvelope', class => ""
</span></p>
</span>
</p>
% my $btn = l('SAVE');
%= submit_button "$btn", class => ""

View File

@@ -5,9 +5,9 @@
% use constant FALSE => 0;
% use constant TRUE => 1;
<div id="" class="">
<div class="card-body">
% if (config->{debug} == TRUE) {
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $mai_datas
@@ -17,31 +17,40 @@
% if ( stash 'error' ) {
<br><div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
</div>
%}
<h1><%= $title%></h1>
%= form_for 'emailsettings' => (method => 'POST') => begin
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_POP_ACCESS_CONTROL'
</span><span class="">
</span>
<span class="">
%= $c->get_current_pop3_access( TRUE )
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_IMAP_ACCESS_CONTROL'
</span><span class="">
</span>
<span class="">
%= $c->get_current_imap_access( TRUE )
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_WEBMAIL'
</span><span class="">
</span>
<span class="">
%= $c->get_current_webmail_status( TRUE )
</span></p>
</span>
</p>
% my $btn = l('mai_DESC_STATE_ACCESS_BUTTON');
% my $btn = l('mai_DESC_STATE_ACCESS_BUTTON');
<div class="">
%= submit_button "$btn", class => ""
</div>
@@ -53,23 +62,32 @@
<!--<hr class="" />-->
%= form_for 'emailsettings' => (method => 'POST') => begin
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_VIRUS_SCAN'
</span><span class="">
</span>
<span class="">
%= $c->get_virus_status(TRUE)
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SPAM_SCAN'
</span><span class="">
</span>
<span class="">
%= $c->get_spam_status(TRUE)
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT'
</span><span class="">
</span>
<span class="">
%= $c->get_patterns_status(TRUE)
</span></p>
</span>
</p>
% my $btn = l('mai_DESC_STATE_FILTERING_BUTTON');
<div class="">
@@ -83,34 +101,46 @@
<!--<hr class="" />-->
%= form_for 'emailsettings' => (method => 'POST') => begin
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_MODE'
</span><span class="">
</span>
<span class="">
%= $mai_datas->{fetchmailmethod}
</span></p>
</span>
</p>
% my $smtp_mesg;
% $smtp_mesg=l('SMTP port %u allow client to authenticate:');
<p><span class="">
<p>
<span class="">
%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25));
</span><span class="">
%= $c->get_current_smtp_auth( TRUE )
</span></p>
</span>
<span class="">
%= $c->get_current_smtp_auth( TRUE )
</span>
</p>
% $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:');
<p><span class="">
<p>
<span class="">
%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465));
</span><span class="">
%= $c->get_current_smtp_ssl_auth( TRUE, 's', FALSE )
</span></p>
</span>
<span class="">
%= $c->get_current_smtp_ssl_auth( TRUE, 's', FALSE )
</span>
</p>
% $smtp_mesg=l 'Submission port %u status:';
<p><span class="">
<p>
<span class="">
%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587));
</span><span class="">
</span>
<span class="">
%= $c->get_current_smtp_ssl_auth( TRUE,'u', FALSE )
</span></p>
</span>
</p>
<br />
% my $btn = l('mai_DESC_STATE_RECEPTION_BUTTON');
@@ -125,27 +155,36 @@
<!--<hr class="" />-->
%= form_for 'emailsettings' => (method => 'POST') => begin
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_UNKNOWN'
</span><span class="">
</span>
<span class="">
%= $c->get_emailunknownuser_status( TRUE )
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_DELEGATE'
</span><span class="">
</span>
<span class="">
%= $c->get_value('DelegateMailServer')
</span></p>
</span>
</p>
<p><span class="">
<p>
<span class="">
%=l 'mai_LABEL_SMARTHOST'
</span><span class="">
</span>
<span class="">
%= $c->get_value('SMTPSmartHost')
</span></p>
</span>
</p>
% my $btn = l('mai_DESC_STATE_DELIVERY_BUTTON');
% my $btn = l('mai_DESC_STATE_DELIVERY_BUTTON');
<div class="">
%= submit_button "$btn", class => ""
%= submit_button "$btn", class => ""
</div>
%= hidden_field 'trt' => 'DEL'

View File

@@ -2,18 +2,21 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
</p>
% }
% if ( stash 'error' ) {
<br><div class="">
<br>
<div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1> Embedded - <%=$title %></h1><br>
<h1> Embedded - <%=$title %></h1>
<br>
<p>If the legacy panel does not appear, then you may not be logged into the original Server manager.<br />You can log in by clicking <a href="/server-manager" target='_blank'>here</a>. Or by clicking on the "Legacy SM" button at the top of the window.</p>
% my $height = $c->stash('height') | '600px';
% if ($height !~ /px$/) { $height = $height.'px';}

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin
<div>
<div class="card-body">
<p>
<br>dev<br>
Oups !!!

View File

@@ -1,32 +1,35 @@
% layout 'AdminLTE', title => "Sme server 2 - groups";
% content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $grp_datas
</p>
<div>
%= dumper $c->current_route
%= dumper $grp_datas
</div>
% }
<!-- reetp error here -->
% if ( stash 'error' ) {
<br><div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<div class="text-danger">
<%= $c->render_to_string(inline => stash 'error') %>
</div>
% }
<h1><%= $title%></h1>
% if ($grp_datas->{trt} eq 'ADD') {
%= include 'partials/_grp_add'
%} elsif ($grp_datas->{trt} eq 'DEL') {
%= include 'partials/_grp_add'
% } elsif ($grp_datas->{trt} eq 'DEL') {
%= include 'partials/_grp_del'
%} elsif ($grp_datas->{trt} eq 'UPD') {
% } elsif ($grp_datas->{trt} eq 'UPD') {
%= include 'partials/_grp_upd'
%} else {
% } else {
%= include 'partials/_grp_list'
%}
% }
</div>
%end

View File

@@ -1,13 +1,14 @@
% layout 'AdminLTE', title => "Sme server 2 - hostentries";
% content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) {
<p>
<div>
%= dumper $c->current_route
%= dumper $hos_datas
</p>
</div>
% }
<h1><%= $title%></h1>
@@ -20,15 +21,15 @@
%}
% if ($hos_datas->{trt} eq 'ADD' or $hos_datas->{trt} eq 'UPD') {
%= include 'partials/_hos_upd'
%= include 'partials/_hos_upd'
%} elsif ($hos_datas->{trt} eq 'DEL') {
%= include 'partials/_hos_del'
%= include 'partials/_hos_del'
%} elsif ( $hos_datas->{trt} eq 'ALC' or $hos_datas->{trt} eq 'ULC') {
%= include 'partials/_hos_ulc'
%= include 'partials/_hos_ulc'
%} elsif ( $hos_datas->{trt} eq 'ARM' or $hos_datas->{trt} eq 'URM') {
%= include 'partials/_hos_urm'
%= include 'partials/_hos_urm'
%} else {
%= include 'partials/_hos_list'
%= include 'partials/_hos_list'
%}
</div>

View File

@@ -1,25 +1,27 @@
% layout 'AdminLTE', title => "Sme server 2 - ibays";
% content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) {
<p>
<div>
%= dumper $c->current_route
%= dumper $iba_datas
</p>
</div>
% }
% if ( stash 'error' ) {
<br><div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
<br>
<div>
<%= $c->render_to_string(inline => stash 'error') %>
</div>
%}
<h1><%= $title%></h1>
% if ( stash 'modul' ) {
%= $c->render_to_string(inline => stash 'modul' );
%= $c->render_to_string(inline => stash 'modul' );
% }
% if ($iba_datas->{trt} eq 'ADD') {

View File

@@ -8,7 +8,7 @@
</p>
% }
<div>
<div class="card-body">
% if ( stash 'error' ) {
<br>
@@ -18,11 +18,10 @@
% }
<h3><%= $title %> </h3>
<!-- <h3>template: initial.html.ep</h3> -->
<!-- <H1>Initial AdminLTE</H1> -->
<p>
<!-- <h3>template: initial.html.ep</h3> -->
<!-- <H1>Initial AdminLTE</H1> -->
%= $modul
</p>
</div>

View File

@@ -1,38 +1,43 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- default +jquery -->
<!-- https://icons.getbootstrap.com/ -->
<!-- Nice mojo links -->
<!-- https://en.mojolicious.perlzemi.com/blog/20140414139745.html -->
<!-- https://en.mojolicious.perlzemi.com/blog/20110616130993.html -->
<head>
<title>
<%= $title %>
</title>
<link rel="made" href="mailto:bugs%40koozali.org">
<link rel="icon" type="image/x-icon" href="koozali/assets/img/favicon.ico">
<meta name="copyright" content="(head.tmpl)Copyright 2003-2004 Mitel Corporation">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
%= content_for 'head_contrib'
% if (config 'hasJquery') {
%= include 'partials/_js_imports'
%= include 'common_js'
% }
%= content_for 'refresh'
%= include 'common_js'
%= include 'common_css'
<!-- Custom overrides js/css? -->
<!-- This needs refining - do contribs add in their own stuff?? -->
<!-- This needs refining -->
% if (config 'hasJquery') {
%= include 'partials/_js_imports'
<!-- Custom overrides? -->
% if ($c->current_route eq 'nutups') {
%= include 'partials/_nutups_overrides'
% }
% }
% if ($c->current_route eq 'nutups') {
%= include 'partials/_nutups_overrides'
% }
</head>
<body class="sidebar-expand-lg bg-body-tertiary">
<body class="sidebar-expand-lg bg-body-tertiary app-loaded">
<!-- This is set from the data at the top of the _partials -->
@@ -47,133 +52,155 @@
<div class="app-wrapper">
<!-- Should create a new separate header partial -->
<!-- Should create a new separate header partial?? -->
<!--begin::Header-->
<nav id="koozali_grad" class="app-header navbar navbar-expand bg-success-subtle" data-bs-theme="light">
<!--begin::Container-->
<div class="container-fluid">
<!--begin::Start Navbar Links-->
<!-- Top bar links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-lte-toggle="sidebar" href="#" role="button">
<i class="bi bi-list"></i>
</a>
</li>
<li class="nav-item d-none d-md-block"><a href="/smanager" class="nav-link">Home</a></li>
% if ( not defined $c->session->{username} ) {
<li class="nav-item d-none d-md-block"><a href="login" class="nav-link">Login</a></li>
% } else {
<li class="nav-item d-none d-md-block"><a href="logout" class="nav-link">Logout</a></li>
% }
<li class="nav-item d-none d-md-block">
%= include 'partials/_flag_icon'
</li>
</ul>
<!--end::Start Navbar Links-->
<!-- this can do direct to header so always available-->
% if ($c->is_logged_in && scalar @{SrvMngr::theme_list( $c )} > 1) {
%= include 'partials/_swt_theme'
% }
</div>
<!--end::Container-->
</nav>
<nav id="koozali_grad" class="app-header navbar navbar-expand bg-success-subtle" data-bs-theme="light">
<!--begin::Container-->
<div class="container-fluid">
<!--begin::Start Navbar Links-->
<!-- Top bar links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-lte-toggle="sidebar" href="#" role="button">
<i class="bi bi-list"></i>
</a>
</li>
<li class="nav-item d-none d-md-block"><a href="/smanager" class="nav-link">Home</a></li>
% if ( not defined $c->session->{username} ) {
<li class="nav-item d-none d-md-block"><a href="login" class="nav-link">Login</a></li>
% } else {
<li class="nav-item d-none d-md-block"><a href="logout" class="nav-link">Logout</a></li>
% }
<li class="nav-item d-none d-md-block">
%= include 'partials/_flag_icon'
</li>
</ul>
<!--end::Start Navbar Links-->
<!-- this can do direct to header so always available-->
% if ($c->is_logged_in && scalar @{SrvMngr::theme_list( $c )} > 1) {
%= include 'partials/_swt_theme'
% }
</div>
<!--end::Container-->
</nav>
<!--end::Header-->
<!--begin::Sidebar-->
<aside class="app-sidebar bg-success-subtle" data-bs-theme="light">
<!--begin::Sidebar Brand-->
<div class="sidebar-brand sidebar-dark-primary">
<!--begin::Brand Link-->
<a href="../index.html" class="brand-link">
<!--begin::Brand Image-->
<img src="koozali/assets/img/Koozali_EyeIcon.png" alt="Koozali Logo"
class="brand-image opacity-75 shadow" />
<!--end::Brand Image-->
<!--begin::Brand Text-->
<span class="brand-text fw-light">Koozali</span>
<!--end::Brand Text-->
</a>
<!--end::Brand Link-->
</div>
<!--end::Sidebar Brand-->
<!--begin::Sidebar Wrapper-->
<div class="sidebar-wrapper">
<nav class="mt-2">
<!--begin::Sidebar Menu-->
<ul class="nav sidebar-menu flex-column" data-lte-toggle="treeview" role="menu" data-accordion="false">
<aside class="app-sidebar bg-success-subtle" data-bs-theme="light">
<!--begin::Sidebar Brand-->
<div class="sidebar-brand sidebar-dark-primary">
<!--begin::Brand Link-->
<a href="../index.html" class="brand-link">
<!--begin::Brand Image-->
<img src="koozali/assets/img/Koozali_EyeIcon.png" alt="Koozali Logo"
class="brand-image opacity-75 shadow" />
<!--end::Brand Image-->
<!--begin::Brand Text-->
<span class="brand-text fw-light">Koozali</span>
<!--end::Brand Text-->
</a>
<!--end::Brand Link-->
</div>
<!--end::Sidebar Brand-->
<!--begin::Sidebar Wrapper-->
<div class="sidebar-wrapper navbar-nav-scroll">
<nav class="mt-2">
<!--begin::Sidebar Menu-->
<ul class="nav sidebar-menu flex-column" data-lte-toggle="treeview" role="menu" data-accordion="false">
%= include 'partials/_sidebar_support_menu'
% if ( $c->is_logged_in ) {
%= include 'partials/_sidebar_user_menu'
% }
% if ( $c->is_admin ) {
%= include 'partials/_sidebar_main_menu'
% }
</ul>
<!--end::Sidebar Menu-->
</nav>
</div>
<!--end::Sidebar Wrapper-->
</aside>
%= include 'partials/_sidebar_support_menu'
% if ( $c->is_logged_in ) {
%= include 'partials/_sidebar_user_menu'
% }
% if ( $c->is_admin ) {
%= include 'partials/_sidebar_main_menu'
% }
</ul>
<!--end::Sidebar Menu-->
</nav>
</div>
<!--end::Sidebar Wrapper-->
</aside>
<!--end::Sidebar-->
<!--begin::App Main-->
<main class="app-main">
<!-- Can add a header row here? -->
<!-- %= include 'partials/_app_content_header' -->
<main class="app-main">
<!-- Can add a header row here? -->
<!-- %= include 'partials/_app_content_header' -->
<!--begin::App Content-->
<div class="app-content">
<!--begin::Container-->
<div class="container-fluid">
<!--begin::Rows-->
<!-- Add breadcrumb here -->
%= include 'partials/_app_content_breadcrumb'
<!-- We can add extra rows in the main panel here -->
<!-- %#= include 'partials/_app_content_first_row' -->
<!-- %#= include 'partials/_app_content_demo_row' -->
<!--end::Rows-->
<!-- <br> -->
<!-- This is the main page content depening on the calling module -->
<!-- nameofpanel.html.ep -->
<!-- That will also include it's own _partials -->
%#= dumper $c->current_route
% if ($c->current_route ne 'login') {
%= include 'partials/_panel_card_top'
%= include 'partials/_panel_card_header'
% }
%= content 'module'
<!--begin::App Content-->
<div class="app-content">
<!--begin::Container-->
<div class="container-fluid">
<!--begin::Rows-->
<!-- Add breadcrumb here -->
%= include 'partials/_app_content_breadcrumb'
<! We can add extra rows in the main panel here -->
<!-- %#= include 'partials/_app_content_first_row' -->
<!-- %#= include 'partials/_app_content_demo_row' -->
<!--end::Rows-->
<br>
<!-- This is the main page content depening on the calling module -->
%= content 'module'
% if ($c->current_route ne 'login') {
%= include 'partials/_panel_card_footer'
%= include 'partials/_panel_card_bottom'
% }
</div>
</div>
</div>
<!--end::App Content-->
</main>
<!--end::App Content-->
</main>
<!--end::App Main-->
<!-- This is the original footer - move content to new one -->
<!-- %= include 'partials/_footer' -->
<!--begin::Footer-->
<footer class="app-footer">
<!--begin::To the end-->
<div class="float-end d-none d-sm-inline">Anything you want</div>
<!--end::To the end-->
<!--begin::Copyright-->
<strong>
Copyright &copy; 2014-2025&nbsp;
<a href="https://adminlte.io" class="text-decoration-none">AdminLTE.io</a>.
</strong>
All rights reserved.
<!--end::Copyright-->
</footer>
<footer class="app-footer">
<!--begin::To the end-->
<div class="float-end d-none d-sm-inline">Anything you want</div>
<!--end::To the end-->
<!--begin::Copyright-->
<strong>
Copyright &copy; 2014-2025&nbsp;
<a href="https://adminlte.io" class="text-decoration-none">AdminLTE.io</a>.
</strong>
All rights reserved.
<!--end::Copyright-->
</footer>
<!--end::Footer-->
</div>
<!--end::App Wrapper-->

View File

@@ -6,9 +6,11 @@
% content_for 'module' => begin
<!-- needs moving -->
%= stylesheet '/css/letsencrypt.css'
<div>
<div class="card-body">
% if (config->{debug} == 1) {
<pre>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - localnetworks";
% content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) {
<p>

View File

@@ -2,20 +2,20 @@
% content_for 'module' => begin
%if ( config 'debug' ) {
<p>
% if ( config 'debug' ) {
<div>
<!-- %= dumper $c->current_route -->
%if ( stash 'trt' ) {
%= dumper stash 'trt'
%}
</p>
%}
% if ( stash 'trt' ) {
%= dumper stash 'trt'
% }
</div>
% }
% if ( stash 'error' ) {
<br><div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% }
% my $btn = l('use_SIGNIN');
% if ( $trt eq 'RESET' ) {
@@ -23,7 +23,7 @@
%= $c->render_to_string(inline => l 'use_DESC_RESET')
</h2></div>
% $btn = l('use_RESET');
%}
% }
<div class="login-page bg-body-secondary-subtle app-loaded">
<!-- /.login-logo -->
@@ -77,7 +77,7 @@
<!-- /.col -->
<div class="col-4">
<div class="d-grid gap-2">
<button type="submit" class="btn btn-primary">Sign In</button>
<button type="submit" class="btn btn-primary">Login</button>
</div>
</div>
<!-- /.col -->

View File

@@ -1,69 +0,0 @@
% layout 'AdminLTE' , title => "Sme server 2 - login";
% content_for 'module' => begin
<div id="" class="">
%if ( config 'debug' ) {
<p>
%= dumper $c->current_route
%if ( stash 'trt' ) {
%= dumper stash 'trt'
%}
</p>
%}
% if ( stash 'error' ) {
<br><div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% my $btn = l('use_SIGNIN');
% if ( $trt eq 'RESET' ) {
<br><div class=""><h2>
%= $c->render_to_string(inline => l 'use_DESC_RESET')
</h2></div>
% $btn = l('use_RESET');
%}
<h1>
%=l 'use_TITLE'
</h1>
%= form_for '/login' => (method => 'POST') => begin
<p><span class="">
%=l 'USER_NAME'
</span><span class="">
%= text_field 'Username'
</span></p>
% if ( $trt ne 'RESET' ) {
<p><span class="">
%=l 'PASSWORD'
</span><span class="">
%= password_field 'Password', id => "", autocomplete => 'current-password', class=>""
% if (config 'hasJquery') {
%#<a href='#' id="" class=""> <img src="images/visible.png" height="16" alt="Visible"></a>
% }
</span></p>
%}
%= hidden_field 'From' => $c->tx->req->url
%= hidden_field 'Trt' => $trt
<br>
<div class="">
%= submit_button "$btn", class => ""
</div>
%if ( config 'pwdreset' ) {
<div class=""><a href='login2'>
%=l 'use_FORGOT'
</a></div>
%}
% end
</div>
%end

View File

@@ -1,8 +1,11 @@
% layout 'AdminLTE', title => 'Sme server 2 - Manual';
% content_for 'module' => begin
<div id="" class="">
<p><h1><%= $title %></h1></p>
<div class="card-body">
<p>
<h1><%= $title %></h1>
</p>
%= $c->render_to_string( inline => stash 'modul' )
</div>

View File

@@ -2,9 +2,11 @@
% content_for 'module' => begin
<!-- should be moved? -->
%= stylesheet '/css/module.css'
<div id="" class="">
<div class="card-body">
% if (config->{debug} == 1) {
<p>
<strong>Debug Info:</strong>

View File

@@ -2,8 +2,9 @@
% content_for 'module' => begin
<div id="" class="">
<p><br>dev<br> Oups !!!
<div class="card-body">
<p>
<br>dev<br> Oups !!!
The page you were requesting
"<%= $self->req->url->path || '/' %>"
could not be found.

View File

@@ -1,6 +1,7 @@
% layout 'AdminLTE', title => 'Sme server 2 - Error P';
<div id="" class="">
<p><br><br>
<div class="card-body">
<p>
<br><br>
The page you were requesting
"<%= $self->req->url->path || '/' %>"
could not be found.

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin
<div id="" class="">
<div class="card-body">
<p><br>dev<br> Oups !!!
The page you were requesting
"<%= $self->req->url->path || '/' %>"

View File

@@ -6,7 +6,7 @@
% content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) {
<pre>

View File

@@ -8,7 +8,10 @@
<div class="col-sm-6">
<ol class="breadcrumb float-sm-start">
<li class="breadcrumb-item"><a href="initial">Home</a></li>
<li class="breadcrumb-item active" aria-current="page"><%= $c->current_route %></li>
<li class="breadcrumb-item active" aria-current="page">
<a href="<%= $c->stash('controller') %>"> <%= $c->stash('controller') %>
</a>
</li>
</ol>
</div>
</div>

View File

@@ -1,5 +1,5 @@
<div id="flag-container" class = "flag-style">
<div id="flag-container" class="flag-style">
<!-- class=flag-style" -->
<!-- The flag icon will be inserted here -->
</div>

View File

@@ -1,14 +1,12 @@
<div id="" class="">
<div>
<!--<HR class="">-->
<a href="https://mojolicious.org" target="_blank"><img src="images/sme-mojo-logo-white.png" style="position:relative;"></a>
<font class="">
% if ( $c->is_logged_in && $c->is_admin) {
SME Server <%= session 'releaseVersion' %>-<%= $c->app->VERSION %> Manager II
% my $mode;
% if (config->{mode} eq 'development'){ $mode = '-dev';} else { $mode = '';}
(Mojo:<%= Mojolicious->VERSION %><%= $mode %>)
% }
<br>Copyright 1999-2006 Mitel Corporation<br>
%= session 'copyRight'
<br>Copyright (c) 2013-2024 Koozali Foundation Inc.<br>
</font>
% if ( $c->is_logged_in && $c->is_admin) {
SME Server <%= session 'releaseVersion' %>-<%= $c->app->VERSION %> Manager II
% my $mode;
% if (config->{mode} eq 'development'){ $mode = '-dev';} else { $mode = '';}
(Mojo:<%= Mojolicious->VERSION %><%= $mode %>)
% }
<br>Copyright 1999-2006 Mitel Corporation<br>
%= session 'copyRight'
<br>Copyright (c) 2013-2024 Koozali Foundation Inc.<br>

View File

@@ -1,62 +1,80 @@
<div>
<br>
<!-- <h2><%#= l 'grp_FORM_TITLE' %></h2> -->
% my $btn = l('ADD');
<h2><%= l 'CREATE_GROUP' %></h2>
<br>
<%= l 'grp_GROUP_NAMING' %>
<br><br>
%= form_for '/groups2' => (method => 'POST') => begin
<p><h2>
%=l 'CREATE_GROUP'
</h2>
<br><br>
%=l 'grp_GROUP_NAMING'
</p>
% my $btn = l('ADD');
<p>
<span class="">
%=l 'GROUP_NAME', class => ""
</span>
<span class="">
%= text_field 'groupName', class => ""
</span>
</p>
<form action="/smanager/groups2" method="POST">
<p>
%=l 'grp_GROUP_DESC_EXPL'
<br><br>
<span class="">
%=l 'grp_GROUP_DESC', class => ""
</span>
<span class="">
%= text_field 'groupDesc', class => ""
</span>
</p>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<label for="inputGroupName" class="col-form-label"><%= l 'GROUP_NAME' %></label>
</div>
<div class="col-auto">
<input type="text" name="groupName" id="inputGroupName" class="form-control" aria-describedby="GroupName" >
</div>
<div class="col-auto">
<span id="passwordHelpInline" class="form-text">
Group
</span>
</div>
</div>
<p>
<span class="">
%=l 'GROUP_MEMBERS', class => ""
</span>
<br>
<span class="">
%= check_box 'groupMembers' => 'admin'
Administrator (admin)
<br>
% my $users = $c->gen_users_list();
% foreach my $key ( sort keys %$users )
% {
%= check_box 'groupMembers' => $key
%=$users->{$key}
%= "(" . $key . ")"
<br><br>
<%= l 'grp_GROUP_DESC_EXPL' %>
<br><br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<label for="inputGroupDesc" class="col-form-label"><%= l 'grp_GROUP_DESC' %></label>
</div>
<div class="col-auto">
<input type="text" name="groupDesc" id="inputGroupDesc" class="form-control" aria-describedby="GroupDesc" >
</div>
<div class="col-auto">
<span id="passwordHelpInline" class="form-text">
Group Alias
</span>
</div>
</div>
<br>
<div>
<%= l 'GROUP_MEMBERS' %>
</div>
<br>
<div>
<%= check_box 'groupMembers' => 'admin' %>
&nbspAdministrator (admin)
<br>
% }
</span>
</p>
% my $users = $c->gen_users_list();
% foreach my $key ( sort keys %$users ) {
%= check_box 'groupMembers' => $key
&nbsp
%= $users->{$key}
%= " (" . $key . ")"
<br>
% }
</div>
<p>
<br><br>
%= submit_button "$btn", class => ""
</p>
<br><br>
%= hidden_field 'trt' => $grp_datas->{trt}
% end
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
%= hidden_field 'trt' => $grp_datas->{trt}
</form>
</div>

View File

@@ -1,63 +1,71 @@
<div>
% my $btn = l('REMOVE');
%= form_for '/groups2' => (method => 'POST') => begin
<p><h2>
%=l 'REMOVE_USER_GROUP'
</h2>
% my $btn = l('REMOVE');
<p>
%=l('grp_DELETE_DESCRIPTION', $grp_datas->{group})
</p>
<form action="/smanager/groups2" method="POST">
<br><br>
<p>
% my $size = keys %$members;
% if ( ! $size ){
%=l 'ACCOUNT_GROUP_NONE'
% } else {
%=l 'grp_GROUP_HAS_MEMBERS'
<br>
<ul>
% foreach my $key ( keys %$members)
% {
<li>
%=$key
(
%=$members->{$key}
)
</li>
% }
</ul>
% }
</p>
<h2><%=l 'REMOVE_USER_GROUP' %></h2>
<p>
% $size = keys %$ibays;
% if ( $size ) {
%=l 'grp_IBAYS_WILL_BE_CHANGED'
<br>
<ul>
% foreach my $key (sort ( keys %$ibays ))
% {
<li>
%=$key
(
%=$ibays->{$key}
)
</li>
% }
</ul>
% }
</p>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
<br>
<%=l('grp_DELETE_DESCRIPTION', $grp_datas->{group}) %>
<br><br>
<div>
% my $size = keys %$members;
% if ( ! $size ){
%= l 'ACCOUNT_GROUP_NONE'
% } else {
%= l 'grp_GROUP_HAS_MEMBERS'
<br><br>
<ul>
% foreach my $key ( keys %$members) {
<li>
%=$key
( <%=$members->{$key} %> )
</li>
% }
</ul>
% }
</div>
<br><br>
<div>
% $size = keys %$ibays;
% if ( $size ) {
%=l 'grp_IBAYS_WILL_BE_CHANGED'
<br>
<ul>
% foreach my $key (sort ( keys %$ibays )) {
<li>
%=$key
(
%=$ibays->{$key}
)
</li>
% }
</ul>
% }
</div>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
%= hidden_field 'trt' => $grp_datas->{trt}
%= hidden_field 'groupName' => $grp_datas->{group}
% end
</form>
</div>

View File

@@ -2,73 +2,62 @@
% my $btn = l('GROUP_ADD');
%= form_for '/groups' => (method => 'POST') => begin
<form action="/smanager/groups2" method="POST">
<%= hidden_field 'trt' => 'ADD' %>
<br>
<div>
<button type="submit" class="btn btn-primary"><%= $btn %> </button>
</div>
</form>
%= hidden_field 'trt' => 'ADD'
<br>
<h2><%=l 'grp_CURRENT_LIST' %></h2>
<br><br>
% my $numGroups = @$groups;
% if ($numGroups == 0){
<%= l 'ACCOUNT_GROUP_NONE' %>
% } else {
<table class="table table-bordered user-table-max-width">
<thead>
<tr>
<th class="col-sm"><%= l 'GROUP' %></th>
<th class="col-sm"><%= l 'DESCRIPTION' %></th>
<th class="col-sm user-valign-center" colspan="2"><%= l 'ACTION' %></th>
</tr>
</thead>
<tbody>
% foreach my $group ( @$groups ) {
<tr>
<td><%= $group->key %></td>
<td><%= $group->prop('Description') %></td>
<p> <br>
%= submit_button "$btn", class => ""
</p>
% end
<p> <h2>
%=l 'grp_CURRENT_LIST'
</h2><br><br>
% my $numGroups = @$groups;
% if ($numGroups == 0){
%=l 'ACCOUNT_GROUP_NONE'
% } else {
<table class="table table-bordered">
<thead>
<tr>
<th class="">
%=l 'GROUP'
</th>
<th class="">
%=l 'DESCRIPTION'
</th>
<th class="">
%=l 'ACTION'
</th>
</tr>
</thead>
<tbody>
% foreach my $group ( @$groups )
% {
<tr>
%= t td => (class => "") => $group->key
%= t td => (class => "") => $group->prop('Description')
<td class="" style="min-width:15em">
%my $modify_text = l('MODIFY'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $group_name = $group->key; # group name extracted from the data structure
%my $actionModify = qq{
% <a href="groups2?CsrfDef=$csrf_token&trt=UPD&group=$group_name">
% <button type='button' class="" title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $group_name = $group->key; # group name extracted from the data structure
%my $actionRemove = qq{
% <a href="groups2?CsrfDef=$csrf_token&trt=DEL&group=$group_name">
% <button type='button' class="" title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
</tbody>
</table>
<%} %>
</p>
% my $modify_text = l('MODIFY'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $group_name = $group->key; # group name extracted from the data structure
% my $actionModify = qq{
% <a href="groups2?CsrfDef=$csrf_token&trt=UPD&group=$group_name">
% <button type='button' class="btn btn-primary" title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
% my $remove_text = l('REMOVE'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $group_name = $group->key; # group name extracted from the data structure
% my $actionRemove = qq{
% <a href="groups2?CsrfDef=$csrf_token&trt=DEL&group=$group_name">
% <button type='button' class="btn btn-primary" title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionModify) %></td>
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionRemove) %></td>
</tr>
% }
</tbody>
</table>
% }
</div>

View File

@@ -1,71 +1,90 @@
<div>
<div class="container-sm">
% my $btn = l('SAVE');
% my $btn = l('SAVE');
%= form_for '/groups2' => (method => 'POST') => begin
<form action="/smanager/groups2" method="POST">
<p><h2>
%=l 'MODIFY_USER_GROUP'
</h2><br></p>
<br><br>
<p>
<span class="">
%=l 'GROUP_NAME', class => ""
</span>
<span class="">
%= $grp_datas->{group}, class => ""
</span>
</p>
<h2><%= l 'MODIFY_USER_GROUP' %></h2>
<p>
%=l 'grp_GROUP_DESC_EXPL'
<br><br>
<span class="">
%=l 'grp_GROUP_DESC', class => ""
</span>
<span class="">
% param 'groupDesc' => $grp_datas->{description} unless param 'groupDesc';
%= text_field 'groupDesc', class => ""
</span>
</p>
<br><br>
<p>
<span class="">
%=l 'GROUP_MEMBERS', class => ""
</span>
<br>
<span class="">
% if ( $members->{'admin'} ) {
%= check_box 'groupMembers', value => 'admin', checked => undef
%} else {
%= check_box 'groupMembers' => 'admin'
%}
Administrator (admin)
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<label for="inputLastNAme" class="col-form-label"><%= l 'GROUP_NAME' %></label>
</div>
<div class="col-auto">
<input disabled type="text" id="disabledTextInput" class="form-control" placeholder="<%= $grp_datas->{group} %>">
</div>
</div>
% my $users = $c->gen_users_list();
% foreach my $key ( sort keys %$users )
% {
% if ( $members->{ $key } ) {
<!-- % = check_box 'groupMembers', value => $key, checked => 'checked' -->
<input type='checkbox' name='groupMembers' checked value='<%= $key %>'>
%} else {
%= check_box 'groupMembers' => $key
%}
%=$users->{$key} . " (" . $key . ")"
<br><br>
<%= l 'grp_GROUP_DESC_EXPL'%>
<br><br>
% param 'groupDesc' => $grp_datas->{description} unless param 'groupDesc';
<div class="row g-3 align-items-center">
<div class="col-md-2">
<label for="inputGroupDesc" class="col-form-label"><%= l 'grp_GROUP_DESC' %></label>
</div>
<div class="col-auto">
<input type="text" name="groupDesc" id="inputGroupDesc" class="form-control" aria-describedby="GroupDesc" value="<%= $grp_datas->{description} %>">
</div>
<div class="col-auto">
<span id="passwordHelpInline" class="form-text">
Group Alias
</span>
</div>
</div>
<br><br>
<div>
<%= l 'GROUP_MEMBERS' %>
</div>
<br>
<div>
% if ( $members->{'admin'} ) {
%= check_box 'groupMembers', value => 'admin', checked => undef
% } else {
%= check_box 'groupMembers' => 'admin'
% }
&nbspAdministrator (admin)
</div>
<br>
% my $users = $c->gen_users_list();
% foreach my $key ( sort keys %$users ) {
% if ( $members->{ $key } ) {
<input type='checkbox' name='groupMembers' checked value='<%= $key %>'>
% } else {
%= check_box 'groupMembers' => $key
&nbsp
% }
<%= $users->{$key} %>
<%= " (" . $key . ")" %>
<br>
% }
</span>
</p>
% }
<p>
<br><br>
%= submit_button "$btn", class => ""
</p>
<br><br>
%= hidden_field 'trt' => $grp_datas->{trt}
%= hidden_field 'groupName' => $grp_datas->{group}
% end
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
<%= hidden_field 'trt' => $grp_datas->{trt} %>
<%= hidden_field 'groupName' => $grp_datas->{group} %>
</form>
</div>

View File

@@ -1,29 +1,29 @@
<div>
% my $btn = l('REMOVE');
%= form_for '/hostentriesd' => (method => 'POST') => begin
<p>
<h2>
%=l 'hos_REMOVE_TITLE'
</h2>
</p>
<p>
%= $c->l('hos_REMOVE_PAGE_DESCRIPTION', $hos_datas->{hostname});
</p>
<p><b>
%=l 'hos_ABOUT_TO_REMOVE'
</b></p>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
<form action="/smanager/hostentriesd" method="POST">
%#= form_for '/hostentriesd' => (method => 'POST') => begin
<div>
<h2><%= l 'hos_REMOVE_TITLE'%> </h2>
</div>
<%= $c->l('hos_REMOVE_PAGE_DESCRIPTION', $hos_datas->{hostname}); %>
<b><%= l 'hos_ABOUT_TO_REMOVE' %></b>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
% end
%# end
</form>
</div>

View File

@@ -2,85 +2,82 @@
% my $btn = l('hos_ADD_HOSTNAME');
%= form_for '/hostentries' => (method => 'POST') => begin
<form action="/smanager/hostentriesd" method="POST">
%#= form_for '/hostentries' => (method => 'POST') => begin
<p>
%= submit_button "$btn", class => ""
<br></p>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
%= hidden_field 'trt' => $hos_datas->{trt}
% end
%# end
</form>
% my %dom_hos = %{$dom_hosts};
% foreach my $domain ( sort ( keys %dom_hos ) ) {
<p><br><b>
%= $c->l('hos_CURRENT_HOSTNAMES_FOR_LOCAL_DOMAIN', $domain);
</b><br></p>
<br>
<b>
<%= $c->l('hos_CURRENT_HOSTNAMES_FOR_LOCAL_DOMAIN', $domain); %>
</b>
<br>
<table class="table table-bordered">
<thead>
<tr>
<th class="">
%=l 'hos_HOSTNAME'
</th>
<th class="">
%=l 'hos_HOSTTYPE'
</th>
<th class="">
%=l 'IP_ADDRESS_OR_FQDN'
</th>
<th class="">
%=l 'hos_ETHERNET_ADDRESS'
</th>
<th class="">
%=l 'COMMENT'
</th>
<th class="">
%=l 'ACTION'
</th>
</tr>
</thead>
<tbody>
% foreach (@{$dom_hos{$domain}{'HOSTS'}}) {
<tr>
%= t td => (class => "") => $_->{'HostName'};
%= t td => (class => "") => $_->{'HostType'};
%= t td => (class => "") => $_->{'IP'};
%= t td => (class => "") => $_->{'MACAddress'};
%= t td => (class => "") => $_->{'Comment'};
<td class="" style="min-width:15em">
%my ($actionModify, $actionRemove) = '&nbsp;';
%my $static = $_->{'static'} || "no";
%if ($static ne 'yes') {
%my $modify_text = l('MODIFY'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
%$actionModify = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name">
% <button type='button' class="" title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
%my $remove_text = l('REMOVE'); # Localized text
%$csrf_token = "TOKEN"; # CSRF token for security
%#my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
%$actionRemove = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=DEL&Hostname=$hostentries_name">
% <button type='button' class="" title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
%}
<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
</tbody>
<thead>
<tr>
<th><%= l 'hos_HOSTNAME' %></th>
<th><%= l 'hos_HOSTTYPE' %></th>
<th><%= l 'IP_ADDRESS_OR_FQDN' %></th>
<th><%= l 'hos_ETHERNET_ADDRESS' %></th>
<th><%= l 'COMMENT' %></th>
<th><%= l 'ACTION' %></th>
</tr>
</thead>
<tbody>
% foreach (@{$dom_hos{$domain}{'HOSTS'}}) {
<tr>
<td><%= $_->{'HostName'}; %></td>
<td><%= $_->{'HostType'}; %></td>
<td><%= $_->{'IP'}; %></td>
<td><%= $_->{'MACAddress'}; %></td>
<td><%= $_->{'Comment'}; %></td>
<!--Need a fix? -->
<td style="min-width:15em">
%my ($actionModify, $actionRemove) = '&nbsp;';
%my $static = $_->{'static'} || "no";
%if ($static ne 'yes') {
%my $modify_text = l('MODIFY'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
%$actionModify = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name">
% <button type='button' class="btn btn-primary" title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
%my $remove_text = l('REMOVE'); # Localized text
%$csrf_token = "TOKEN"; # CSRF token for security
%#my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
%$actionRemove = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=DEL&Hostname=$hostentries_name">
% <button type='button' class="btn btn-primary" title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
%}
<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
</tbody>
</table>
% }
</div>

View File

@@ -1,62 +1,64 @@
<div>
<!-- UPDATE HOST TYPE -->
% my $btn = l('NEXT');
% my $btn = l('NEXT');
%= form_for '/hostentriesd' => (method => 'POST') => begin
<p><h2>
% if ( $hos_datas->{trt} eq "ALC" ) {
%=l 'hos_CREATE_TYPE'
% } else {
%=l 'hos_MODIFY_TYPE'
% $btn = l('MODIFY');
% }
</h2></p>
<form action="/smanager/hostentriesd" method="POST">
%#= form_for '/hostentriesd' => (method => 'POST') => begin
<p>
%=l 'hos_LOCAL_PAGE_DESCRIPTION'
</p>
<p>
%=l 'hos_LOCAL_IP_DESCRIPTION'
</p>
<p>
<span class="">
%=l 'hos_LOCAL_IP', class => ""
</span>
<span class="">
% param 'Internalip' => $hos_datas->{internalip} unless param 'Internalip';
%= text_field 'Internalip', class => ""
</span>
</p>
<p>
%=l 'hos_ETHERNET_ADDRESS_DESCRIPTION'
</p>
<p>
<span class="">
%=l 'hos_ETHERNET_ADDRESS', class => ""
</span>
<span class="">
% param 'Macaddress' => $hos_datas->{macaddress} unless param 'Macaddress';
%= text_field 'Macaddress', class => ""
</span>
</p>
<p><br>
%= submit_button "$btn", class => ""
</p>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
<h2>
% if ( $hos_datas->{trt} eq "ALC" ) {
%=l 'hos_CREATE_TYPE'
% } else {
%=l 'hos_MODIFY_TYPE'
% $btn = l('MODIFY');
% }
</h2>
<div>
<%= l 'hos_LOCAL_PAGE_DESCRIPTION' %>
</div>
<div>
<%= l 'hos_LOCAL_IP_DESCRIPTION' %>
</div>
<div>
<%= l 'hos_LOCAL_IP' %>
</div>
<div>
% param 'Internalip' => $hos_datas->{internalip} unless param 'Internalip';
<%= text_field 'Internalip' %>
</div>
<div>
<%= l 'hos_ETHERNET_ADDRESS_DESCRIPTION' %>
</div>
<div>
<%= l 'hos_ETHERNET_ADDRESS' %>
</div>
<div>
% param 'Macaddress' => $hos_datas->{macaddress} unless param 'Macaddress';
<%= text_field 'Macaddress' %>
</div>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%= hidden_field 'Name' => $hos_datas->{name}
%= hidden_field 'Domain' => $hos_datas->{domain}
%= hidden_field 'Comment'=> $hos_datas->{comment}
%= hidden_field 'Hosttype'=> $hos_datas->{hosttype}
%= hidden_field 'Externalip' => $hos_datas->{externalip}
%= hidden_field 'Comment'=> $hos_datas->{comment}
%= hidden_field 'Hosttype'=> $hos_datas->{hosttype}
%= hidden_field 'Externalip' => $hos_datas->{externalip}
%end
%#end
</form>
</div>

View File

@@ -1,81 +1,79 @@
<div>
% my $btn = l('NEXT');
% my $btn = l('NEXT');
%= form_for '/hostentriesd' => (method => 'POST') => begin
<p><h2>
% if ( $hos_datas->{trt} eq "ADD" ) {
%=l 'hos_CREATE_TITLE'
% } else {
%=l 'hos_MODIFY_TITLE'
% $btn = l('MODIFY');
% }
</h2></p>
<form action="/smanager/hostentriesd" method="POST">
%#= form_for '/hostentriesd' => (method => 'POST') => begin
<p>
%=l 'hos_HOSTNAME_DESCRIPTION'
</p>
<h2>
% if ( $hos_datas->{trt} eq "ADD" ) {
<%=l 'hos_CREATE_TITLE' %>
% } else {
<%=l 'hos_MODIFY_TITLE' %>
% $btn = l('MODIFY');
% }
</h2>
<div><%= l 'hos_HOSTNAME_DESCRIPTION' %></div>
<div><%=l 'hos_HOSTNAME' %></div>
<div>
% if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Name' => $hos_datas->{name} unless param 'Name';
<%= text_field 'Name' %>
% } else {
%= hidden_field 'Name' => $hos_datas->{name}
<%= $hos_datas->{name} %>
% }
</div>
<div>
<%= l 'DOMAIN' %>
</div>
<p>
<span class="">
%=l 'hos_HOSTNAME', class => ""
</span>
<span class="">
% if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Name' => $hos_datas->{name} unless param 'Name';
%= text_field 'Name', class => ""
% } else {
%= hidden_field 'Name' => $hos_datas->{name}
%= $hos_datas->{name}, class => ""
% }
</span>
</p>
<div>
% if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Domain' => $hos_datas->{domain} unless param 'Domain';
<%= select_field 'Domain', $c->domains_list() %>
% } else {
%= hidden_field 'Domain' => $hos_datas->{domain}
<%= $hos_datas->{domain} %>
% }
</div>
<div>
<%= $c->l('COMMENT', ''); %>
</div>
<p>
<span class="">
%=l 'DOMAIN', class => ""
</span>
<span class="">
% if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Domain' => $hos_datas->{domain} unless param 'Domain';
%= select_field 'Domain', $c->domains_list(), class => ""
% } else {
%= hidden_field 'Domain' => $hos_datas->{domain}
%= $hos_datas->{domain}, class => ""
% }
</span>
</p>
<div>
% param 'Comment' => $hos_datas->{comment} unless param 'Comment';
<%= text_field 'Comment' %>
</div>
<p>
<span class="">
%= $c->l('COMMENT', '');
</span>
<span class="">
% param 'Comment' => $hos_datas->{comment} unless param 'Comment';
%= text_field 'Comment', class => ""
</span>
</p>
<div>
<%=l 'LOCATION' %>
</div>
<p>
<span class="">
%=l 'LOCATION', class => ""
</span>
<span class="">
% param 'Hosttype' => $hos_datas->{hosttype} unless param 'Hosttype';
%= select_field 'Hosttype', $c->hosttype_list(), class => ""
</span>
</p>
<div>
% param 'Hosttype' => $hos_datas->{hosttype} unless param 'Hosttype';
%= select_field 'Hosttype', $c->hosttype_list(), class => ""
</div>
<p><br>
%= submit_button "$btn", class => ""
</p>
<br>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%= hidden_field 'Internalip' => $hos_datas->{internalip}
%= hidden_field 'Externalip' => $hos_datas->{externalip}
%= hidden_field 'Macaddress' => $hos_datas->{macaddress}
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%= hidden_field 'Internalip' => $hos_datas->{internalip}
%= hidden_field 'Externalip' => $hos_datas->{externalip}
%= hidden_field 'Macaddress' => $hos_datas->{macaddress}
%end
%#end
</form>
</div>

View File

@@ -3,36 +3,38 @@
% my $btn = l('MODIFY');
%= form_for '/hostentriesd' => (method => 'POST') => begin
<p>
%=l 'hos_REMOTE_PAGE_DESCRIPTION'
</p>
<p>
<span class="">
%=l 'IP_ADDRESS_OR_FQDN', class => ""
</span>
<span class="">
% param 'Externalip' => $hos_datas->{externalip} unless param 'Externalip';
%= text_field 'Externalip', class => ""
</span>
</p>
<p><br>
%= submit_button "$btn", class => ""
</p>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
<form action="/smanager/hostentriesd" method="POST">
%#= form_for '/hostentriesd' => (method => 'POST') => begin
<div>
<%= l 'hos_REMOTE_PAGE_DESCRIPTION' %>
</div>
<div>
<%= l 'IP_ADDRESS_OR_FQDN' %>
</div>
<div>
% param 'Externalip' => $hos_datas->{externalip} unless param 'Externalip';
<%= text_field 'Externalip' %>
</div>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%= hidden_field 'Name' => $hos_datas->{name}
%= hidden_field 'Domain' => $hos_datas->{domain}
%= hidden_field 'Comment'=> $hos_datas->{comment}
%= hidden_field 'Hosttype'=> $hos_datas->{hosttype}
%= hidden_field 'Internalip' => $hos_datas->{internalip}
%= hidden_field 'Macaddress' => $hos_datas->{macaddress}
%= hidden_field 'Comment'=> $hos_datas->{comment}
%= hidden_field 'Hosttype'=> $hos_datas->{hosttype}
%= hidden_field 'Internalip' => $hos_datas->{internalip}
%= hidden_field 'Macaddress' => $hos_datas->{macaddress}
%end
%#end
</form>
</div>

View File

@@ -18,7 +18,7 @@
%=l 'PASSWORD_NEW', class => ""
</span>
<span class="">
%= password_field 'newPass', class => "" , class="">'sme-password'
%= password_field 'newPass', class => "" , class=> 'sme-password'
</span>
</p>
@@ -27,7 +27,7 @@
%=l 'PASSWORD_VERIFY_NEW', class => ""
</span>
<span class="">
%= password_field 'newPassVerify', class => "", class="">'sme-password'
%= password_field 'newPassVerify', class => "", class=> 'sme-password'
</span>
</p>
@@ -41,4 +41,4 @@
% end
</div>
</div>

View File

@@ -15,13 +15,13 @@
const password = document.querySelector('#id_password');
if (( togglePassword ) && ( password )) {
togglePassword.addEventListener('click', function (e) {
// toggle the type attribute
const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
password.setAttribute('type', type);
// toggle the eye slash icon
// this.classList.toggle('eye-slash');
})
togglePassword.addEventListener('click', function (e) {
// toggle the type attribute
const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
password.setAttribute('type', type);
// toggle the eye slash icon
// this.classList.toggle('eye-slash');
})
}
});
@@ -36,34 +36,34 @@
%= javascript begin
$(document).ready(function() {
$('#tognav').click(function() {
//alert('click1:'+window.localStorage.getItem('menunav'));
window.localStorage.setItem('menunav',!$('#menunav').is(':visible'));
//alert('click2:'+window.localStorage.getItem('menunav'));
$('#menunav').toggle({ duration: 300 });
});
$('#tognav').click(function() {
//alert('click1:'+window.localStorage.getItem('menunav'));
window.localStorage.setItem('menunav',!$('#menunav').is(':visible'));
//alert('click2:'+window.localStorage.getItem('menunav'));
$('#menunav').toggle({ duration: 300 });
});
$('#toguser').click(function() {
window.localStorage.setItem('menuuser',!$('#menuuser').is(':visible'));
$('#menuuser').toggle({ duration: 300 });
});
$('#toguser').click(function() {
window.localStorage.setItem('menuuser',!$('#menuuser').is(':visible'));
$('#menuuser').toggle({ duration: 300 });
});
$('#togadm').click(function() {
window.localStorage.setItem('menuadm',!$('#menuadm').is(':visible'));
$('#menuadm').toggle({ duration: 300 });
});
$('#togadm').click(function() {
window.localStorage.setItem('menuadm',!$('#menuadm').is(':visible'));
$('#menuadm').toggle({ duration: 300 });
});
$('.section-title').click(function() {
var $section = $(this).parent().next('div');
if(!$section.length){
return false;
}
let localStorageTag = "admSection-"+this.innerHTML;
var jqObj = $($section);
window.localStorage.setItem(localStorageTag,!jqObj.is(':visible'));
$section.toggle({ duration: 600 });
})
$('.section-title').click(function() {
var $section = $(this).parent().next('div');
if(!$section.length){
return false;
}
let localStorageTag = "admSection-"+this.innerHTML;
var jqObj = $($section);
window.localStorage.setItem(localStorageTag,!jqObj.is(':visible'));
$section.toggle({ duration: 600 });
})
});
% end
@@ -73,36 +73,36 @@
% content_for 'js_swapClass' => begin
%= javascript begin
(function($) {
$.fn.swapClass = function(class1, class2) {
this.each(function() {
var $elem = $(this);
if ($elem.hasClass(class1)) {
$elem.removeClass(class1).addClass(class2);
}
else if ($elem.hasClass(class2)) {
$elem.removeClass(class2).addClass(class1);
}
});
};
})(jQuery);
(function($) {
$.fn.swapClass = function(class1, class2) {
this.each(function() {
var $elem = $(this);
if ($elem.hasClass(class1)) {
$elem.removeClass(class1).addClass(class2);
}
else if ($elem.hasClass(class2)) {
$elem.removeClass(class2).addClass(class1);
}
});
};
})(jQuery);
$(document).ready(function() {
$('a.item-current').swapClass('item-current','item');
$('a.item-current').swapClass('item-current','item');
var pathname = $(location).attr('pathname');
var pathname = $(location).attr('pathname');
//alert('jQuery loaded. Path searched: ' + pathname);
//alert('jQuery loaded. Path searched: ' + pathname);
var menus = $('a.item');
$.each(menus, function() {
if ( $(this).attr('href') == pathname ) {
$(this).swapClass('item', 'item-current');
// alert('menu found! ' + $(this).attr('href') + ' ' + $(this).attr('class'));
}
})
var menus = $('a.item');
$.each(menus, function() {
if ( $(this).attr('href') == pathname ) {
$(this).swapClass('item', 'item-current');
// alert('menu found! ' + $(this).attr('href') + ' ' + $(this).attr('class'));
}
})
});
});
% end
% end

View File

@@ -2,37 +2,37 @@
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-12-01 15:22:43
%#
<div>
<script>
window.onload = function() {
SelectInput();
};
</script>
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $lets_data
</pre>
% }
% if (config->{debug} == 1) {
<pre>
%= dumper $lets_data
</pre>
% }
% my $btn = l('lets_APPLY');
%= form_for "letsencryptu" => (method => 'POST') => begin
% param 'trt' => $lets_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $lets_data->{trt}
%# Inputs etc in here.
% my $btn = l('lets_APPLY');
%= form_for "letsencryptu" => (method => 'POST') => begin
% param 'trt' => $lets_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $lets_data->{trt}
%# Inputs etc in here.
<h1 class=""><%=l('lets_Check_all_domains')%></h1>
<h2 class=""><%=l('lets_Loop_through_checking_the_letsencrypt')%></h2>
<span class="">
%=l('lets_All_domains_check_result')
</span>
<span class="">
% param 'AllDomainsCheck' => $lets_data->{AllDomainsCheck} unless param 'AllDomainsCheck';
%= text_area 'AllDomainsCheck', cols=>40, rows=>10, Readonly=>'true'
</span><br>
<span class="">
<h1 class=""><%=l('lets_Check_all_domains')%></h1>
<h2 class=""><%=l('lets_Loop_through_checking_the_letsencrypt')%></h2>
<span class="">
%=l('lets_All_domains_check_result')
</span>
<span class="">
% param 'AllDomainsCheck' => $lets_data->{AllDomainsCheck} unless param 'AllDomainsCheck';
%= text_area 'AllDomainsCheck', cols=>40, rows=>10, Readonly=>'true'
</span><br>
<span class="">
%my $back_text = l('lets_Back'); # Localized text
%my $actionBack = qq{
% <a href="letsencryptd">
@@ -40,8 +40,8 @@
% </a>
%};
<%= $c->render_to_string(inline => $actionBack) %>
</span>
</span>
%# Probably finally by a submit.
%end
%# Probably finally by a submit.
%end
</div>

View File

@@ -2,38 +2,38 @@
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-12-01 15:22:43
%#
<div>
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $lets_data
</pre>
% }
% my $btn = l('lets_APPLY');
%= form_for "letsencryptu" => (method => 'POST') => begin
% param 'trt' => $lets_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $lets_data->{trt}
%# Inputs etc in here.
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $lets_data
</pre>
% }
% my $btn = l('lets_APPLY');
%= form_for "letsencryptu" => (method => 'POST') => begin
% param 'trt' => $lets_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $lets_data->{trt}
%# Inputs etc in here.
<h1 class=""><%=l('lets_Check_all_enabled_domains')%></h1>
<h2 class=""><%=l('lets_Loop_through_checking_the_letsencrypt')%></h2>
<span class="">
%=l('lets_Enabled_domains_check_result')
</span>
<span class="">
% param 'EnabledDomainsCheck' => $lets_data->{EnabledDomainsCheck} unless param 'EnabledDomainsCheck';
%= text_area 'EnabledDomainsCheck', cols=>40, rows=>10, Readonly=>'true'
</span>
<br>
<h1 class=""><%=l('lets_Check_all_enabled_domains')%></h1>
<h2 class=""><%=l('lets_Loop_through_checking_the_letsencrypt')%></h2>
<span class="">
%=l('lets_Enabled_domains_check_result')
</span>
<span class="">
% param 'EnabledDomainsCheck' => $lets_data->{EnabledDomainsCheck} unless param 'EnabledDomainsCheck';
%= text_area 'EnabledDomainsCheck', cols=>40, rows=>10, Readonly=>'true'
</span>
<br>
<span class="">
<span class="">
%my $back_text = l('lets_Back'); # Localized text
%my $actionBack = qq{
% <a href="letsencryptd">
@@ -41,9 +41,9 @@
% </a>
%};
<%= $c->render_to_string(inline => $actionBack) %>
</span>
%# Probably finally by a submit.
%end
</span>
%# Probably finally by a submit.
%end
</div>

View File

@@ -2,48 +2,48 @@
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-12-01 15:22:43
%#
<div>
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $lets_data
</pre>
% }
% my $btn = l('lets_APPLY');
%= form_for "letsencryptu" => (method => 'POST') => begin
% param 'trt' => $lets_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $lets_data->{trt}
%# Inputs etc in here.
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $lets_data
</pre>
% }
% my $btn = l('lets_APPLY');
%= form_for "letsencryptu" => (method => 'POST') => begin
% param 'trt' => $lets_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $lets_data->{trt}
%# Inputs etc in here.
<h1 class=""><%=l('lets_Check_just_one_domain')%></h1>
<h2 class=""><%=l('lets_Loop_through_and_check_the')%></h2>
<p><span class="">
%=l('lets_Domains_name')
</span>
<span class="">
% param 'OneDomainToCheck' => $lets_data->{OneDomainToCheck} unless param 'OneDomainToCheck';
%= text_field 'OneDomainToCheck', size => '50', class => "" , pattern=>'.*' , placeholder=>'OneDomainToCheck', Readonly=>'true'
<br>
</span>
</p>
<span class="">
%=l('lets_One_domain_check_result')
</span>
<span class="">
% param 'OneDomainsCheck' => $lets_data->{OneDomainsCheck} unless param 'OneDomainsCheck';
%= text_area 'OneDomainsCheck', cols=>40, rows=>10, Readonly=>'true'
</span>
<br>
<span class="">
<h1 class=""><%=l('lets_Check_just_one_domain')%></h1>
<h2 class=""><%=l('lets_Loop_through_and_check_the')%></h2>
<p><span class="">
%=l('lets_Domains_name')
</span>
<span class="">
% param 'OneDomainToCheck' => $lets_data->{OneDomainToCheck} unless param 'OneDomainToCheck';
%= text_field 'OneDomainToCheck', size => '50', class => "" , pattern=>'.*' , placeholder=>'OneDomainToCheck', Readonly=>'true'
<br>
</span>
</p>
<span class="">
%=l('lets_One_domain_check_result')
</span>
<span class="">
% param 'OneDomainsCheck' => $lets_data->{OneDomainsCheck} unless param 'OneDomainsCheck';
%= text_area 'OneDomainsCheck', cols=>40, rows=>10, Readonly=>'true'
</span>
<br>
<span class="">
%my $back_text = l('lets_Back'); # Localized text
%my $actionBack = qq{
% <a href="letsencryptd">
@@ -51,9 +51,9 @@
% </a>
%};
<%= $c->render_to_string(inline => $actionBack) %>
</span>
%# Probably finally by a submit.
%end
</span>
%# Probably finally by a submit.
%end
</div>

View File

@@ -2,150 +2,151 @@
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-12-01 15:22:43
%#
<div>
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $lets_data
</pre>
% }
% my $btn = l('lets_APPLY');
%= form_for "letsencryptu" => (method => 'POST') => begin
% param 'trt' => $lets_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $lets_data->{trt}
%# Inputs etc in here.
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $lets_data
</pre>
% }
% my $btn = l('lets_APPLY');
%= form_for "letsencryptu" => (method => 'POST') => begin
% param 'trt' => $lets_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $lets_data->{trt}
%# Inputs etc in here.
<div>
<div>
<a href='letsencryptd?trt=PARAMS' class="">
%= l('lets_CONFIG')
</a>
%#= link_to l('lets_CONFIG'), 'letsencryptd?trt=PARAMS' , class="">'link link2'
<a href='letsencryptd?trt=CHECKALLDOMAINS' class="">
%= l('lets_CHECK_ALL_DOMAINS')
</a>
%#= link_to l('lets_CHECK_ALL_DOMAINS'), 'letsencryptd?trt=CHECKALLDOMAINS' , class="">'link link3'
<a href='letsencryptd?trt=CHECKALLENABLEDDOMAINS' class="">
%= l('lets_CHECK_ALL_ENABLED_DOMAINS')
</a>
%#= link_to l('lets_CHECK_ALL_ENABLED_DOMAINS'), 'letsencryptd?trt=CHECKALLENABLEDDOMAINS' , class="">'link link4'
</div>
<h2 class=""><%=l('lets_For_this_Server')%></h2>
<p>
<span class="">
%=l('lets_Internal_IP')
</span>
<span class="">
% param 'InternalIP' => $lets_data->{InternalIP} unless param 'InternalIP';
%= text_field 'InternalIP', size => '50', class => "" , pattern=>'.*' , placeholder=>'InternalIP', Readonly=>'true'
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_External_Interface_IP')
</span>
<span class="">
% param 'ExternalIP' => $lets_data->{ExternalIP} unless param 'ExternalIP';
%= text_field 'ExternalIP', size => '50', class => "" , pattern=>'.*' , placeholder=>'ExternalIP', Readonly=>'true'
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_Internet_IP')
</span>
<span class="">
% param 'InternetIP' => $lets_data->{InternetIP} unless param 'InternetIP';
%= text_field 'InternetIP', size => '50', class => "" , pattern=>'.*' , placeholder=>'InternetIP', Readonly=>'true'
<br>
</span>
</p>
<h2 class=""><%=l('lets_Current_certificate_details')%></h2>
<p>
<span class="">
%=l('lets_Issuer')
</span>
<span class="">
% param 'Issuer' => $lets_data->{Issuer} unless param 'Issuer';
%= text_field 'Issuer', size => '50', class => "" , pattern=>'.*' , placeholder=>'Issuer', Readonly=>'true'
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_Expiry')
</span>
<span class="">
% param 'Expiry' => $lets_data->{Expiry} unless param 'Expiry';
%= text_field 'Expiry', size => '50', class => "" , pattern=>'.*' , placeholder=>'Expiry', Readonly=>'true'
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_Not_Before')
</span><span class="">
% param 'NotBefore' => $lets_data->{NotBefore} unless param 'NotBefore';
%= text_field 'NotBefore', size => '50', class => "" , pattern=>'.*' , placeholder=>'NotBefore', Readonly=>'true'
<br>
</span>
</p>
<h2 class=""><%=l('lets_List_of_Domains_and_Hosts')%></h2>
<br />
<table class="table table-bordered">
<thead class="">
<tr table-head-row>
<th class=""><%=l('lets_Domain_name_/_HOSTNAME')%></th>
<th class=""><%=l('lets_Brief_description')%></th>
<th class=""><%=l('lets_Content')%></th>
<th class=""><%=l('lets_LABEL_NAMESERVERS')%></th>
<th class=""><%=l('lets_LABEL_POINT')%></th>
<th class=""><%=l('lets_LABEL_LECERT')%></th>
<th class=""><%=l('lets_IS_IN_CERT')%></th>
<th class=""><%=l('lets_CHECK')%></th>
</tr>
</thead>
<tbody class="">
% my $control_data = $c->stash('DomainList');
% foreach my $row (@$control_data) {
<tr class="">
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-Domain name / HOSTNAME'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-Brief description'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-Content'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-LABEL_NAMESERVERS'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-LABEL_POINT'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-LABEL_LECERT'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-IS_IN_CERT'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-CHECK'})%></td>
</tr>
%}
</tbody>
</table>
%# Probably finally by a submit.
%end
</div>
<a href='letsencryptd?trt=PARAMS' class="">
%= l('lets_CONFIG')
</a>
%#= link_to l('lets_CONFIG'), 'letsencryptd?trt=PARAMS' , class=> 'link link2'
<a href='letsencryptd?trt=CHECKALLDOMAINS' class="">
%= l('lets_CHECK_ALL_DOMAINS')
</a>
%#= link_to l('lets_CHECK_ALL_DOMAINS'), 'letsencryptd?trt=CHECKALLDOMAINS' , class=> 'link link3'
<a href='letsencryptd?trt=CHECKALLENABLEDDOMAINS' class="">
%= l('lets_CHECK_ALL_ENABLED_DOMAINS')
</a>
%#= link_to l('lets_CHECK_ALL_ENABLED_DOMAINS'), 'letsencryptd?trt=CHECKALLENABLEDDOMAINS' , class=> 'link link4'
</div>
<h2 class=""><%=l('lets_For_this_Server')%></h2>
<p>
<span class="">
%=l('lets_Internal_IP')
</span>
<span class="">
% param 'InternalIP' => $lets_data->{InternalIP} unless param 'InternalIP';
%= text_field 'InternalIP', size => '50', class => "" , pattern=>'.*' , placeholder=>'InternalIP', Readonly=>'true'
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_External_Interface_IP')
</span>
<span class="">
% param 'ExternalIP' => $lets_data->{ExternalIP} unless param 'ExternalIP';
%= text_field 'ExternalIP', size => '50', class => "" , pattern=>'.*' , placeholder=>'ExternalIP', Readonly=>'true'
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_Internet_IP')
</span>
<span class="">
% param 'InternetIP' => $lets_data->{InternetIP} unless param 'InternetIP';
%= text_field 'InternetIP', size => '50', class => "" , pattern=>'.*' , placeholder=>'InternetIP', Readonly=>'true'
<br>
</span>
</p>
<h2 class=""><%=l('lets_Current_certificate_details')%></h2>
<p>
<span class="">
%=l('lets_Issuer')
</span>
<span class="">
% param 'Issuer' => $lets_data->{Issuer} unless param 'Issuer';
%= text_field 'Issuer', size => '50', class => "" , pattern=>'.*' , placeholder=>'Issuer', Readonly=>'true'
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_Expiry')
</span>
<span class="">
% param 'Expiry' => $lets_data->{Expiry} unless param 'Expiry';
%= text_field 'Expiry', size => '50', class => "" , pattern=>'.*' , placeholder=>'Expiry', Readonly=>'true'
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_Not_Before')
</span>
<span class="">
% param 'NotBefore' => $lets_data->{NotBefore} unless param 'NotBefore';
%= text_field 'NotBefore', size => '50', class => "" , pattern=>'.*' , placeholder=>'NotBefore', Readonly=>'true'
<br>
</span>
</p>
<h2 class=""><%=l('lets_List_of_Domains_and_Hosts')%></h2>
<br />
<table class="table table-bordered">
<thead class="">
<tr table-head-row>
<th class=""><%=l('lets_Domain_name_/_HOSTNAME')%></th>
<th class=""><%=l('lets_Brief_description')%></th>
<th class=""><%=l('lets_Content')%></th>
<th class=""><%=l('lets_LABEL_NAMESERVERS')%></th>
<th class=""><%=l('lets_LABEL_POINT')%></th>
<th class=""><%=l('lets_LABEL_LECERT')%></th>
<th class=""><%=l('lets_IS_IN_CERT')%></th>
<th class=""><%=l('lets_CHECK')%></th>
</tr>
</thead>
<tbody class="">
% my $control_data = $c->stash('DomainList');
% foreach my $row (@$control_data) {
<tr class="">
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-Domain name / HOSTNAME'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-Brief description'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-Content'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-LABEL_NAMESERVERS'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-LABEL_POINT'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-LABEL_LECERT'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-IS_IN_CERT'})%></td>
<td class=""><%=$c->render_to_string(inline=>$row->{'Table1-CHECK'})%></td>
</tr>
%}
</tbody>
</table>
%# Probably finally by a submit.
%end
</div>

View File

@@ -2,127 +2,129 @@
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-12-01 15:22:43
%#
<div>
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $lets_data
</pre>
% }
% my $btn = l('lets_APPLY');
%= form_for "letsencryptu" => (method => 'POST') => begin
% param 'trt' => $lets_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $lets_data->{trt}
%# Inputs etc in here.
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $lets_data
</pre>
% }
% my $btn = l('lets_APPLY');
%= form_for "letsencryptu" => (method => 'POST') => begin
% param 'trt' => $lets_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $lets_data->{trt}
%# Inputs etc in here.
<h2 class=""><%=l('lets_Manage_letsencrypt-config_settings:')%></h2>
<p class="">
%=l('lets_CONFIG_LETSENCRYPT')
</p>
<p>
<span class="">
%=l('lets_SERVICE_STATUS')
</span><span class="">
%# my @status_options = [['Disabled' => 'disabled'], ['Enabled' => 'enabled'], ['TEST' => 'test']];
% my @status_options = selected_field([['Disabled' => 'disabled'], ['Enabled' => 'enabled'], ['TEST' => 'test']], $lets_data->{status});
%# param 'status' => $lets_data->{status} unless param 'status';
%= select_field 'status' => @status_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_HOOKSCRIPT_STATUS')
</span>
<span class="">
% my @hookScript_options = [['Disabled' => 'disabled'], ['Enabled' => 'enabled']];
% param 'hookScript' => $lets_data->{hookScript} unless param 'hookScript';
%= select_field 'hookScript' => @hookScript_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_HOSTOVERRIDE_STATUS')
</span>
<span class="">
% my @hostOverride_options = [['Disabled' => 'disabled'], ['Yes' => 'yes']];
% param 'hostOverride' => $lets_data->{hostOverride} unless param 'hostOverride';
%= select_field 'hostOverride' => @hostOverride_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_ACCEPT_TERMS_STATUS')
</span>
<span class="">
% my @ACCEPT_TERMS_options = [['Disabled' => 'disabled'], ['Yes' => 'yes']];
% param 'ACCEPT_TERMS' => $lets_data->{ACCEPT_TERMS} unless param 'ACCEPT_TERMS';
%= select_field 'ACCEPT_TERMS' => @ACCEPT_TERMS_options, class => ""
<br>
</span>
</p>
<h2 class=""><%=l('lets_Manage_letsencrypt-config_settings:')%></h2>
<p class="">
%=l('lets_CONFIG_LETSENCRYPT')
</p>
<p>
<span class="">
%=l('lets_SERVICE_STATUS')
</span>
<span class="">
%# my @status_options = [['Disabled' => 'disabled'], ['Enabled' => 'enabled'], ['TEST' => 'test']];
% my @status_options = selected_field([['Disabled' => 'disabled'], ['Enabled' => 'enabled'], ['TEST' => 'test']], $lets_data->{status});
%# param 'status' => $lets_data->{status} unless param 'status';
%= select_field 'status' => @status_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_HOOKSCRIPT_STATUS')
</span>
<span class="">
% my @hookScript_options = [['Disabled' => 'disabled'], ['Enabled' => 'enabled']];
% param 'hookScript' => $lets_data->{hookScript} unless param 'hookScript';
%= select_field 'hookScript' => @hookScript_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_HOSTOVERRIDE_STATUS')
</span>
<span class="">
% my @hostOverride_options = [['Disabled' => 'disabled'], ['Yes' => 'yes']];
% param 'hostOverride' => $lets_data->{hostOverride} unless param 'hostOverride';
%= select_field 'hostOverride' => @hostOverride_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_ACCEPT_TERMS_STATUS')
</span>
<span class="">
% my @ACCEPT_TERMS_options = [['Disabled' => 'disabled'], ['Yes' => 'yes']];
% param 'ACCEPT_TERMS' => $lets_data->{ACCEPT_TERMS} unless param 'ACCEPT_TERMS';
%= select_field 'ACCEPT_TERMS' => @ACCEPT_TERMS_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_API_STATUS')
</span><span class="">
% my @API_options = [['2' => '2']];
% param 'API' => $lets_data->{API} unless param 'API';
%= select_field 'API' => @API_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_API_STATUS')
</span>
<span class="">
% my @API_options = [['2' => '2']];
% param 'API' => $lets_data->{API} unless param 'API';
%= select_field 'API' => @API_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_KEYSIZE_STATUS')
</span>
<span class="">
% my @keysize_options = [['2048' => '2048'], ['3072' => '3072'], ['4096' => '4096']];
% param 'keysize' => $lets_data->{keysize} unless param 'keysize';
%= select_field 'keysize' => @keysize_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_KEYSIZE_STATUS')
</span>
<span class="">
% my @keysize_options = [['2048' => '2048'], ['3072' => '3072'], ['4096' => '4096']];
% param 'keysize' => $lets_data->{keysize} unless param 'keysize';
%= select_field 'keysize' => @keysize_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_CONFIGUREMODE_STATUS')
</span>
<span class="">
% my @configure_options = [['ALL' => 'all'], ['Domains' => 'domains'], ['HOSTS' => 'hosts'], ['NONE' => 'none']];
% param 'configure' => $lets_data->{configure} unless param 'configure';
%= select_field 'configure' => @configure_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_CONFIGUREMODE_STATUS')
</span>
<span class="">
% my @configure_options = [['ALL' => 'all'], ['Domains' => 'domains'], ['HOSTS' => 'hosts'], ['NONE' => 'none']];
% param 'configure' => $lets_data->{configure} unless param 'configure';
%= select_field 'configure' => @configure_options, class => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('lets_EMAIL')
</span>
<span class="">
% param 'email' => $lets_data->{email} unless param 'email';
%=email_field 'email', class => ""
</span>
</p>
<p>
<span class="">
%=l('lets_EMAIL')
</span>
<span class="">
% param 'email' => $lets_data->{email} unless param 'email';
%=email_field 'email', class => ""
</span>
</p>
<span class="">
%= submit_button l('lets_Save'), class => ""
</span>
<span class="">
%= submit_button l('lets_Save'), class => ""
</span>
%# Probably finally by a submit.
%end
%# Probably finally by a submit.
%end
</div>

View File

@@ -1,76 +1,76 @@
<div>
% my $retref= $c->stash("ret");
% my %ret;
% unless (length($retref)) {%ret = (ret=>"");}
% else {%ret = %$retref;}
% my @vars = split(",",$ret{vars});
% my $var1 = @vars[0];
% my $var2 = @vars[1];
% my $var3 = @vars[2];
% my $var4 = @vars[3];
% my $var5 = @vars[4];
% my $var6 = @vars[5];
% my $retref= $c->stash("ret");
% my %ret;
% unless (length($retref)) {%ret = (ret=>"");}
% else {%ret = %$retref;}
% my @vars = split(",",$ret{vars});
% my $var1 = @vars[0];
% my $var2 = @vars[1];
% my $var3 = @vars[2];
% my $var4 = @vars[3];
% my $var5 = @vars[4];
% my $var6 = @vars[5];
%if ($ret{'ret'} eq "") {
%} elsif (index($ret{ret},"SUCCESS") != -1) {
<div class="">
<h2> Operation Status Report</h2>
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%} else {
<div class="">
<h2> Operation Status Report - Error</h2>
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%}
<br />
%if ($ret{'ret'} eq "") {
%} elsif (index($ret{ret},"SUCCESS") != -1) {
<div class="">
<h2> Operation Status Report</h2>
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%} else {
<div class="">
<h2> Operation Status Report - Error</h2>
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%}
<br />
% my $btn = l('ADD');
% my $network_db = esmith::NetworksDB->open();
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
</p>
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
</p>
% }
%= form_for '/localnetworksb' => (method => 'POST') => begin
<h2>
%=l "ln_ADD_TITLE"
</h2>
<p>
%= $c->render_to_string(inline => l('ln_ADD_DESC'));
</p>
<br>
<span class="">
%=l "NETWORK"
</span>
<span class="">
%=text_field 'networkAddress'
</span>
<br><br>
<span class="">
%=l "ln_SUBNET_MASK"
</span>
<span class="">
%=text_field 'networkMask'
</span>
<br><br>
<span class="">
%=l "ROUTER"
</span>
<span class="">
%=text_field 'networkRouter'
</span>
<br><br>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
%end
<h2>
%=l "ln_ADD_TITLE"
</h2>
<p>
%= $c->render_to_string(inline => l('ln_ADD_DESC'));
</p>
<br>
<span class="">
%=l "NETWORK"
</span>
<span class="">
%=text_field 'networkAddress'
</span>
<br><br>
<span class="">
%=l "ln_SUBNET_MASK"
</span>
<span class="">
%=text_field 'networkMask'
</span>
<br><br>
<span class="">
%=l "ROUTER"
</span>
<span class="">
%=text_field 'networkRouter'
</span>
<br><br>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
%end
</div>

View File

@@ -6,60 +6,60 @@
% my $router = $ln_datas->{router};
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
%= dumper %$ln_datas
%= dumper $deletehosts
</p>
</p>
% }
%= form_for '/localnetworkse' => (method => 'POST') => begin
<h2>
%=l "ln_REMOVE_TITLE"
</h2>
<p>
%=l "ln_REMOVE_DESC"
</p>
<br>
<span class="">
%=l "NETWORK"
</span>
<span class="">
%=$localnetwork
</span>
<br><br>
<span class="">
%=l "ln_SUBNET_MASK"
</span>
<span class="">
%= $subnet
</span>
<br><br>
<span class="">
%=l "ROUTER"
</span>
<span class="">
%= $router
</span>
<br><br>
% if($deletehosts) {
<br>
%=$c->l("ln_REMOVE_HOSTS_DESC")
<br>
<span class="">
%= $c->l("ln_REMOVE_HOSTS_LABEL")
</span>
<span class="">
%=check_box deletehost=>1, checked=>1
</span>
<br><br>
%}
%= hidden_field localnetwork=>$localnetwork
<p>
<br>
%= submit_button "$btn", class => ""
</p>
%end
<h2>
%=l "ln_REMOVE_TITLE"
</h2>
<p>
%=l "ln_REMOVE_DESC"
</p>
<br>
<span class="">
%=l "NETWORK"
</span>
<span class="">
%=$localnetwork
</span>
<br><br>
<span class="">
%=l "ln_SUBNET_MASK"
</span>
<span class="">
%= $subnet
</span>
<br><br>
<span class="">
%=l "ROUTER"
</span>
<span class="">
%= $router
</span>
<br><br>
% if($deletehosts) {
<br>
%=$c->l("ln_REMOVE_HOSTS_DESC")
<br>
<span class="">
%= $c->l("ln_REMOVE_HOSTS_LABEL")
</span>
<span class="">
%=check_box deletehost=>1, checked=>1
</span>
<br><br>
%}
%= hidden_field localnetwork=>$localnetwork
<p>
<br>
%= submit_button "$btn", class => ""
</p>
%end
</div>

View File

@@ -2,107 +2,107 @@
% my $btn = l('ln_LOCALNETWORK_ADD');
%= form_for '/localnetworksa' => (method => 'POST') => begin
% my $retref= $c->stash("ret");
% my %ret;
% unless (length($retref)) {%ret = (ret=>"");}
% else {%ret = %$retref;}
% my $retref= $c->stash("ret");
% my %ret;
% unless (length($retref)) {%ret = (ret=>"");}
% else {%ret = %$retref;}
% if (config->{debug} == 1) {
<p>
%= dumper "Ret:".$ret{ret};
</p>
%}
<p>
%= dumper "Ret:".$ret{ret};
</p>
%}
% my @vars = split(",",$ret{vars});
% my $var1 = @vars[0];
% my $var2 = @vars[1];
% my $var3 = @vars[2];
% my $var4 = @vars[3];
% my $var5 = @vars[4];
% my $var6 = @vars[5];
% my $var7 = @vars[6];
% my @vars = split(",",$ret{vars});
% my $var1 = @vars[0];
% my $var2 = @vars[1];
% my $var3 = @vars[2];
% my $var4 = @vars[3];
% my $var5 = @vars[4];
% my $var6 = @vars[5];
% my $var7 = @vars[6];
%if ($ret{ret} eq "") {
%=l "ln_FIRSTPAGE_DESC"
%} elsif (index($ret{ret},"SUCCESS") != -1) {
<div class="">
<h2> Operation Status Report</h2>
%= $c->render_to_string(inline => l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6,$var7));
</div>
%} else {
<div class="">
<h2> Operation Status Report - Error</h2>
%= $c->render_to_string(inline => l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6,$var7));
</div>
%}
%if ($ret{ret} eq "") {
%=l "ln_FIRSTPAGE_DESC"
%} elsif (index($ret{ret},"SUCCESS") != -1) {
<div class="">
<h2> Operation Status Report</h2>
%= $c->render_to_string(inline => l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6,$var7));
</div>
%} else {
<div class="">
<h2> Operation Status Report - Error</h2>
%= $c->render_to_string(inline => l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6,$var7));
</div>
%}
<p>
<br>
%= submit_button "$btn", class => ""
</p>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
% end
<br>
<br>
% my $numlocalnetworks = @$localnetworks;
% if ($numlocalnetworks == 0){
% if ($numlocalnetworks == 0){
%=l 'ln_LOCAL_NETWORK_NONE'
% } else {
% } else {
<br>
<table class="table table-bordered">
<thead>
<tr>
<th class="">
%=l 'NETWORK'
</th>
<th class="">
%=l 'ln_SUBNET_MASK'
</th>
<table class="table table-bordered">
<thead>
<tr>
<th class="">
%=l 'NETWORK'
</th>
<th class="">
%=l 'ln_SUBNET_MASK'
</th>
<th class="">
%=l 'ln_NUMBER_OF_HOSTS'
</th>
<th class="">
%=l 'ln_NUMBER_OF_HOSTS'
</th>
<th class="">
%=l 'ROUTER'
</th>
<th class="">
%=l 'ROUTER'
</th>
<th class="">
%=l 'ACTION'
</th>
</tr>
</thead>
<tbody>
% foreach my $localnetwork (@$localnetworks )
% {
% my ($num_hosts) = esmith::util::computeHostRange( $localnetwork->key, $localnetwork->prop('Mask') );
% my $removable = $localnetwork->prop('Removable') || "yes";
% my $system = $localnetwork->prop('SystemLocalNetwork') || "no";
% if ( $system eq "yes" ) { $removable = "no"; }
<tr>
%= t td => (class => "") => $localnetwork->key
%= t td => (class => "") => $localnetwork->prop('Mask')
%= t td => (class => "") => $num_hosts
%= t td => (class => "") => $localnetwork->prop('Router')
%my $actionRemove = '&nbsp;';
%if ($removable eq "yes") {
%my $remove_text = l('REMOVE'); # Localized text
%my $local_network_entry = $localnetwork->key;
%my $csrf_token = "TOKEN"; # CSRF token for security
%$actionRemove = qq{
<th class="">
%=l 'ACTION'
</th>
</tr>
</thead>
<tbody>
% foreach my $localnetwork (@$localnetworks )
% {
% my ($num_hosts) = esmith::util::computeHostRange( $localnetwork->key, $localnetwork->prop('Mask') );
% my $removable = $localnetwork->prop('Removable') || "yes";
% my $system = $localnetwork->prop('SystemLocalNetwork') || "no";
% if ( $system eq "yes" ) { $removable = "no"; }
<tr>
%= t td => (class => "") => $localnetwork->key
%= t td => (class => "") => $localnetwork->prop('Mask')
%= t td => (class => "") => $num_hosts
%= t td => (class => "") => $localnetwork->prop('Router')
%my $actionRemove = '&nbsp;';
%if ($removable eq "yes") {
%my $remove_text = l('REMOVE'); # Localized text
%my $local_network_entry = $localnetwork->key;
%my $csrf_token = "TOKEN"; # CSRF token for security
%$actionRemove = qq{
% <a href="localnetworksd?CsrfDef=$csrf_token&trt=DEL&localnetwork=$local_network_entry">
% <button type='button' class="" title='$remove_text' >
% $remove_text
% </button>
% <button type='button' class="" title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
% }
<td class=""><%= $c->render_to_string(inline => $actionRemove) %></td>
</tr>
% }
</tbody>
</table>
%= hidden_field 'trt' => $ln_datas->{trt}
%}
%};
% }
<td class=""><%= $c->render_to_string(inline => $actionRemove) %></td>
</tr>
% }
</tbody>
</table>
%= hidden_field 'trt' => $ln_datas->{trt}
%}
</div>

View File

@@ -2,162 +2,162 @@
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-01-20 16:21:33
%#
<div>
<script>
window.onload = function() {
SelectInput();
};
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $nut_data
</pre>
% }
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $nut_data
</pre>
% }
% my $btn = l('nut_APPLY');
%= form_for "nutupsu" => (method => 'POST') => begin
% param 'trt' => $nut_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $nut_data->{trt}
%# Inputs etc in here.
% my $btn = l('nut_APPLY');
%= form_for "nutupsu" => (method => 'POST') => begin
% param 'trt' => $nut_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $nut_data->{trt}
%# Inputs etc in here.
<h2 class=""><%=l('nut_Manage_Nutups-config_settings:')%></h2>
<p>
<span class="">
%=l('nut_Nut_status')
</span>
<span class="">
%# my @status_options = [['Disabled' => 'disabled'], ['Enabled' => 'enabled']];
%# param 'status' => $nut_data->{status} unless param 'status';
<h2 class=""><%=l('nut_Manage_Nutups-config_settings:')%></h2>
<p>
<span class="">
%=l('nut_Nut_status')
</span>
<span class="">
%# my @status_options = [['Disabled' => 'disabled'], ['Enabled' => 'enabled']];
%# param 'status' => $nut_data->{status} unless param 'status';
% my @status_options = selected_field([['Disabled' => 'disabled'], ['Enabled' => 'enabled']], $nut_data->{status});
%= select_field 'status' => @status_options, class => "", id => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('nut_Nut_mode')
</span>
<span class="">
% my @Nutmode_options = [['Standalone' => 'standalone'], ['Net Server' => 'netserver'], ['Net Client ' => 'netclient']];
% param 'Nutmode' => $nut_data->{Nutmode} unless param 'Nutmode';
%= select_field 'Nutmode' => @Nutmode_options, class => "", id => ""
<br>
</span>
</p>
<div class="">
<h2 class=""><%=l('nut_if_Net_Server')%></h2>
<p>
<span class="">
%=l('nut_MasterUPS_UPSNAME@IP')
</span>
<span class="">
% param 'MasterUPS_Name' => $nut_data->{MasterUPS_Name} unless param 'MasterUPS_Name';
%= text_field 'MasterUPS_Name', size => '50', class => "" , pattern=>'.*' , placeholder=>'ups@localhost'
<br>
</span>
</p>
% my @status_options = selected_field([['Disabled' => 'disabled'], ['Enabled' => 'enabled']], $nut_data->{status});
%= select_field 'status' => @status_options, class => "", id => ""
<br>
</span>
</p>
<p>
<span class="">
%=l('nut_Nut_mode')
</span>
<span class="">
% my @Nutmode_options = [['Standalone' => 'standalone'], ['Net Server' => 'netserver'], ['Net Client ' => 'netclient']];
% param 'Nutmode' => $nut_data->{Nutmode} unless param 'Nutmode';
%= select_field 'Nutmode' => @Nutmode_options, class => "", id => ""
<br>
</span>
</p>
<div class="">
<h2 class=""><%=l('nut_if_Net_Server')%></h2>
<p>
<span class="">
%=l('nut_MasterUPS_UPSNAME@IP')
</span>
<span class="">
% param 'MasterUPS_Name' => $nut_data->{MasterUPS_Name} unless param 'MasterUPS_Name';
%= text_field 'MasterUPS_Name', size => '50', class => "" , pattern=>'.*' , placeholder=>'ups@localhost'
<br>
</span>
</p>
<p>
<span class="">
%=l('nut_MasterUPS_Password')
</span>
<span class="">
% param 'MasterUPS_Password' => $nut_data->{MasterUPS_Password} unless param 'MasterUPS_Password';
%=password_field 'MasterUPS_Password', class => ""
</span>
</p>
<p>
<span class="">
%=l('nut_MasterUPS_Password')
</span>
<span class="">
% param 'MasterUPS_Password' => $nut_data->{MasterUPS_Password} unless param 'MasterUPS_Password';
%=password_field 'MasterUPS_Password', class => ""
</span>
</p>
<p>
<span class="">
%=l('nut_UPS_Model')
</span>
<span class="">
% my @UPS_Model_options = $c->get_model_options();
% param 'UPS_Model' => $nut_data->{UPS_Model} unless param 'UPS_Model';
%= select_field 'UPS_Model' => \@UPS_Model_options, class => "", id => ""
<br>
</span></p>
<p>
<span class="">
%=l('nut_UPS_Model')
</span>
<span class="">
% my @UPS_Model_options = $c->get_model_options();
% param 'UPS_Model' => $nut_data->{UPS_Model} unless param 'UPS_Model';
%= select_field 'UPS_Model' => \@UPS_Model_options, class => "", id => ""
<br>
</span></p>
<p><span class="">
%=l('nut_UPS_Device')
</span><span class="">
% param 'UPS_Device' => $nut_data->{UPS_Device} unless param 'UPS_Device';
%= text_field 'UPS_Device', size => '50', class => "" , pattern=>'.*' , placeholder=>'auto (for usb)'
<br></span></p>
</div>
<div class="">
<h2 class=""><%=l('nut_if_Net_Client')%></h2>
<p>
<span class="">
%=l('nut_SlaveUPS_UPSNAME@IP')
</span>
<span class="">
% param 'SlaveUPS_Name' => $nut_data->{SlaveUPS_Name} unless param 'SlaveUPS_Name';
%= text_field 'SlaveUPS_Name', size => '50', class => "" , pattern=>'.*' , placeholder=>'upsname@IP'
<br>
</span>
</p>
<p>
<span class="">
%=l('nut_SlaveUPS_Password')
</span>
<span class="">
% param 'SlaveUPS_Password' => $nut_data->{SlaveUPS_Password} unless param 'SlaveUPS_Password';
%=password_field 'SlaveUPS_Password', class => ""
</span>
</p>
</div>
<div class="">
` <h2 class=""><%=l('nut_if_genericups')%></h2>
<p>
<span class="">
%=l('nut_UPS_Generic_Type')
</span>
<span class="">
% param 'UPS_gen_Type' => $nut_data->{UPS_gen_Type} unless param 'UPS_gen_Type';
%= text_field 'UPS_gen_Type', size => '50', class => "" , pattern=>'.*' , placeholder=>'UPS_gen_Type'
<br>
</span>
</p>
<p>
<span class="">
%=l('nut_UPS_Generic_Manufacturer')
</span>
<span class="">
% param 'UPS_gen_Mfr' => $nut_data->{UPS_gen_Mfr} unless param 'UPS_gen_Mfr';
%= text_field 'UPS_gen_Mfr', size => '50', class => "" , pattern=>'.*' , placeholder=>'UPS_gen_Mfr'
<br>
</span>
</p>
<p>
<span class="">
%=l('nut_UPS_Generic_Model')
</span>
<span class="">
% param 'UPS_gen_Model' => $nut_data->{UPS_gen_Model} unless param 'UPS_gen_Model';
%= text_field 'UPS_gen_Model', size => '50', class => "" , pattern=>'.*' , placeholder=>'UPS_gen_Model'
<br>
</span>
</p>
` </div>
<span class="">
%= submit_button l('nut_Save'), class => ""
</span>
<p><span class="">
%=l('nut_UPS_Device')
</span><span class="">
% param 'UPS_Device' => $nut_data->{UPS_Device} unless param 'UPS_Device';
%= text_field 'UPS_Device', size => '50', class => "" , pattern=>'.*' , placeholder=>'auto (for usb)'
<br></span></p>
</div>
<div class="">
<h2 class=""><%=l('nut_if_Net_Client')%></h2>
<p>
<span class="">
%=l('nut_SlaveUPS_UPSNAME@IP')
</span>
<span class="">
% param 'SlaveUPS_Name' => $nut_data->{SlaveUPS_Name} unless param 'SlaveUPS_Name';
%= text_field 'SlaveUPS_Name', size => '50', class => "" , pattern=>'.*' , placeholder=>'upsname@IP'
<br>
</span>
</p>
<p>
<span class="">
%=l('nut_SlaveUPS_Password')
</span>
<span class="">
% param 'SlaveUPS_Password' => $nut_data->{SlaveUPS_Password} unless param 'SlaveUPS_Password';
%=password_field 'SlaveUPS_Password', class => ""
</span>
</p>
</div>
<div class="">
` <h2 class=""><%=l('nut_if_genericups')%></h2>
<p>
<span class="">
%=l('nut_UPS_Generic_Type')
</span>
<span class="">
% param 'UPS_gen_Type' => $nut_data->{UPS_gen_Type} unless param 'UPS_gen_Type';
%= text_field 'UPS_gen_Type', size => '50', class => "" , pattern=>'.*' , placeholder=>'UPS_gen_Type'
<br>
</span>
</p>
<p>
<span class="">
%=l('nut_UPS_Generic_Manufacturer')
</span>
<span class="">
% param 'UPS_gen_Mfr' => $nut_data->{UPS_gen_Mfr} unless param 'UPS_gen_Mfr';
%= text_field 'UPS_gen_Mfr', size => '50', class => "" , pattern=>'.*' , placeholder=>'UPS_gen_Mfr'
<br>
</span>
</p>
<p>
<span class="">
%=l('nut_UPS_Generic_Model')
</span>
<span class="">
% param 'UPS_gen_Model' => $nut_data->{UPS_gen_Model} unless param 'UPS_gen_Model';
%= text_field 'UPS_gen_Model', size => '50', class => "" , pattern=>'.*' , placeholder=>'UPS_gen_Model'
<br>
</span>
</p>
` </div>
<span class="">
%= submit_button l('nut_Save'), class => ""
</span>
%# Probably finally by a submit.
%end
%# Probably finally by a submit.
%end
</div>

View File

@@ -2,55 +2,55 @@
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-01-20 16:21:33
%#
<div>
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $nut_data
</pre>
% }
% my $btn = l('nut_APPLY');
%= form_for "nutupsu" => (method => 'POST') => begin
% param 'trt' => $nut_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $nut_data->{trt}
%# Inputs etc in here.
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $nut_data
</pre>
% }
% my $btn = l('nut_APPLY');
%= form_for "nutupsu" => (method => 'POST') => begin
% param 'trt' => $nut_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $nut_data->{trt}
%# Inputs etc in here.
<div class="">
<a href='nutupsd?trt=CONFIG' class="">
%= l('nut_Configure_NutUPS')
</a>
%#= link_to l('nut_Configure_NutUPS'), 'nutupsd?trt=CONFIG' , class="">'link link1'
</div>
<h2 class=""><%=l('nut_Status_of_the_controlled_UPS')%></h2>
<p class="">
%=l('nut_Descriptive_paragraph')
</p>
<div class="">
<a href='nutupsd?trt=CONFIG' class="">
%= l('nut_Configure_NutUPS')
</a>
%#= link_to l('nut_Configure_NutUPS'), 'nutupsd?trt=CONFIG' , class=> 'link link1'
</div>
<h2 class=""><%=l('nut_Status_of_the_controlled_UPS')%></h2>
<p class="">
%=l('nut_Descriptive_paragraph')
</p>
<!--
<span class="">
%=l('nut_Status_(from_upsc)')
</span>
<span class="">
% param 'UPSStatus' => $nut_data->{UPSStatus} unless param 'UPSStatus';
%= text_area 'UPSStatus', cols=>55, rows=>35, Readonly=>'true'
</span>
<br>
<span class="">
%=l('nut_Status_(from_upsc)')
</span>
<span class="">
% param 'UPSStatus' => $nut_data->{UPSStatus} unless param 'UPSStatus';
%= text_area 'UPSStatus', cols=>55, rows=>35, Readonly=>'true'
</span>
<br>
-->
%= include 'partials/_nut_UPS_STATUS'
%# Probably finally by a submit.
%end
</div>
%= include 'partials/_nut_UPS_STATUS'
%# Probably finally by a submit.
%end
</div>

View File

@@ -1,45 +1,45 @@
<h1>UPS Status</h1>
%= stylesheet '/css/nut_ups-status-page.css'
<div class="container-md">
<div>
<h2>Device Information</h2>
<table class="table table-bordered">
<tr><td>Manufacturer:</td><td><%= $nut_data->{'ups_data'}->{'device.mfr'} %></td></tr>
<tr><td>Model:</td><td><%= $nut_data->{'ups_data'}->{'device.model'} %></td></tr>
<tr><td>Serial:</td><td><%= $nut_data->{'ups_data'}->{'device.serial'} %></td></tr>
<tr><td>Type:</td><td><%= $nut_data->{'ups_data'}->{'device.type'} %></td></tr>
</table>
</div>
<div>
<h2>Battery Status</h2>
<table class="table table-bordered">
<tr><td>Charge:</td><td><%= $nut_data->{'ups_data'}->{'battery.charge'} %>%</td></tr>
<tr><td>Runtime:</td><td><%= sprintf("%.2f", $nut_data->{'ups_data'}->{'battery.runtime'} / 60) %> minutes</td></tr>
<tr><td>Voltage:</td><td><%= $nut_data->{'ups_data'}->{'battery.voltage'} %>V</td></tr>
<tr><td>Type:</td><td><%= $nut_data->{'ups_data'}->{'battery.type'} %></td></tr>
</table>
</div>
<div>
<h2>Input Power</h2>
<table class="table table-bordered">
<tr><td>Voltage:</td><td><%= $nut_data->{'ups_data'}->{'input.voltage'} %>V</td></tr>
<tr><td>Nominal Voltage:</td><td><%= $nut_data->{'ups_data'}->{'input.voltage.nominal'} %>V</td></tr>
<tr><td>Sensitivity:</td><td><%= $nut_data->{'ups_data'}->{'input.sensitivity'} %></td></tr>
<tr><td>Transfer High:</td><td><%= $nut_data->{'ups_data'}->{'input.transfer.high'} %>V</td></tr>
<tr><td>Transfer Low:</td><td><%= $nut_data->{'ups_data'}->{'input.transfer.low'} %>V</td></tr>
</table>
</div>
<div>
<h2>UPS Status</h2>
<table class="table table-bordered">
<tr><td>Status:</td><td><%= $nut_data->{'ups_data'}->{'ups.status'} %></td></tr>
<tr><td>Load:</td><td><%= $nut_data->{'ups_data'}->{'ups.load'} %>%</td></tr>
<tr><td>Beeper:</td><td><%= $nut_data->{'ups_data'}->{'ups.beeper.status'} %></td></tr>
<tr><td>Firmware:</td><td><%= $nut_data->{'ups_data'}->{'ups.firmware'} %></td></tr>
<tr><td>Test Result:</td><td><%= $nut_data->{'ups_data'}->{'ups.test.result'} %></td></tr>
</table>
</div>
<div>
<h2>Device Information</h2>
<table class="table table-bordered">
<tr><td>Manufacturer:</td><td><%= $nut_data->{'ups_data'}->{'device.mfr'} %></td></tr>
<tr><td>Model:</td><td><%= $nut_data->{'ups_data'}->{'device.model'} %></td></tr>
<tr><td>Serial:</td><td><%= $nut_data->{'ups_data'}->{'device.serial'} %></td></tr>
<tr><td>Type:</td><td><%= $nut_data->{'ups_data'}->{'device.type'} %></td></tr>
</table>
</div>
<div>
<h2>Battery Status</h2>
<table class="table table-bordered">
<tr><td>Charge:</td><td><%= $nut_data->{'ups_data'}->{'battery.charge'} %>%</td></tr>
<tr><td>Runtime:</td><td><%= sprintf("%.2f", $nut_data->{'ups_data'}->{'battery.runtime'} / 60) %> minutes</td></tr>
<tr><td>Voltage:</td><td><%= $nut_data->{'ups_data'}->{'battery.voltage'} %>V</td></tr>
<tr><td>Type:</td><td><%= $nut_data->{'ups_data'}->{'battery.type'} %></td></tr>
</table>
</div>
<div>
<h2>Input Power</h2>
<table class="table table-bordered">
<tr><td>Voltage:</td><td><%= $nut_data->{'ups_data'}->{'input.voltage'} %>V</td></tr>
<tr><td>Nominal Voltage:</td><td><%= $nut_data->{'ups_data'}->{'input.voltage.nominal'} %>V</td></tr>
<tr><td>Sensitivity:</td><td><%= $nut_data->{'ups_data'}->{'input.sensitivity'} %></td></tr>
<tr><td>Transfer High:</td><td><%= $nut_data->{'ups_data'}->{'input.transfer.high'} %>V</td></tr>
<tr><td>Transfer Low:</td><td><%= $nut_data->{'ups_data'}->{'input.transfer.low'} %>V</td></tr>
</table>
</div>
<div>
<h2>UPS Status</h2>
<table class="table table-bordered">
<tr><td>Status:</td><td><%= $nut_data->{'ups_data'}->{'ups.status'} %></td></tr>
<tr><td>Load:</td><td><%= $nut_data->{'ups_data'}->{'ups.load'} %>%</td></tr>
<tr><td>Beeper:</td><td><%= $nut_data->{'ups_data'}->{'ups.beeper.status'} %></td></tr>
<tr><td>Firmware:</td><td><%= $nut_data->{'ups_data'}->{'ups.firmware'} %></td></tr>
<tr><td>Test Result:</td><td><%= $nut_data->{'ups_data'}->{'ups.test.result'} %></td></tr>
</table>
</div>
</div>

View File

@@ -1,4 +1,4 @@
<!-- card footer -->
<div class="card-footer">Footer</div>
<div class="card-footer">Card Footer</div>
<!-- /.card-footer-->

View File

@@ -1,7 +1,7 @@
<div class="card-header">
<h3 class="card-title">Card Title <%= $title%></h3>
<h3 class="card-title">Card Title - <%= $title%></h3>
%= include 'partials/_panel_card_tools'
%= include 'partials/_panel_card_tools'
</div>

View File

@@ -1,5 +1,7 @@
<!--
<div class="card-tools">
<button type="button" class="btn btn-tool" data-lte-toggle="card-collapse"
title="Collapse">
<i data-lte-icon="expand" class="bi bi-plus-lg"></i>
@@ -9,4 +11,5 @@
title="Remove">
<i class="bi bi-x-lg"></i>
</button>
</div>
</div>
-->

View File

@@ -1,95 +1,95 @@
<div>
% my $retref= $c->stash("ret");
% my %ret;
% unless (length($retref)) {%ret = (ret=>"");}
% else {%ret = %$retref;}
% my @vars = split(",",$ret{vars});
% my $var1 = @vars[0];
% my $var2 = @vars[1];
% my $var3 = @vars[2];
% my $var4 = @vars[3];
% my $var5 = @vars[4];
% my $var6 = @vars[5];
% my $retref= $c->stash("ret");
% my %ret;
% unless (length($retref)) {%ret = (ret=>"");}
% else {%ret = %$retref;}
% my @vars = split(",",$ret{vars});
% my $var1 = @vars[0];
% my $var2 = @vars[1];
% my $var3 = @vars[2];
% my $var4 = @vars[3];
% my $var5 = @vars[4];
% my $var6 = @vars[5];
<br>
%if ($ret{'ret'} eq "") {
%} elsif (index($ret{ret},"SUCCESS") != -1) {
<div class="">
<!--<h2> Operation Status Report</h2>-->
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%} else {
<div class="">
<!--<h2> Operation Status Report - Error</h2>-->
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%}
<br />
<br>
%if ($ret{'ret'} eq "") {
%} elsif (index($ret{ret},"SUCCESS") != -1) {
<div class="">
<!--<h2> Operation Status Report</h2>-->
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%} else {
<div class="">
<!--<h2> Operation Status Report - Error</h2>-->
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%}
<br />
% my $btn = l('ADD');
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
</p>
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
</p>
% }
%= form_for '/portforwardingb' => (method => 'POST') => begin
<h2>
%=l "pf_CREATE_RULE"
</h2>
<p>
%=l "pf_SUMMARY_ADD_DESC"
</p><br>
<span class="">
%=l "pf_LABEL_PROTOCOL"
</span>
<span class="">
%=select_field 'proto'=>["TCP","UDP"]
</span><br><br>
<span class="">
%=l "pf_LABEL_SOURCE_PORT"
</span>
<span class="">
%=text_field 'sport'
</span>
<br><br>
<span class="">
%=l "pf_LABEL_DESTINATION_PORT"
</span>
<span class="">
%=text_field 'dport'
</span>
<br><br>
<span class="">
%=l "pf_LABEL_DESTINATION_HOST"
</span>
<span class="">
%=text_field 'dhost'
</span>
<br><br>
<span class="">
%=l "pf_ALLOW_HOSTS"
</span>
<span class="">
%=text_field 'allow'
</span>
<br><br>
<span class="">
%=l "pf_RULE_COMMENT"
</span>
<span class="">
%=text_field 'cmmnt'
</span>
<br><br>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
<h2>
%=l "pf_CREATE_RULE"
</h2>
<p>
%=l "pf_SUMMARY_ADD_DESC"
</p><br>
<span class="">
%=l "pf_LABEL_PROTOCOL"
</span>
<span class="">
%=select_field 'proto'=>["TCP","UDP"]
</span><br><br>
<span class="">
%=l "pf_LABEL_SOURCE_PORT"
</span>
<span class="">
%=text_field 'sport'
</span>
<br><br>
<span class="">
%=l "pf_LABEL_DESTINATION_PORT"
</span>
<span class="">
%=text_field 'dport'
</span>
<br><br>
<span class="">
%=l "pf_LABEL_DESTINATION_HOST"
</span>
<span class="">
%=text_field 'dhost'
</span>
<br><br>
<span class="">
%=l "pf_ALLOW_HOSTS"
</span>
<span class="">
%=text_field 'allow'
</span>
<br><br>
<span class="">
%=l "pf_RULE_COMMENT"
</span>
<span class="">
%=text_field 'cmmnt'
</span>
<br><br>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
%end
%end
</div>

View File

@@ -9,65 +9,65 @@
% my $allow = $pf_datas->{allow};
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
%= dumper %$pf_datas
</p>
</p>
% }
%= form_for '/portforwardinge' => (method => 'POST') => begin
<br>
%= l "pf_SUMMARY_REMOVE_DESC"
</p><br>
<span class="">
%=l "pf_LABEL_PROTOCOL"
</span>
<span class="">
%=$proto
</span><br><br>
<span class="">
%=l "pf_LABEL_SOURCE_PORT"
</span>
<span class="">
%=$sport
</span>
<br><br>
<span class="">
%=l "pf_LABEL_DESTINATION_HOST"
</span>
<span class="">
%=$dport
</span>
<br><br>
<span class="">
%=l "pf_LABEL_DESTINATION_PORT"
</span>
<span class="">
%=$dhost
</span>
<br><br>
<span class="">
%=l "pf_RULE_COMMENT"
</span>
<span class="">
%=$cmmnt
</span>
<br><br>
<span class="">
%=l "pf_ALLOW_HOSTS"
</span>
<span class="">
%=$allow
</span>
<br><br>
%#}
%= hidden_field sport=>$sport
%= hidden_field proto=>$proto
<br>
%= submit_button "$btn", class => ""
</p>
%= l "pf_SUMMARY_REMOVE_DESC"
</p><br>
<span class="">
%=l "pf_LABEL_PROTOCOL"
</span>
<span class="">
%=$proto
</span><br><br>
<span class="">
%=l "pf_LABEL_SOURCE_PORT"
</span>
<span class="">
%=$sport
</span>
<br><br>
<span class="">
%=l "pf_LABEL_DESTINATION_HOST"
</span>
<span class="">
%=$dport
</span>
<br><br>
<span class="">
%=l "pf_LABEL_DESTINATION_PORT"
</span>
<span class="">
%=$dhost
</span>
<br><br>
<span class="">
%=l "pf_RULE_COMMENT"
</span>
<span class="">
%=$cmmnt
</span>
<br><br>
<span class="">
%=l "pf_ALLOW_HOSTS"
</span>
<span class="">
%=$allow
</span>
<br><br>
%#}
%= hidden_field sport=>$sport
%= hidden_field proto=>$proto
<br>
%= submit_button "$btn", class => ""
</p>
%end
%end
</div>

View File

@@ -2,119 +2,119 @@
% my $btn = l('pf_CREATE_RULE');
%= form_for '/portforwardinga' => (method => 'POST') => begin
% my $retref= $c->stash("ret");
% my %ret;
% unless (length($retref)) {%ret = (ret=>"");}
% else {%ret = %$retref;}
% my $retref= $c->stash("ret");
% my %ret;
% unless (length($retref)) {%ret = (ret=>"");}
% else {%ret = %$retref;}
% my $numtcpforwards = @$tcpforwards;
% my $numudpforwards = @$udpforwards;
% my $numudpforwards = @$udpforwards;
% my @vars = split(",",$ret{vars});
% my $var1 = @vars[0];
% my $var2 = @vars[1];
% my $var3 = @vars[2];
% my $var4 = @vars[3];
% my $var5 = @vars[4];
% my $var6 = @vars[5];
% my @vars = split(",",$ret{vars});
% my $var1 = @vars[0];
% my $var2 = @vars[1];
% my $var3 = @vars[2];
% my $var4 = @vars[3];
% my $var5 = @vars[4];
% my $var6 = @vars[5];
%if ($ret{ret} eq "") {
%= $c->render_to_string(inline => l('pf_FIRST_PAGE_DESCRIPTION'));
%} elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class="">
<!--<h2> Operation Status Report</h2>-->
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%} else {
<br>
<div class="">
<!--<h2> Operation Status Report - Error</h2>-->
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%}
%if ($ret{ret} eq "") {
%= $c->render_to_string(inline => l('pf_FIRST_PAGE_DESCRIPTION'));
%} elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class="">
<!--<h2> Operation Status Report</h2>-->
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%} else {
<br>
<div class="">
<!--<h2> Operation Status Report - Error</h2>-->
%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
</div>
%}
<p>
<br>
%= submit_button "$btn", class => ""
</p>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
% end
% if ($empty){
% if ($empty){
<br>
%=l 'pf_NO_FORWARDS'
% } else {
%=l 'pf_NO_FORWARDS'
% } else {
<br>
%=l 'pf_SHOW_FORWARDS'
<br><br />
<table class="table table-bordered">
<thead>
<tr>
<th class="">
%=l 'pf_LABEL_PROTOCOL'
</th>
<th class="">
%=l 'pf_LABEL_SOURCE_PORT'
</th>
<th class="">
%=l 'pf_LABEL_DESTINATION_HOST'
</th>
<th class="">
%=l 'pf_LABEL_DESTINATION_PORT'
</th>
<th class="">
%=l 'pf_ALLOW_HOSTS'
</th>
<th class="">
%=l 'pf_RULE_COMMENT'
</th>
<th class="" '>
%=l 'ACTION'
</th>
</tr>
</thead>
<tbody>
% my %forwards = ();
% $forwards{TCP} = $tcpforwards;
% $forwards{UDP} = $udpforwards;
%=l 'pf_SHOW_FORWARDS'
<br><br />
<table class="table table-bordered">
<thead>
<tr>
<th class="">
%=l 'pf_LABEL_PROTOCOL'
</th>
<th class="">
%=l 'pf_LABEL_SOURCE_PORT'
</th>
<th class="">
%=l 'pf_LABEL_DESTINATION_HOST'
</th>
<th class="">
%=l 'pf_LABEL_DESTINATION_PORT'
</th>
<th class="">
%=l 'pf_ALLOW_HOSTS'
</th>
<th class="">
%=l 'pf_RULE_COMMENT'
</th>
<th class="" '>
%=l 'ACTION'
</th>
</tr>
</thead>
<tbody>
% my %forwards = ();
% $forwards{TCP} = $tcpforwards;
% $forwards{UDP} = $udpforwards;
% foreach my $proto (sort keys %forwards) {
% if (@{ $forwards{$proto} }) {
% foreach my $entry (@{ $forwards{$proto} }) {
<tr>
<tr>
% my $sport = $entry->key;
% my $dhost = $entry->prop('DestHost');
% my $dport = $entry->prop('DestPort') || '';
% my $cmmnt = $entry->prop('Comment') || '';
% my $allow = $entry->prop('AllowHosts') || '';
%= t td => (class => "") => $proto
%= t td => (class => "") => $sport
%= t td => (class => "") => $dhost
%= t td => (class => "") => $dport
%= t td => (class => "") => $allow
%= t td => (class => "") => $cmmnt
<td class="">
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $actionRemove = qq{
%= t td => (class => "") => $proto
%= t td => (class => "") => $sport
%= t td => (class => "") => $dhost
%= t td => (class => "") => $dport
%= t td => (class => "") => $allow
%= t td => (class => "") => $cmmnt
<td class="">
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $actionRemove = qq{
% <a href="portforwardingd?CsrfDef=$csrf_token&trt=DEL&sport=$sport&proto=$proto">
% <button type='button' class="" title='$remove_text' >
% $remove_text
% </button>
% <button type='button' class="" title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
<%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
%};
<%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
% }
%}
%}
</tbody>
</table>
%= hidden_field 'trt' => $pf_datas->{trt}
%}
</tbody>
</table>
%= hidden_field 'trt' => $pf_datas->{trt}
</div>

View File

@@ -1,51 +1,51 @@
<div>
% my $btn = l('ADD');
% my $btn = l('ADD');
%= form_for '/printers2' => (method => 'POST') => begin
<p>
<h2>
%=l 'prt_CREATE_NEW_PRINTER'
</h2>
<br>
%=l 'prt_CREATE_NEW_DESC'
</p>
<br>
<p>
<h2>
%=l 'prt_CREATE_NEW_PRINTER'
</h2>
<br>
%=l 'prt_CREATE_NEW_DESC'
</p>
<br>
<p>
<span class="">
%=l 'prt_PRINTER_NAME', class => ""
</span>
<span class="">
%= text_field 'Name', class => ""
</span>
</p>
<p>
<span class="">
%=l 'prt_PRINTER_NAME', class => ""
</span>
<span class="">
%= text_field 'Name', class => ""
</span>
</p>
<p>
<span class="">
%=l 'DESCRIPTION_BRIEF', class => ""
</span>
<span class="">
%= text_field 'Description', class => ""
</span>
</p>
<p>
<span class="">
%=l 'DESCRIPTION_BRIEF', class => ""
</span>
<span class="">
%= text_field 'Description', class => ""
</span>
</p>
<p>
<span class="">
%=l 'LOCATION', class => ""
</span>
<span class="">
%= select_field 'Location' => $c->printerLocation_list(), class => ""
</span>
</p>
<p>
<span class="">
%=l 'LOCATION', class => ""
</span>
<span class="">
%= select_field 'Location' => $c->printerLocation_list(), class => ""
</span>
</p>
<p>
<br><br>
%= submit_button "$btn", class => ""
</p>
<p>
<br><br>
%= submit_button "$btn", class => ""
</p>
%= hidden_field 'trt' => $prt_datas->{trt}
%= hidden_field 'trt' => $prt_datas->{trt}
% end
</div>

View File

@@ -1,26 +1,26 @@
<div>
% my $btn = l('REMOVE');
% my $btn = l('REMOVE');
%= form_for '/printers2' => (method => 'POST') => begin
<p>
<h2>
%=l 'prt_REMOVE_PRINTER'
</h2>
<br><br>
<p>
<h2>
%=l 'prt_REMOVE_PRINTER'
</h2>
<br><br>
<%=l 'prt_ABOUT_TO_REMOVE'%> <%=$prt_datas->{printer}%>
(<%=$prt_datas->{description}%>)
<br>
<%=l 'prt_ABOUT_TO_REMOVE'%> <%=$prt_datas->{printer}%>
(<%=$prt_datas->{description}%>)
<br>
%=l 'prt_SPOOL_FILE_WARNING'
<br>
%=l 'prt_SPOOL_FILE_WARNING'
<br>
%=l 'prt_ARE_YOU_SURE'
</p>
%=l 'prt_ARE_YOU_SURE'
</p>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
%= hidden_field 'trt' => $prt_datas->{trt}
%= hidden_field 'printer' => $prt_datas->{printer}

View File

@@ -6,45 +6,45 @@
%= hidden_field 'trt' => 'ADD'
<p>
<br>
%= submit_button "$btn", class => ""
</p>
<p>
<br>
%= submit_button "$btn", class => ""
</p>
% end
<p>
<h2>
%=l 'prt_CURRENT_LIST'
</h2>
<br><br>
% my $numPrinters = @$printerDrivers;
% if ($numPrinters == 0){
<p>
<h2>
%=l 'prt_CURRENT_LIST'
</h2>
<br><br>
% my $numPrinters = @$printerDrivers;
% if ($numPrinters == 0){
%=l 'prt_NO_PRINTERS'
% } else {
<table class="table table-bordered">
<thead>
<tr>
<th class="">
%=l 'NAME'
</th>
<th class="">
%=l 'DESCRIPTION'
</th>
<th class="">
%=l 'LOCATION'
</th>
<th class="">
%=l 'prt_REMOTE_ADDRESS'
</th>
<th class="">
%=l 'prt_REMOTE_NAME'
</th>
<th class="">
%=l 'ACTION'
</th>
</tr>
</thead>
<tbody>
% } else {
<table class="table table-bordered">
<thead>
<tr>
<th class="">
%=l 'NAME'
</th>
<th class="">
%=l 'DESCRIPTION'
</th>
<th class="">
%=l 'LOCATION'
</th>
<th class="">
%=l 'prt_REMOTE_ADDRESS'
</th>
<th class="">
%=l 'prt_REMOTE_NAME'
</th>
<th class="">
%=l 'ACTION'
</th>
</tr>
</thead>
<tbody>
% foreach my $printer (@$printerDrivers)
% {
% my $address = ($printer->prop('Location') eq 'remote')
@@ -58,25 +58,25 @@
%= t td => (class => "") => $printer->prop('Location')
%= t td => (class => "") => $address
%= t td => (class => "") => $remoteName
<td class="">
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $printer_name = $printer->key;
%my $actionRemove = qq{
<td class="">
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $printer_name = $printer->key;
%my $actionRemove = qq{
% <a href="printers2?CsrfDef=$csrf_token&trt=DEL&&printer=$printer_name">
% <button type='button' class="" title='$remove_text' >
% $remove_text
% </button>
% <button type='button' class="" title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
<%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
%};
<%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
</tbody>
</table>
<%} %>
</p>
</tbody>
</table>
<%} %>
</p>
</div>

View File

@@ -1,45 +1,45 @@
<div>
% my $btn = l('ADD');
% my $btn = l('ADD');
%= form_for '/printers2' => (method => 'POST') => begin
<p>
<h2>
%=l 'prt_CREATE_NETWORK_PRINTER'
</h2>
<br><br>
%=l 'prt_CREATE_NETWORK_DESC'
</p>
<p>
<span class="">
%=l 'prt_HOSTNAME_OR_IP', class => ""
</span>
<span class="">
%= text_field 'Address', class => ""
</span>
</p>
<p>
<h2>
%=l 'prt_CREATE_NETWORK_PRINTER'
</h2>
<br><br>
%=l 'prt_CREATE_NETWORK_DESC'
</p>
<p>
<span class="">
%=l 'prt_HOSTNAME_OR_IP', class => ""
</span>
<span class="">
%= text_field 'Address', class => ""
</span>
</p>
<p>
<span class="">
%=l 'prt_REMOTE_NAME_DESC', class => ""
</span>
<span class="">
%= text_field 'RemoteName' => 'raw', class => ""
</span>
</p>
<p>
<span class="">
%=l 'prt_REMOTE_NAME_DESC', class => ""
</span>
<span class="">
%= text_field 'RemoteName' => 'raw', class => ""
</span>
</p>
<p>
<br><br>
%= submit_button "$btn", class => ""
</p>
<p>
<br><br>
%= submit_button "$btn", class => ""
</p>
%= hidden_field 'trt' => $prt_datas->{trt}
%= hidden_field 'Name' => $prt_datas->{name}
%= hidden_field 'Description' => $prt_datas->{description}
%= hidden_field 'Location' => $prt_datas->{location}
%= hidden_field 'trt' => $prt_datas->{trt}
%= hidden_field 'Name' => $prt_datas->{name}
%= hidden_field 'Description' => $prt_datas->{description}
%= hidden_field 'Location' => $prt_datas->{location}
% end
</div>

View File

@@ -1,41 +1,48 @@
<div>
% my $btn = l('ADD');
%= form_for '/pseudonyms2' => (method => 'POST') => begin
<p>
<h2>
%=l 'pse_TITLE_CREATE'
</h2>
% my $btn = l('ADD');
<br>
%= $c->render_to_string(inline => l('pse_VALID_PSEUDONYM_NAMES'));
</p>
<h2><%= l 'pse_TITLE_CREATE' %></h2>
<br>
<form action="/smanager/pseudonyms2" method="POST">
<p>
<span class="">
%=l 'pse_PSEUDONYM_NAME', class => ""
</span>
<span class="">
%= text_field 'Pseudonym', class => ""
</span>
</p>
<div class="row g-3 align-items-center">
<div class="col-auto">
<%= $c->render_to_string(inline => l('pse_VALID_PSEUDONYM_NAMES')); %>
<br>
</div>
<br>
<div class="col-md-2">
<label for="inputPseudonymName" class="col-form-label"><%= l 'pse_PSEUDONYM_NAME' %></label>
</div>
<p>
<span class="">
%=l 'pse_SELECT_ACCOUNT', class => ""
</span>
<span class="">
%= select_field 'Account' => $c->existing_accounts_list(), class => ""
</span>
</p>
<div class="col-auto">
<input type="text" name="pseudonymDesc" id="inputPseudonymDesc" class="form-control" aria-describedby="PseudonymDesc" >
</div>
</div>
<p>
<br><br>
%= submit_button "$btn", class => ""
</p>
<br><br>
%= hidden_field 'trt' => $pse_datas->{trt}
% end
<div class="row g-3 align-items-center">
<div class="col-md-2">
<%=l 'pse_SELECT_ACCOUNT' %>
</div>
<div class="col-auto">
<%= select_field 'Account' => $c->existing_accounts_list(), class => "form-select" %>
</div>
</div>
<br><br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
%= hidden_field 'trt' => $pse_datas->{trt}
</form>
</div>

View File

@@ -1,25 +1,24 @@
<div>
% my $btn = l('REMOVE');
%= form_for '/pseudonyms2' => (method => 'POST') => begin
<p>
<h2>
%=l 'pse_REMOVE_PSEUDONYM'
</h2>
% my $btn = l('REMOVE');
<p>
%= $c->render_to_string(inline => l('pse_ABOUT_TO_REMOVE', $pse_datas->{pseudonym}));
<form action="/smanager/pseudonyms2" method="POST">
<h2><%= l 'pse_REMOVE_PSEUDONYM' %></h2>
</p>
<!--This is the old test that needs fixing in the language files-->
<p>
<br>
%= submit_button "$btn", class => ""
</p>
<br>
<%= $c->render_to_string(inline => l('pse_ABOUT_TO_REMOVE', $pse_datas->{pseudonym})); %>
<br><br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
%= hidden_field 'trt' => $pse_datas->{trt}
%= hidden_field 'Pseudonym' => $pse_datas->{pseudonym}
% end
</form>
</div>

View File

@@ -8,91 +8,81 @@
%= hidden_field 'trt' => 'ADD'
<p><br>
%= submit_button "$btn", class => ""
</p>
% end
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
% end
<br>
<h2><%= l 'pse_CURRENT_PSEUDONYMS' %></h2>
<br>
% my $numPseudonyms = @$pseudonyms;
% if ($numPseudonyms == 0) {
<%= l 'pse_ACCOUNT_PSEUDONYM_NONE' %>
% } else {
<table class="table table-bordered user-table-max-width">
<thead>
<tr>
<th class="col-sm"><%= l 'pse_PSEUDONYM' %></th>
<th class="col-sm"><%= l 'pse_USER_OR_GROUP' %></th>
<th class="col-sm user-valign-center" colspan="2"><%= l 'ACTION' %></th>
<!-- <th class="" style="display: normal;"></th> -->
</tr>
</thead>
<tbody>
<p><h2>
%=l 'pse_CURRENT_PSEUDONYMS'
</h2><br>
% my $numPseudonyms = @$pseudonyms;
% if ($numPseudonyms == 0){
%=l 'pse_ACCOUNT_PSEUDONYM_NONE'
% } else {
<table class="table table-bordered">
<thead>
<tr>
<th class="">
%=l 'pse_PSEUDONYM'
</th>
<th class="">
%=l 'pse_USER_OR_GROUP'
</th>
<th class="">
%=l 'ACTION'
</th>
% foreach my $pseudonym ( @$pseudonyms ) {
% my $modifiable = $pseudonym->prop('Changeable') || 'yes';
% my $removable = $pseudonym->prop('Removable') || 'yes';
<!-- <th class="" style="display: normal;"></th> -->
</tr>
</thead>
<tbody>
% my $account = $pseudonym->prop('Account');
% $account = "Administrator" if ($account eq "admin");
% $account = $c->l("pse_EVERYONE") if ($account eq "shared");
% foreach my $pseudonym ( @$pseudonyms )
% {
% my $modifiable = $pseudonym->prop('Changeable') || 'yes';
% my $removable = $pseudonym->prop('Removable') || 'yes';
% my $visible = $pseudonym->prop('Visible');
% $account .= $c->l("pse_LOCAL_ONLY")
% if (defined $visible && $visible eq "internal");
% my $account = $pseudonym->prop('Account');
% $account = "Administrator" if ($account eq "admin");
% $account = $c->l("pse_EVERYONE") if ($account eq "shared");
<tr>
<td><%= $pseudonym->key%></td>
<td><%= $account%></td>
% my $visible = $pseudonym->prop('Visible');
% $account .= $c->l("pse_LOCAL_ONLY")
% if (defined $visible && $visible eq "internal");
% my ($actionModify, $actionRemove) = '&nbsp;';
% if ($modifiable eq 'yes') {
%my $modify_text = l('MODIFY'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
%$actionModify = qq{
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=UPD&pseudonym=$pseudonyms_entry_name">
% <button type='button' class="btn btn-primary" title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
% }
<tr>
%= t td => (class => "") => $pseudonym->key
%= t td => (class => "") => $account
% if ($removable eq 'yes') {
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
%$actionRemove = qq{
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=DEL&pseudonym=$pseudonyms_entry_name">
% <button type='button' class="btn btn-primary" title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
% }
<td class="">
%my ($actionModify, $actionRemove) = '&nbsp;';
%if ($modifiable eq 'yes') {
%my $modify_text = l('MODIFY'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
%$actionModify = qq{
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=UPD&pseudonym=$pseudonyms_entry_name">
% <button type='button' class="" title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
%}
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionModify) %></td>
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionRemove) %></td>
%if ($removable eq 'yes') {
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
%$actionRemove = qq{
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=DEL&pseudonym=$pseudonyms_entry_name">
% <button type='button' class="" title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
%}
<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
</tbody>
</tr>
% }
</tbody>
</table>
<%} %>
</p>
% }
</div>

View File

@@ -2,55 +2,70 @@
% my $btn = l('SAVE');
%= form_for '/pseudonyms2' => (method => 'POST') => begin
<p>
<h2>
%=l 'pse_MODIFY_PSEUDONYM'
</h2>
<br>
%=l 'pse_DESC_PSEUDONYM_NAME'
</p>
<form action="/smanager/pseudonyms2" method="POST">
<p>
<span class="">
%=l 'pse_PSEUDONYM_NAME', class => ""
</span>
<span class="">
%= $pse_datas->{pseudonym}, class => ""
</span>
</p>
<h2><%=l 'pse_MODIFY_PSEUDONYM' %></h2>
<br>
<p>
<span class="">
%=l 'pse_SELECT_ACCOUNT', class => ""
</span>
<span class="">
% param 'Account' => $pse_datas->{account} unless param 'Account';
%= select_field 'Account' => $c->existing_accounts_list(), class => ""
</span>
</p>
<div>
<%=l 'pse_DESC_PSEUDONYM_NAME' %>
</div>
%if ( $c->is_pseudonym_not_removable( $pse_datas->{pseudonym} ) ) {
<br>
<p>
<span class="">
%=l 'pse_SELECT_INTERNAL', class => ""
</span>
<span class="">
% param 'Internal' => $pse_datas->{internal} unless param 'Internal';
%= select_field 'Internal' => [ [(l 'YES') => 'YES'], [(l 'NO') => 'NO'] ], class => ""
</span>
</p>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<%=l 'pse_PSEUDONYM_NAME' %>
</div>
%}
<p>
%= submit_button "$btn", class => ""
</p>
<div class="col-auto">
<%= $pse_datas->{pseudonym} %>
</div>
</div>
%= hidden_field 'trt' => $pse_datas->{trt}
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<%=l 'pse_SELECT_ACCOUNT' %>
</div>
<div class="col-auto">
% param 'Account' => $pse_datas->{account} unless param 'Account';
<%= select_field 'Account' => $c->existing_accounts_list(); %>
</div>
</div>
% if ( $c->is_pseudonym_not_removable( $pse_datas->{pseudonym} ) ) {
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<%= l 'pse_SELECT_INTERNAL' %>
</div>
<div class="col-auto">
% param 'Internal' => $pse_datas->{internal} unless param 'Internal';
<%= select_field 'Internal' => [ [(l 'YES') => 'YES'], [(l 'NO') => 'NO'] ] %>
</div>
</div>
% }
<br><br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
%= hidden_field 'trt' => $pse_datas->{trt}
%= hidden_field 'Pseudonym' => $pse_datas->{pseudonym}
%end
</form>
</div>

View File

@@ -1,84 +1,72 @@
<div>
<p>
% my $modul = $c->render_to_string(inline => $c->l('quo_QUOTA_DESC'));
%= $modul
<h3>
%=l 'quo_CURRENT_USAGE_AND_SETTINGS'
</h3>
% my $modul = $c->render_to_string(inline => $c->l('quo_QUOTA_DESC'));
<%= $modul %>
<h2><%= l 'quo_CURRENT_USAGE_AND_SETTINGS' %></h2>
<br>
% my $numUsers = @$userAccounts;
% if ($numUsers == 0){
%=l 'ACCOUNT_USER_NONE'
% } else {
% my $limit = l('quo_LIMIT_WITH_GRACE_MB'); $limit =~ s#(graceX)#<br>$1#;
% my $absolute = l('quo_ABS_LIMIT_MB'); $absolute =~ s#(limitX)#<br>$1#;
% my $current = l('quo_CURRENT_USAGE'); $current =~ s#(usageX)#<br>$1#;
% my $numUsers = @$userAccounts;
% if ($numUsers == 0){
<%= l 'ACCOUNT_USER_NONE' %>
% } else {
<table class="table table-bordered">
<thead>
<tr>
<th class="">
%=l 'ACCOUNT'
</th>
<th class="">
%=l 'USER_NAME'
</th>
<th class="">
%= $limit
</th>
<th class="">
%= $absolute
</th>
<th class="">
%= $current
</th>
<th class="">
%=l 'ACTION'
</th>
</tr>
</thead>
<tbody>
% my $limit = l('quo_LIMIT_WITH_GRACE_MB'); $limit =~ s#(graceX)#<br>$1#;
% my $absolute = l('quo_ABS_LIMIT_MB'); $absolute =~ s#(limitX)#<br>$1#;
% my $current = l('quo_CURRENT_USAGE'); $current =~ s#(usageX)#<br>$1#;
% foreach my $user (@$userAccounts)
% {
% my $uid = getpwnam($user->key);
% unless ($uid) {
% warn($self->localise('COULD_NOT_GET_UID'),$user->key);
% next;
% }
% my $name = $user->prop("FirstName")." ".$user->prop("LastName");
% my $dev = Quota::getqcarg('/home/e-smith/files');
% my ($bc, $bs, $bh, $bt, $ic, $is, $ih, $it) = Quota::query($dev, $uid);
<tr>
%= t td => (class => "") => $user->key
%= t td => (class => "") => $name
%= t td => (class => "") => sprintf("%.2f", $bs / 1024 )
%= t td => (class => "") => sprintf("%.2f", $bh / 1024 )
%= t td => (class => "") => sprintf("%.2f", $bc / 1024 )
<td class="">
%my $modify_text = l('MODIFY'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $quota_user_name = $user->key; # quotas_entry name extracted from the data structure
%my $actionModify = qq{
% <a href="quotad?CsrfDef=$csrf_token&trt=UPD&user=$quota_user_name">
% <button type='button' class="" title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
<%= $c->render_to_string(inline => $actionModify) %>
</td>
</tr>
% }
</tbody>
<table class="table table-bordered">
<thead>
<tr>
<th class="col-sm"><%= l 'ACCOUNT' %></th>
<th class="col-sm"><%= l 'USER_NAME' %></th>
<th class="col-sm"><%= $limit %></th>
<th class="col-sm"><%= $absolute %></th>
<th class="col-sm"><%= $current %></th>
<th class="col-sm user-valign-center"><%= l 'ACTION' %></th>
</tr>
</thead>
<tbody>
% foreach my $user (@$userAccounts) {
% my $uid = getpwnam($user->key);
% unless ($uid) {
% warn($self->localise('COULD_NOT_GET_UID'),$user->key);
% next;
% }
% my $name = $user->prop("FirstName")." ".$user->prop("LastName");
% my $dev = Quota::getqcarg('/home/e-smith/files');
% my ($bc, $bs, $bh, $bt, $ic, $is, $ih, $it) = Quota::query($dev, $uid);
<tr>
<td><%= $user->key %></td>
<td><%= $name %></td>
<td><%= sprintf("%.2f", $bs / 1024 ) %></td>
<td><%= sprintf("%.2f", $bh / 1024 ) %></td>
<td><%= sprintf("%.2f", $bc / 1024 ) %></td>
% my $modify_text = l('MODIFY'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $quota_user_name = $user->key; # quotas_entry name extracted from the data structure
% my $actionModify = qq{
% <a href="quotad?CsrfDef=$csrf_token&trt=UPD&user=$quota_user_name">
% <button type='button' class="btn btn-primary" title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionModify) %></td>
</tr>
% }
</tbody>
</table>
<%} %>
</p>
%= hidden_field 'trt' => $quo_datas->{trt}
% }
<%= hidden_field 'trt' => $quo_datas->{trt} %>
</div>

Some files were not shown because too many files have changed in this diff Show More