Compare commits

...

5 Commits

Author SHA1 Message Date
33d96940e6 Consistent rendering of certificatelist attributes with certificate attributes
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 28s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m26s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 2m42s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
2025-06-03 23:20:32 +10:00
06b7c204b0 Add more Certificate Serial Number, Subject and Authority Key IDs
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 28s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m39s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 2m55s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
2025-06-03 22:49:04 +10:00
7854cbdabd Cosmetic fixes for search results - fixing overflow affecting the input box 2025-06-03 16:16:33 +10:00
32514c9ab1 Remove the warning about multi-language tags, PLA handles them fine now 2025-06-02 10:39:18 +10:00
db600a28d3 Install amiranagram/localizator into dev setup to identify translatable strings,
Show locale on the debug frame,
Detect the browsers language,
Documentation on translating PLA, and
Some missed translatable strings
2025-06-02 10:39:02 +10:00
24 changed files with 444 additions and 256 deletions

View File

@ -4,6 +4,7 @@ namespace App\Classes\LDAP\Attribute;
use Carbon\Carbon;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use App\Classes\LDAP\Attribute;
use App\Traits\MD5Updates;
@ -17,6 +18,15 @@ final class Certificate extends Attribute
private array $_object = [];
public function authority_key_identifier(int $key=0): string
{
$data = collect(explode("\n",$this->cert_info('extensions.authorityKeyIdentifier',$key)));
return $data
->filter(fn($item)=>Str::startsWith($item,'keyid:'))
->map(fn($item)=>Str::after($item,'keyid:'))
->first();
}
public function certificate(int $key=0): string
{
return sprintf("-----BEGIN CERTIFICATE-----\n%s\n-----END CERTIFICATE-----",
@ -29,19 +39,23 @@ final class Certificate extends Attribute
if (! array_key_exists($key,$this->_object))
$this->_object[$key] = openssl_x509_parse(openssl_x509_read($this->certificate($key)));
return Arr::get($this->_object[$key],$index);
}
public function expires($key=0): Carbon
public function expires(int $key=0): Carbon
{
return Carbon::createFromTimestampUTC($this->cert_info('validTo_time_t',$key));
}
public function subject($key=0): string
public function subject(int $key=0): string
{
$subject = collect($this->cert_info('subject',$key))->reverse();
return $subject->map(fn($item,$key)=>sprintf("%s=%s",$key,$item))->join(',');
}
public function subject_key_identifier(int $key=0): string
{
return $this->cert_info('extensions.subjectKeyIdentifier',$key);
}
}

View File

@ -0,0 +1,44 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
class AcceptLanguage
{
public function handle(Request $request,Closure $next): mixed
{
if ($locale=$this->parseHttpLocale($request)) {
Log::debug(sprintf('Accept Language changed from [%s] to [%s] from Browser (%s)',app()->getLocale(),$locale,$request->header('Accept-Language')));
app()->setLocale($locale);
}
return $next($request);
}
private function parseHttpLocale(Request $request): string
{
$list = explode(',',$request->server('HTTP_ACCEPT_LANGUAGE',''));
$locales = Collection::make($list)
->map(function ($locale) {
$parts = explode(';',$locale);
$mapping = [];
$mapping['locale'] = trim($parts[0]);
$mapping['factor'] = isset($parts[1])
? Arr::get(explode('=',$parts[1]),1)
: 1;
return $mapping;
})
->sortByDesc(fn($locale)=>$locale['factor']);
return Arr::get($locales->first(),'locale');
}
}

View File

