source: extensions/AdditionalPages/admin/template/add_page.tpl @ 9350

Last change on this file since 9350 was 9350, checked in by patdenice, 13 years ago

Extended description now work on page title.
Language restriction is now optionnal.

File size: 4.2 KB
Line 
1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
2{html_head}{literal}
3<script type="text/javascript">
4jQuery().ready( function () {
5  jQuery('#title').focusout(function () {
6    if (jQuery('#permalink').val() == '' && auto_permalink)
7      jQuery.post("plugins/AdditionalPages/admin/ajax.php", { str: this.value }, function(data) {
8        jQuery('#permalink').val(data);
9        auto_permalink = false;
10      });
11  });
12});
13var auto_permalink = true;
14</script>
15<style type="text/css">
16#mainConf { margin:0; }
17.groups { margin-top:15px; }
18.groups input { margin-right:5px; }
19.groups label { margin-right:10px; display: inline-block; overflow: hidden; white-space: nowrap; line-height:1.3em;}
20.groups div { float:right; width:74%; line-height:1.3em;}
21</style>
22{/literal}{/html_head}
23
24<div class="titrePage">
25        <h2>{$AP_TITLE}</h2>
26</div>
27<form method="post" action="" class="properties" id="configContent" ENCTYPE="multipart/form-data">
28<fieldset id="mainConf">
29  <legend></legend>
30        <ul>
31    <li>
32      <span class="property">
33        <label for="title">{'ap_page_name'|@translate}</label>
34      </span>
35      <input type="text" size="60" maxlength="255" value="{if isset($NAME)}{$NAME}{/if}" name="title" id="title"/>
36    </li>
37
38    <li>
39      <span class="property">
40        <label for="permalink">{'Permalink'|@translate}</label>
41      </span>
42      <input type="text" size="60" value="{if isset($PERMALINK)}{$PERMALINK}{/if}" name="permalink" id="permalink"/>
43    </li>
44
45    {if isset($lang)}
46    <li>
47      <span class="property">
48        <label for="lang">{'ap_page_lang'|@translate}</label>
49      </span>
50      {html_options name=lang id=lang options=$lang selected=$selected_lang}
51    </li>
52    {/if}
53
54    <li style="margin-top:15px;">
55      <span class="property">
56        <label for="homepage">{'ap_set_as_homepage'|@translate}</label>
57      </span>
58      <input type="checkbox" name="homepage" id="homepage" {if isset($HOMEPAGE) and $HOMEPAGE}checked="checked"{/if}/>
59      <i>{'ap_homepage_tip'|@translate}</i>
60    </li>
61
62    <li>
63      <span class="property">
64        <label for="standalone">{'ap_standalone_page'|@translate}</label>
65      </span>
66      <input type="checkbox" name="standalone" id="standalone" {if isset($STANDALONE) and $STANDALONE}checked="checked"{/if}/>
67      <i>{'ap_standalone_tip'|@translate}</i>
68    </li>
69
70    {if isset($level_perm)}
71    <li style="margin-top:15px;">
72      <span class="property">
73        <label for="privacy">{'Privacy level'|@translate}</label>
74      </span>
75      <select name="level" size="1">{html_options options=$level_perm selected=$level_selected id=privacy}</select>
76    </li>
77    {/if}
78
79    {if isset($users)}
80    <li class="groups" style="margin-top:15px;">
81      <span class="property">
82        <label for="users">{'ap_authorized_users'|@translate}</label>
83      </span>
84      {html_checkboxes options=$users selected=$selected_users name=users}
85    </li>
86    {/if}
87
88    {if isset($groups)}
89    <li class="groups" style="margin-top:15px;">
90      <span class="property">
91        <label for="groups">{'ap_authorized_group'|@translate}</label>
92      </span>
93      <div>{html_checkboxes options=$groups selected=$selected_groups name=groups}</div>
94    </li>
95    <li class="groups">
96      <div>
97        <a href="#" onClick="jQuery('input[name^=\'groups\']').attr('checked', 'checked');return false;">{'ap_select_all'|@translate}</a> /
98        <a href="#" onClick="jQuery('input[name^=\'groups\']').attr('checked', '');return false;">{'ap_unselect_all'|@translate}</a> &nbsp;
99        <i>{'ap_guest'|@translate}</i>
100      </div>
101    </li>
102    {/if}
103</ul>
104</fieldset>
105<table style="width:95%;">
106                <tr>
107                        <td colspan="2" align="center"><br>
108                                <b>{'ap_page_content'|@translate}</b><br>
109                                <textarea name="ap_content" id="ap_content" rows="30" cols="50" style="width:100%;">{if isset($CONTENT)}{$CONTENT}{/if}</textarea>
110      </td>
111                </tr>
112
113                <tr>
114                <td colspan="2" align="center"><br>
115                <input class="submit" type="submit" value="{'ap_save'|@translate}" name="save">
116                {if isset($delete)}
117                <input class="submit" type="submit" value="{'ap_delete'|@translate}" name="delete" onclick="return confirm('{'Are you sure?'|@translate}');"/>
118                {/if}
119                </tr>
120</table>
121</form>
Note: See TracBrowser for help on using the repository browser.