<?php use_helper('Object', 'Language', 'Validation', 'MyForm'); // Here document = map echo '<div>'; display_document_edit_hidden_tags($document); echo '</div>'; echo mandatory_fields_warning(); include_partial('documents/language_field', array('document' => $document, 'new_document' => $new_document)); echo object_group_tag($document, 'name', array('class' => 'long_input')); echo form_section_title('Information', 'form_info', 'preview_info'); echo object_group_dropdown_tag($document, 'editor', 'mod_maps_editors_list'); echo object_group_dropdown_tag($document, 'scale', 'mod_maps_scales_list'); echo object_group_tag($document, 'code', array('class' => 'long_input')); echo form_section_title('Description', 'form_desc', 'preview_desc'); echo object_group_bbcode_tag($document, 'description', null, array('class' => 'mediumtext', 'abstract' => true)); include_partial('documents/form_history');
<?php use_helper('Object', 'Language', 'Validation', 'MyForm'); $creator = $document->getCreator(); // do not allow to modify the article type: // * only moderators have all right // * the creator can switch from personal to collaborative // * other users cannot $hide_article_type_edit = !$new_document && (!$sf_user->hasCredential('moderator') && $document->get('article_type') == 1 || !$sf_user->hasCredential('moderator') && $sf_user->getId() != $creator['id']); $hidden_fields = array(); echo '<div>'; if ($hide_article_type_edit) { array_push($hidden_fields, 'article_type'); } display_document_edit_hidden_tags($document, $hidden_fields); echo '</div>'; echo mandatory_fields_warning(array('article form warning')); include_partial('documents/language_field', array('document' => $document, 'new_document' => $new_document)); echo object_group_tag($document, 'name', array('class' => 'long_input')); echo form_section_title('Information', 'form_info', 'preview_info'); echo object_group_dropdown_tag($document, 'categories', 'mod_articles_categories_list', array('multiple' => true)); echo object_group_dropdown_tag($document, 'activities', 'app_activities_list', array('multiple' => true), false, null, null, '', '', 'picto_act act_'); if (!$hide_article_type_edit) { echo object_group_dropdown_tag($document, 'article_type', 'mod_articles_article_types_list'); } echo form_section_title('Description', 'form_desc', 'preview_desc'); echo object_group_bbcode_tag($document, 'abstract', null, array('no_img' => true, 'class' => 'smalltext')); echo object_group_bbcode_tag($document, 'description', __('article body'), array('class' => 'largetext')); include_partial('documents/form_history');
$response->addJavascript('/static/js/outings_edit.js', 'last'); if ($mw_contest_enabled) { $response->addJavascript('/static/js/mw.js', 'last'); } echo javascript_queue("C2C.confirm_outing_date_message = '" . addslashes(__('Has this outing really been done today?')) . "';\nC2C.confirm_outing_activities_message = '" . addslashes(__('Is really a multi-activity outing?')) . "';\nC2C.alert_outing_paragliding_message = '" . addslashes(__('paragliding can not be selected alone')) . "';\nC2C.confirm_snow_elevation_message = '" . addslashes(__('Snow elevation is correct?')) . "';"); // Here document = outing $link_with = $linked_doc ? $linked_doc->get('id') : 0; echo '<div>'; echo input_hidden_tag('document_id', $link_with); if ($new_document == false && $mw_contest_enabled == true) { echo javascript_queue('C2C.mw_contest_article_id=' . sfConfig::get('app_mw_contest_id')); // for use with MW contest } display_document_edit_hidden_tags($document, array('v4_id', 'v4_app')); echo '</div>'; echo mandatory_fields_warning(array('outing form warning')); include_partial('documents/language_field', array('document' => $document, 'new_document' => $new_document)); echo object_group_tag($document, 'name', array('class' => 'long_input')); echo form_section_title('Information', 'form_info', 'preview_info'); echo object_group_tag($document, 'date', array('callback' => 'object_input_date_tag', 'year_start' => date('Y'), 'year_end' => sfConfig::get('app_date_year_min'))); ?> <div class="article_gauche_5050"> <?php echo object_group_dropdown_tag($document, 'activities', 'app_activities_list', array('multiple' => true, 'na' => array(0)), true, null, null, '', '', 'picto_act act_'); ?> </div> <div class="article_droite_5050"> <?php echo __('select activities according to outing'); ?> </div>
use_helper('Object', 'Language', 'Validation', 'MyForm', 'Button', 'ModalBox'); $response = sfContext::getInstance()->getResponse(); $response->addJavascript('/static/js/routes_edit.js', 'last'); // Here document = route echo '<div>'; display_document_edit_hidden_tags($document, array('v4_id', 'v4_app')); if ($linked_doc) { $linked_with = $linked_doc->get('id'); $linked_name = $linked_doc->get('name'); } else { $linked_with = 0; } echo input_hidden_tag('summit_id', $linked_with); echo '</div>'; // FIXME: form validation : test this value to prevent value 0 upon route creation echo mandatory_fields_warning(array('route form warning')); include_partial('documents/language_field', array('document' => $document, 'new_document' => $new_document)); $prefix = $linked_name . __(' :'); echo object_group_tag($document, 'name', array('prefix' => $prefix, 'class' => 'bfc_input')); echo form_section_title('Information', 'form_info', 'preview_info'); echo object_group_dropdown_tag($document, 'activities', 'app_activities_list', array('multiple' => true, 'na' => array(0, 8)), true, null, null, '', '', 'picto_act act_'); ?> <div data-act-filter="none"> <div class="article_gauche_5050"> <?php echo object_group_tag($document, 'max_elevation', array('suffix' => 'meters', 'class' => 'short_input', 'type' => 'number', 'min' => '0', 'max' => '8900')); echo object_group_tag($document, 'min_elevation', array('suffix' => 'meters', 'class' => 'short_input', 'type' => 'number', 'min' => '0', 'max' => '8900')); echo object_group_tag($document, 'height_diff_up', array('suffix' => 'meters', 'class' => 'short_input', 'type' => 'number', 'min' => '0')); ?> <div data-act-filter="1 2 3 6 7"> <?php
<?php use_helper('Object', 'Language', 'Validation', 'MyForm'); // Here document = user echo '<div>'; display_document_edit_hidden_tags($document, array('v4_id')); // need the name, due to versioning and i18n in other models echo input_hidden_tag('name', $document->getName()); echo '</div>'; echo mandatory_fields_warning(array('user form warning')); echo form_section_title('Information', 'form_info', 'preview_info'); include_partial('documents/oam_coords', array('document' => $document)); echo object_group_dropdown_tag($document, 'category', 'mod_users_category_list'); echo object_group_dropdown_tag($document, 'activities', 'app_activities_list', array('multiple' => true), false, null, null, '', '', 'picto_act act_'); echo form_section_title('Description', 'form_desc', 'preview_desc'); include_partial('documents/language_field', array('document' => $document, 'new_document' => $new_document)); echo object_group_bbcode_tag($document, 'description', null, array('class' => 'largetext', 'abstract' => true)); include_partial('documents/form_history');
<?php use_helper('Object', 'Language', 'Validation', 'MyForm'); // Here document = summit echo '<div>'; display_document_edit_hidden_tags($document, array('v4_id')); echo '</div>'; echo mandatory_fields_warning(array('summit form warning')); include_partial('documents/language_field', array('document' => $document, 'new_document' => $new_document)); echo object_group_tag($document, 'name', array('class' => 'long_input')); echo form_section_title('Information', 'form_info', 'preview_info'); include_partial('documents/oam_coords', array('document' => $document)); // lon, lat fields + OAM map echo object_group_tag($document, 'elevation', array('suffix' => 'meters', 'class' => 'short_input', 'type' => 'number', 'min' => '0', 'max' => '8900')); echo object_group_tag($document, 'maps_info', array('class' => 'medium2_input'), true, null, null, '', true); echo object_group_dropdown_tag($document, 'summit_type', 'app_summits_summit_types'); echo form_section_title('Description', 'form_desc', 'preview_desc'); echo object_group_bbcode_tag($document, 'description', null, array('class' => 'medlargetext', 'abstract' => true)); include_partial('documents/form_history');