@ -4,7 +4,7 @@ use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use App\Http\Middleware\{AllowAnonymous,ApplicationSession,CheckUpdate,SwapinAuthUser,ViewVariables};
use App\Http\Middleware\{AcceptLanguage,AllowAnonymous,ApplicationSession,CheckUpdate,SwapinAuthUser,ViewVariables};
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
@ -17,6 +17,7 @@ return Application::configure(basePath: dirname(__DIR__))
group: 'web',
middleware: [
ApplicationSession::class,
AcceptLanguage::class,
AllowAnonymous::class,
SwapinAuthUser::class,
ViewVariables::class,

View File

@ -15,6 +15,7 @@
"laravel/ui": "^4.5"
},
"require-dev": {
"amirami/localizator": "^0.14@dev",
"barryvdh/laravel-debugbar": "^3.6",
"fakerphp/faker": "^1.23",
"mockery/mockery": "^1.6",

84
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "fe524438312a0b5d565ad83c191eac6a",
"content-hash": "baf49824fa0f2a2a61b7915204b18d2c",
"packages": [
{
"name": "brick/math",
@ -5848,6 +5848,84 @@
}
],
"packages-dev": [
{
"name": "amirami/localizator",
"version": "v0.14.0-alpha",
"source": {
"type": "git",
"url": "https://github.com/amiranagram/localizator.git",
"reference": "30aae5e51d3aaa95105e3834d481b8c37efaab40"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/amiranagram/localizator/zipball/30aae5e51d3aaa95105e3834d481b8c37efaab40",
"reference": "30aae5e51d3aaa95105e3834d481b8c37efaab40",
"shasum": ""
},
"require": {
"ext-json": "*",
"illuminate/config": "^8.0|^9.0|^10.0|^11.0|^12.0",
"illuminate/console": "^8.0|^9.0|^10.0|^11.0|^12.0",
"illuminate/filesystem": "^8.0|^9.0|^10.0|^11.0|^12.0",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0",
"php": "^7.2.5|^8.0",
"symfony/finder": "^5.1|^6.0|^7.0"
},
"require-dev": {
"mockery/mockery": "^1.3.3",
"orchestra/testbench": "^6.6|^7.0|^8.0|^9.0|^10.0",
"phpunit/phpunit": "^9.5|^10.0|^11.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Amirami\\Localizator\\ServiceProvider"
]
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Amirami\\Localizator\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Amir Rami",
"email": "me@amirrami.com",
"homepage": "https://amirrami.com",
"role": "Developer"
}
],
"description": "Localizator is a small tool for Laravel that gives you the ability to extract untranslated strings from project files. It works using the artisan command line and the provided localize command.",
"homepage": "https://github.com/amiranagram/localizator",
"support": {
"issues": "https://github.com/amiranagram/localizator/issues",
"source": "https://github.com/amiranagram/localizator/tree/v0.14.0-alpha"
},
"funding": [
{
"url": "https://m.do.co/c/f38828dd20f8",
"type": "custom"
},
{
"url": "https://www.buymeacoffee.com/amirami/",
"type": "custom"
},
{
"url": "https://github.com/amiranagram",
"type": "github"
}
],
"time": "2025-03-06T12:49:02+00:00"
},
{
"name": "barryvdh/laravel-debugbar",
"version": "v3.15.4",
@ -8461,7 +8539,9 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {},
"stability-flags": {
"amirami/localizator": 20
},
"prefer-stable": true,
"prefer-lowest": false,
"platform": {

59
config/localizator.php Normal file
View File

@ -0,0 +1,59 @@
<?php
return [
/**
* Localize types of translation strings.
*/
'localize' => [
/**
* Short keys. This is the default for Laravel.
* They are stored in PHP files inside folders name by their locale code.
* Laravel comes with default: auth.php, pagination.php, passwords.php and validation.php
*/
'default' => true,
/**
* Translations strings as key.
* They are stored in JSON file for each locale.
*/
'json' => true,
],
/**
* Search criteria for files.
*/
'search' => [
/**
* Directories which should be looked inside.
*/
'dirs' => ['app','resources/views'],
/**
* Subdirectories which will be excluded.
* The values must be relative to the included directory paths.
*/
'exclude' => [
//
],
/**
* Patterns by which files should be queried.
* The values can be a regular expression, glob, or just a string.
*/
'patterns' => ['*.php'],
/**
* Functions that the strings will be extracted from.
* Add here any custom defined functions.
* NOTE: The translation string should always be the first argument.
*/
'functions' => ['__', 'trans', '@lang']
],
/**
* Should the localize command sort extracted strings alphabetically?
*/
'sort' => true,
];

View File

@ -262,4 +262,10 @@ select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__
/* limit selection to inside the modal */
body.modal-open {
user-select: none;
}
/* Fix our search results, implementing a scroll bar */
#search_results ul.typeahead.dropdown-menu {
overflow-y: scroll;
max-height: 300px;
}

View File

@ -1,6 +1,45 @@
This directory contains language translation files for PLA.
This directory contains language translation files for PLA. PLA should automatically detect your language based on your
browser configuration, and if the language is not available it will fall back to the language used internally (English).
Language files named by 2 letter iso language name (suffixed with .json)
represent the translations for that language.
Language files are named by 2 letter iso language name (suffixed with .json) represent the translations for that
language.
Where a language is spoken in multiple countries, but has local country differences (eg: `en-US` vs `en-GB`,
or `zh-CN` vs `zh-TW`), then the language filename is suffixed with `-` and a two letter country, eg:
eg: en.json
* `en.json` for English (General),
* `en-GB.json` for English (Great Britain),
* `zh-CN.json` for Chinese (China),
* `zh-TW.json` for Chinese (Taiwan), etc
The language file `zz.json` is an example language file, with each translated string prefixed with the letter "Z". Its
used to identify any default language text (in english) that is not in a translated configuration. Text strings enclosed
in `@lang()`, or `__()` functions are translatable to other languages.
If you want to update the language text for your language, then:
* If your language file **exists** (eg: `fr.json` for French), then:
* Identify the missing tags (compare it to `zz.json`),
* Insert the missing tags into the language file (eg: `fr.json` for French) - ensure you keep the file in English
Alphabetical order.
* If your language file **doesnt** exist (eg; `fr.json` for French), then
* Copy the default language file `zz.json` to `fr.json`
* Translate the strings
The structure of the json files is:
```json
{
"Untranslated string1": "Translated string1",
"Untranslated string2": "Translated string2"
}
```
Some important notes:
* `Untranslated string` is the string as it appears in PLA, wrapped in either a `__()` or `@lang()` function, normally and english phrase
* `Translated string` is the translation for your language
* Each translated string must be comma terminated *EXCEPT* the last string
Please submit a pull request with your translations, so that others users can benefit from the translation.
If you find any strings that you are not translatable, or translated incorrectly, please submit a bug report.

View File

@ -1,10 +0,0 @@
{
"Email": "DEV:Email",
"Home": "DEV:Home",
"Password": "DEV:Password",
"Please enter your email": "DEV:Please enter your email",
"Please enter your password": "DEV:Please enter your password",
"Server Info": "DEV:Server Info",
"Server Name": "DEV:Server Name",
"Sign in to <strong>:server</strong>": "DEV:Sign in to <strong>:server</strong>"
}

View File

@ -1,19 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => 'These credentials do not match our records.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];

View File

@ -1,19 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; Previous',
'next' => 'Next &raquo;',
];

