Autofocus on first input of add field form

This commit is contained in:
2025-04-21 22:23:33 -07:00
parent 236997cbc2
commit cc0daa1dfe

View File

@@ -787,6 +787,20 @@ if ($action == 'tbl_create.php') {
</fieldset>
<div id="properties_message"></div>
</form>
<?php
if ($action == 'tbl_addfield.php') {
?>
<script type="text/javascript">
// <![CDATA[
document.forms
.<?php echo ($action == 'tbl_create.php' ? 'create_table_form' : 'append_fields_form'); ?>
.querySelector('input[name="field_name[0]"]')
.focus();
// ]]>
</script>
<?php
} // end if ($action == 'tbl_addfield.php')
?>
<div id="enum_editor">
<a class="close_enum_editor"><?php echo __('Close'); ?></a>