// Fix multishop javascript for preferences and shop url
This commit is contained in:
@@ -61,7 +61,7 @@
|
|||||||
<img src="{$categoryData['image']}"/>
|
<img src="{$categoryData['image']}"/>
|
||||||
{if isset($categoryData['title'])}{$categoryData['title']}{else}{l s='Options'}{/if}
|
{if isset($categoryData['title'])}{$categoryData['title']}{else}{l s='Options'}{/if}
|
||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
{* Category description *}
|
{* Category description *}
|
||||||
{if (isset($categoryData['description']) && $categoryData['description'])}
|
{if (isset($categoryData['description']) && $categoryData['description'])}
|
||||||
<div class="optionsDescription">{$categoryData['description']}</div>
|
<div class="optionsDescription">{$categoryData['description']}</div>
|
||||||
@@ -70,9 +70,9 @@
|
|||||||
{if (isset($categoryData['info']) && $categoryData['info'])}
|
{if (isset($categoryData['info']) && $categoryData['info'])}
|
||||||
<p>{$categoryData['info']}</p>
|
<p>{$categoryData['info']}</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{foreach $categoryData['fields'] AS $key => $field}
|
{foreach $categoryData['fields'] AS $key => $field}
|
||||||
|
|
||||||
{if $field['type'] == 'hidden'}
|
{if $field['type'] == 'hidden'}
|
||||||
<input type="hidden" name="{$key}" value="{$field['value']}" />
|
<input type="hidden" name="{$key}" value="{$field['value']}" />
|
||||||
{else}
|
{else}
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
</select>
|
</select>
|
||||||
{else if isset($input.empty_message)}
|
{else if isset($input.empty_message)}
|
||||||
{$input.empty_message}
|
{$input.empty_message}
|
||||||
{/if}
|
{/if}
|
||||||
{elseif $field['type'] == 'bool'}
|
{elseif $field['type'] == 'bool'}
|
||||||
<label class="t" for="{$key}_on"><img src="../img/admin/enabled.gif" alt="{l s='Yes'}" title="{l s='Yes'}" /></label>
|
<label class="t" for="{$key}_on"><img src="../img/admin/enabled.gif" alt="{l s='Yes'}" title="{l s='Yes'}" /></label>
|
||||||
<input type="radio" name="{$key}" id="{$key}_on" value="1" {if $field['value']} checked="checked"{/if}{if isset($field['js']['on'])} {$field['js']['on']}{/if}/>
|
<input type="radio" name="{$key}" id="{$key}_on" value="1" {if $field['value']} checked="checked"{/if}{if isset($field['js']['on'])} {$field['js']['on']}{/if}/>
|
||||||
@@ -174,12 +174,12 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<br style="clear:both">
|
<br style="clear:both">
|
||||||
{/if}
|
{/if}
|
||||||
{if ($field['multishop_default'])}
|
{if ($field['multishop_default'])}
|
||||||
<div class="preference_default_multishop">
|
<div class="preference_default_multishop">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="configUseDefault['{$key}']" value="1" {if $field['is_disabled']} checked="checked"{/if} onclick="checkMultishopDefaultValue(this, '{$key}')" /> {l s='Use default value'}
|
<input type="checkbox" name="configUseDefault[{$key}]" value="1" {if $field['is_disabled']} checked="checked"{/if} onclick="checkMultishopDefaultValue(this, '{$key}')" /> {l s='Use default value'}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -194,9 +194,9 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
{if isset($categoryData['submit'])}
|
{if isset($categoryData['submit'])}
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<input type="submit"
|
<input type="submit"
|
||||||
value="{if isset($categoryData['submit']['title'])}{$categoryData['submit']['title']}{else}{l s=' Save '}{/if}"
|
value="{if isset($categoryData['submit']['title'])}{$categoryData['submit']['title']}{else}{l s=' Save '}{/if}"
|
||||||
name="{if isset($categoryData['submit']['name'])}$categoryData['submit']['name']{else}submit{$category|ucfirst}{$table}{/if}"
|
name="{if isset($categoryData['submit']['name'])}$categoryData['submit']['name']{else}submit{$category|ucfirst}{$table}{/if}"
|
||||||
class="{if isset($categoryData['submit']['class'])}{$categoryData['submit']['class']}{else}button{/if}"
|
class="{if isset($categoryData['submit']['class'])}{$categoryData['submit']['class']}{else}button{/if}"
|
||||||
id="{$table}_form_submit_btn"
|
id="{$table}_form_submit_btn"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
if (physical)
|
if (physical)
|
||||||
url += '/'+physical;
|
url += '/'+physical;
|
||||||
if (virtual)
|
if (virtual)
|
||||||
url += '/'+virtual;
|
url += '/'+virtual+'/';
|
||||||
url = url.replace(/\/+/g, "/");
|
url = url.replace(/\/+/g, "/");
|
||||||
$('#final_url').val('http://'+url);
|
$('#final_url').val('http://'+url);
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-2
@@ -901,12 +901,12 @@ $(document).ready(function()
|
|||||||
{
|
{
|
||||||
var key = $(v).attr('name');
|
var key = $(v).attr('name');
|
||||||
var len = key.length;
|
var len = key.length;
|
||||||
checkMultishopDefaultValue(v, key.substr(18, len - 20));
|
checkMultishopDefaultValue(v, key.substr(17, len - 18));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function checkMultishopDefaultValue(obj, key)
|
function checkMultishopDefaultValue(obj, key)
|
||||||
{console.log(key)
|
{
|
||||||
if ($(obj).attr('checked') || $('#'+key).hasClass('isInvisible'))
|
if ($(obj).attr('checked') || $('#'+key).hasClass('isInvisible'))
|
||||||
{
|
{
|
||||||
$('#conf_id_'+key+' input, #conf_id_'+key+' textarea, #conf_id_'+key+' select').attr('disabled', true);
|
$('#conf_id_'+key+' input, #conf_id_'+key+' textarea, #conf_id_'+key+' select').attr('disabled', true);
|
||||||
|
|||||||
Reference in New Issue
Block a user