Compare commits

..

No commits in common. "33c890654fa79a525e95e7a70bdcd437177c5df9" and "9e39e607cf70b4b4e36eab83976cf277cde0fa8c" have entirely different histories.

6 changed files with 21 additions and 31 deletions

View File

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

View File

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

12
public/css/custom.css vendored
View File

@ -16,15 +16,3 @@ div#userPassword .select2-container--bootstrap-5 .select2-selection {
border-bottom-right-radius: unset; border-bottom-right-radius: unset;
border-top-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,8 +297,12 @@ select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__
font-weight: 800; font-weight: 800;
} }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice { div#objectClass .input-group-delete {
padding: 0.25em 0.45em; position: relative;
float: inline-end;
bottom: 30px;
right: 10px;
height: 5px;
} }
.input-group-text { .input-group-text {

View File

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

View File

@ -1,16 +1,12 @@
<span id="objectclass_{{$value}}"> <span id="objectclass_{{$value}}">
<div class="input-group has-validation"> <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 --> <!-- @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','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)> <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)>
@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"> <div class="invalid-feedback pb-2">
@if($e) @if($e)
{{ join('|',$e) }} {{ join('|',$e) }}
@endif @endif
</div> </div>
</div> </div>
<span class="input-group-delete"><i class="fas fa-fw fa-xmark"></i></span>
</span> </span>