mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Fix incorrect category selected by default when editing a document and a default category is set
This commit is contained in:
parent
94869286ce
commit
bd8de66c78
4 changed files with 18 additions and 12 deletions
|
|
@ -19,11 +19,12 @@
|
||||||
<li>
|
<li>
|
||||||
<label for="nCategory">{$lang->category}</label>
|
<label for="nCategory">{$lang->category}</label>
|
||||||
<select name="category_srl" id="nCategory">
|
<select name="category_srl" id="nCategory">
|
||||||
<!--@foreach($category_list as $val)-->
|
<option value="">{$lang->category}</option>
|
||||||
<option <!--@if(!$val->grant)-->disabled="disabled"<!--@endif--> value="{$val->category_srl}" <!--@if($val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl'))-->selected="selected"<!--@endif-->>
|
<!--@foreach($category_list as $val)-->
|
||||||
{str_repeat(" ",$val->depth)} {$val->title} ({$val->document_count})
|
<option value="{$val->category_srl}" disabled="disabled"|cond="!$val->grant" selected="selected"|cond="$val->grant && (($val->selected && !$oDocument->get('category_srl')) || $val->category_srl == $oDocument->get('category_srl'))">
|
||||||
|
{str_repeat(' ', $val->depth)} {$val->title} ({$val->document_count})
|
||||||
</option>
|
</option>
|
||||||
<!--@end-->
|
<!--@endforeach-->
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,12 @@
|
||||||
<li>
|
<li>
|
||||||
<label for="nCategory" class="db fb">{$lang->category}</label>
|
<label for="nCategory" class="db fb">{$lang->category}</label>
|
||||||
<select name="category_srl" id="nCategory">
|
<select name="category_srl" id="nCategory">
|
||||||
<!--@foreach($category_list as $val)-->
|
<option value="">{$lang->category}</option>
|
||||||
<option <!--@if(!$val->grant)-->disabled="disabled"<!--@endif--> value="{$val->category_srl}" <!--@if($val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl'))-->selected=="selected"<!--@endif-->>
|
<!--@foreach($category_list as $val)-->
|
||||||
{str_repeat(" ",$val->depth)} {$val->title} ({$val->document_count})
|
<option value="{$val->category_srl}" disabled="disabled"|cond="!$val->grant" selected="selected"|cond="$val->grant && (($val->selected && !$oDocument->get('category_srl')) || $val->category_srl == $oDocument->get('category_srl'))">
|
||||||
|
{str_repeat(' ', $val->depth)} {$val->title} ({$val->document_count})
|
||||||
</option>
|
</option>
|
||||||
<!--@end-->
|
<!--@endforeach-->
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,11 @@
|
||||||
<div class="write_header">
|
<div class="write_header">
|
||||||
<select name="category_srl" cond="$module_info->use_category=='Y'">
|
<select name="category_srl" cond="$module_info->use_category=='Y'">
|
||||||
<option value="">{$lang->category}</option>
|
<option value="">{$lang->category}</option>
|
||||||
<option loop="$category_list => $val" disabled="disabled"|cond="!$val->grant" value="{$val->category_srl}" selected="selected"|cond="$val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl')">
|
<!--@foreach($category_list as $val)-->
|
||||||
{str_repeat(" ",$val->depth)} {$val->title} ({$val->document_count})
|
<option value="{$val->category_srl}" disabled="disabled"|cond="!$val->grant" selected="selected"|cond="$val->grant && (($val->selected && !$oDocument->get('category_srl')) || $val->category_srl == $oDocument->get('category_srl'))">
|
||||||
|
{str_repeat(' ', $val->depth)} {$val->title} ({$val->document_count})
|
||||||
</option>
|
</option>
|
||||||
|
<!--@endforeach-->
|
||||||
</select>
|
</select>
|
||||||
<input cond="$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" value="{escape($oDocument->getTitleText(), false)}" />
|
<input cond="$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" value="{escape($oDocument->getTitleText(), false)}" />
|
||||||
<input cond="!$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" />
|
<input cond="!$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" />
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,11 @@
|
||||||
<div class="write_header">
|
<div class="write_header">
|
||||||
<select name="category_srl" cond="$module_info->use_category=='Y'">
|
<select name="category_srl" cond="$module_info->use_category=='Y'">
|
||||||
<option value="">{$lang->category}</option>
|
<option value="">{$lang->category}</option>
|
||||||
<option loop="$category_list => $val" disabled="disabled"|cond="!$val->grant" value="{$val->category_srl}" selected="selected"|cond="$val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl')">
|
<!--@foreach($category_list as $val)-->
|
||||||
{str_repeat(" ",$val->depth)} {$val->title} ({$val->document_count})
|
<option value="{$val->category_srl}" disabled="disabled"|cond="!$val->grant" selected="selected"|cond="$val->grant && (($val->selected && !$oDocument->get('category_srl')) || $val->category_srl == $oDocument->get('category_srl'))">
|
||||||
|
{str_repeat(' ', $val->depth)} {$val->title} ({$val->document_count})
|
||||||
</option>
|
</option>
|
||||||
|
<!--@endforeach-->
|
||||||
</select>
|
</select>
|
||||||
<input cond="$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" value="{escape($oDocument->getTitleText(), false)}" />
|
<input cond="$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" value="{escape($oDocument->getTitleText(), false)}" />
|
||||||
<input cond="!$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" />
|
<input cond="!$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue