Changeset 26025 for extensions/EasyCaptcha/template/common.inc.tpl
- Timestamp:
- Dec 18, 2013, 6:48:06 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/EasyCaptcha/template/common.inc.tpl
r24234 r26025 1 1 {* <!-- DRAG & DROP --> *} 2 {if $EASYCAPTCHA _CHALLENGE== 'drag'}2 {if $EASYCAPTCHA.challenge == 'drag'} 3 3 {combine_script id='jquery.event.drag' load='footer' require='jquery' path=$EASYCAPTCHA_PATH|cat:'template/jquery.events/jquery.event.drag-2.2.js'} 4 4 {combine_script id='jquery.event.drop' load='footer' require='jquery' path=$EASYCAPTCHA_PATH|cat:'template/jquery.events/jquery.event.drop-2.2.js'} 5 5 6 6 {combine_script id='easycaptcha.drag' load='footer' require='jquery.event.drag,jquery.event.drop' path=$EASYCAPTCHA_PATH|cat:'template/drag.js'} 7 8 {html_style} 9 #easycaptcha, #easycaptcha_noscript {ldelim} 10 display:inline-block; 11 position:relative; 12 padding:10px; 13 border-radius:8px; 14 background: {$EASYCAPTCHA_CONF.bg1}; 15 background: -webkit-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%); 16 background: -moz-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%); 17 background: -ms-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%); 18 background: -o-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%); 19 background: linear-gradient(to bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%); 20 color:{$EASYCAPTCHA_CONF.txt}; 21 } 22 #easycaptcha .drag_item {ldelim} 23 position:absolute; 24 top:15px; 25 width:{$EASYCAPTCHA_CONF.size}px; 26 height:{$EASYCAPTCHA_CONF.size}px; 27 border-radius:5px; 28 border:1px solid {$EASYCAPTCHA_CONF.bd1}; 29 background:{$EASYCAPTCHA_CONF.obj}; 30 z-index:10; 31 cursor:move; 32 } 33 #easycaptcha .drag_item.active {ldelim} 34 z-index:100; 35 opacity:0.75; 36 } 37 #easycaptcha .drag_item img {ldelim} 38 width:{$EASYCAPTCHA_CONF.size}px; 39 height:{$EASYCAPTCHA_CONF.size}px; 40 border-radius:5px; 41 } 42 #easycaptcha .drop_zone {ldelim} 43 -moz-box-sizing:borderbox; 44 box-sizing:borderbox; 45 padding:5px; 46 width:{$EASYCAPTCHA_CONF.size}px; 47 height:{$EASYCAPTCHA_CONF.size}px; 48 margin-left:{math equation='15+(x+5)*y' x=$EASYCAPTCHA_CONF.size y=$EASYCAPTCHA_CONF.nb}px; 49 line-height:{$EASYCAPTCHA_CONF.size}px; 50 background: {$EASYCAPTCHA_CONF.bg1}; 51 background: -webkit-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%); 52 background: -moz-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%); 53 background: -ms-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%); 54 background: -o-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%); 55 background: linear-gradient(to top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%); 56 border:1px dotted {$EASYCAPTCHA_CONF.bd2}; 57 border-radius:5px; 58 text-align:center; 59 text-transform:uppercase; 60 color:{$EASYCAPTCHA_CONF.txt}; 61 } 62 #easycaptcha .drop_zone.active {ldelim} 63 background:{$EASYCAPTCHA_CONF.sel}; 64 } 65 #easycaptcha .drop_zone.valid {ldelim} 66 background:{$EASYCAPTCHA_CONF.sel}; 67 box-shadow:0 0 0 2px {$EASYCAPTCHA_CONF.sel}; 68 } 69 {/html_style} 7 {combine_css id='easycaptcha.drag' path=$EASYCAPTCHA_PATH|cat:'template/drag.css' template=true version=$EASYCAPTCHA.lastmod} 70 8 71 9 {capture name=easycaptcha} … … 76 14 <div id="easycaptcha" style="display:none;"> 77 15 {counter start=0 assign=i} 78 {foreach from=$EASYCAPTCHA _CONF.selection item=image}79 <div class="drag_item" style="left:{math equation='10+(x+5)*y' x=$EASYCAPTCHA _CONF.size y=$i}px;" data-id="{$image}">80 <img src="{$ROOT_URL}{$EASYCAPTCHA_PATH}drag/get.php?{$EASYCAPTCHA _CONF.theme}&{$image}">16 {foreach from=$EASYCAPTCHA.drag.selection item=image} 17 <div class="drag_item" style="left:{math equation='10+(x+5)*y' x=$EASYCAPTCHA.drag.size y=$i}px;" data-id="{$image}"> 18 <img src="{$ROOT_URL}{$EASYCAPTCHA_PATH}drag/get.php?{$EASYCAPTCHA.drag.theme}&{$image}"> 81 19 </div> 82 20 {counter} … … 87 25 {* <!-- fields are not type "hidden" for LiveValidation in GuestBook and ContactForm --> *} 88 26 <input type="text" name="easycaptcha" value="" style="display:none;"> 89 <input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA _CONF.key}" style="display:none;">27 <input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA.key}" style="display:none;"> 90 28 {/capture} 91 29 92 30 93 31 {* <!-- TIC TAC TOE --> *} 94 {else if $EASYCAPTCHA_CHALLENGE == 'tictac'} 95 {html_style} 96 #easycaptcha table {ldelim} 97 width:{$EASYCAPTCHA_CONF.size}px; 98 height:{$EASYCAPTCHA_CONF.size}px; 99 border-collapse:collapse; 100 display:inline-block; 101 margin:0; 102 background:url('{$ROOT_URL}{$EASYCAPTCHA_PATH}tictac/gen.php?t={$smarty.now}') no-repeat; 103 } 104 #easycaptcha td {ldelim} 105 border:none; 106 padding:0; 107 } 108 #easycaptcha label {ldelim} 109 display:block; 110 width:{math equation="floor(x/3)" x=$EASYCAPTCHA_CONF.size}px; 111 height:{math equation="floor(x/3)" x=$EASYCAPTCHA_CONF.size}px; 112 cursor:url('{$ROOT_URL}{$EASYCAPTCHA_PATH}tictac/gen.php?cross=96') 16 16, pointer; 113 } 114 #easycaptcha input {ldelim} 115 display:none; 116 } 117 #easycaptcha label.selected {ldelim} 118 background:url('{$ROOT_URL}{$EASYCAPTCHA_PATH}tictac/gen.php?cross={$EASYCAPTCHA_CONF.size}') no-repeat; 119 } 120 {/html_style} 32 {else if $EASYCAPTCHA.challenge == 'tictac'} 33 {combine_css id='easycaptcha.tictac' path=$EASYCAPTCHA_PATH|cat:'template/tictac.css' template=true version=$EASYCAPTCHA.lastmod} 121 34 122 {footer_script require='jquery'} {literal}35 {footer_script require='jquery'} 123 36 (function($){ 124 37 $('#easycaptcha input').on('change', function() { … … 127 40 }); 128 41 }(jQuery)); 129 {/ literal}{/footer_script}42 {/footer_script} 130 43 131 44 {capture name=easycaptcha} … … 150 63 </div> 151 64 152 <input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA _CONF.key}" style="display:none;">65 <input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA.key}" style="display:none;"> 153 66 {/capture} 154 67
Note: See TracChangeset
for help on using the changeset viewer.