} ?> <form action="" enctype="multipart/form-data" method="POST"> <?php if ($sf_params->get('gw')) { echo backend_hidden('gw', $sf_params->get('gw')); } if ($sf_params->get('gh')) { echo backend_hidden('gh', $sf_params->get('gh')); } if ($sf_params->get('gp')) { echo backend_hidden('gp', $sf_params->get('gp')); } if ($sf_params->get('gtw')) { echo backend_hidden('gtw', $sf_params->get('gtw')); } if ($sf_params->get('gth')) { echo backend_hidden('gth', $sf_params->get('gth')); } if ($sf_params->get('gtp')) { echo backend_hidden('gtp', $sf_params->get('gtp')); } echo backend_hidden('parentMediaId', $sf_params->get('parentMediaId')); echo backend_hidden('gallery_type', $sf_params->get('gallery_type', 0)); ?> <input type="hidden" name="submitted" value="yes"/> <input type="file" name="galleryPic"/> <input type="submit" value="Add"/> </form> </div> </body>
echo backend_input('attrPassword', $obj, array('labelname' => 'Password', 'model' => 'User', 'maxlength' => '50', 'onfocus' => ' validateEditForm();'), 'getPassword'); ?> <?php echo backend_input('Confirmpass', $obj, array('labelname' => 'Confirm password', 'model' => 'User', 'maxlength' => '50', 'validate' => 'compare', 'onfocus' => 'validateCompare(this.id, \'attrPassword\', \'Password\'); validateEditForm();'), 'getConfirmpass'); ?> <?php echo backend_input('attrPhone', $obj, array('labelname' => 'Phone', 'model' => 'User', 'maxlength' => '20'), 'getPhone'); ?> <?php echo backend_tags($tags, $obj); ?> </div> <div id='tab2' name='tabAdmin' style='display: none'> <?php echo backend_hidden('attrBackend', $obj, array('labelname' => 'Backend', 'model' => 'User'), 'getBackend'); ?> <?php echo backend_select('attrType', $obj, Lists::getListitemsForSelect('usertype'), array('labelname' => 'Type', 'model' => 'User'), 'getType'); ?> </div> <div id='tab3' name='tabUser' style='display: none'> <?php echo backend_date('attrBirthDate', $obj, array('labelname' => 'BirthDate', 'model' => 'User'), 'getBirthDate'); ?> <?php echo backend_select('attrEducation', $obj, Lists::getListitemsForSelect('educations'), array('labelname' => 'Education', 'model' => 'User'), 'getEducation'); ?> <?php echo backend_media('attrCv', $obj, array('labelname' => 'Cv', 'model' => 'User'), 'getCv');
function backend_gallery($objId, $options = array()) { $paramsStr = ""; if ($options['width']) { $code .= backend_hidden('gw', $options['width']); $paramsStr .= "gw-" . $options['width'] . "-"; } if ($options['height']) { $code .= backend_hidden('gh', $options['height']); $paramsStr .= "gh-" . $options['height'] . "-"; } if ($options['path']) { $code .= backend_hidden('gp', $options['path']); $paramsStr .= "gp-" . $options['path'] . "-"; } if ($options['thumb_width']) { $code .= backend_hidden('gtw', $options['thumb_width']); $paramsStr .= "gtw-" . $options['thumb_width'] . "-"; } if ($options['thumb_height']) { $code .= backend_hidden('gth', $options['thumb_height']); $paramsStr .= "gth-" . $options['thumb_height'] . "-"; } if ($options['thumb_path']) { $code .= backend_hidden('gtp', $options['thumb_path']); $paramsStr .= "gtp-" . $options['thumb_path'] . "-"; } $paramsStr = str_replace("/", "_", $paramsStr); $children = Document::getChildrenOf($objId, "Media"); $code = "<br><div id='line'></div><br><a href='javascript:;' onclick='addGalleryMedia(" . $objId . ",\"" . $paramsStr . "\")'>> Add pic to gallery</a><ul id='galleryPicsList'>"; foreach ($children as $pic) { $code .= "<li><img src='" . $pic->getRelativeThumbUrl() . "'><img onclick='deleteGalleryMedia(" . $objId . ", " . $pic->getId() . ");' src='/images/icons/delete.png'/></li>"; } $code .= "</ul>"; return $code; }
if ($moduleName && $documentName) { ?> <?php echo backend_hidden('moduleName', $moduleName); ?> <?php echo backend_hidden('documentName', $documentName); ?> <?php } ?> <?php echo backend_hidden('id', $obj, '', 'getId'); ?> <?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' => 'ListitemI18n', 'maxlength' => '255', 'required' => 'true', 'onfocus' => ' validateEditForm();'), 'getLabel'); ?> <?php if ($userType == "admin") { ?> <?php echo backend_input('attrValue', $obj, array('labelname' => 'Value', 'model' => 'ListitemI18n', 'maxlength' => '255'), 'getValue');
?> <?php echo backend_date('attrEndDate', $obj, array('labelname' => 'End date', 'model' => 'NewsI18n'), 'getEndDate'); ?> <?php echo backend_select('attrCulture', $obj, Lists::getListitemsForSelect('culture'), array('labelname' => 'Culture', 'model' => 'NewsI18n', 'unique' => 'true', 'required' => 'true', 'onchange' => ' validateEditForm();'), 'getCulture'); ?> <?php if ($obj) { echo backend_gallery($obj->getId(), array('width' => '600', 'thumb_width' => '100', 'path' => 'upload')); } ?> <?php echo backend_tags($tags, $obj); ?> </div> <div id='tab2' name='tabContent' style='display: none'> <?php echo backend_textarea('attrContent', $obj, array('labelname' => 'Content', 'model' => 'NewsI18n', 'size' => '50', 'richtext' => 'true', 'rows' => '10'), 'getContent'); ?> </div> <?php echo backend_hidden('imageFields', 'Image'); ?> <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>