Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add autofocus on edit (for HumHub 1.17) #139

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
1.5.6 (Unreleased)
-------------------------
- Fix #135: Fix gallery comment URL from notifications
- Fix: Add autofocus on edit (for HumHub 1.17 - see https://github.com/humhub/humhub/issues/7136)

1.5.5 (December 22, 2023)
-------------------------
Expand Down
6 changes: 4 additions & 2 deletions views/custom-gallery/modal_gallery_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
use humhub\modules\ui\form\widgets\SortOrderField;
use humhub\widgets\ModalButton;
use humhub\widgets\ModalDialog;
use yii\bootstrap\ActiveForm; ?>
use yii\bootstrap\ActiveForm;

?>

<?php

Expand All @@ -39,7 +41,7 @@
<?php $form = ActiveForm::begin(['id' => 'Gallery', 'class' => 'form-horizontal']); ?>

<div class="modal-body">
<?= $form->field($gallery, 'title' )->label(Yii::t('GalleryModule.base', 'Title')); ?>
<?= $form->field($gallery, 'title' )->textInput(['autofocus' => ''])->label(Yii::t('GalleryModule.base', 'Title')); ?>
<?= $form->field($gallery, 'description' )->textArea()->label(Yii::t('GalleryModule.base', 'Description')); ?>
<?php if (!$sortByCreated): ?>
<?= $form->field($gallery, 'sort_order')->widget(SortOrderField::class, []); ?>
Expand Down
Loading