mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
Finish new organization members and invitation page
This commit is contained in:
parent
36b4c57ff1
commit
78add502d7
5 changed files with 44 additions and 8 deletions
|
@ -20,7 +20,7 @@ github.com/macaron-contrib/cache =
|
|||
github.com/macaron-contrib/captcha =
|
||||
github.com/macaron-contrib/csrf =
|
||||
github.com/macaron-contrib/i18n =
|
||||
github.com/macaron-contrib/session =
|
||||
github.com/macaron-contrib/session =
|
||||
github.com/macaron-contrib/toolbox =
|
||||
github.com/nfnt/resize =
|
||||
|
||||
|
|
|
@ -1823,8 +1823,12 @@ textarea#issue-add-content {
|
|||
.invite-box {
|
||||
padding: 50px 0;
|
||||
min-height: 130px;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
width: 50%;
|
||||
}
|
||||
.invite-box input {
|
||||
width: 250px;
|
||||
width: 300px;
|
||||
}
|
||||
#org-member-list-block {
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
|
|
@ -329,6 +329,28 @@ function initOrgSetting() {
|
|||
});
|
||||
}
|
||||
|
||||
function initInvite() {
|
||||
// Invitation.
|
||||
var $ul = $('#org-member-invite-list');
|
||||
$('#org-member-invite').on('keyup', function () {
|
||||
var $this = $(this);
|
||||
if (!$this.val()) {
|
||||
$ul.toggleHide();
|
||||
return;
|
||||
}
|
||||
Gogs.searchUsers($this.val(), $ul);
|
||||
}).on('focus', function () {
|
||||
if (!$(this).val()) {
|
||||
$ul.toggleHide();
|
||||
} else {
|
||||
$ul.toggleShow();
|
||||
}
|
||||
}).next().next().find('ul').on("click", 'li', function () {
|
||||
$('#org-member-invite').val($(this).text());
|
||||
$ul.toggleHide();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
initCore();
|
||||
if ($('#user-profile-setting').length) {
|
||||
|
@ -343,6 +365,9 @@ $(document).ready(function () {
|
|||
if ($('#org-setting').length) {
|
||||
initOrgSetting();
|
||||
}
|
||||
if ($('#invite-box').length) {
|
||||
initInvite();
|
||||
}
|
||||
|
||||
Tabs('#dashboard-sidebar-menu');
|
||||
|
||||
|
|
|
@ -150,8 +150,12 @@
|
|||
.invite-box {
|
||||
padding: 50px 0;
|
||||
min-height: 130px;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
width: 50%;
|
||||
input {
|
||||
width: 250px;
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
#org-member-list-block {
|
||||
padding-top: 2px;
|
||||
}
|
|
@ -2,13 +2,16 @@
|
|||
{{template "ng/base/header" .}}
|
||||
{{template "org/header" .}}
|
||||
<div class="container">
|
||||
<div class="invite-box">
|
||||
<div class="invite-box" id="invite-box">
|
||||
{{template "ng/base/alert" .}}
|
||||
<h3>{{.i18n.Tr "org.members.invite_desc" .Org.FullName}}</h3>
|
||||
<form action="{{.OrgLink}}/invitations/new" method="post">
|
||||
<form id="invite-member-form" action="{{.OrgLink}}/invitations/new" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input class="ipt ipt-large ipt-radius" name="uname" required>
|
||||
<input class="ipt ipt-large ipt-radius" id="org-member-invite" name="uname" autocomplete="off" required>
|
||||
<button class="btn btn-blue btn-large btn-radius">{{.i18n.Tr "org.members.invite_now"}}</button>
|
||||
<div id="org-member-list-block">
|
||||
<ul class="menu-down-show menu-vertical menu-radius switching-list user-list" id="org-member-invite-list"></ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue