Compare commits

..

3 Commits

Author SHA1 Message Date
33c890654f Add some debugging
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 26s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m23s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 4m36s
Create Docker Image / Final Docker Image Manifest (push) Successful in 8s
2025-03-03 16:56:29 +11:00
a59bbc8790 Improve rendering of objectclasses in entries 2025-03-03 16:56:29 +11:00
9b3ef7a3ba Revert "Only run CI/CD on master/sandpit"
Trying to leverage tag id during build

This reverts commit 9e39e607cf70b4b4e36eab83976cf277cde0fa8c.
2025-03-03 16:56:29 +11:00
6 changed files with 31 additions and 21 deletions

View File

@ -1,10 +1,6 @@
name: Create Docker Image
run-name: ${{ gitea.actor }} Building Docker Image 🐳
on:
push:
branches:
- master
- sandpit
on: [push]
env:
VERSION: latest
DOCKER_HOST: tcp://127.0.0.1:2375
@ -101,8 +97,10 @@ jobs:
# Start docker
( dockerd --host=tcp://0.0.0.0:2375 --tls=false & ) && sleep 3
## Some debugging info
# docker info && docker version
# env|sort
docker info && docker version
env|sort
echo GITHUB_REF_NAME=${GITHUB_REF_NAME}
echo GITHUB_REF_TYPE=${GITHUB_REF_TYPE}
- name: Registry FQDN Setup
id: registry

View File

@ -15,8 +15,8 @@ use LdapRecord\LdapRecordException;
use LdapRecord\Query\ObjectNotFoundException;
use Nette\NotImplementedException;
use App\Classes\LDAP\Attribute\Factory;
use App\Classes\LDAP\{Attribute,Server};
use App\Classes\LDAP\Attribute\{Factory,Password};
use App\Classes\LDAP\Server;
use App\Classes\LDAP\Import\LDIF as LDIFImport;
use App\Classes\LDAP\Export\LDIF as LDIFExport;
use App\Exceptions\Import\{GeneralException,VersionException};
@ -101,10 +101,10 @@ class HomeController extends Controller
$x = $request->noheader
? (string)view(sprintf('components.attribute.widget.%s',$id))
->with('o',new Attribute($id,[]))
->with('o',Factory::create($id,[]))
->with('value',$request->value)
->with('loop',$xx)
: (new AttributeType(new Attribute($id,[]),TRUE,collect($request->oc ?: [])))->render();
: (new AttributeType(Factory::create($id,[]),TRUE,collect($request->oc ?: [])))->render();
return $x;
}
@ -249,7 +249,7 @@ class HomeController extends Controller
if ($value) {
$type = Arr::get($request->userpassword_hash,$key);
array_push($passwords,Attribute\Password::hash_id($type)->encode($value));
array_push($passwords,Password::hash_id($type)->encode($value));
}
}
$o->userpassword = $passwords;

12
public/css/custom.css vendored
View File

@ -15,4 +15,16 @@ div#userPassword .select2-container--bootstrap-5 .select2-selection {
.input-group:first-child .select2-container--bootstrap-5 .select2-selection {
border-bottom-right-radius: unset;
border-top-right-radius: unset;
}
div#objectClass .input-group-end:not(input.form-control) {
position: absolute;
right: 1em;
top: 0.5em;
z-index: 5;
}
input.form-control.input-group-end {
border-bottom-right-radius: 4px !important;
border-top-right-radius: 4px !important;
}

View File

@ -297,12 +297,8 @@ select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__
font-weight: 800;
}
div#objectClass .input-group-delete {
position: relative;
float: inline-end;
bottom: 30px;
right: 10px;
height: 5px;
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
padding: 0.25em 0.45em;
}
.input-group-text {

View File

@ -1,7 +1,7 @@
<!-- $o=Attribute::class -->
<x-attribute.layout :edit="$edit" :new="$new" :o="$o">
@foreach (old($o->name_lc,$o->values) as $value)
@if ($edit && ($value === NULL || (! $o->isStructural($value))))
@if ($edit)
<x-attribute.widget.objectclass :o="$o" :edit="$edit" :new="$new" :loop="$loop" :value="$value"/>
@else
{{ $value }}

View File

@ -1,12 +1,16 @@
<span id="objectclass_{{$value}}">
<div class="input-group has-validation">
<!-- @todo Have an "x" to remove the entry, we need an event to process the removal, removing any attribute values along the way -->
<input type="text" @class(['form-control','is-invalid'=>($e=$errors->get($o->name_lc.'.'.$loop->index)),'mb-1','border-focus'=>$o->values->contains($value)]) name="{{ $o->name_lc }}[]" value="{{ $value }}" placeholder="{{ Arr::get($o->values,$loop->index,'['.__('NEW').']') }}" @readonly(true)>
<input type="text" @class(['form-control','input-group-end','is-invalid'=>($e=$errors->get($o->name_lc.'.'.$loop->index)),'mb-1','border-focus'=>$o->values->contains($value)]) name="{{ $o->name_lc }}[]" value="{{ $value }}" placeholder="{{ Arr::get($o->values,$loop->index,'['.__('NEW').']') }}" @readonly(true)>
@if ($o->isStructural($value))
<span class="input-group-end text-black-50">structural</span>
@else
<span class="input-group-end"><i class="fas fa-fw fa-xmark"></i></span>
@endif
<div class="invalid-feedback pb-2">
@if($e)
{{ join('|',$e) }}
@endif
</div>
</div>
<span class="input-group-delete"><i class="fas fa-fw fa-xmark"></i></span>
</span>