View File

@ -1,22 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
'reset' => 'Your password has been reset!',
'sent' => 'We have emailed your password reset link!',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that email address.",
];

View File

@ -1,151 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => 'The :attribute must be accepted.',
'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.',
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
'alpha' => 'The :attribute may only contain letters.',
'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'The :attribute may only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
'before' => 'The :attribute must be a date before :date.',
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
'between' => [
'numeric' => 'The :attribute must be between :min and :max.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
'string' => 'The :attribute must be between :min and :max characters.',
'array' => 'The :attribute must have between :min and :max items.',
],
'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.',
'date' => 'The :attribute is not a valid date.',
'date_equals' => 'The :attribute must be a date equal to :date.',
'date_format' => 'The :attribute does not match the format :format.',
'different' => 'The :attribute and :other must be different.',
'digits' => 'The :attribute must be :digits digits.',
'digits_between' => 'The :attribute must be between :min and :max digits.',
'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'email' => 'The :attribute must be a valid email address.',
'ends_with' => 'The :attribute must end with one of the following: :values.',
'exists' => 'The selected :attribute is invalid.',
'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field must have a value.',
'gt' => [
'numeric' => 'The :attribute must be greater than :value.',
'file' => 'The :attribute must be greater than :value kilobytes.',
'string' => 'The :attribute must be greater than :value characters.',
'array' => 'The :attribute must have more than :value items.',
],
'gte' => [
'numeric' => 'The :attribute must be greater than or equal :value.',
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
'string' => 'The :attribute must be greater than or equal :value characters.',
'array' => 'The :attribute must have :value items or more.',
],
'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field does not exist in :other.',
'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.',
'ipv4' => 'The :attribute must be a valid IPv4 address.',
'ipv6' => 'The :attribute must be a valid IPv6 address.',
'json' => 'The :attribute must be a valid JSON string.',
'lt' => [
'numeric' => 'The :attribute must be less than :value.',
'file' => 'The :attribute must be less than :value kilobytes.',
'string' => 'The :attribute must be less than :value characters.',
'array' => 'The :attribute must have less than :value items.',
],
'lte' => [
'numeric' => 'The :attribute must be less than or equal :value.',
'file' => 'The :attribute must be less than or equal :value kilobytes.',
'string' => 'The :attribute must be less than or equal :value characters.',
'array' => 'The :attribute must not have more than :value items.',
],
'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
'file' => 'The :attribute may not be greater than :max kilobytes.',
'string' => 'The :attribute may not be greater than :max characters.',
'array' => 'The :attribute may not have more than :max items.',
],
'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [
'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.',
],
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute format is invalid.',
'numeric' => 'The :attribute must be a number.',
'password' => 'The password is incorrect.',
'present' => 'The :attribute field must be present.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute and :other must match.',
'size' => [
'numeric' => 'The :attribute must be :size.',
'file' => 'The :attribute must be :size kilobytes.',
'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.',
],
'starts_with' => 'The :attribute must start with one of the following: :values.',
'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid zone.',
'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
'url' => 'The :attribute format is invalid.',
'uuid' => 'The :attribute must be a valid UUID.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap our attribute placeholder
| with something more reader friendly such as "E-Mail Address" instead
| of "email". This simply helps us make our message more expressive.
|
*/
'attributes' => [],
];

143
resources/lang/zz.json Normal file
View File

@ -0,0 +1,143 @@
{
"(no description)": "Z(no description)",
"(none)": "Z(none)",
"(not applicable)": "Z(not applicable)",
"(not specified)": "Z(not specified)",
"(unknown syntax)": "Z(unknown syntax)",
"Add New Attribute": "ZAdd New Attribute",
"Add Objectclass": "ZAdd Objectclass",
"Add Value": "ZAdd Value",
"Aliases": "ZAliases",
"Attributes": "ZAttributes",
"attributes(s)": "Zattributes(s)",
"Attribute Types": "ZAttribute Types",
"Authority Key Identifier": "ZAuthority Key Identifier",
"Certificate Subject": "ZCertificate Subject",
"Check": "ZCheck",
"Check Password": "ZCheck Password",
"Close": "ZClose",
"Collective": "ZCollective",
"Copy\/Move": "ZCopy\/Move",
"Create Child Entry": "ZCreate Child Entry",
"Created": "ZCreated",
"Create Entry": "ZCreate Entry",
"Create New Entry": "ZCreate New Entry",
"Create new LDAP item here": "ZCreate new LDAP item here",
"Delete": "ZDelete",
"Deleted": "ZDeleted",
"Delete Entry": "ZDelete Entry",
"Deleting this DN will permanently delete it from your LDAP server.": "ZDeleting this DN will permanently delete it from your LDAP server.",
"Description": "ZDescription",
"DN": "ZDN",
"Download": "ZDownload",
"Do you want to make the following changes?": "ZDo you want to make the following changes?",
"dynamic": "Zdynamic",
"Edit Entry": "ZEdit Entry",
"Entry": "ZEntry",
"Entry updated": "ZEntry updated",
"Equality": "ZEquality",
"Error": "ZError",
"Expired": "ZExpired",
"Expires": "ZExpires",
"Export": "ZExport",
"Exported by": "ZExported by",
"Force as MAY by config": "ZForce as MAY by config",
"Generated by": "ZGenerated by",
"Home": "ZHome",
"Ignoring blank value": "ZIgnoring blank value",
"Import Result": "ZImport Result",
"Inherits from": "ZInherits from",
"Internal": "ZInternal",
"Invalid Password": "ZInvalid Password",
"KRB_DISALLOW_ALL_TIX": "ZKRB_DISALLOW_ALL_TIX",
"KRB_DISALLOW_DUP_SKEY": "ZKRB_DISALLOW_DUP_SKEY",
"KRB_DISALLOW_FORWARDABLE": "ZKRB_DISALLOW_FORWARDABLE",
"KRB_DISALLOW_POSTDATED": "ZKRB_DISALLOW_POSTDATED",
"KRB_DISALLOW_PROXIABLE": "ZKRB_DISALLOW_PROXIABLE",
"KRB_DISALLOW_RENEWABLE": "ZKRB_DISALLOW_RENEWABLE",
"KRB_DISALLOW_SVR": "ZKRB_DISALLOW_SVR",
"KRB_DISALLOW_TGT_BASED": "ZKRB_DISALLOW_TGT_BASED",
"KRB_PWCHANGE_SERVICE": "ZKRB_PWCHANGE_SERVICE",
"KRB_REQUIRES_HW_AUTH": "ZKRB_REQUIRES_HW_AUTH",
"KRB_REQUIRES_PRE_AUTH": "ZKRB_REQUIRES_PRE_AUTH",
"KRB_REQUIRES_PWCHANGE": "ZKRB_REQUIRES_PWCHANGE",
"LDAP Authentication Error": "ZLDAP Authentication Error",
"LDAP Entry": "ZLDAP Entry",
"LDAP Server Error Code": "ZLDAP Server Error Code",
"LDAP Server Unavailable": "ZLDAP Server Unavailable",
"LDIF": "ZLDIF",
"LDIF Import": "ZLDIF Import",
"LDIF Import Result": "ZLDIF Import Result",
"Line": "ZLine",
"locale": "ZZ",
"Matching Rules": "ZMatching Rules",
"Maximum file size": "ZMaximum file size",
"Maximum Length": "ZMaximum Length",
"NEW": "ZNEW",
"New Value": "ZNew Value",
"Next": "ZNext",
"No attributes changed": "ZNo attributes changed",
"No description available, can you help with one?": "ZNo description available, can you help with one?",
"No Server Name Yet": "ZNo Server Name Yet",
"NOT DEFINED": "ZNOT DEFINED",
"Not Implemented": "ZNot Implemented",
"Object Classes": "ZObject Classes",
"Object Identifier": "ZObject Identifier",
"Obsolete": "ZObsolete",
"Optional Attributes": "ZOptional Attributes",
"Ordering": "ZOrdering",
"Or upload LDIF file": "ZOr upload LDIF file",
"Parent to": "ZParent to",
"Paste in your LDIF here": "ZPaste in your LDIF here",
"Possible Causes": "ZPossible Causes",
"Process": "ZProcess",
"rdn": "Zrdn",
"RDN is required": "ZRDN is required",
"RDN is required.": "ZRDN is required.",
"RDN value is required.": "ZRDN value is required.",
"Rename": "ZRename",
"Replace": "ZReplace",
"required": "Zrequired",
"Required Attribute by ObjectClass(es)": "ZRequired Attribute by ObjectClass(es)",
"Required Attributes": "ZRequired Attributes",
"Required by ObjectClasses": "ZRequired by ObjectClasses",
"Reset": "ZReset",
"Result": "ZResult",
"Schema Information": "ZSchema Information",
"Search Filter": "ZSearch Filter",
"Search Scope": "ZSearch Scope",
"Select a Structural ObjectClass...": "ZSelect a Structural ObjectClass...",
"Select attribute...": "ZSelect attribute...",
"Select from": "ZSelect from",
"Serial Number": "ZSerial Number",
"Server": "ZServer",
"Server Info": "ZServer Info",
"Single Valued": "ZSingle Valued",
"Step": "ZStep",
"structural": "Zstructural",
"Subject Key Identifier": "ZSubject Key Identifier",
"Substring Rule": "ZSubstring Rule",
"Syntax": "ZSyntax",
"Syntaxes": "ZSyntaxes",
"These are dynamic values present as a result of another attribute": "ZThese are dynamic values present as a result of another attribute",
"This attribute is required for the RDN": "ZThis attribute is required for the RDN",
"To Server": "ZTo Server",
"Total Entries": "ZTotal Entries",
"Type": "ZType",
"Unknown": "ZUnknown",
"Untrapped Error": "ZUntrapped Error",
"Update": "ZUpdate",
"Updated": "ZUpdated",
"Upload JpegPhoto": "ZUpload JpegPhoto",
"Usage": "ZUsage",
"Used by Attributes": "ZUsed by Attributes",
"Used by ObjectClasses": "ZUsed by ObjectClasses",
"User Modification": "ZUser Modification",
"Validation Errors": "ZValidation Errors",
"Version": "ZVersion",
"WARNING": "ZWARNING",
"Your DNS server cannot resolve that hostname": "ZYour DNS server cannot resolve that hostname",
"Your LDAP server hostname is incorrect": "ZYour LDAP server hostname is incorrect",
"Your LDAP server is not connectable": "ZYour LDAP server is not connectable",
"Your Resolver is not pointing to your DNS server": "ZYour Resolver is not pointing to your DNS server"
}

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html translate="no">
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" translate="no">
@section('htmlheader')
@include('architect::layouts.partials.htmlheader')
@show

