Add option to use a specific string in the URL to bypass disabled signup page

회원 가입을 닫아놓은 상태에서는 관리자도 회원 가입 기능을 테스트할 수 없는
문제를 해소하기 위해, 관리자가 설정한 특정한 문자열을 URL에 포함할 경우
회원 가입 페이지에 접근할 수 있도록 허용하는 옵션 추가
This commit is contained in:
Kijin Sung 2022-10-11 22:19:32 +09:00
parent 24f49d441e
commit 81882e8420
7 changed files with 56 additions and 6 deletions

View file

@ -9,7 +9,10 @@
<div class="x_control-label">{$lang->enable_join}</div>
<div class="x_controls">
<label class="x_inline" for="enable_join_yes"><input type="radio" name="enable_join" id="enable_join_yes" value="Y" checked="checked"|cond="$config->enable_join == 'Y'" /> {$lang->cmd_yes}</label>
<label class="x_inline" for="enable_join_no"><input type="radio" name="enable_join" id="enable_join_no" value="N" checked="checked"|cond="$config->enable_join != 'Y'" /> {$lang->cmd_no}</label>
<label class="x_inline" for="enable_join_no"><input type="radio" name="enable_join" id="enable_join_no" value="N" checked="checked"|cond="$config->enable_join != 'Y' && empty($config->enable_join_key)" /> {$lang->cmd_no}</label>
<label class="x_inline" for="enable_join_only_with_key"><input type="radio" name="enable_join" id="enable_join_only_with_key" value="KEY" checked="checked"|cond="$config->enable_join != 'Y' && !empty($config->enable_join_key)" /> {$lang->enable_join_only_with_url_key}</label>
<input type="text" name="enable_join_key" id="enable_join_key" value="{$config->enable_join_key ?? ''}" placeholder="{$lang->enable_join_url_key}" style="display:none"|cond="empty($config->enable_join_key)" />
<p class="x_help-block">{$lang->about_enable_join}</p>
</div>
</div>
<div class="x_control-group">

View file

@ -1,4 +1,13 @@
jQuery(function($){
$('input[name=enable_join]').on('change', function() {
if ($('#enable_join_only_with_key').is(':checked')) {
$('#enable_join_key').show();
} else {
$('#enable_join_key').hide();
}
});
$('.__sync').click(function (){
exec_xml(
'importer', // module