From df9507c4a91adea4e516219810843dec07129226 Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 23 Nov 2023 16:37:52 +0800 Subject: [PATCH] - user: remove unused function and code. --- module/user/js/create.ui.js | 25 ------------------------- module/user/ui/create.html.php | 1 - 2 files changed, 26 deletions(-) diff --git a/module/user/js/create.ui.js b/module/user/js/create.ui.js index 45f2b7e152..cc247cfb14 100644 --- a/module/user/js/create.ui.js +++ b/module/user/js/create.ui.js @@ -31,31 +31,6 @@ function changeType(event) $('#commiter').closest('.form-row').toggleClass('hidden', type != 'inside'); } -function changeAddCompany(event) -{ - const checked = $(event.target).prop('checked'); - if(checked) - { - const $inputGroup = $('[name="company"]').closest('.picker-box'); - if($inputGroup.length == 0) return; - $('[name="company"]').zui('picker').destroy(); - $inputGroup.replaceWith(""); - } - else - { - const link = $.createLink('company', 'ajaxGetOutsideCompany'); - $.post(link, function(data) - { - var $companyPicker = $('#company').replaceWith('
'); - if(data) - { - data = JSON.parse(data); - new zui.Picker('#companyPicker', {name: 'company', items: data}); - } - }) - } -} - function clickSubmit() { if(!password1Encrypted || !password2Encrypted) diff --git a/module/user/ui/create.html.php b/module/user/ui/create.html.php index ac24a49a89..75dc3d1307 100644 --- a/module/user/ui/create.html.php +++ b/module/user/ui/create.html.php @@ -17,7 +17,6 @@ formPanel set::id('createUser'), on::change('input[name=type]', 'changeType'), on::change('input[name=role]', 'changeRole'), - on::change('#addCompany', 'changeAddCompany'), on::change('input[name^=visions]', 'changeVision'), on::change('#password1,#password2,#verifyPassword', 'changePassword'), on::click('button[type=submit]', 'clickSubmit'),