Continue working on new admin pages
This commit is contained in:
parent
904bf1a50b
commit
d2aff9a46a
27 changed files with 669 additions and 539 deletions
|
@ -1400,31 +1400,37 @@ The register and sign-in page style
|
|||
.setting-content {
|
||||
margin-left: 32px;
|
||||
}
|
||||
#auth-setting-form,
|
||||
#org-setting-form,
|
||||
#repo-setting-form,
|
||||
#user-profile-form {
|
||||
background-color: #FFF;
|
||||
padding: 30px 0;
|
||||
}
|
||||
#auth-setting-form textarea,
|
||||
#org-setting-form textarea,
|
||||
#repo-setting-form textarea,
|
||||
#user-profile-form textarea {
|
||||
margin-left: 4px;
|
||||
height: 100px;
|
||||
}
|
||||
#auth-setting-form label,
|
||||
#org-setting-form label,
|
||||
#repo-setting-form label,
|
||||
#user-profile-form label,
|
||||
#auth-setting-form .form-label,
|
||||
#org-setting-form .form-label,
|
||||
#repo-setting-form .form-label,
|
||||
#user-profile-form .form-label {
|
||||
width: 240px;
|
||||
}
|
||||
#auth-setting-form .ipt,
|
||||
#org-setting-form .ipt,
|
||||
#repo-setting-form .ipt,
|
||||
#user-profile-form .ipt {
|
||||
width: 360px;
|
||||
}
|
||||
#auth-setting-form .field,
|
||||
#org-setting-form .field,
|
||||
#repo-setting-form .field,
|
||||
#user-profile-form .field {
|
||||
|
|
|
@ -429,13 +429,13 @@ function initTeamRepositoriesList() {
|
|||
|
||||
function initAdmin() {
|
||||
// Create account.
|
||||
$('#login-type').on("change",function(){
|
||||
$('#login-type').on("change", function () {
|
||||
var v = $(this).val();
|
||||
if(v.indexOf("0-")+1){
|
||||
if (v.indexOf("0-") + 1) {
|
||||
$('.auth-name').toggleHide();
|
||||
$(".pwd").find("input").attr("required","required")
|
||||
$(".pwd").find("input").attr("required", "required")
|
||||
.end().toggleShow();
|
||||
}else{
|
||||
} else {
|
||||
$(".pwd").find("input").removeAttr("required")
|
||||
.end().toggleHide();
|
||||
$('.auth-name').toggleShow();
|
||||
|
@ -450,6 +450,27 @@ function initAdmin() {
|
|||
var $form = $('user-profile-form');
|
||||
$form.attr('action', $form.data('delete-url'));
|
||||
});
|
||||
// Create authorization.
|
||||
$('#auth-type').on("change", function () {
|
||||
var v = $(this).val();
|
||||
if (v == 2) {
|
||||
$('.ldap').toggleShow();
|
||||
$('.smtp').toggleHide();
|
||||
}
|
||||
if (v == 3) {
|
||||
$('.smtp').toggleShow();
|
||||
$('.ldap').toggleHide();
|
||||
}
|
||||
});
|
||||
// Delete authorization.
|
||||
$('#auth-delete').click(function (e) {
|
||||
if (!confirm('This authorization is going to be deleted, do you want to continue?')) {
|
||||
e.preventDefault();
|
||||
return true;
|
||||
}
|
||||
var $form = $('auth-setting-form');
|
||||
$form.attr('action', $form.data('delete-url'));
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
margin-left: 32px;
|
||||
}
|
||||
|
||||
#auth-setting-form,
|
||||
#org-setting-form,
|
||||
#repo-setting-form,
|
||||
#user-profile-form {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue