Compare commits
4 Commits
b613608721
...
291e3ab2da
Author | SHA1 | Date | |
---|---|---|---|
291e3ab2da | |||
b34dad8836 | |||
ef2ea5e266 | |||
91b5b53137 |
@ -383,6 +383,11 @@ class HomeController extends Controller
|
|||||||
: view('frames.'.$key['cmd']))
|
: view('frames.'.$key['cmd']))
|
||||||
->with('bases',$this->bases());
|
->with('bases',$this->bases());
|
||||||
|
|
||||||
|
// If we are rendering a DN, rebuild our object
|
||||||
|
$o = config('server')->fetch($key['dn']);
|
||||||
|
foreach (collect(old())->except(['dn','_token']) as $attr => $value)
|
||||||
|
$o->{$attr} = $value;
|
||||||
|
|
||||||
return match ($key['cmd']) {
|
return match ($key['cmd']) {
|
||||||
'create' => $view
|
'create' => $view
|
||||||
->with('container',old('container',$key['dn']))
|
->with('container',old('container',$key['dn']))
|
||||||
@ -390,7 +395,8 @@ class HomeController extends Controller
|
|||||||
|
|
||||||
'dn' => $view
|
'dn' => $view
|
||||||
->with('dn',$key['dn'])
|
->with('dn',$key['dn'])
|
||||||
->with('page_actions',collect(['edit'=>TRUE,'copy'=>TRUE])),
|
->with('o',$o)
|
||||||
|
->with('page_actions',collect(['edit'=>TRUE])),
|
||||||
|
|
||||||
'import' => $view,
|
'import' => $view,
|
||||||
|
|
||||||
|
@ -94,12 +94,10 @@ class Entry extends Model
|
|||||||
|
|
||||||
$key = $this->normalizeAttributeKey($key);
|
$key = $this->normalizeAttributeKey($key);
|
||||||
|
|
||||||
if ((! $this->objects->get($key)) && $value) {
|
if ((! $this->objects->get($key)) && $value)
|
||||||
$this->objects->put($key,Factory::create($key,$value));
|
$this->objects->put($key,Factory::create($key,[]));
|
||||||
|
|
||||||
} elseif ($this->objects->get($key)) {
|
$this->objects->get($key)->value = $this->attributes[$key];
|
||||||
$this->objects->get($key)->value = $this->attributes[$key];
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -164,7 +162,6 @@ class Entry extends Model
|
|||||||
/**
|
/**
|
||||||
* Convert all our attribute values into an array of Objects
|
* Convert all our attribute values into an array of Objects
|
||||||
*
|
*
|
||||||
* @param array $attributes
|
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
public function getAttributesAsObjects(): Collection
|
public function getAttributesAsObjects(): Collection
|
||||||
|
@ -1 +1 @@
|
|||||||
v2.0.1-rel
|
v2.0.2-dev
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 pt-2">
|
<div class="col-12 pt-2">
|
||||||
<x-form.select id="newattr" label="Select from..." :options="$o->getMissingAttributes()->sortBy('name')->map(fn($item)=>['id'=>$item->name,'value'=>$item->name_lc])"/>
|
<x-form.select id="newattr" label="Select from..." :options="$o->getMissingAttributes()->sortBy('name')->unique('name')->map(fn($item)=>['id'=>$item->name,'value'=>$item->name_lc])"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@extends('layouts.dn')
|
@extends('layouts.dn')
|
||||||
|
|
||||||
@section('page_title')
|
@section('page_title')
|
||||||
@include('fragment.dn.header',['o'=>($o=config('server')->fetch($dn))])
|
@include('fragment.dn.header',['o'=>($o ?? $o=config('server')->fetch($dn))])
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('main-content')
|
@section('main-content')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user