// Add overflow-y to module payments

This commit is contained in:
Jerome Nadaud
2013-10-15 14:53:31 +02:00
parent eed6b65914
commit 5fd6b9aac6
2 changed files with 87 additions and 85 deletions
@@ -30,97 +30,99 @@
{$list['title']}
</h3>
<p class="help-block">{$list['desc']}</p>
<table cellpadding="0" cellspacing="0" class="table">
<tr>
<th width="40%">{$list['title']}</th>
{foreach $payment_modules as $module}
{if $module->active}
<th>
{if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'}
<input type="hidden" id="checkedBox_{$list['name_id']}_{$module->name}" value="checked"/>
<a href="javascript:checkPaymentBoxes('{$list['name_id']}', '{$module->name}')">
{/if}
&nbsp;<img src="{$ps_base_uri}modules/{$module->name}/logo.gif" alt="{$module->name}" title="{$module->displayName}"/>
{if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'}
</a>
{/if}
</th>
{/if}
{/foreach}
</tr>
{foreach $list['items'] as $item}
<div class="row table-responsive clearfix overflow-y">
<table class="table">
<tr>
<td>
<span>{$item['name']}</span>
</td>
{foreach $payment_modules as $key_module => $module}
<th width="40%"><span class="title_box">{$list['title']}<span></th>
{foreach $payment_modules as $module}
{if $module->active}
<td>
{assign var='type' value='null'}
{if !$item['check_list'][$key_module]}
{* Keep $type to null *}
{elseif $list['name_id'] === 'currency'}
{if $module->currencies && $module->currencies_mode == 'checkbox'}
<th class="center">
{if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'}
<input type="hidden" id="checkedBox_{$list['name_id']}_{$module->name}" value="checked"/>
<a href="javascript:checkPaymentBoxes('{$list['name_id']}', '{$module->name}')">
{/if}
&nbsp;<img src="{$ps_base_uri}modules/{$module->name}/logo.gif" alt="{$module->name}" title="{$module->displayName}"/>
{if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'}
</a>
{/if}
</th>
{/if}
{/foreach}
</tr>
{foreach $list['items'] as $item}
<tr>
<td>
<span>{$item['name']}</span>
</td>
{foreach $payment_modules as $key_module => $module}
{if $module->active}
<td class="center">
{assign var='type' value='null'}
{if !$item['check_list'][$key_module]}
{* Keep $type to null *}
{elseif $list['name_id'] === 'currency'}
{if $module->currencies && $module->currencies_mode == 'checkbox'}
{$type = 'checkbox'}
{elseif $module->currencies && $module->currencies_mode == 'radio'}
{$type = 'radio'}
{/if}
{else}
{$type = 'checkbox'}
{elseif $module->currencies && $module->currencies_mode == 'radio'}
{$type = 'radio'}
{/if}
{else}
{$type = 'checkbox'}
{/if}
{if $type != 'null'}
<input type="{$type}" name="{$module->name}_{$list['name_id']}[]" value="{$item[$list['identifier']]}" {if $item['check_list'][$key_module] == 'checked'}checked="checked"{/if}/>
{else}
<input type="hidden" name="{$module->name}_{$list['name_id']}[]" value="{$item[$list['identifier']]}"/>--
{/if}
</td>
{/if}
{/foreach}
</tr>
{/foreach}
{if $list['name_id'] === 'currency'}
<tr>
<td>
<span>{l s='Customer currency'}</span>
</td>
{foreach $payment_modules as $module}
{if $module->active}
<td>
{if $module->currencies && $module->currencies_mode == 'radio'}
<input type="radio" name="{$module->name}_{$list['name_id']}[]" value="-1"{if in_array(-1, $module->$list['name_id'])} checked="checked"
{/if} />
{else}
--
{/if}
</td>
{/if}
{/foreach}
</tr>
<tr>
<td>
<span>{l s='Shop default currency'}</span>
</td>
{foreach $payment_modules as $module}
{if $module->active}
<td>
{if $module->currencies && $module->currencies_mode == 'radio'}
<input type="radio" name="{$module->name}_{$list['name_id']}[]" value="-2"{if in_array(-2, $module->$list['name_id'])} checked="checked"
{/if}
/>
{else}
--
{/if}
</td>
{/if}
{/foreach}
</tr>
{/if}
</table>
<p class="text-right">
{if $type != 'null'}
<input type="{$type}" name="{$module->name}_{$list['name_id']}[]" value="{$item[$list['identifier']]}" {if $item['check_list'][$key_module] == 'checked'}checked="checked"{/if}/>
{else}
<input type="hidden" name="{$module->name}_{$list['name_id']}[]" value="{$item[$list['identifier']]}"/>--
{/if}
</td>
{/if}
{/foreach}
</tr>
{/foreach}
{if $list['name_id'] === 'currency'}
<tr>
<td>
<span>{l s='Customer currency'}</span>
</td>
{foreach $payment_modules as $module}
{if $module->active}
<td>
{if $module->currencies && $module->currencies_mode == 'radio'}
<input type="radio" name="{$module->name}_{$list['name_id']}[]" value="-1"{if in_array(-1, $module->$list['name_id'])} checked="checked"
{/if} />
{else}
--
{/if}
</td>
{/if}
{/foreach}
</tr>
<tr>
<td>
<span>{l s='Shop default currency'}</span>
</td>
{foreach $payment_modules as $module}
{if $module->active}
<td>
{if $module->currencies && $module->currencies_mode == 'radio'}
<input type="radio" name="{$module->name}_{$list['name_id']}[]" value="-2"{if in_array(-2, $module->$list['name_id'])} checked="checked"
{/if}
/>
{else}
--
{/if}
</td>
{/if}
{/foreach}
</tr>
{/if}
</table>
</div>
<div class="row pull-right">
<button type="submit" class="btn btn-primary" name="submitModule{$list['name_id']}">
<i class="icon-save"></i>
{l s='Save restrictions'}
</button>
</p>
</div>
</fieldset>
</form>
@@ -179,7 +179,7 @@
<fieldset class="col-lg-12">
{if isset($title)}<h3>{if isset($icon)}<i class="{$icon}"></i> {/if}{if is_array($title)}{$title|end}{else}{$title}{/if}</h3>{/if}
{/if}
<div class="table-responsive clearfix">
<div class="table-responsive clearfix{if isset($use_overflow) && $use_overflow} overflow-y{/if}">
<table
name="list_table"
{if $table_id} id={$table_id}{/if}