Repository: LycheeOrg/Lychee (language: php)

Issue:
Not possible to change licence in Lychee 4.8.1
### Detailed description of the problem [REQUIRED]
For me changing licence in Lychee 4.8.1 doesn't work, because pressing the button doesn't do anything.

### Steps to reproduce the issue
1. Go to any photo album
2. Click on the pen icon next to licence
3. Nothing happens

**Screenshots**
![image](https://github.com/LycheeOrg/Lychee/assets/7679721/5b2c8186-ae2d-4a0b-8cac-b37ba920845f)

### Output of the diagnostics  [REQUIRED]
Nothing relevant visible there.

```
    Diagnostics
    -------
    Warning: Dropbox import not working. dropbox_key is empty.
    Warning: Pictures that are rotated lose their metadata! Please install Imagick to avoid that.
    Info: Latest version of PHP is 8.2
    Warning: Default timezone not properly set; you might experience strange results when importing photos without explicit EXIF timezone
```

### Browser and system
Edge/Windows 11


Discussion / hints:
Confirmed issue in the front-end:
```
Uncaught TypeError: Cannot set properties of undefined (setting 'textContent')
    at Object.initSetAlbumLicenseDialog [as readyCB] (frontend.js:2173:133)
    at Object.t [as show] (frontend.js:21:7700)
    at album.setLicense (frontend.js:2173:481)
    at HTMLDivElement.<anonymous> (frontend.js:4167:1161)
    at HTMLDivElement.dispatch (frontend.js:2:43336)
    at y.handle (frontend.js:2:41320)
```
i created a pull request on [Lychee-front](https://github.com/LycheeOrg/Lychee-front) for this with a pull request #401

Fix patch:
diff --git a/public/Lychee-front b/public/Lychee-front
index 8add9f3c607..5207d16086b 160000
--- a/public/Lychee-front
+++ b/public/Lychee-front
@@ -1,1 +1,1 @@
-Subproject commit 8add9f3c6076e02b5eecba64ff5b402fd8373f18
+Subproject commit 5207d16086b970b1f806fb7426da3686ddbdce53
diff --git a/public/dist/frontend.js b/public/dist/frontend.js
index 919904caf23..bbfe9d53596 100644
--- a/public/dist/frontend.js
+++ b/public/dist/frontend.js
@@ -2170,7 +2170,7 @@ albumIDs.forEach(function(id){var a=albums.getByID(id);if(a)a.title=newTitle;vie
 	 * @param {ModalDialogFormElements} formElements
 	 * @param {HTMLDivElement} dialog
 	 * @returns {void}
-	 */var initSetAlbumLicenseDialog=function initSetAlbumLicenseDialog(formElements,dialog){formElements.license.labels[0].textContent=lychee.locale["ALBUM_LICENSE"];formElements.license.item(0).textContent=lychee.locale["ALBUM_LICENSE_NONE"];formElements.license.item(1).textContent=lychee.locale["ALBUM_RESERVED"];formElements.license.value=album.json.license===""?"none":album.json.license;dialog.querySelector("p a").textContent=lychee.locale["ALBUM_LICENSE_HELP"];};basicModal.show({body:setAlbumLicenseDialogBody,readyCB:initSetAlbumLicenseDialog,buttons:{action:{title:lychee.locale["ALBUM_SET_LICENSE"],fn:action},cancel:{title:lychee.locale["CANCEL"],fn:basicModal.close}}});};/**
+	 */var initSetAlbumLicenseDialog=function initSetAlbumLicenseDialog(formElements,dialog){dialog.querySelector("label").textContent=lychee.locale["ALBUM_LICENSE"];formElements.license.item(0).textContent=lychee.locale["ALBUM_LICENSE_NONE"];formElements.license.item(1).textContent=lychee.locale["ALBUM_RESERVED"];formElements.license.value=album.json.license===""?"none":album.json.license;dialog.querySelector("p a").textContent=lychee.locale["ALBUM_LICENSE_HELP"];};basicModal.show({body:setAlbumLicenseDialogBody,readyCB:initSetAlbumLicenseDialog,buttons:{action:{title:lychee.locale["ALBUM_SET_LICENSE"],fn:action},cancel:{title:lychee.locale["CANCEL"],fn:basicModal.close}}});};/**
  * @param {string} albumID
  * @returns {void}
  */album.setSorting=function(albumID){/** @param {{sorting_col: string, sorting_order: string}} data */var action=function action(data){basicModal.close();api.post("Album::setSorting",{albumID:albumID,sorting_column:data.sorting_col,sorting_order:data.sorting_order},function(){if(visible.album()){album.reload();}});};var setAlbumSortingDialogBody="\n\t\t<form>\n\t\t\t<div class=\"input-group compact\">\n\t\t\t\t<label for=\"sorting_dialog_column_select\"></label>\n\t\t\t\t<div class=\"select\"><select name=\"sorting_col\" id=\"sorting_dialog_column_select\">\n\t\t\t\t\t<option value=''>&mdash;</option>\n\t\t\t\t\t<option value='created_at'/>\n\t\t\t\t\t<option value='taken_at'/>\n\t\t\t\t\t<option value='title'/>\n\t\t\t\t\t<option value='description'/>\n\t\t\t\t\t<option value='is_public'/>\n\t\t\t\t\t<option value='is_starred'/>\n\t\t\t\t\t<option value='type'/>\n\t\t\t\t</select></div>\n\t\t\t</div>\n\t\t\t<div class=\"input-group compact\">\n\t\t\t\t<label for=\"sorting_dialog_order_select\"></label>\n\t\t\t\t<div class=\"select\"><select name=\"sorting_order\" id=\"sorting_dialog_order_select\">\n\t\t\t\t\t<option value=''>&mdash;</option>\n\t\t\t\t\t<option value='ASC'/>\n\t\t\t\t\t<option value='DESC'/>\n\t\t\t\t</select></div>\n\t\t\t</div>\n\t\t</form>";/**
@@ -3122,7 +3122,7 @@ tbPublicSearch.placeholder=lychee.locale["SEARCH"];}tbPublic.querySelector("a.bu
 tbAlbumsSearch.placeholder=lychee.locale["SEARCH"];}tbAlbums.querySelector("a.button--map-albums").title=lychee.locale["DISPLAY_FULL_MAP"];tbAlbums.querySelector("a.button_add").title=lychee.locale["ADD"];var tbAlbum=document.querySelector("div#lychee_toolbar_album");tbAlbum.querySelector("a#button_back_home").title=lychee.locale["CLOSE_ALBUM"];tbAlbum.querySelector("a#button_visibility_album").title=lychee.locale["VISIBILITY_ALBUM"];tbAlbum.querySelector("a#button_sharing_album_users").title=lychee.locale["SHARING_ALBUM_USERS"];tbAlbum.querySelector("a#button_nsfw_album").title=lychee.locale["ALBUM_MARK_NSFW"];tbAlbum.querySelector("a#button_share_album").title=lychee.locale["SHARE_ALBUM"];tbAlbum.querySelector("a#button_archive").title=lychee.locale["DOWNLOAD_ALBUM"];tbAlbum.querySelector("a#button_info_album").title=lychee.locale["ABOUT_ALBUM"];tbAlbum.querySelector("a#button_map_album").title=lychee.locale["DISPLAY_FULL_MAP"];tbAlbum.querySelector("a#button_move_album").title=lychee.locale["MOVE_ALBUM"];tbAlbum.querySelector("a#button_trash_album").title=lychee.locale["DELETE_ALBUM"];tbAlbum.querySelector("a#button_fs_album_enter").title=lychee.locale["FULLSCREEN_ENTER"];tbAlbum.querySelector("a#button_fs_album_exit").title=lychee.locale["FULLSCREEN_EXIT"];tbAlbum.querySelector("a.button_add").title=lychee.locale["ADD"];var tbPhoto=document.querySelector("div#lychee_toolbar_photo");tbPhoto.querySelector("a#button_back").title=lychee.locale["CLOSE_PHOTO"];tbPhoto.querySelector("a#button_star").title=lychee.locale["STAR_PHOTO"];tbPhoto.querySelector("a#button_visibility").title=lychee.locale["VISIBILITY_PHOTO"];tbPhoto.querySelector("a#button_rotate_ccwise").title=lychee.locale["PHOTO_EDIT_ROTATECCWISE"];tbPhoto.querySelector("a#button_rotate_cwise").title=lychee.locale["PHOTO_EDIT_ROTATECWISE"];tbPhoto.querySelector("a#button_share").title=lychee.locale["SHARE_PHOTO"];tbPhoto.querySelector("a#button_info").title=lychee.locale["ABOUT_PHOTO"];tbPhoto.querySelector("a#button_map").title=lychee.locale["DISPLAY_FULL_MAP"];tbPhoto.querySelector("a#button_move").title=lychee.locale["MOVE"];tbPhoto.querySelector("a#button_trash").title=lychee.locale["DELETE"];tbPhoto.querySelector("a#button_fs_enter").title=lychee.locale["FULLSCREEN_ENTER"];tbPhoto.querySelector("a#button_fs_exit").title=lychee.locale["FULLSCREEN_EXIT"];tbPhoto.querySelector("a#button_more").title=lychee.locale["MORE"];var tbMap=document.querySelector("div#lychee_toolbar_map");tbMap.querySelector("a#button_back_map").title=lychee.locale["CLOSE_MAP"];var tbConfig=document.querySelector("div#lychee_toolbar_config");tbConfig.querySelector("a#button_close_config").title=lychee.locale["CLOSE"];// Sidebar
 document.querySelector("#lychee_sidebar_header h1").textContent=lychee.locale["PHOTO_ABOUT"];// NSFW Warning Banner
 /** @type {HTMLDivElement} */var nsfwBanner=document.querySelector("#sensitive_warning");nsfwBanner.innerHTML=lychee.nsfw_banner_override?lychee.nsfw_banner_override:lychee.locale["NSFW_BANNER"];// Footer
-var footer=document.querySelector("#lychee_footer");footer.querySelector("p.home_copyright").textContent=lychee.footer_show_copyright?sprintf(lychee.locale["FOOTER_COPYRIGHT"],lychee.site_owner,lychee.site_copyright_begin===lychee.site_copyright_end?lychee.site_copyright_begin:lychee.site_copyright_begin+"–"+lychee.site_copyright_end):"";footer.querySelector("p.personal_text").textContent=lychee.footer_additional_text;footer.querySelector("p.hosted_by a").textContent=lychee.locale["HOSTED_WITH_LYCHEE"];/** @type {HTMLDivElement} */var footerSocialMedia=footer.querySelector("div#home_socials");if(lychee.footer_show_social_media){footerSocialMedia.style.display=null;footerSocialMedia.querySelector("a#facebook").href=lychee.sm_facebook_url;footerSocialMedia.querySelector("a#flickr").href=lychee.sm_flickr_url;footerSocialMedia.querySelector("a#instagram").href=lychee.sm_instagram_url;footerSocialMedia.querySelector("a#twitter").href=lychee.sm_twitter_url;footerSocialMedia.querySelector("a#youtube").href=lychee.sm_youtube_url;}else{footerSocialMedia.style.display="none";}};/**
+var footer=document.querySelector("#lychee_footer");footer.querySelector("p.home_copyright").textContent=lychee.footer_show_copyright?sprintf(lychee.locale["FOOTER_COPYRIGHT"],lychee.site_owner,lychee.site_copyright_begin===lychee.site_copyright_end?lychee.site_copyright_begin:lychee.site_copyright_begin+"–"+lychee.site_copyright_end):"";footer.querySelector("p.personal_text").innerHTML=lychee.footer_additional_text;footer.querySelector("p.hosted_by a").textContent=lychee.locale["HOSTED_WITH_LYCHEE"];/** @type {HTMLDivElement} */var footerSocialMedia=footer.querySelector("div#home_socials");if(lychee.footer_show_social_media){footerSocialMedia.style.display=null;footerSocialMedia.querySelector("a#facebook").href=lychee.sm_facebook_url;footerSocialMedia.querySelector("a#flickr").href=lychee.sm_flickr_url;footerSocialMedia.querySelector("a#instagram").href=lychee.sm_instagram_url;footerSocialMedia.querySelector("a#twitter").href=lychee.sm_twitter_url;footerSocialMedia.querySelector("a#youtube").href=lychee.sm_youtube_url;}else{footerSocialMedia.style.display="none";}};/**
  * Parses the configuration settings which are always available.
  *
  * TODO: If configuration management is re-factored on the backend, remember to use proper types in the first place
@@ -3906,7 +3906,7 @@ _photo3.json.license=data.license;view.photo.license();});};var setPhotoLicenseD
 	 * @param {ModalDialogFormElements} formElements
 	 * @param {HTMLDivElement} dialog
 	 * @returns {void}
-	 */var initSetPhotoLicenseDialog=function initSetPhotoLicenseDialog(formElements,dialog){formElements.license.labels[0].textContent=lychee.locale["PHOTO_LICENSE"];formElements.license.item(0).textContent=lychee.locale["PHOTO_LICENSE_NONE"];formElements.license.item(1).textContent=lychee.locale["PHOTO_RESERVED"];formElements.license.value=_photo3.json.license===""?"none":_photo3.json.license;dialog.querySelector("p a").textContent=lychee.locale["PHOTO_LICENSE_HELP"];};basicModal.show({body:setPhotoLicenseDialogBody,readyCB:initSetPhotoLicenseDialog,buttons:{action:{title:lychee.locale["PHOTO_SET_LICENSE"],fn:action},cancel:{title:lychee.locale["CANCEL"],fn:basicModal.close}}});};/**
+	 */var initSetPhotoLicenseDialog=function initSetPhotoLicenseDialog(formElements,dialog){dialog.querySelector("label").textContent=lychee.locale["PHOTO_LICENSE"];formElements.license.item(0).textContent=lychee.locale["PHOTO_LICENSE_NONE"];formElements.license.item(1).textContent=lychee.locale["PHOTO_RESERVED"];formElements.license.value=_photo3.json.license===""?"none":_photo3.json.license;dialog.querySelector("p a").textContent=lychee.locale["PHOTO_LICENSE_HELP"];};basicModal.show({body:setPhotoLicenseDialogBody,readyCB:initSetPhotoLicenseDialog,buttons:{action:{title:lychee.locale["PHOTO_SET_LICENSE"],fn:action},cancel:{title:lychee.locale["CANCEL"],fn:basicModal.close}}});};/**
  * @param {string[]} photoIDs
  * @param {?string} [kind=null] - the type of size variant; one out of
  *                                `"ORIGINAL"`, `"MEDIUM2X"`, `"MEDIUM"`,
@@ -4132,8 +4132,7 @@ if(e.which!==13)return;var saveSettingsConfirmationDialogBody=// TODO: move the
 	 * @param {ModalDialogFormElements} formElements
 	 * @param {HTMLDivElement} dialog
 	 * @returns {void}
-	 */var initTokenDialog=function initTokenDialog(formElements,dialog){resetTokenButton=dialog.querySelector("a#button_reset_token");resetTokenButton.title=lychee.locale["RESET"];copyTokenButton=dialog.querySelector("a#button_copy_token");copyTokenButton.title=lychee.locale["URL_COPY_TO_CLIPBOARD"];disableTokenButton=dialog.querySelector("a#button_disable_token");disableTokenButton.title=lychee.locale["DISABLE_TOKEN_TOOLTIP"];tokenInputElement=formElements.token;tokenInputElement.placeholder=lychee.locale["TOKEN_WAIT"];// console.log(tokenInputElement)
-tokenInputElement.labels.textContent="Token";tokenInputElement.blur();updateTokenDialog();lychee.addClickOrTouchListener(copyTokenButton,onCopyToken);lychee.addClickOrTouchListener(resetTokenButton,onResetToken);lychee.addClickOrTouchListener(disableTokenButton,onDisableToken);};basicModal.show({body:bodyHtml,readyCB:initTokenDialog,buttons:{cancel:{title:lychee.locale["CLOSE"],fn:basicModal.close}}});};var sharing={/** @type {?SharingInfo} */json:null};/**
+	 */var initTokenDialog=function initTokenDialog(formElements,dialog){resetTokenButton=dialog.querySelector("a#button_reset_token");resetTokenButton.title=lychee.locale["RESET"];copyTokenButton=dialog.querySelector("a#button_copy_token");copyTokenButton.title=lychee.locale["URL_COPY_TO_CLIPBOARD"];disableTokenButton=dialog.querySelector("a#button_disable_token");disableTokenButton.title=lychee.locale["DISABLE_TOKEN_TOOLTIP"];tokenInputElement=formElements.token;tokenInputElement.placeholder=lychee.locale["TOKEN_WAIT"];dialog.querySelector("label").textContent="Token";tokenInputElement.blur();updateTokenDialog();lychee.addClickOrTouchListener(copyTokenButton,onCopyToken);lychee.addClickOrTouchListener(resetTokenButton,onResetToken);lychee.addClickOrTouchListener(disableTokenButton,onDisableToken);};basicModal.show({body:bodyHtml,readyCB:initTokenDialog,buttons:{cancel:{title:lychee.locale["CLOSE"],fn:basicModal.close}}});};var sharing={/** @type {?SharingInfo} */json:null};/**
  * @returns {void}
  */sharing.add=function(){var params={/** @type {string[]} */albumIDs:[],/** @type {number[]} */userIDs:[]};$("#albums_list_to option").each(function(){params.albumIDs.push(this.value);});$("#user_list_to option").each(function(){params.userIDs.push(Number.parseInt(this.value,10));});if(params.albumIDs.length===0){loadingBar.show("error",lychee.locale["ERROR_SELECT_ALBUM"]);return;}if(params.userIDs.length===0){loadingBar.show("error",lychee.locale["ERROR_SELECT_USER"]);return;}api.post("Sharing::add",params,function(){loadingBar.show("success",lychee.locale["SHARING_SUCCESS"]);sharing.list();// reload user list
 });};/**


Test patch: