Файл: base-sys/admin/views/controllers/pages_index.html
Строк: 112
<?php
{script}
{literal}
$(document).ready(function(){
$radio1 = $('#address1');
$radio2 = $('#address2');
$url1 = $('#url1');
$url2 = $('#url2');
$radio1.bind('click', function(){
var disabled = !this.checked;
$('#meta-tags-tr').show();
$('#meta-tags').attr( 'disabled', disabled );
$('#content').attr( 'disabled', disabled );
$('#content-tr').show();
$('#title').attr( 'disabled', disabled );
$('#title-tr').show();
}).bind('click', function(){
$('#type').attr('value', 'local');
});
$radio1.bind('click', function(){
$url1[0].focus();
})
{/literal}
{if !$isLocal}
{literal}
$('#meta-tags-tr').hide();
$('#content-tr').hide();
$('#title-tr').hide();
$('#address2').attr('checked', 'checked');
{/literal}
{else}
{literal}
$('#address1').attr('checked', 'checked');
{/literal}
{/if}
{literal}
$radio2.bind('click', function(){
var disabled = this.checked;
$('#meta-tags-tr').hide();
$('#meta-tags').attr( 'disabled', disabled );
$('#content').attr( 'disabled', disabled );
$('#content-tr').hide();
$('#title').attr( 'disabled', disabled );
$('#title-tr').hide();
}).bind('click', function(){
$('#type').attr('value', 'external');
}).bind('click', function(){
$url2[0].focus();
});
});
{/literal}
{/script}
{form name="page-add-form"}
<table class="peep_table_1" id="new-page-form">
<tr class="{cycle values="peep_alt2,peep_alt1"} peep_tr_first">
<td style="width: 15%;" class="peep_label">{label name="name"}</td>
<td class="peep_value">{input name="name"}
<br />{error name="name"}
</td>
<td class="peep_description peep_small" style="width: 25%">
</td>
</tr>
<tr class="{cycle values="peep_alt2,peep_alt1"}">
<td class="peep_label">{label name="type"}</td>
<td class="peep_value">
{input name="type" style="display: none;"}
<input type="radio" name="address" id="address1"/>
<label for="address1">Local page</label>, http://yoursite.com/{input name="local-url" style="width: 200px;margin-left: 6px;"}<br /> {error name='local-url'}
<div class="peep_center" style="margin:5px 0;">- {text key="admin+pages_new_form_or"} -</div>
<input type="radio" name="address" id="address2" />
<label for="address2">External URL</label>
{input name="external-url"}
{error name='external-url'}
{input name="ext-open-in-new-window"}
{label name="ext-open-in-new-window"}
</td>
<td class="peep_description peep_small"></td>
</tr>
<tr id="title-tr" class="{cycle values="peep_alt2,peep_alt1"}">
<td class="peep_label">
{label name="title"}
</td>
<td class="peep_value">
{input name="title"}
<br />{error name="title"}
</td>
<td class="peep_description peep_small"></td>
</tr>
<tr class="{cycle values="peep_alt2,peep_alt1"}">
<td class="peep_label">{label name="visible-for"}</td>
<td class="peep_value">
{input name="visible-for"}
<br />{error name="visible-for"}
</td>
<td class="peep_description peep_small"></td>
</tr>
<tr class="{cycle values="peep_alt2,peep_alt1"}" id="meta-tags-tr">
<td class="peep_label">{label name="meta-tags"}</td>
<td class="peep_value">{input name="meta-tags"}
<br />{error name="meta-tags"}
</td>
<td class="peep_description peep_small"> {desc name="meta-tags"}
</td>
</tr>
<tr class="{cycle values="peep_alt2,peep_alt1"} peep_tr_last" id="content-tr">
<td class="peep_label">{label name="content"}</td>
<td class="peep_value">{input name="content"}
<br />{error name="content"}
</td>
<td class="peep_description peep_small"> {desc name="content"}</td>
</tr>
</table>
<div class="clearfix peep_stdmargin"><div class="peep_right">{submit name="submit" class="peep_positive"}</div></div>
{/form}
?>