Commit 982f5747 authored by Son Nguyen's avatar Son Nguyen
Browse files

When editing site skin, disable skin background images (Bug 1305308)



Also display confirmation dialogue.

Change-Id: I55b4a85cdeabf14ae39027723a6882456ff13c01
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent 3fd420f9
......@@ -34,6 +34,7 @@ $string['exportspecific'] = 'Export "%s"';
$string['exportskins'] = 'Export skin(s)';
$string['createskin'] = 'Create skin';
$string['editthisskin'] = 'Edit this skin';
$string['editsiteskin?'] = 'This is a site skin. Do you want to edit it?';
$string['editskin'] = 'Edit skin';
$string['skinsaved'] = 'Skin saved successfully';
$string['skinimported'] = 'Skin imported successfully';
......
......@@ -72,7 +72,8 @@ else {
}
// Set the Skin access options (for creating or editing form)...
if ($designsiteskin or (isset($skindata) and $skinobj->get('type') == 'site')) {
$designsiteskin = $designsiteskin || (isset($skinobj) && $skinobj->get('type') == 'site');
if ($designsiteskin) {
$accessoptions = array(
'site' => get_string('siteskinaccess', 'skin')
);
......
......@@ -20,7 +20,8 @@
<div class="skinthumb">
<div class="skin-controls">
{if $skin.editable}
<a href="{$WWWROOT}skin/design.php?id={$skin.id}{if $siteskins}&site=1{/if}" class="btn-big-edit" title="{str tag='editthisskin' section='skin'}">
<a href="{$WWWROOT}skin/design.php?id={$skin.id}{if $skin.type == 'site'}&site=1{/if}" class="btn-big-edit" title="{str tag='editthisskin' section='skin'}"
{if $skin.type == 'site'}onclick="return confirm('{str tag='editsiteskin?' section='skin'}');"{/if}>
{str tag=editspecific arg1=$skin.title}
</a>
{/if}
......@@ -33,7 +34,7 @@
<a href="{$WWWROOT}skin/export.php?id={$skin.id}" class="btn-big-export" title="{str tag='exportthisskin' section='skin'}">
{str tag=exportspecific section=skin arg1=$skin.title}
</a>
<a href="{$WWWROOT}skin/delete.php?id={$skin.id}{if $siteskins}&site=1{/if}" class="btn-big-del" title="{str tag='deletethisskin' section='skin'}">
<a href="{$WWWROOT}skin/delete.php?id={$skin.id}{if $skin.type == 'site'}&site=1{/if}" class="btn-big-del" title="{str tag='deletethisskin' section='skin'}">
{str tag=deletespecific arg1=$skin.title}
</a>
{else}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment