Clean up signup form config screen

This commit is contained in:
Kijin Sung 2019-08-04 01:06:05 +09:00
parent 24d516f1bc
commit 4d607290e5
2 changed files with 29 additions and 12 deletions

View file

@ -69,7 +69,7 @@ jQuery(function($){
.find(':radio[value=option]').attr('checked', 'checked')
.end()
.prev('td')
.find(':input[value=Y]').not('[data-donotchange]').removeAttr('disabled').attr('checked', 'checked');
.find(':input[value=Y]').removeAttr('disabled').attr('checked', 'checked');
} else {
$i.parent('td').next('td').next('td')
.find('>._subItem').hide().end()
@ -77,7 +77,7 @@ jQuery(function($){
.next('label').css('fontWeight','normal').end()
.end()
.prev('td')
.find(':input[value=Y]').not('[data-donotchange]').removeAttr('checked').attr('disabled', 'disabled');
.find(':input[value=Y]').removeAttr('checked').attr('disabled', 'disabled');
}
}

View file

@ -96,7 +96,8 @@
</thead>
<tbody class="uDrag">
{@ $disabled_list = array('find_account_question')}
{@ $fixed_public_list = array('nick_name', 'password', 'email_address', 'phone_number')}
{@ $fixed_public_list = array('nick_name')}
{@ $fixed_private_list = array('email_address', 'phone_number', 'password')}
<!--@foreach($config->signupForm as $item)-->
<!--@if(in_array($item->name, $disabled_list))-->
<!--@elseif($item->isDefaultForm)-->
@ -110,16 +111,30 @@
<span class="_title" style="display:inline-block;white-space:pre-line;overflow:inherit;width:120px;text-overflow:ellipsis" title="{$item->title}">{$item->title}</span>
</div>
</th>
<td style="text-align:center"><input type="checkbox" name="usable_list[]" value="{$item->name}" title="{$lang->use}" checked="checked"|cond="$item->isIdentifier || $item->mustRequired || $item->isUse" disabled="disabled"|cond="$item->isIdentifier || $item->mustRequired" /></td>
<td style="text-align:center"><input type="checkbox" name="is_{$item->name}_public" value="Y" checked="checked"|cond="$item->isPublic == 'Y'" disabled="disabled"|cond="in_array($item->name, $fixed_public_list) || !$item->isUse" data-donotchange="Y"|cond="in_array($item->name, $fixed_public_list)" /></td>
<td style="text-align:center">
<input type="checkbox" name="usable_list[]" value="{$item->name}" title="{$lang->use}" checked="checked"|cond="$item->isIdentifier || $item->mustRequired || $item->isUse" disabled="disabled"|cond="$item->isIdentifier || $item->mustRequired" />
</td>
<td style="text-align:center">
<!--@if(!in_array($item->name, $fixed_private_list))-->
<input type="checkbox" name="is_{$item->name}_public" value="Y" checked="checked"|cond="$item->isPublic == 'Y'" disabled="disabled"|cond="in_array($item->name, $fixed_public_list) || !$item->isUse" />
<!--@endif-->
</td>
<td class="nowr">
<label for="{$item->name}_re" class="x_inline"><input type="radio" id="{$item->name}_re" name="{$item->name}" value="required" checked="checked"|cond="$item->mustRequired || $item->required" disabled="disabled"|cond="$item->mustRequired || !$item->isUse" /> {$lang->cmd_required}</label>
<label for="{$item->name}_op" class="x_inline"><input type="radio" id="{$item->name}_op" name="{$item->name}" value="option" checked="checked"|cond="!$item->mustRequired && ($item->isUse && !$item->required)" disabled="disabled"|cond="$item->mustRequired || !$item->isUse" /> {$lang->cmd_optional}</label>
<label for="{$item->name}_re" class="x_inline"><input type="radio" id="{$item->name}_re" name="{$item->name}" value="required" checked="checked"|cond="$item->mustRequired || $item->required" disabled="disabled"|cond="!$item->isUse" /> {$lang->cmd_required}</label>
<!--@if(!$item->mustRequired)-->
<label for="{$item->name}_op" class="x_inline"><input type="radio" id="{$item->name}_op" name="{$item->name}" value="option" checked="checked"|cond="!$item->mustRequired && ($item->isUse && !$item->required)" disabled="disabled"|cond="!$item->isUse" /> {$lang->cmd_optional}</label>
<!--@endif-->
<div cond="$item->imageType" class="_subItem" style="display:none"|cond="!$item->isUse">
<label for="{$item->name}_max_width">{$lang->cmd_image_max_width}: <input type="number" min="1" name="{$item->name}_max_width" id="{$item->name}_max_width" value="{$item->max_width}" /> px</label>
<label for="{$item->name}_max_height">{$lang->cmd_image_max_height}: <input type="number" min="1" name="{$item->name}_max_height" id="{$item->name}_max_height" value="{$item->max_height}" /> px</label>
<label for="{$item->name}_max_filesize">{$lang->allowed_filesize}: <input type="number" min="1" name="{$item->name}_max_filesize" id="{$item->name}_max_filesize" value="{$item->max_filesize}" /> KB</label>
<p class="x_help-block">
<label class="x_inline" for="{$item->name}_max_width">{$lang->cmd_image_max_width}</label> <input type="number" min="1" name="{$item->name}_max_width" id="{$item->name}_max_width" value="{$item->max_width}" /> px
</p>
<p class="x_help-block">
<label class="x_inline" for="{$item->name}_max_height">{$lang->cmd_image_max_height}</label> <input type="number" min="1" name="{$item->name}_max_height" id="{$item->name}_max_height" value="{$item->max_height}" /> px
</p>
<p class="x_help-block">
<label class="x_inline" for="{$item->name}_max_filesize">{$lang->allowed_filesize}</label> <input type="number" min="1" name="{$item->name}_max_filesize" id="{$item->name}_max_filesize" value="{$item->max_filesize}" /> KB
</p>
</div>
<div cond="$item->name == 'phone_number'" class="_subItem" style="display:none"|cond="!$item->isUse">
@ -152,14 +167,16 @@
<!--@end-->
</select>
<select name="sel_editor_colorset" id="sel_editor_colorset" style="display:none"></select>
<p class="x_help-block">{$lang->allow_html}
<p class="x_help-block">
<label class="x_inline">{lang('allow_html')}</label>
<label class="x_inline"><input type="radio" name="signature_html" id="signature_html_yes" value="Y" checked="checked"|cond="$config->signature_html != 'N'" /> {$lang->cmd_yes}</label>
<label class="x_inline"><input type="radio" name="signature_html" id="signature_html_no" value="N" checked="checked"|cond="$config->signature_html == 'N'" /> {$lang->cmd_no}</label>
<label class="x_inline" id="signature_html_retroact" title="{$lang->signature_html_retroact}" style="">
<input type="checkbox" name="signature_html_retroact" value="Y" checked="checked"|cond="$config->signature_html_retroact == 'Y'" /> {$lang->retroactive_application}
</label>
</p>
<p class="x_help-block">{lang('file.file_upload')}
<p class="x_help-block">
<label class="x_inline">{lang('file.file_upload')}</label>
<label class="x_inline"><input type="radio" name="member_allow_fileupload" value="Y" checked="checked"|cond="$config->member_allow_fileupload == 'Y'" /> {$lang->cmd_yes}</label>
<label class="x_inline"><input type="radio" name="member_allow_fileupload" value="N" checked="checked"|cond="$config->member_allow_fileupload != 'Y'" /> {$lang->cmd_no}</label>
</p>