Add explicit `type` to `<button>`
authorAlexander Ebert <ebert@woltlab.com>
Wed, 14 Sep 2022 15:19:54 +0000 (17:19 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 14 Sep 2022 15:19:54 +0000 (17:19 +0200)
files/js/WoltLabSuite/Core/Conversation/Ui/Subject/Editor.js
templates/conversation.tpl
templates/conversationAdd.tpl
templates/conversationAddParticipants.tpl
templates/conversationLabelAssignment.tpl
templates/conversationLabelManagement.tpl
templates/conversationLeave.tpl
templates/conversationList.tpl
templates/conversationMessageInlineEditor.tpl
templates/conversationMessageList.tpl
ts/WoltLabSuite/Core/Conversation/Ui/Subject/Editor.ts

index bd0e5f79be527084bcb378d03c04bac3ddef7d10..98e598287bb39f97ac54aa0074ae098d44bd37a4 100644 (file)
@@ -83,7 +83,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ui/Dialog", "WoltLabSu
           </dd>
         </dl>
         <div class="formSubmit">
-          <button class="buttonPrimary jsButtonSave">${Language.get("wcf.global.button.save")}</button>
+          <button type="button" class="button buttonPrimary jsButtonSave">${Language.get("wcf.global.button.save")}</button>
         </div>
       `,
             };
index d476cd7bf64b542d916800b20ad57d98c07497fc..c9adba3662b02c8a1ac9ecc725170f0fd8c08798 100644 (file)
@@ -50,7 +50,7 @@
                                        {content}
                                                {if $conversation->canReply()}
                                                        <li class="jsOnly">
-                                                               <button class="button buttonPrimary jsQuickReply">
+                                                               <button type="button" class="button buttonPrimary jsQuickReply">
                                                                        {icon name='reply'}
                                                                        <span>{lang}wcf.conversation.message.button.add{/lang}</span>
                                                                </button>
@@ -76,7 +76,7 @@
                                <span>{lang}wcf.global.button.edit{/lang}</span>
                        </a>
                {else}
-                       <button class="button small jsConversationInlineEditor">
+                       <button type="button" class="button small jsConversationInlineEditor">
                                {icon name='pencil'}
                                <span>{lang}wcf.global.button.edit{/lang}</span>
                        </button>
                                                                {if $participant->isInvisible}<small>({lang}wcf.conversation.invisible{/lang})</small>{/if}
                                                                {if $participant->userID && ($conversation->userID == $__wcf->getUser()->userID) && ($participant->userID != $__wcf->getUser()->userID) && $participant->hideConversation != 2 && $participant->leftAt == 0}
                                                                        <button
+                                                                               type="button"
                                                                                class="jsObjectAction jsTooltip jsOnly"
                                                                                data-object-action="removeParticipant"
                                                                                title="{lang}wcf.conversation.participants.removeParticipant{/lang}"
index 052d5719baa6fdf06bd3f148c63d5df19cdc5339..175eb430475822d1516fd1fc7b71ef7f13cdec94 100644 (file)
        
        <div class="formSubmit">
                <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
-               <button name="draft" accesskey="d" value="1">{lang}wcf.conversation.button.saveAsDraft{/lang}</button>
+               <button type="submit" class="button" name="draft" accesskey="d" value="1">{lang}wcf.conversation.button.saveAsDraft{/lang}</button>
                {include file='messageFormPreviewButton' previewMessageObjectType='com.woltlab.wcf.conversation.message' previewMessageObjectID=0}
                {csrfToken}
        </div>
index cca3719d6b4714d91067145c1afc840cf49db3b8..fecdd1ad8c25fe2e7ec576a8e11fe39c4b0e476c 100644 (file)
@@ -22,5 +22,5 @@
 {/if}
 
 <div class="formSubmit">
-       <button id="addParticipants" class="buttonPrimary">{lang}wcf.global.button.submit{/lang}</button>
+       <button type="button" id="addParticipants" class="button buttonPrimary">{lang}wcf.global.button.submit{/lang}</button>
 </div>
\ No newline at end of file
index 92c637d292ecc174818fbfa5d9be162904dce4e6..180675e38fc6af55e30ffd089ed54214e1b736fd 100644 (file)
@@ -10,5 +10,5 @@
 </ul>
 
 <div class="formSubmit">
-       <button class="buttonPrimary" id="assignLabels">{lang}wcf.global.button.save{/lang}</button>
+       <button type="button" class="button buttonPrimary" id="assignLabels">{lang}wcf.global.button.save{/lang}</button>
 </div>
index b915eef36eb7ca15cb3efbfa25b585d71a54a81c..c7a837edda8bd37451e14607f9b05877fb74f9be 100644 (file)
@@ -36,8 +36,8 @@
        </dl>
        
        <div class="formSubmit">
-               <button id="addLabel" class="buttonPrimary">{lang}wcf.global.button.save{/lang}</button>
-               <button id="editLabel" style="display: none;" class="buttonPrimary">{lang}wcf.global.button.save{/lang}</button>
-               <button id="deleteLabel" style="display: none;">{lang}wcf.conversation.label.management.deleteLabel{/lang}</button>
+               <button type="button" id="addLabel" class="button buttonPrimary">{lang}wcf.global.button.save{/lang}</button>
+               <button type="button" id="editLabel" class="button" style="display: none;" class="buttonPrimary">{lang}wcf.global.button.save{/lang}</button>
+               <button type="button" id="deleteLabel" class="button" style="display: none;">{lang}wcf.conversation.label.management.deleteLabel{/lang}</button>
        </div>
 </section>
\ No newline at end of file
index 7350529203dc69c23003946bc58ce3bfc75fd891..177fb93f6c3bb06f5ef4c9c75169c4bd7f7643b5 100644 (file)
@@ -16,5 +16,5 @@
 </dl>
 
 <div class="formSubmit">
-       <button id="hideConversation" class="buttonPrimary">{lang}wcf.global.button.submit{/lang}</button>
+       <button type="button" id="hideConversation" class="button buttonPrimary">{lang}wcf.global.button.submit{/lang}</button>
 </div>
index 50631791477bea8b9abd0e1d7be067e9001383eb..a3a116ee5bd5ce2b1af4b043a188f9ed0ee3f141 100644 (file)
                </div>
                
                <div class="boxContent">
-                       <button id="manageLabel">{lang}wcf.conversation.label.management{/lang}</button>
+                       <button type="button" id="manageLabel" class="button">{lang}wcf.conversation.label.management{/lang}</button>
                </div>
        </section>
        
 {/capture}
 
 {capture assign='contentInteractionButtons'}
-       <button class="markAllAsReadButton contentInteractionButton button small jsOnly">
+       <button type="button" class="markAllAsReadButton contentInteractionButton button small jsOnly">
                {icon name='check'}
                <span>{lang}wcf.global.button.markAllAsRead{/lang}</span>
        </button>
index 6eee8d52157740dc0c89479932819c2b47081982..cffb0e92cfbaf9fc46d5764f2653ae47a7301f5a 100644 (file)
@@ -8,11 +8,11 @@
        {include file='messageFormTabsInline' inConversationInlineEdit=true wysiwygContainerID=$wysiwygContainerID}
        
        <div class="formSubmit">
-               <button class="buttonPrimary" data-type="save">{lang}wcf.global.button.save{/lang}</button>
+               <button type="button" class="button buttonPrimary" data-type="save">{lang}wcf.global.button.save{/lang}</button>
                
                {include file='messageFormPreviewButton' previewMessageFieldID=$wysiwygSelector previewButtonID=$wysiwygSelector|concat:'_PreviewButton' previewMessageObjectType='com.woltlab.wcf.conversation.message' previewMessageObjectID=$message->messageID}
                
-               <button data-type="cancel">{lang}wcf.global.button.cancel{/lang}</button>
+               <button type="button" class="button" data-type="cancel">{lang}wcf.global.button.cancel{/lang}</button>
        </div>
        
        {include file='wysiwyg' wysiwygEnableUpload=true}
index 5c6ce33be36b06bc1111bc47a06c412c00e8648e..6f51a9f11192d54d421937751bdd06d940f31490 100644 (file)
@@ -97,7 +97,7 @@
                                                        </li>
                                                        {if $message->userID != $__wcf->getUser()->userID && $__wcf->session->getPermission('user.profile.canReportContent')}
                                                                <li class="jsReportConversationMessage jsOnly" data-object-id="{@$message->messageID}">
-                                                                       <button title="{lang}wcf.moderation.report.reportContent{/lang}" class="button jsTooltip">
+                                                                       <button type="button" title="{lang}wcf.moderation.report.reportContent{/lang}" class="button jsTooltip">
                                                                                {icon name='triangle-exclamation'}
                                                                                <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span>
                                                                        </button>
index 08cf8531f0f8b1556ccd687158133546f4483484..c1c69fe51a0d49d334044e1672bb45c3c1630e4c 100644 (file)
@@ -114,7 +114,9 @@ class UiSubjectEditor implements AjaxCallbackObject, DialogCallbackObject {
           </dd>
         </dl>
         <div class="formSubmit">
-          <button class="buttonPrimary jsButtonSave">${Language.get("wcf.global.button.save")}</button>
+          <button type="button" class="button buttonPrimary jsButtonSave">${Language.get(
+            "wcf.global.button.save",
+          )}</button>
         </div>
       `,
     };