1 | {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} |
---|
2 | {html_head}{literal} |
---|
3 | <script type="text/javascript"> |
---|
4 | function GereChkbox(conteneur, a_faire) { |
---|
5 | var blnEtat=null; |
---|
6 | var Chckbox = document.getElementById(conteneur).firstChild; |
---|
7 | while (Chckbox!=null) { |
---|
8 | if (Chckbox.nodeName=="INPUT") |
---|
9 | if (Chckbox.getAttribute("type")=="checkbox") { |
---|
10 | blnEtat = (a_faire=='0') ? false : (a_faire=='1') ? true : (document.getElementById(Chckbox.getAttribute("id")).checked) ? false : true; |
---|
11 | document.getElementById(Chckbox.getAttribute("id")).checked=blnEtat; |
---|
12 | } |
---|
13 | Chckbox = Chckbox.nextSibling; |
---|
14 | } |
---|
15 | } |
---|
16 | |
---|
17 | jQuery().ready( function () { |
---|
18 | jQuery('#title').focusout(function () { |
---|
19 | if (jQuery('#permalink').val() == '' && auto_permalink) |
---|
20 | jQuery.post("plugins/AdditionalPages/admin/ajax.php", { str: this.value }, function(data) { |
---|
21 | jQuery('#permalink').val(data); |
---|
22 | auto_permalink = false; |
---|
23 | }); |
---|
24 | }); |
---|
25 | }); |
---|
26 | |
---|
27 | var auto_permalink = true; |
---|
28 | </script> |
---|
29 | {/literal}{/html_head} |
---|
30 | |
---|
31 | <div class="titrePage"> |
---|
32 | <h2>{$AP_TITLE}</h2> |
---|
33 | </div> |
---|
34 | <form method="post" action="" class="properties" ENCTYPE="multipart/form-data"> |
---|
35 | <table> |
---|
36 | <tr> |
---|
37 | <td align="right"><label for="title">{'ap_page_name'|@translate}</label> </td> |
---|
38 | <td><input type="text" size="60" maxlength="255" value="{if isset($NAME)}{$NAME}{/if}" name="title" id="title"/></td> |
---|
39 | </tr> |
---|
40 | <tr> |
---|
41 | <td align="right"><label for="permalink">{'Permalink'|@translate}</label> </td> |
---|
42 | <td><input type="text" size="60" value="{if isset($PERMALINK)}{$PERMALINK}{/if}" name="permalink" id="permalink"/></td> |
---|
43 | </tr> |
---|
44 | <tr> |
---|
45 | <td align="right"><label for="lang">{'ap_page_lang'|@translate}</label> </td> |
---|
46 | <td> |
---|
47 | {html_options name=lang id=lang options=$lang.OPTIONS selected=$lang.SELECTED} |
---|
48 | </td> |
---|
49 | </tr> |
---|
50 | <tr><td> </td></tr> |
---|
51 | <tr> |
---|
52 | <td align="right"><label for="homepage">{'ap_set_as_homepage'|@translate}</label> </td> |
---|
53 | <td><input type="checkbox" name="homepage" id="homepage" {if isset($HOMEPAGE) and $HOMEPAGE}checked="checked"{/if}"/> |
---|
54 | <i>{'ap_homepage_tip'|@translate}</i></td> |
---|
55 | </tr> |
---|
56 | <tr> |
---|
57 | <td align="right"><label for="standalone">{'ap_standalone_page'|@translate}</label> </td> |
---|
58 | <td><input type="checkbox" name="standalone" id="standalone" {if isset($STANDALONE) and $STANDALONE}checked="checked"{/if}"/> |
---|
59 | <i>{'ap_standalone_tip'|@translate}</i></td> |
---|
60 | </tr> |
---|
61 | |
---|
62 | {if isset($user_perm)} |
---|
63 | <tr> |
---|
64 | <td colspan="2"><hr></td> |
---|
65 | </tr> |
---|
66 | <tr> |
---|
67 | <td align="right">{'ap_authorized_users'|@translate} </td> |
---|
68 | <td> |
---|
69 | <div id="users"> |
---|
70 | <input type="checkbox" name="users[]" id="guest" value="guest" {$user_perm.GUEST}><label> {'user_status_guest'|@translate}</label> |
---|
71 | <input type="checkbox" name="users[]" id="generic" value="generic" {$user_perm.GENERIC}><label> {'user_status_generic'|@translate}</label> |
---|
72 | <input type="checkbox" name="users[]" id="normal" value="normal" {$user_perm.NORMAL}><label> {'user_status_normal'|@translate}</label> |
---|
73 | <input type="checkbox" name="users[]" id="admin" value="admin" checked="checked" disabled onclick="return false;"><label> {'user_status_admin'|@translate}</label> |
---|
74 | </div> |
---|
75 | </td> |
---|
76 | </tr> |
---|
77 | {/if} |
---|
78 | |
---|
79 | {if !empty($GROUPSELECTION)} |
---|
80 | <tr> |
---|
81 | <td colspan="2"><hr></td> |
---|
82 | </tr> |
---|
83 | <tr> |
---|
84 | <td align="right">{'ap_authorized_group'|@translate} </td> |
---|
85 | <td>{$GROUPSELECTION}</td> |
---|
86 | </tr> |
---|
87 | <tr> |
---|
88 | <td></td> |
---|
89 | <td><a href="javascript:GereChkbox('groups','1');">{'ap_select_all'|@translate}</a> / <a href="javascript:GereChkbox('groups','0');">{'ap_unselect_all'|@translate}</a> |
---|
90 | <i> {'ap_guest'|@translate}</i></td> |
---|
91 | </tr> |
---|
92 | {/if} |
---|
93 | </table> |
---|
94 | <table style="width:95%;"> |
---|
95 | <tr> |
---|
96 | <td colspan="2" align="center"><br> |
---|
97 | <b>{'ap_page_content'|@translate}</b><br> |
---|
98 | <textarea name="ap_content" id="ap_content" rows="30" cols="50" style="width:100%;">{if isset($CONTENT)}{$CONTENT}{/if}</textarea> |
---|
99 | </td> |
---|
100 | </tr> |
---|
101 | |
---|
102 | <tr> |
---|
103 | <td colspan="2" align="center"><br> |
---|
104 | <input class="submit" type="submit" value="{'ap_save'|@translate}" name="save"> |
---|
105 | {if isset($delete)} |
---|
106 | <input class="submit" type="submit" value="{'ap_delete'|@translate}" name="delete" onclick="return confirm('Are you sure?'|@translate);"/> |
---|
107 | {/if} |
---|
108 | </tr> |
---|
109 | </table> |
---|
110 | </form> |
---|