mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-13 17:05:50 +01:00
Set tabindex for the comment form.
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
styleClass: String = "",
|
styleClass: String = "",
|
||||||
placeholder: String = "Leave a comment",
|
placeholder: String = "Leave a comment",
|
||||||
elastic: Boolean = false,
|
elastic: Boolean = false,
|
||||||
|
tabIndex: Int = -2,
|
||||||
uid: Long = new java.util.Date().getTime())(implicit context: gitbucket.core.controller.Context)
|
uid: Long = new java.util.Date().getTime())(implicit context: gitbucket.core.controller.Context)
|
||||||
@import context._
|
@import context._
|
||||||
@import gitbucket.core._
|
@import gitbucket.core._
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
<span id="error-content" class="error"></span>
|
<span id="error-content" class="error"></span>
|
||||||
@textarea = {
|
@textarea = {
|
||||||
<textarea id="content@uid" name="content" placeholder="@placeholder"
|
<textarea id="content@uid" name="content" placeholder="@placeholder"
|
||||||
|
@if(tabIndex > -2){ tabindex="@tabIndex"}
|
||||||
@if(style.nonEmpty){ style="@style"}
|
@if(style.nonEmpty){ style="@style"}
|
||||||
@if(styleClass.nonEmpty){ class="@styleClass" }>@content</textarea>
|
@if(styleClass.nonEmpty){ class="@styleClass" }>@content</textarea>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,14 +18,15 @@
|
|||||||
enableTaskList = true,
|
enableTaskList = true,
|
||||||
hasWritePermission = hasWritePermission,
|
hasWritePermission = hasWritePermission,
|
||||||
style = "",
|
style = "",
|
||||||
elastic = true
|
elastic = true,
|
||||||
|
tabIndex = 1
|
||||||
)
|
)
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<input type="hidden" name="issueId" value="@issue.issueId"/>
|
<input type="hidden" name="issueId" value="@issue.issueId"/>
|
||||||
@if((reopenable || !issue.closed) && (hasWritePermission || issue.openedUserName == loginAccount.get.userName)){
|
@if((reopenable || !issue.closed) && (hasWritePermission || issue.openedUserName == loginAccount.get.userName)){
|
||||||
<input type="submit" class="btn" formaction="@url(repository)/issue_comments/state" value="@{if(issue.closed) "Reopen" else "Close"}" id="action"/>
|
<input type="submit" class="btn" tabindex="3" formaction="@url(repository)/issue_comments/state" value="@{if(issue.closed) "Reopen" else "Close"}" id="action"/>
|
||||||
}
|
}
|
||||||
<input type="submit" class="btn btn-success" formaction="@url(repository)/issue_comments/new" value="Comment"/>
|
<input type="submit" class="btn btn-success" tabindex="2" formaction="@url(repository)/issue_comments/new" value="Comment"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user