forked from gitea/gitea
Finish new organization members and invitation page
This commit is contained in:
parent
36b4c57ff1
commit
78add502d7
|
@ -1823,8 +1823,12 @@ textarea#issue-add-content {
|
||||||
.invite-box {
|
.invite-box {
|
||||||
padding: 50px 0;
|
padding: 50px 0;
|
||||||
min-height: 130px;
|
min-height: 130px;
|
||||||
text-align: center;
|
margin: 0 auto;
|
||||||
|
width: 50%;
|
||||||
}
|
}
|
||||||
.invite-box input {
|
.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 () {
|
$(document).ready(function () {
|
||||||
initCore();
|
initCore();
|
||||||
if ($('#user-profile-setting').length) {
|
if ($('#user-profile-setting').length) {
|
||||||
|
@ -343,6 +365,9 @@ $(document).ready(function () {
|
||||||
if ($('#org-setting').length) {
|
if ($('#org-setting').length) {
|
||||||
initOrgSetting();
|
initOrgSetting();
|
||||||
}
|
}
|
||||||
|
if ($('#invite-box').length) {
|
||||||
|
initInvite();
|
||||||
|
}
|
||||||
|
|
||||||
Tabs('#dashboard-sidebar-menu');
|
Tabs('#dashboard-sidebar-menu');
|
||||||
|
|
||||||
|
|
|
@ -150,8 +150,12 @@
|
||||||
.invite-box {
|
.invite-box {
|
||||||
padding: 50px 0;
|
padding: 50px 0;
|
||||||
min-height: 130px;
|
min-height: 130px;
|
||||||
text-align: center;
|
margin: 0 auto;
|
||||||
|
width: 50%;
|
||||||
input {
|
input {
|
||||||
width: 250px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#org-member-list-block {
|
||||||
|
padding-top: 2px;
|
||||||
|
}
|
|
@ -2,13 +2,16 @@
|
||||||
{{template "ng/base/header" .}}
|
{{template "ng/base/header" .}}
|
||||||
{{template "org/header" .}}
|
{{template "org/header" .}}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="invite-box">
|
<div class="invite-box" id="invite-box">
|
||||||
{{template "ng/base/alert" .}}
|
{{template "ng/base/alert" .}}
|
||||||
<h3>{{.i18n.Tr "org.members.invite_desc" .Org.FullName}}</h3>
|
<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}}
|
{{.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>
|
<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>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue