- Timestamp:
- Jun 28, 2012, 12:11:22 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AdditionalPages/trunk/admin/template/add_page.tpl
r9660 r16118 7 7 auto_permalink = false; 8 8 }); 9 }); 10 11 var content_changed = false; 12 jQuery("#ap_content").change(function() { 13 content_changed = true; 14 }); 15 16 jQuery("#template").change(function() { 17 if ($(this).val() != '-1') { 18 {/literal} 19 if (content_changed == false || confirm("{'The content of the page changed, are your sure you wan\'t to quit without saving?'|@translate|escape:javascript}")) {ldelim} 20 window.location.href = "admin.php?page=plugin-AdditionalPages-add_page&load_template="+ $(this).val(); 21 } else {ldelim} 22 $(this).val('-1'); 23 } 24 {literal} 25 } 9 26 }); 10 27 }); … … 28 45 <legend></legend> 29 46 <ul> 47 {if $TEMPLATES} 48 <li> 49 <span class="property"> 50 <label for="template">{'Load a page model'|@translate}</label> 51 </span> 52 <select name="template" id="template"> 53 <option value="-1">---------</option> 54 {foreach from=$TEMPLATES item=tpl} 55 <option value="{$tpl.tpl_id}" {if $template_selected==$tpl.tpl_id}selected="selected"{/if}>{$tpl.name}</option> 56 {/foreach} 57 </select> 58 </li> 59 {/if} 60 30 61 <li> 31 62 <span class="property">
Note: See TracChangeset
for help on using the changeset viewer.