Skip to content

Commit

Permalink
Merge pull request #11 from lara-zeus/imporve-resourses
Browse files Browse the repository at this point in the history
Imporve resourses
  • Loading branch information
atmonshi authored Aug 22, 2022
2 parents ee441f7 + 680aaa2 commit c200875
Show file tree
Hide file tree
Showing 17 changed files with 222 additions and 141 deletions.
74 changes: 73 additions & 1 deletion resources/lang/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,77 @@
"Question": "السؤال",
"Answer": "الإجابة",
"Clear": "مسح",
"Showing Search result of": "عرض نتائج البحث عن"
"Showing Search result of": "عرض نتائج البحث عن",
"Forms": "النماذج",
"Form": "نموذج",
"Form details": "تفاصيل النموذج",
"Name, slug, and other options": "الاسم، الرابط المختصر، والمزيد",
"Other Form Options": "خيارات متفرقة",
"Form Options": "خيارات النمودج",
"Category": "التصنيف",
"optional, organize your forms into categories": "اختياري، رتب النماذج الخاصة بك في تصنيفات",
"Select Category...": "اختر التصنيف",
"Form Dates": "تواريخ النموذج",
"optional, specify when the form will be active and receiving new entries": "اختياري، ادخل البريد الإلكتروني لارسال التنبيهات عند وجود ادخالات جديدة",
"Start Date": "تاريح البداية",
"End Date": "تاريخ النهاية",
"Emails Notifications": "تنبيهات البريد ال إلكتروني",
"separate emails with a comma": "افصل بين كل بريد واخر بفاصلة",
"optional, enter the emails you want to receive notification when ever you got a new entry": "اختياري، ادخل البريد الإلكتروني لارسال التنبيهات عند وجود ادخالات جديدة",
"emailOne , emailTwo": "emailOne , emailTwo",
"enter webHook URL": "رابط خارجي",
"Send the form data to a webHook.": "ارسال بيانات النموذج إلى رابط خارجي",
"Save": "حفظ",
"Is Active": "مفعل",
"Set Form Texts, like desc and details": "نصوص النموذج كالوصف والتفاصيل",
"Form Texts": "نصوص النموذج",
"Form Description": "وصف النموذج",
"Write a few details about the form.": "اكتب تفاصيل اضافية للنموذج",
"Confirmation Message": "رسالة التأكيد",
"optional, show a massage whenever any one submit a new entery": "اختياري، عرض رسالة بعد ارسال النموذج",
"form activation and access options": "خيارات عرض وتفعيل النموذج",
"Form Settings": "اعدادات النموذج",
"Activate the form": "تفعيل النموذج",
"require Login": "يتطلب تسجيل الدخول",
"User must be logged in or create an account before can submit a new entry": "اجبار المستخدمين على تسجيل الدخول قبل تعبئة النموذج",
"One Entry Per User": "ادخال واحد فقط لكل مستخدم",
"to check if the user already submitted an entry in this form": "يتم منع المستخدمين من اكمال النموذج عدة مرات",
"Sections To Pages": "عرض الاقسام كصفحات",
"instead of showing all section in one page, separate them in multiple pages with next and previous buttons": "عوضا عن عرض كافة الاقسام في صفحة واحدة هذا الخيار يعرض النموذج في صفحات منفضلة مع عرض التالي والسابق",
"Form Name": "عنوان النموذج",
"Form Slug": "الرابط المختصر",
"Form Order": "ترتيب النموذج",
"Ordering": "الترتيب",
"Section Name": "اسم القسم",
"Section Fields": "حقول القسم",
"Field Name": "اسم الحقل",
"Field Type": "نوع الحقل",
"Field Options": "خيارات الحقل",
"Add field": "اضف حقل",
"Add Section": "اضف قسم",
"Text Input": "حقل نصي",
"Select Menu": "قائمة منسدلة",
"File Upload": "رفع ملف",
"Date Time": "وقت وتاريخ",
"Date Type": "نوع التاريخ",
"Data Source": "مصدر الخيارات",
"Sections title": "الأقسام",
"Entries": "الإدخالات",
"view all entries": "عرض كافة الإدخالات",
"Open": "عرض النموذج",
"open form": "عرض النموذج",
"Collection": "قائمة",
"Collections": "قوائم البيانات",
"Response": "ادخال نموذج",
"Responses": "الإدخالات",
"Collections Name": "اسم القائمة",
"Collections Values": "القيم",
"Key": "المفتاح",
"what store in the form": "مايتم تخزينه في النموذج",
"Value": "القيمة",
"what the user will see": "مايتم عرضه للمستخدم",
"selected by default": "محدد بشكل افتراضي",
"Logo": "الصورة",
"Name": "الإسم",
"sections are here to group the fields, and you can display it as pages from the Form options. if you have one section, it wont show in the form": "الاقسام تساعدك على ترتيب الحقول وتجميعها ليسهل على المستخدم تعبئة النموذج، في حالة وجود قسم واحد فقط لن يتم اظهاره في النموذج"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
<div class="flex items-center justify-between">
<div class="flex-1">
<h5 class="text-lg font-bold tracking-tight">
Form details
{{ __('Form details') }}
</h5>

