Skip to content

Commit

Permalink
Fix: Add autofocus on file creation modal box (for HumHub 1.17 - see h…
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-farre committed Jul 29, 2024
1 parent 08888eb commit 5ecc940
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Changelog
- Fix #11: Display confirmation for unsaved changes
- Fix #3: Fix CodeMirror Editor
- Enh #19: Improve extension handling
- Fix: Add autofocus on file creation modal box (for HumHub 1.17 - see https://github.com/humhub/humhub/issues/7136)
10 changes: 5 additions & 5 deletions views/create/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@

<?php ModalDialog::begin(['header' => Yii::t('TextEditorModule.base', '<strong>Create</strong> file')]) ?>

<?php $form = ActiveForm::begin(); ?>
<?php $form = ActiveForm::begin() ?>

<div class="modal-body">
<?= $form->field($model, 'fileName'); ?>
<?= $form->field($model, 'openEditForm')->checkbox(); ?>
<?= $form->field($model, 'fileName')->textInput(['autofocus' => '']) ?>
<?= $form->field($model, 'openEditForm')->checkbox() ?>
</div>

<div class="modal-footer">
<?= Button::save()->action('text_editor.createSubmit')->submit(); ?>
<?= Button::save()->action('text_editor.createSubmit')->submit() ?>
</div>

<?php ActiveForm::end(); ?>

<?php ModalDialog::end(); ?>
<?php ModalDialog::end(); ?>

0 comments on commit 5ecc940

Please sign in to comment.