Skip to content

Commit

Permalink
Merge pull request #491 from OpenSynergic/fix--error-when-slug-not-fi…
Browse files Browse the repository at this point in the history
…lled-in-static-page-form

fix: error when slog not filled on static page form
  • Loading branch information
rahmanramsi authored Jan 7, 2025
2 parents 79c7912 + a68a7c1 commit 8083e6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Panel/Administration/Resources/StaticPageResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public static function form(Form $form): Form
TextInput::make('slug')
->label(__('general.slug'))
->alphaDash()
->required()
->helperText(__('general.slug_helper'))
->unique(ignoreRecord: true, modifyRuleUsing: function (Unique $rule) {
return $rule
->where('conference_id', app()->getCurrentConference()?->getKey() ?? 0)
Expand Down
1 change: 1 addition & 0 deletions lang/en/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -995,4 +995,5 @@
'submission_setting.hide_from_timeline' => 'Hide from Timeline',
'files' => 'Files',
'mailing_address' => 'Mailing Address',
'slug_helper' => "Enter a unique URL-friendly identifier for this page. Use lowercase letters, numbers, dashes, and underscores only. For example, 'about-us' or 'contact-info'"
];

0 comments on commit 8083e6a

Please sign in to comment.