<p class="text-gray-500">
Name, slug, and other options
{{ __('Name, slug, and other options') }}
</p>
</div>
<div class="flex justify-end gap-2" x-data="{ state: $wire.entangle('{{ $getStatePath() }}') }">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
@endif
</div>
@endforeach


@foreach($row->fieldsResponses as $resp)
<div class="py-2">
{{ $resp->field->name }}:<span class="font-semibold">{{ $resp->response ?? ''}}</span>
Expand All @@ -41,7 +39,7 @@
</div>
@empty
<div class="flex justify-center items-center space-x-2">
<x-heroicon-o-inbox class="h-8 w-8 text-gray-400"/>
<x-clarity-data-cluster-line class="h-8 w-8 text-gray-400"/>
<span class="font-medium py-8 text-gray-400 text-xl">No responses found...</span>
</div>
@endforelse
Expand Down
39 changes: 18 additions & 21 deletions resources/views/forms/modals/options.blade.php
Original file line number Diff line number Diff line change
@@ -1,71 +1,68 @@
<x-filament::modal width="4xl">
<x-slot name="trigger">
<button x-on:click="isOpen = true" type="button" data-tippy-content="Other Form Options">
<button x-on:click="isOpen = true" type="button" data-tippy-content="{{ __('Other Form Options') }}">
<x-clarity-cog-line class="h-6 w-6 text-green-600" />
</button>
</x-slot>
<x-slot name="header">
<x-filament::modal.heading>
<p class="text-green-700">
<x-clarity-cog-line class="h-6 w-6 inline" />
Form Options
{{ __('Form Options') }}
</p>
</x-filament::modal.heading>
</x-slot>

<div class="space-y-10">
<x-zeus::input.group for="category_id" inline label="Category">
<x-zeus::input.group for="category_id" inline label="{{ __('Category') }}">
<cite class="text-gray-500 text-xs mb-4 block">
optional,
organize your forms into categories
{{ __('optional, organize your forms into categories') }}
</cite>
<x-zeus::input.select id="category_id" wire:model="data.category_id">
<option value="">Select Category...</option>
<option value="">{{ __('Select Category...') }}</option>
@foreach(\LaraZeus\Bolt\Models\Category::get() as $category)
<option value="{{ $category->id }}">{{ $category->name }}</option>
@endforeach
</x-zeus::input.select>
</x-zeus::input.group>

<div>
<h4 class="block text-base font-medium leading-5 text-green-700">Form Dates</h4>
<h4 class="block text-base font-medium leading-5 text-green-700">{{ __('Form Dates') }}</h4>
<cite class="text-gray-500 text-xs mb-4 block">
optional,
specify when the form will be active and receiving new entries
{{ __('optional, specify when the form will be active and receiving new entries') }}
</cite>
<div class="flex justify-between gap-2">
<div class="w-full">
<x-zeus::input.group inline for="start_date" label="Start Date">
<x-zeus::input.date wire:model="data.start_date" placeholder="Start Date" id="start_date" />
<x-zeus::input.group inline for="start_date" label="{{ __('Start Date') }}">
<x-zeus::input.date wire:model="data.start_date" placeholder="{{ __('Start Date') }}" id="start_date" />
</x-zeus::input.group>
</div>

<div class="w-full">
<x-zeus::input.group inline for="end_date" label="End Date">
<x-zeus::input.date wire:model="data.end_date" placeholder="End Date"/>
<x-zeus::input.group inline for="end_date" label="{{ __('End Date') }}">
<x-zeus::input.date wire:model="data.end_date" placeholder="{{ __('End Date') }}"/>
</x-zeus::input.group>
</div>
</div>
</div>

