From 1f753c4dc6ace4251b810d53805903944cd9b8e8 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 9 Jan 2024 23:28:17 +1100 Subject: [PATCH] Standardise attribute layout --- .../views/components/attribute.blade.php | 39 +++++------ .../attribute/binary/jpegphoto.blade.php | 64 ++++++++----------- .../components/attribute/layout.blade.php | 10 +++ .../attribute/objectclass.blade.php | 47 ++++++-------- .../components/attribute/password.blade.php | 47 ++++++-------- 5 files changed, 93 insertions(+), 114 deletions(-) create mode 100644 resources/views/components/attribute/layout.blade.php diff --git a/resources/views/components/attribute.blade.php b/resources/views/components/attribute.blade.php index 51bcc59..0aa3945 100644 --- a/resources/views/components/attribute.blade.php +++ b/resources/views/components/attribute.blade.php @@ -1,26 +1,19 @@ -
-
-
-
- @foreach (old($o->name_lc,$new ? [NULL] : $o->values) as $value) - @if ($edit && ! $o->is_rdn) -
- + + @foreach (old($o->name_lc,$new ? [NULL] : $o->values) as $value) + @if ($edit && ! $o->is_rdn) +
+ -
- @if($e) - {{ join('|',$e) }} - @endif -
-
+
+ @if($e) + {{ join('|',$e) }} + @endif +
+
- @else - {{ $value }} - @endif - @endforeach -
- - @include('components.attribute.widget.options') -
-
+ @else + {{ $value }} + @endif + @endforeach + \ No newline at end of file diff --git a/resources/views/components/attribute/binary/jpegphoto.blade.php b/resources/views/components/attribute/binary/jpegphoto.blade.php index 494e9c2..03c7bb0 100644 --- a/resources/views/components/attribute/binary/jpegphoto.blade.php +++ b/resources/views/components/attribute/binary/jpegphoto.blade.php @@ -1,40 +1,30 @@ - -
-
-
-
- - @foreach ($o->values as $value) -
-
- @switch ($x=$f->buffer($value,FILEINFO_MIME_TYPE)) - @case('image/jpeg') - @default - + @endswitch + + @endforeach +
- - get($o->name_lc.'.'.$loop->index))is-invalid @endif /> + + + + @foreach ($o->values as $value) + + @switch ($x=$f->buffer($value,FILEINFO_MIME_TYPE)) + @case('image/jpeg') + @default + - @endswitch - - - @endforeach -
+ + - @if ($edit) -
- - @lang('Delete') + @if ($edit) +
+ + @lang('Delete') -
- @if($e) - {{ join('|',$e) }} - @endif -
- @endif -
- - - - @include('components.attribute.widget.options') - - \ No newline at end of file +
+ @if($e) + {{ join('|',$e) }} + @endif +
+ @endif +
+ \ No newline at end of file diff --git a/resources/views/components/attribute/layout.blade.php b/resources/views/components/attribute/layout.blade.php new file mode 100644 index 0000000..42c8064 --- /dev/null +++ b/resources/views/components/attribute/layout.blade.php @@ -0,0 +1,10 @@ +
+
+
+
+ {{ $slot }} +
+ + +
+
diff --git a/resources/views/components/attribute/objectclass.blade.php b/resources/views/components/attribute/objectclass.blade.php index b7e88db..38b2ef3 100644 --- a/resources/views/components/attribute/objectclass.blade.php +++ b/resources/views/components/attribute/objectclass.blade.php @@ -1,29 +1,22 @@ -
-
-
-
- @foreach (old($o->name_lc,$o->values) as $value) - @if ($edit && ($value === NULL || (! $o->isStructural($value)))) -
- -
- @if($e) - {{ join('|',$e) }} - @endif -
-
- @else - {{ $value }} - @if ($o->isStructural($value)) - - @lang('structural') + + @foreach (old($o->name_lc,$o->values) as $value) + @if ($edit && ($value === NULL || (! $o->isStructural($value)))) +
+ +
+ @if($e) + {{ join('|',$e) }} @endif -
- @endif - @endforeach -
- - @include('components.attribute.widget.options') -
-
\ No newline at end of file +
+
+ @else + {{ $value }} + @if ($o->isStructural($value)) + + @lang('structural') + @endif +
+ @endif + @endforeach + \ No newline at end of file diff --git a/resources/views/components/attribute/password.blade.php b/resources/views/components/attribute/password.blade.php index 8752e7f..7a75d5c 100644 --- a/resources/views/components/attribute/password.blade.php +++ b/resources/views/components/attribute/password.blade.php @@ -1,30 +1,23 @@ - -
-
-
-
- @foreach ($o->values as $value) - @if ($edit) -
- + + + @foreach ($o->values as $value) + @if ($edit) +
+ -
- @if($e) - {{ join('|',$e) }} - @endif -
-
- @else - {{ $value }}
- @endif - @endforeach -
+
+ @if($e) + {{ join('|',$e) }} + @endif +
+
+ @else + {{ $value }}
+ @endif + @endforeach - @include('components.attribute.widget.options') - - - @lang('Check Password') - -
-
+ + @lang('Check Password') + + \ No newline at end of file