View File

@ -38,7 +38,7 @@
<span></span>
<div id="searching" class="d-none"><i class="fas fa-fw fa-spinner fa-pulse text-light"></i></div>
</button>
<div id="search_results" class="overflow-scroll" style="height: 300px;"></div>
<div id="search_results"></div>
</div>
<button class="btn-close"></button>
</div>
@ -164,13 +164,6 @@
</div>
@section('page-scripts')
<style>
#search_results ul.typeahead.dropdown-menu {
overflow: scroll;
max-height: 300px;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('button[id^="link-"]').on('click',function(item) {

View File

@ -3,7 +3,7 @@
<!-- $o=Certificate::class -->
<x-attribute.layout :edit="$edit" :new="$new" :o="$o">
@foreach($o->tagValuesOld('binary') as $key => $value)
<!-- If this attribute is not handle, it'll be an Attribute::class, we'll just render it normally -->
<!-- If this attribute is not handled, it'll be an Attribute::class, we'll just render it normally -->
@if(($o instanceof Certificate) && $edit)
<input type="hidden" name="name={{ $o->name_lc }}[binary][]" value="{{ md5($value) }}">
@ -16,9 +16,29 @@
@endif
</div>
</div>
<div class="input-helper">
@lang('Certificate Subject'): <strong>{{ $o->subject($loop->index) }}</strong><br/>
{{ ($expire=$o->expires($loop->index))->isPast() ? __('Expired') : __('Expires') }}: <strong>{{ $expire->format(config('pla.datetime_format','Y-m-d H:i:s')) }}</strong>
<div class="input-helper small">
<table class="table table-borderless w-75">
<tr >
<td class="p-0">@lang('Certificate Subject')</td>
<th class="p-0">{{ $o->subject($loop->index) }}</th>
</tr>
<tr>
<td class="p-0">{{ ($expire=$o->expires($loop->index))->isPast() ? __('Expired') : __('Expires') }}</td>
<th class="p-0">{{ $expire->format(config('pla.datetime_format','Y-m-d H:i:s')) }}</th>
</tr>
<tr>
<td class="p-0">@lang('Serial Number')</td>
<th class="p-0">{{ $o->cert_info('serialNumberHex',$loop->index) }}</th>
</tr>
<tr>
<td class="p-0">@lang('Subject Key Identifier')</td>
<th class="p-0">{{ $o->subject_key_identifier($loop->index) }}</th>
</tr>
<tr>
<td class="p-0">@lang('Authority Key Identifier')</td>
<th class="p-0">{{ $o->authority_key_identifier($loop->index) }}</th>
</tr>
</table>
</div>
@else

View File

@ -1,7 +1,14 @@
<!-- $o=CertificateList::class -->
<x-attribute.layout :edit="$edit" :new="$new" :o="$o">
@foreach($o->tagValuesOld('binary') as $key => $value)
<!-- If this attribute is not handle, it'll be an Attribute::class, we'll just render it normally -->
<span class="form-control mb-1"><pre class="m-0">{{ $o->render_item_old('binary.'.$key) }}</pre></span>
<div class="input-group has-validation mb-3">
<textarea class="form-control mb-1 font-size-md font-monospace overflow-hidden" rows="{{ count(explode("\n",$x=$o->render_item_old('binary.'.$key))) }}" disabled>{{ $x }}</textarea>
<div class="invalid-feedback pb-2">
@if($e=$errors->get($o->name_lc.'.binary.'.$loop->index))
{{ join('|',$e) }}
@endif
</div>
</div>
@endforeach
</x-attribute.layout>

View File

@ -44,6 +44,12 @@
<td>Root URL</td>
<td>{{ request()->root() }}</td>
</tr>
<!-- Locale -->
<tr>
<td>Locale</td>
<td>{{ __('locale') }} [{{ config('app.locale') }}]</td>
</tr>
</tbody>
</table>
</div>

View File

@ -8,13 +8,13 @@
<div class="d-none round" id="newattr-select">
<div class="row">
<div class="col-12 bg-dark text-light p-2 rounded-2">
<i class="fas fa-plus-circle"></i> Add New Attribute
<i class="fas fa-plus-circle"></i> @lang('Add New Attribute')
</div>
</div>
<div class="row">
<div class="col-12 pt-2">
<x-form.select id="newattr" label="Select from..." :options="$o->getMissingAttributes()->sortBy('name')->unique('name')->map(fn($item)=>['id'=>$item->name,'value'=>$item->name])"/>
<x-form.select id="newattr" :label="__('Select from').'...'" :options="$o->getMissingAttributes()->sortBy('name')->unique('name')->map(fn($item)=>['id'=>$item->name,'value'=>$item->name])"/>
</div>
</div>
</div>

View File

@ -62,7 +62,7 @@
<div class="row d-none pt-3">
<div class="col-12 {{ $step > 1 ? 'offset-sm-2' : '' }} col-lg-10">
<x-form.reset form="dn-create"/>
<x-form.submit action="Next" form="dn-create"/>
<x-form.submit :action="__('Next')" form="dn-create"/>
</div>
</div>
</div>

View File

@ -50,10 +50,6 @@
<div class="alert alert-danger p-2">
This entry has [<strong>{!! $x->flatten()->join('</strong>, <strong>') !!}</strong>] tags used by [<strong>{!! $x->keys()->join('</strong>, <strong>') !!}</strong>] that cant be managed by PLA. You can though manage those tags with an LDIF import.
</div>
@elseif(($x=$o->getLangMultiTags())->count())
<div class="alert alert-danger p-2">
This entry has multi-language tags used by [<strong>{!! $x->keys()->join('</strong>, <strong>') !!}</strong>] that cant be managed by PLA. You can though manage those lang tags with an LDIF import.
</div>
@endif
<x-note/>
@ -124,7 +120,7 @@
<div class="row d-none pt-3">
<div class="col-12 offset-sm-2 col-sm-4 col-lg-2">
<x-form.reset form="dn-edit"/>
<x-form.submit action="Update" form="dn-edit"/>
<x-form.submit :action="__('Update')" form="dn-edit"/>
</div>
</div>
</div>

View File

@ -56,7 +56,7 @@
<div class="card-footer">
<span class="ms-auto">
<x-form.submit action="Process" form="import-form"/>
<x-form.submit :action="__('Process')" form="import-form"/>
</span>
</div>
</div>

View File

@ -64,7 +64,7 @@
<div class="row p-3">
<div class="col-12 offset-sm-2 col-sm-4 col-lg-2 mx-auto">
<x-form.cancel/>
<x-form.submit action="Update" form="dn-update"/>
<x-form.submit :action="__('Update')" form="dn-update"/>
</div>
</div>