<x-zeus::input.group inline for="data.options.emailsNotification" label="Emails Notifications" help-text="separate emails with a comma">
<x-zeus::input.group inline for="data.options.emailsNotification" label="{{ __('Emails Notifications') }}" help-text="{{ __('separate emails with a comma') }}">
<x-slot name="cite">
optional,
enter the emails you want to receive notification when ever you got a new entry
{{ __('optional, enter the emails you want to receive notification when ever you got a new entry') }}
</x-slot>
<x-zeus::input.text wire:model="data.options.emailsNotification" placeholder="emailOne , emailTwo"/>
<x-zeus::input.text wire:model="data.options.emailsNotification" placeholder="{{ __('emailOne , emailTwo') }}"/>
</x-zeus::input.group>

<x-zeus::input.group inline for="data.options.webHook" label="Send to a webhook" help-text="enter webHook URL">
<x-zeus::input.group inline for="data.options.webHook" label="Send to a webhook" help-text="{{ __('enter webHook URL') }}">
<x-slot name="cite">
Send the form data to a webHook, <a>read more</a>
{{ __('Send the form data to a webHook.') }}
</x-slot>
<x-zeus::input.text wire:model="data.options.webHook" placeholder=""/>
<x-zeus::input.text wire:model="data.options.webHook" placeholder="https://site/etc"/>
</x-zeus::input.group>
</div>
<x-slot name="footer">
<x-filament::modal.actions>
<x-filament::button x-on:click="isOpen = false">Save</x-filament::button>
<x-filament::button x-on:click="isOpen = false">{{ __('Save') }}</x-filament::button>
</x-filament::modal.actions>
</x-slot>
</x-filament::modal>
18 changes: 9 additions & 9 deletions resources/views/forms/modals/settings.blade.php
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
<x-filament::modal width="4xl">
<x-slot name="trigger">
<button x-on:click="isOpen = true" type="button" data-tippy-content="form activation and access options">
<button x-on:click="isOpen = true" type="button" data-tippy-content="{{ __('form activation and access options') }}">
<x-clarity-slider-line class="h-6 w-6 text-green-600" />
</button>
</x-slot>
<x-slot name="header">
<x-filament::modal.heading>
<p class="text-green-700">
<x-clarity-slider-line class="h-6 w-6 inline" />
Form Settings
{{ __('Form Settings') }}
</p>
</x-filament::modal.heading>
</x-slot>

<div class="space-y-10">
<x-zeus::input.group inline for="data.is_active" label="Activate the form">
<x-zeus::input.group inline for="data.is_active" label="{{ __('Activate the form') }}">
<x-zeus::input.toggle wireTo="data.is_active" />
</x-zeus::input.group>

<x-zeus::input.group inline for="data.options.requireLogin" label="require Login">
<x-zeus::input.group inline for="data.options.requireLogin" label="{{ __('require Login') }}">
<x-slot name="cite">
User must be logged in or create an account before can submit a new entry
{{ __('User must be logged in or create an account before can submit a new entry') }}
</x-slot>
<x-zeus::input.toggle wireTo="data.options.requireLogin" />
</x-zeus::input.group>

<div>
<x-zeus::input.group inline for="data.options.oneEntryPerUser" label="One Entry Per User">
<x-zeus::input.group inline for="data.options.oneEntryPerUser" label="{{ __('One Entry Per User') }}">
<x-slot name="cite">
to check if the user already submitted an entry in this form
</x-slot>
<x-zeus::input.toggle wireTo="data.options.oneEntryPerUser" />
</x-zeus::input.group>
</div>

<x-zeus::input.group inline for="data.options.sectionsToPages" label="sections To Pages">
<x-zeus::input.group inline for="data.options.sectionsToPages" label="{{ __('Sections To Pages') }}">
<x-slot name="cite">
instead of showing all section in one page, separate them in multiple pages with next and previous buttons
{{ __('instead of showing all section in one page, separate them in multiple pages with next and previous buttons') }}
</x-slot>
<x-zeus::input.toggle wireTo="data.options.sectionsToPages" />
</x-zeus::input.group>
</div>

<x-slot name="footer">
<x-filament::modal.actions>
<x-filament::button x-on:click="isOpen = false">Save</x-filament::button>
<x-filament::button x-on:click="isOpen = false">{{ __('Save') }}</x-filament::button>
</x-filament::modal.actions>
</x-slot>
</x-filament::modal>
19 changes: 9 additions & 10 deletions resources/views/forms/modals/texts.blade.php
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
<x-filament::modal width="4xl">
<x-slot name="trigger">
<button x-on:click="isOpen = true" type="button" data-tippy-content="Set Form Texts, like desc and details">
<button x-on:click="isOpen = true" type="button" data-tippy-content="{{ __('Set Form Texts, like desc and details') }}">
<x-clarity-talk-bubbles-line class="h-6 w-6 text-green-600" />
</button>
</x-slot>
<x-slot name="header">
<x-filament::modal.heading>
<p class="text-green-700">
<x-clarity-talk-bubbles-line class="h-6 w-6 inline" />
Form Texts
{{ __('Form Texts') }}
</p>
</x-filament::modal.heading>
</x-slot>

<div class="space-y-10">
<x-zeus::input.group inline for="desc" label="Desc" :error="$errors->first('data.desc')">
<x-zeus::input.textarea wire:model="data.desc" placeholder="Form Desc"/>
<x-zeus::input.group inline for="desc" label="{{ __('Description') }}" :error="$errors->first('data.desc')">
<x-zeus::input.textarea wire:model="data.desc" placeholder="{{ __('Form Description') }}"/>
</x-zeus::input.group>

<x-zeus::input.group inline label="Details" for="data.details" :error="$errors->first('data.details')" help-text="Write a few details about the form.">
<x-zeus::input.group inline label="Details" for="data.details" :error="$errors->first('data.details')" help-text="{{ __('Write a few details about the form.') }}">
<x-zeus::input.rich-text wire:model.lazy="data.details" id="data.details"/>
</x-zeus::input.group>

<x-zeus::input.group inline for="options.confirmationMessage" label="Confirmation Message">
<x-zeus::input.group inline for="options.confirmationMessage" label="{{ __('Confirmation Message') }}">
<x-slot name="cite">
optional,
show a massage whenever any one submit a new entery
{{ __('optional, show a massage whenever any one submit a new entery') }}
</x-slot>
<x-zeus::input.textarea wire:model="data.options.confirmationMessage" placeholder="Confirmation Message"/>
<x-zeus::input.textarea wire:model="data.options.confirmationMessage" placeholder="{{ __('Confirmation Message') }}"/>
</x-zeus::input.group>
</div>

<x-slot name="footer">
<x-filament::modal.actions>
<x-filament::button x-on:click="isOpen = false">Save</x-filament::button>
<x-filament::button x-on:click="isOpen = false">{{ __('Save') }}</x-filament::button>
</x-filament::modal.actions>
</x-slot>
</x-filament::modal>
4 changes: 2 additions & 2 deletions src/Fields/Classes/DateTimePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function __construct()
{
$this->definition = [
'type' => 'DateTimePicker',
'title' => 'Date Time',
'title' => __('Date Time'),
'icon' => 'fa-calendar',
'settings_view' => 'date-time',
'order' => 6,
Expand All @@ -23,7 +23,7 @@ public function __construct()
public static function getOptions()
{
return [
Select::make('options.dateType')->required()->options([
Select::make('options.dateType')->label(__('Date Type'))->required()->options([
'date'=>'date',
'datetime'=>'datetime',
'time'=>'time',
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/Classes/FileUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct()
{
$this->definition = [
'type' => 'FileUpload',
'title' => 'File Upload',
'title' => __('File Upload'),
'icon' => 'fa-cloud-upload',
'settings_view' => 'file-upload',
'order' => 7,
Expand Down
4 changes: 2 additions & 2 deletions src/Fields/Classes/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function __construct()
{
$this->definition = [
'type' => 'Select',
'title' => 'Select Menu',
'title' => __('Select Menu'),
'icon' => 'fa-check',
'settings_view' => 'list-values',
'order' => 3,
Expand All @@ -24,7 +24,7 @@ public function __construct()
public static function getOptions()
{
return [
FilamentSelect::make('options.dataSource')->required()->options(Collection::pluck('name', 'id')),
FilamentSelect::make('options.dataSource')->required()->options(Collection::pluck('name', 'id'))->label(__('Data Source')),
];
}
}
2 changes: 1 addition & 1 deletion src/Fields/Classes/TextInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct()
{
$this->definition = [
'type' => 'TextInput',
'title' => 'Text Input',
'title' => __('Text Input'),
'icon' => 'fa-text-width',
'order' => 1,
];
Expand Down
Loading

0 comments on commit c200875

Please sign in to comment.