<?php echo panel_hidden('documentName', $documentName); ?> <?php } ?> <?php if ($obj) { echo panel_hidden('http_ref', $_SERVER["HTTP_REFERER"] ? $_SERVER["HTTP_REFERER"] : $sf_request->getParameter('http_ref')); } ?> <?php echo panel_hidden('id', $obj, '', 'getId'); ?> <?php echo panel_hidden('parent', $sf_request->getParameter('parent')); ?> <fieldset class='drop-shadow'> <?php echo panel_input('attrLabel', $obj, array('labelname' => 'Label', 'model' => 'News', 'maxlength' => 255, 'required' => 'true', 'class' => 'large'), 'getLabel'); ?> <?php echo panel_input('attrShortDescription', $obj, array('labelname' => 'Short description', 'model' => 'News', 'maxlength' => 255, 'class' => 'large'), 'getShortDescription'); ?> <?php echo panel_image('attrImage', $obj, array('labelname' => 'Main picture', 'model' => 'News', 'allowed' => 'images'), 'getImage'); ?> <?php echo panel_date('attrStartDate', $obj, array('labelname' => 'Date', 'model' => 'News', 'withtime' => true), 'getStartDate'); ?>
<?php echo panel_input('attrPassword', $obj, array('labelname' => 'Password', 'model' => 'User', 'maxlength' => '50', 'class' => 'large'), 'getPassword'); ?> <?php echo panel_input('Confirmpass', $obj, array('labelname' => 'Confirm password', 'model' => 'User', 'maxlength' => '50', 'validate' => 'compare', 'class' => 'large'), 'getConfirmpass'); ?> <?php echo panel_input('attrPhone', $obj, array('labelname' => 'Phone', 'model' => 'User', 'maxlength' => '20'), 'getPhone'); ?> <?php echo panel_separator('hr', array('class' => 'brake')); ?> <?php echo panel_hidden('attrBackend', $obj, array('labelname' => 'Backend', 'model' => 'User'), 'getBackend'); ?> <?php echo panel_select('attrType', $obj, Lists::getListitemsForSelect('usertype'), array('labelname' => 'Type', 'model' => 'User'), 'getType'); ?> <?php //echo panel_date('attrBirthDate', $obj, array('labelname' => 'BirthDate' , 'model' => 'User'), 'getBirthDate'); ?> <?php echo panel_separator('hr', array('class' => 'brake')); ?> <?php if (count($tags) > 0) { echo panel_tags($tags, $obj); echo panel_separator('hr', array('class' => 'brake'));
<!-- START CONTENT --> <?php echo $sf_params->get('backendMsg'); ?> <form method='POST' action='' name='editForm' id='editForm'> <?php echo panel_hidden('moduleName', 'settings'); ?> <?php echo panel_hidden('id', $obj, '', 'getId'); ?> <?php echo panel_hidden('http_ref', $_SERVER["HTTP_REFERER"] ? $_SERVER["HTTP_REFERER"] : $sf_request->getParameter('http_ref')); ?> <fieldset class='drop-shadow'> <?php echo panel_input('attrValue', $val, array('labelname' => 'Value', 'model' => 'Settings', 'maxlength' => '255', 'required' => true, 'class' => 'large'), 'getValue'); ?> <?php echo panel_separator('hr', array('class' => 'brake')); ?> <?php echo panel_save_button(array('div' => 'buttons', 'class' => 'submit', 'value' => 'Save changes')); ?> </fieldset> </form> <div class='clear'></div> <!-- END CONTENT -->
function panel_textarea($name, $input = null, $options = array(), $methode = null) { /* $code = get_field_wrapper($options, $name); $isAdmin = 0; $user = sfContext::getInstance()->getUser()->getSubscriber(); if ($user && ($user->getType() == 'admin')) { $isAdmin = 1; } if ($options['richtext']) { $options['id'] = 'richtext_'.$name; $options['onclick'] = 'selectElement(this, '.$isAdmin.'); '.$options['onclick']; } if($options['validate']) $errSpan = "<span id='".$name."Error'></span>"; $code .= textarea_tag($name, get_val($input, $methode, $name), clear_options($options)); $code .= $errSpan;*/ // $out = get_field_wrapper($options, $name); $code = $out = ''; $content = get_val($input, $methode, $name); // parse Page->Content (richtext blocks) if ($content && array_key_exists("parse", $options) && array_key_exists("richtext", $options)) { $options['id'] = $name; $richtext = panel_get_richtext_blocks($content); //var_dump($richtext); if (count($richtext) > 0) { echo "<!-- found richtext in content -->\n"; // sort by RichText number ksort($richtext); $elementName = $options['labelname']; $elementId = $options['id']; foreach ($richtext as $i => $arr) { $options['labelname'] = $elementName . $i; $options['id'] = $elementId . $i; $edit = get_field_wrapper($options, $name . $i); $code = textarea_tag($name . $i, $arr['content'], clear_options($options)); // add hidden tag with TARGET for richtext content $out .= str_replace('##code##', $code, $edit) . panel_hidden('contentID' . $i, $arr['id']) . panel_hidden('contentTarget' . $i, $arr['target']); // target } return $out; } else { echo "<!-- no richtext in content -->\n"; if ($input) { // parse template content (richtext blocks) if ($template = get_val($input, 'getTemplate', 'attrTemplate')) { $richtext = panel_get_template_blocks($template); //var_dump($richtext); if (count($richtext) > 0) { // sort by RichText number ksort($richtext); $elementName = $options['labelname']; $elementId = $options['id']; foreach ($richtext as $i => $arr) { $options['labelname'] = $elementName . $i; $options['id'] = $elementId . $i; $edit = get_field_wrapper($options, $name . $i); $code = textarea_tag($name . $i, $arr['content'], clear_options($options)); // add hidden tag with TARGET for richtext content $out .= str_replace('##code##', $code, $edit) . panel_hidden('contentID' . $i, $arr['id']) . panel_hidden('contentTarget' . $i, $arr['target']); //targt } return $out; } else { echo "<!-- no richtext in template -->\n"; // $out = get_field_wrapper($options, $name); // if ($options['target']) // $out .= panel_hidden(str_replace('attrContent', 'contentTarget', $name), $options['target']); // $code = textarea_tag($name, $content, clear_options($options)); } } } return str_replace('##code##', $code, $out); } } else { $out = get_field_wrapper($options, $name); if (array_key_exists("target", $options)) { $out .= panel_hidden(str_replace('attrContent', 'contentTarget', $name), $options['target']); } if ($err = sfContext::getInstance()->getRequest()->getError($name)) { $options['class'] .= " error"; } $code = textarea_tag($name, $content, clear_options($options)); return str_replace('##code##', $code, $out); } }
?> " /> <?php if ($sf_params->get('gw')) { echo panel_hidden('gw', $sf_params->get('gw')); } if ($sf_params->get('gh')) { echo panel_hidden('gh', $sf_params->get('gh')); } if ($sf_params->get('gp')) { echo panel_hidden('gp', $sf_params->get('gp')); } if ($sf_params->get('gtw')) { echo panel_hidden('gtw', $sf_params->get('gtw')); } if ($sf_params->get('gth')) { echo panel_hidden('gth', $sf_params->get('gth')); } if ($sf_params->get('gtp')) { echo panel_hidden('gtp', $sf_params->get('gtp')); } ?> <span style="display: block;">Picture:</span> <input type="file" name="mainPic" /><br> <span style="display: block;">Description:</span> <textarea cols="33" rows="2" name="attrDescription"><?php echo $description; ?> </textarea><br> <input type="submit" value="Upload/Save" /> </form> </div> </body>