示例#1
0
?>
	</span>
	<span id="EXTERNAL" style="display:none">
		<?php 
echo backend_input('attrUrl', $obj, array('labelname' => 'Url', 'model' => 'PageI18n', 'maxlength' => 255, 'validate' => 'Url', 'onfocus' => 'validateField(\'attrUrl\', \'admin/validateUrl\')'), 'getUrl');
?>
	</span>

	<?php 
echo backend_input('attrNavigationTitle', $obj, array('labelname' => 'Navigation title', 'model' => 'PageI18n', 'maxlength' => 255, 'required' => 'true', 'onfocus' => ' validateEditForm();'), 'getNavigationTitle');
?>
	<?php 
echo backend_select('attrTemplate', $obj, $template, array('labelname' => 'Template', 'model' => 'PageI18n', 'required' => 'true', 'onchange' => ' validateEditForm();'), 'getTemplate');
?>
	<?php 
echo backend_checkbox('attrIsSecure', $obj, array('labelname' => 'Is secure', 'model' => 'PageI18n'), 'getIsSecure');
?>
	<?php 
echo backend_select('attrCulture', $obj, Lists::getListitemsForSelect('culture'), array('labelname' => 'Culture', 'model' => 'PageI18n', 'unique' => 'true', 'required' => 'true', 'onchange' => ' validateEditForm();'), 'getCulture');
?>
	
	<?php 
//echo backend_media('attrImage', $obj, array('labelname' => 'Background PNG' , 'model' => 'PageI18n', 'allowed' => 'png'), 'getImage');
?>
	<?php 
echo backend_input('attrGalleryLabel', $obj, array('labelname' => 'Gallery Label', 'model' => 'PageI18n', 'maxlength' => 255, 'onfocus' => ' validateEditForm();'), 'getGalleryLabel');
?>
	<?php 
if ($obj) {
    echo backend_gallery($obj->getId(), array('width' => '600', 'thumb_width' => '126', 'path' => 'upload'));
}
示例#2
0
function backend_tags($tags, $obj)
{
    $count = count($tags);
    if ($count) {
        $width = intval(100 / $count) - 1;
    }
    if ($count > 4) {
        $width = 19;
    }
    if ($count) {
        $widthStr = 'width="' . $width . '%"';
    }
    if ($count > 0) {
        $code = "<h3>Tags</h3>\n\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
    }
    $ind = 0;
    foreach ($tags as $tag) {
        if ($ind % 5 == 0) {
            $code .= "\t<tr>\n";
            $closed = false;
        }
        $code .= "\t\t<td>\n" . "\t\t\t" . backend_checkbox('tag_id_' . $tag->getId(), Document::hasTag($obj, $tag->getTagId()), array("class" => "check_box", "labelname" => "")) . "\n" . "\t\t</td>\n" . "\t\t<td " . $widthStr . " class=\"label_checkbox\">" . getLabelName($options['labelname'], $tag->getLabel()) . "</td>\n";
        if ($ind % 5 == 4) {
            $code .= "\t</tr>\n";
            $closed = true;
        }
        $ind++;
    }
    if ($count > 0) {
        if (!$closed) {
            $code .= "\t</tr>\n";
        }
        $code .= "</table>";
    }
    return $code;
}
示例#3
0
	<?php 
echo backend_hidden('parent', $sf_request->getParameter('parent'));
?>
	<?php 
if ($obj) {
    echo 'ID: ' . $obj->getId();
}
?>
	<?php 
echo backend_input('attrLabel', $obj, array('labelname' => 'Label', 'model' => 'Tag', 'maxlength' => 255, 'required' => 'true', 'onfocus' => ' validateEditForm();'), 'getLabel');
?>
	<?php 
echo backend_input('attrTagId', $obj, array('labelname' => 'Tag ID', 'model' => 'Tag', 'maxlength' => 255, 'required' => 'true', 'onfocus' => ' validateEditForm();'), 'getTagId');
?>
	<?php 
echo backend_input('attrModule', $obj, array('labelname' => 'Module', 'model' => 'Tag', 'maxlength' => 255, 'required' => 'true', 'onfocus' => ' validateEditForm();'), 'getModule');
?>
	<?php 
echo backend_input('attrDocumentModel', $obj, array('labelname' => 'Document Model', 'model' => 'Tag', 'maxlength' => 255, 'required' => 'true', 'onfocus' => ' validateEditForm();'), 'getDocumentModel');
?>
	<?php 
echo backend_checkbox('attrExclusive', $obj, array('labelname' => 'Exclusive', 'model' => 'Tag'), 'getExclusive');
?>
	<?php 
echo backend_tags($tags, $obj);
?>
	<div id='line'></div>
	<input id='btnSubmit' type='submit' class='save_btndisabled' value='' disabled/>
</form>
</div>
<script type="text/javascript">setTimeout(function(){$('#backendMsg').fadeOut(1000)},2000);</script>