function object_enum_tag($object, $method, $options)
{
    $enumValues = _get_option($options, 'enumValues', array());
    $currentValue = _get_object_value($object, $method);
    $enumValues = array_combine($enumValues, $enumValues);
    return select_tag(_convert_method_to_name($method, $options), options_for_select($enumValues, $currentValue), $options);
}
Пример #2
0
/**
* Determines the possible index/value pairs for the given table/field from their
* Peer objects. Sets the selected index to the value in $selected. Returns the
* HTML for a <select> field accordingly.
*/
function enum_values_select_tag($table, $field, $selected = null)
{
    //Load the options
    $options = call_user_func(array($table . 'Peer', 'get' . $field . 's'));
    //Return the select area
    return select_tag(strtolower($table) . '[' . strtolower($field) . ']', options_for_select($options, $selected), array('style' => 'width: 125px'));
}
 public function testBooleanOptions()
 {
     $this->assertDomEqual(check_box_tag('admin', 1, true, array('disabled' => true, 'readonly' => true)), '<input checked="checked" disabled="disabled" id="admin" name="admin" readonly="readonly" type="checkbox" value="1" />');
     $this->assertDomEqual(check_box_tag('admin', 1, true, array('disabled' => false, 'readonly' => null)), '<input checked="checked" id="admin" name="admin" type="checkbox" value="1" />');
     $this->assertDomEqual(select_tag('people', '<option>raph</option>', array('multiple' => true)), '<select id="people" name="people" multiple="multiple"><option>raph</option></select>');
     $this->assertDomEqual(select_tag('people', '<option>raph</option>', array('multiple' => null)), '<select id="people" name="people"><option>raph</option></select>');
 }
Пример #4
0
function sf_simple_cms_slot($page, $slot, $default_text = null, $default_type = 'Text')
{
    $context = sfContext::getInstance();
    $request = $context->getRequest();
    $culture = $request->getAttribute('culture');
    $slot_object = $page->getSlot($slot, constant(sfConfig::get('app_sfSimpleCMS_escaping_strategy', 'ESC_RAW')));
    if (!$slot_object) {
        $slot_object = new sfSimpleCMSSlot();
        $slot_object->setType($default_type);
        $slot_object->setCulture($culture);
    }
    $slot_value = $slot_object->getValue();
    $slot_type_name = $slot_object->getType();
    $slot_type_class = 'sfSimpleCMSSlot' . $slot_type_name;
    $slot_type = new $slot_type_class();
    if ($request->getParameter('edit') == 'true' && !$request->getParameter('preview')) {
        echo '<div class="editable_slot" title="' . __('Double-click to edit') . '" id="slot_' . $slot . '" onDblClick="Element.show(\'edit_' . $slot . '\');Element.hide(\'slot_' . $slot . '\');">';
        if ($slot_value) {
            // Get slot value from the slot type object
            echo $slot_type->getSlotValue($slot_object);
        } else {
            // default text
            echo $default_text ? $default_text : sfConfig::get('app_sfSimpleCMS_default_text', __('[add text here]'));
        }
        echo '</div>';
        echo form_remote_tag(array('url' => 'sfSimpleCMS/updateSlot', 'script' => 'true', 'update' => 'slot_' . $slot, 'success' => 'Element.show(\'slot_' . $slot . '\');
                        Element.hide(\'edit_' . $slot . '\');
                       ' . visual_effect('highlight', 'slot_' . $slot)), array('class' => 'edit_slot', 'id' => 'edit_' . $slot, 'style' => 'display:none'));
        echo input_hidden_tag('slug', $page->getSlug(), 'id=edit_path' . $slot);
        echo input_hidden_tag('slot', $slot);
        if (sfConfig::get('app_sfSimpleCMS_use_l10n', false)) {
            echo input_hidden_tag('sf_culture', $slot_object->getCulture());
        }
        // Get slot editor from the slot type object
        echo $slot_type->getSlotEditor($slot_object);
        echo label_for('slot_type', __('Type: '));
        echo select_tag('slot_type', options_for_select(sfConfig::get('app_sfSimpleCMS_slot_types', array('Text' => __('Simple Text'), 'RichText' => __('Rich text'), 'Php' => __('PHP code'), 'Image' => __('Image'), 'Modular' => __('List of partials/components'))), $slot_type_name));
        if ($rich = sfConfig::get('app_sfSimpleCMS_rich_editing', false)) {
            // activate rich text if global rich_editing is true and is the current slot is RichText
            $rich = $slot_type_name == 'RichText';
        }
        echo submit_tag('update', array('onclick' => $rich ? 'tinymceDeactivate()' . ';submitForm(\'edit_' . $slot . '\'); return false' : '', 'class' => 'submit_tag'));
        echo button_to_function('cancel', 'Element.hide(\'edit_' . $slot . '\');Element.show(\'slot_' . $slot . '\');', 'class=submit_tag');
        echo '</form>';
    } else {
        echo $slot_type->getSlotValue($slot_object);
    }
}
/**
 * Returns a <selectize> tag populated with all the languages in the world (or almost).
 *
 * The select_language_tag builds off the traditional select_tag function, and is conveniently populated with
 * all the languages in the world (sorted alphabetically). Each option in the list has a two or three character
 * language/culture code for its value and the language's name as its display title.  The country data is
 * retrieved via the sfCultureInfo class, which stores a wide variety of i18n and i10n settings for various
 * countries and cultures throughout the world. Here's an example of an <option> tag generated by the select_country_tag:
 *
 * <samp>
 *  <option value="en">English</option>
 * </samp>
 *
 * <b>Examples:</b>
 * <code>
 *  echo select_language_tag('language', 'de');
 * </code>
 *
 * @param  string $name     field name
 * @param  string $selected selected field values (two or three-character language/culture code)
 * @param  array  $options  additional HTML compliant <select> tag parameters
 *
 * @return string <selectize> tag populated with all the languages in the world.
 * @see select_tag, options_for_select, sfCultureInfo
 */
function object_multiselect_language_tag($name, $selected = null, $options = array())
{
    $c = new sfCultureInfo(sfContext::getInstance()->getUser()->getCulture());
    $languages = $c->getLanguages();
    if ($language_option = _get_option($options, 'languages')) {
        foreach ($languages as $key => $value) {
            if (!in_array($key, $language_option)) {
                unset($languages[$key]);
            }
        }
    }
    asort($languages);
    $option_tags = options_for_select($languages, $selected, $options);
    unset($options['include_blank'], $options['include_custom']);
    return select_tag($name, $option_tags, $options);
}
Пример #6
0
/**
 * Returns a <select> tag populated with all the states in the country.
 *
 * The select_state_tag builds off the traditional select_tag function, and is conveniently populated with 
 * all the states in the default country (sorted alphabetically). Each option in the list has a state code (two-character 
 * for US and Canada) for its value and the state's name as its display title.
 * The options[] array may also contain the following non-html options:
 *   A states[] array containing a list of states to be added in the form array
 * Here's an example of an <option> tag generated by the select_state_tag:
 *
 * <samp>
 *  <option value="NY">New York</option>
 * </samp>
 *
 * <b>Examples:</b>
 * <code>
 *  echo select_state_tag('state', 'NY');
 * </code>
 *
 * @param  string field name 
 * @param  string selected field value (two-character state code)
 * @param  string country (two-character country code)
 * @param  array  additional HTML compliant <select> tag parameters. 
 *                May also include a 'states[]' array containing a list of states to be removed from the list
 *                May also include a 'country' value that will select the states from a country code
 * @return string <select> tag populated with all the states in the default or selected country.
 * @see select_tag, options_for_select
 */
function select_state_tag($name, $value, $options = array())
{
    if (isset($options['country'])) {
        $country = $options['country'];
        unset($options['country']);
    }
    $states = getStates($country);
    if (isset($options['states']) && is_array($options['states'])) {
        foreach ($options['states'] as $key) {
            if (isset($states[$key])) {
                unset($states[$key]);
            }
        }
        unset($options['states']);
    }
    if (isset($options['sort'])) {
        asort($states);
        unset($options['sort']);
    }
    $option_tags = options_for_select($states, $value);
    return select_tag($name, $option_tags, $options);
}
Пример #7
0
echo form_tag('#', array("id" => "disegni-decreti-filter", "class" => $active ? 'active' : ''));
?>
  <fieldset class="labels">
    <label for="filter_article">articolo:</label>
    <label for="filter_site">sede:</label>
    <label for="filter_presenter">presentatore:</label>
    <label for="filter_status">status:</label>
  </fieldset>
  <p>filtra per</p>
  <fieldset>
    <?php 
echo select_tag('filter_article', options_for_select($available_articles, $selected_article));
?>
                          
    <?php 
echo select_tag('filter_site', options_for_select($available_sites, $selected_site));
?>

    <?php 
echo select_tag('filter_presenter', options_for_select($available_presenters, $selected_presenter));
?>

    <?php 
echo select_tag('filter_status', options_for_select($available_statuses, $selected_status));
?>

    <?php 
echo submit_image_tag('btn-applica.png', array('id' => 'disegni-decreti-filter-apply', 'alt' => 'applica', 'style' => 'display: none;', 'name' => 'disegni-decreti-filter-apply'));
?>
  </fieldset>
</form>
Пример #8
0
        <label for="form-item-2">Mission Date Range</label>
        <?php 
echo $date_widget->render('mission_date1', $mission_date1);
?>
        <strong class="to">to</strong>
        <?php 
echo $date_widget->render('mission_date2', $mission_date2);
?>
      </div>
      <div class="holder1">
        <label>Wing</label>
                    <?php 
if (!isset($wing)) {
    $wing = null;
}
echo select_tag('wing', objects_for_select($wings, 'getId', 'getName', $wing, array('include_custom' => 'All')), array('id' => 'wing_list', 'class' => 'text'));
?>
      </div>
        <div class="holder2">
        <label>Passenger</label>
        <input name="pass_name" type="text" class="text1" value="<?php 
echo isset($pass_name) ? $pass_name : '';
?>
"/>
      </div>
        <div class="holder2">
        <label>Pilot</label>
        <input name="pilot_name" type="text" class="text1" value="<?php 
echo isset($pilot_name) ? $pilot_name : '';
?>
"/>
Пример #9
0
            	<?php 
echo image_tag('indicator.gif');
?>
 Assigning users...
            </p>
          </div>
          
          <div id="task-status-holder">
          <?php 
echo form_remote_tag(array('update' => 'task-' . $task->getUuid() . '-holder', 'url' => 'project/ajaxSetTaskStatus', 'loading' => "Element.show('indicator-" . $task->getUuid() . "-status')", 'complete' => "Element.hide('indicator-" . $task->getUuid() . "-status');" . visual_effect('highlight', 'task-' . $task->getUuid())));
?>
          		<?php 
echo input_hidden_tag('task', $task->getUuid(), array());
?>
          		<?php 
echo select_tag('task-status', options_for_select(array('2' => 'Pending/In Planning', '1' => 'In Progress', '0' => 'Complete'), $task->getStatus()));
?>
          		<?php 
echo submit_tag('go', array());
?>
          	</form>
          </div>
          <div style="height:20px">
            <p id="indicator-<?php 
echo $task->getUuid();
?>
-status" style="display:none">
            	<?php 
echo image_tag('indicator.gif');
?>
 Settings task status...
Пример #10
0
/**
 * Returns a <select> tag populated with all the timezones in the world.
 *
 * The select_timezone_tag builds off the traditional select_tag function, and is conveniently populated with 
 * all the timezones in the world (sorted alphabetically). Each option in the list has a unique timezone identifier 
 * for its value and the timezone's locale as its display title.  The timezone data is retrieved via the sfCultureInfo
 * class, which stores a wide variety of i18n and i10n settings for various countries and cultures throughout the world.
 * Here's an example of an <option> tag generated by the select_timezone_tag:
 *
 * <b>Options:</b>
 * - display - 
 *     identifer         - Display the PHP timezone identifier (e.g. America/Denver)
 *     timezone          - Display the full timezone name (e.g. Mountain Standard Time)
 *     timezone_abbr     - Display the timezone abbreviation (e.g. MST)
 *     timzone_dst       - Display the full timezone name with daylight savings time (e.g. Mountain Daylight Time)
 *     timezone_dst_abbr - Display the timezone abbreviation with daylight savings time (e.g. MDT)
 *     city              - Display the city/region that relates to the timezone (e.g. Denver)
 * 
 * <samp>
 *  <option value="America/Denver">America/Denver</option>
 * </samp>
 *
 * <b>Examples:</b>
 * <code>
 *  echo select_timezone_tag('timezone', 'America/Denver');
 * </code>
 *
 * @param  string $name      field name 
 * @param  string $selected  selected field value (timezone identifier)
 * @param  array  $options   additional HTML compliant <select> tag parameters
 *
 * @return string <select> tag populated with all the timezones in the world.
 * @see select_tag, options_for_select, sfCultureInfo
 */
function select_timezone_tag($name, $selected = null, $options = array())
{
    static $display_keys = array('identifier' => 0, 'timezone' => 1, 'timezone_abbr' => 2, 'timezone_dst' => 3, 'timezone_dst_abbr' => 4, 'city' => 5);
    $display = _get_option($options, 'display', 'identifier');
    $display_key = isset($display_keys[$display]) ? $display_keys[$display] : 0;
    $c = sfCultureInfo::getInstance(sfContext::getInstance()->getUser()->getCulture());
    $timezone_groups = $c->getTimeZones();
    $timezones = array();
    foreach ($timezone_groups as $tz_group) {
        $array_key = isset($tz_group[0]) ? $tz_group[0] : null;
        if (isset($tz_group[$display_key]) and !empty($tz_group[$display_key])) {
            $timezones[$array_key] = $tz_group[$display_key];
        }
    }
    if ($timezone_option = _get_option($options, 'timezones')) {
        $timezones = array_intersect_key($timezones, array_flip((array) $timezone_option));
    }
    // Remove duplicate values
    $timezones = array_unique($timezones);
    asort($timezones);
    $option_tags = options_for_select($timezones, $selected);
    return select_tag($name, $option_tags, $options);
}
Пример #11
0
<fieldset >
  <h2><?php 
echo __('filtros');
?>
</h2>
  
  <div class="form-row">
  <?php 
echo label_for("filters[es_evento]", __('tipo') . ":");
?>
    <div class="content">
    <?php 
$opciones = array('0' => __('tareas'), '1' => __('eventos'));
$tipo_tarea = isset($filters['es_evento']) ? $filters['es_evento'] : null;
$value = select_tag('filters[es_evento]', options_for_select($opciones, $tipo_tarea, array('include_custom' => __('tareas y eventos'))));
echo $value ? $value : "&nbsp";
?>
    </div>
  </div>

  
  <div class="form-row">
    <?php 
echo label_for("filters[estado_tarea]", __('estado tarea') . ":");
?>
    <div class="content">
    <?php 
$opciones = TareaPeer::getAllEstadosTareas();
$html = "";
$html .= "<ul class=\"sf_admin_checklist\">\n";
echo form_tag();
?>
  <?php 
echo label_tag('data', 'Input Data: ') . '<br />' . text_area_tag('data', '', array('cols' => 80, 'rows' => 10));
?>
<br />
  <?php 
echo label_tag('uri', 'or Uri: ') . text_field_tag('uri', 'http://www.dajobe.org/foaf.rdf', array('size' => 80));
?>
<br />
  <?php 
echo label_tag('input_format', 'Input Format: ') . select_tag('input_format', $input_format_options, 'guess');
?>
<br />
  <?php 
echo label_tag('output_format', 'Output Format: ') . select_tag('output_format', $output_format_options, 'turtle');
?>
<br />
  <?php 
echo reset_tag();
?>
 <?php 
echo submit_tag();
?>
  <?php 
echo form_end_tag();
?>
</div>

<?php 
if (isset($_REQUEST['uri']) or isset($_REQUEST['data'])) {
Пример #13
0
        echo input_tag($name, $cs_setting->getValue(), 'size=55');
        break;
    case 'textarea':
        echo textarea_tag($name, $cs_setting->getValue());
        break;
    case 'yesno':
        echo 'Yes: ' . radiobutton_tag($name, 1, $cs_setting->getValue());
        echo 'No: ' . radiobutton_tag($name, 0, $cs_setting->getValue() ? false : true);
        break;
    case 'select':
        $options = _parse_attributes($cs_setting->getOptions());
        echo select_tag($name, options_for_select($options, $cs_setting->getValue(), 'include_blank=true'));
        break;
    case 'model':
        $config = _parse_attributes($cs_setting->getOptions());
        $method = $cs_setting->getOption('table_method');
        $method = $method ? $method : 'findAll';
        $options = Doctrine::getTable($cs_setting->getOption('model', true))->{$method}();
        echo select_tag($name, objects_for_select($options, 'getId', '__toString', $cs_setting->getValue()), 'include_blank=true');
        break;
    case 'wysiwyg':
        echo textarea_tag($name, $cs_setting->getvalue(), 'rich=true ' . $cs_setting->getOptions());
        break;
    case 'upload':
        echo $cs_setting->getValue() ? link_to($cs_setting->getValue(), public_path('uploads/setting/' . $cs_setting->getValue())) . '<br />' : '';
        echo input_file_tag($name, $cs_setting->getValue(), $cs_setting->getOptions());
        break;
    default:
        echo input_tag($name, $cs_setting->getValue(), 'size=55');
        break;
}
}
if (!isset($_REQUEST['input_format'])) {
    $_REQUEST['input_format'] = 'guess';
}
// Display the form, if raw option isn't set
if (!isset($_REQUEST['raw'])) {
    print "<html>\n";
    print "<head><title>EasyRdf Converter</title></head>\n";
    print "<body>\n";
    print "<h1>EasyRdf Converter</h1>\n";
    print "<div style='margin: 10px'>\n";
    print form_tag();
    print label_tag('data', 'Input Data: ') . '<br />' . text_area_tag('data', '', array('cols' => 80, 'rows' => 10)) . "<br />\n";
    print label_tag('uri', 'or Uri: ') . text_field_tag('uri', 'http://www.dajobe.org/foaf.rdf', array('size' => 80)) . "<br />\n";
    print label_tag('input_format', 'Input Format: ') . select_tag('input_format', $input_format_options) . "<br />\n";
    print label_tag('output_format', 'Output Format: ') . select_tag('output_format', $output_format_options) . "<br />\n";
    print label_tag('raw', 'Raw Output: ') . check_box_tag('raw') . "<br />\n";
    print reset_tag() . submit_tag();
    print form_end_tag();
    print "</div>\n";
}
if (isset($_REQUEST['uri']) or isset($_REQUEST['data'])) {
    // Parse the input
    $graph = new EasyRdf_Graph($_REQUEST['uri']);
    if (empty($_REQUEST['data'])) {
        $graph->load($_REQUEST['uri'], $_REQUEST['input_format']);
    } else {
        $graph->parse($_REQUEST['data'], $_REQUEST['input_format'], $_REQUEST['uri']);
    }
    // Lookup the output format
    $format = EasyRdf_Format::getFormat($_REQUEST['output_format']);
Пример #15
0
?>
</span>

<div id="fake_div">

<div id="outing_wizard">

<hr />
<h4><?php 
echo __('Step 1: choose a summit');
?>
</h4>
<div>
<?php 
echo global_form_errors_tag();
echo select_tag('wizard_type', options_for_select(array('summits' => __('Summit:'), 'sites' => __('Site:')), 0));
echo input_tag('summits_name', '', array('size' => '35'));
echo input_tag('sites_name', '', array('size' => '35', 'style' => 'display:none'));
echo javascript_queue("var indicator = \$('#indicator');\n\$('#wizard_type').change(function() {\n  \$('#summits_name, #sites_name').val('').toggle();\n  \$('#wizard_no_route, #wizard_route, #summit_link, #last_ok').hide();\n\n  var summit = \$(this).val() == 'summits';\n  \$('#wizard_routes_hints').toggle(summit);\n  \$('#wizard_sites_hints').toggle(!summit);\n  \n});\n\n\$('#summits_name').c2cAutocomplete({\n  url: '" . url_for('summits/autocomplete') . "',\n  minChars: " . sfConfig::get('app_autocomplete_min_chars') . "\n}).on('itemselect', function(e, item) {\n  indicator.show();\n  \$('#summit_id').val(item.id);\n  \$('#wizard_no_route, .wizard_hints').hide();\n  \$.get('" . url_for('summits/getroutes') . "',\n             'summit_id=' + \$('#summit_id').val() + '&div_name=routes')\n    .always(function() { indicator.hide(); })\n    .done(function(data) {\n      \$('#divRoutes').html(data);\n      \$('#last_ok h4').html(\$('#wizard_routes_hints h4').last().html());\n      \$('#wizard_no_route').hide();\n      \$('#summit_link, #wizard_route, #last_ok').show();\n      C2C.getWizardRouteRatings('routes');\n    })\n    .fail(function(data) {\n      \$('#wizard_route, #wizard_hints, #wizard_route_descr, #last_ok').hide();\n      \$('#summit_link, #wizard_no_route').show();\n      C2C.showFailure(data.responseText);\n    })\n});\n\n\$('#sites_name').c2cAutocomplete({\n  url: '" . url_for('sites/autocomplete') . "',\n  minChars: " . sfConfig::get('app_autocomplete_min_chars') . "\n}).on('itemselect', function(e, item) {\n  \$('.wizard_hints').hide();\n  \$('#last_ok h4').html(\$('#wizard_sites_hints h4').last().html());\n  \$('#last_ok').show();\n  \$('#link').val(item.id);\n});\n");
echo form_tag('outings/wizard');
echo input_hidden_tag('summit_id', '0');
?>
<p id="summit_link" style="display: none">
<a href="#" onclick="window.open('/summits/' + $('#summit_id').val());"><?php 
echo __('Show the summit');
?>
</a>
</p>
<p id="wizard_summit_create" class="wizard_tip"><?php 
echo __('No summit matching your search?') . ' ' . link_to(__('Add your summit'), '@document_edit?module=summits&id=&lang=');
?>
Пример #16
0
                <label for="ff_city">City</label>
                <input type="text" class="text" value="<?php 
echo $city;
?>
" id="ff_city" name="city"/>
                <br clear="left"/>
                <label for="ff_state">State</label>
                <input type="text" class="text" value="<?php 
echo $state;
?>
" id="ff_state" name="state"/>
              </div>
              <div>
                <label for="ff_country">Country</label>
                <?php 
echo select_tag('country', options_for_select($countries, $country, array('include_custom' => '- any -')), array('id' => 'ff_country', 'class' => 'text narrow'));
?>
                <br clear="left"/>
                <label for="ff_county">County</label>
                <input type="text" class="text" value="<?php 
echo $county;
?>
" id="ff_county" name="county"/>
              </div>
              <div>
                <div class="location-as">
                  <ul>
                    <li>
                      <input type="checkbox" id="ff_deceased" value="1" <?php 
if ($deceased) {
    echo 'checked="checked"';
Пример #17
0
">
  <?php 
if ($sf_request->hasError('tabla{id_usuario}')) {
    ?>
    <?php 
    echo form_error('tabla{id_usuario}', array('class' => 'form-error-msg'));
    ?>
  <?php 
}
?>

  <?php 
$usuario_actual = Usuario::getUsuarioActual();
$usuarios = $usuario_actual->getUsuariosAccesibles();
$opciones = objects_for_select($usuarios, 'getPrimaryKey', 'getNombreCompleto', $tabla->getIdUsuario());
$value = select_tag('tabla[id_usuario]', $opciones, array('control_name' => 'tabla[id_usuario]'));
echo $value ? $value : '&nbsp;';
?>
  </div>
</div>

<div class="form-row">
  <?php 
echo label_for('tabla[id_categoria]', __($labels['tabla{id_categoria}']));
?>
  <div class="content<?php 
if ($sf_request->hasError('tabla{id_categoria}')) {
    ?>
 form-error<?php 
}
?>
Пример #18
0
     function linkTo() {
        var obj = document.getElementById('idDocente');
        location.href = "<?php 
echo url_for('docenteHorario/list', false);
?>
/idDocente/"+obj.options[obj.selectedIndex].value;
     }
	</script>		
<?php 
use_helper('Misc');
echo form_tag('docenteHorario/grabarDocenteHorario', 'onSubmit="selectItem()"');
?>
<div id="sf_admin_container">
<br> 
<h1>Docente  <?php 
echo select_tag('idDocente', options_for_select($optionsDocente, $sf_params->get('idDocente')), 'onChange=linkTo()');
?>
</h1>
<div id="sf_admin_header"></div>
<br>
<div id="sf_admin_container">

<?php 
if (count($aHorario) > 0) {
    ?>
<h2>Horarios Tentativos</h2>
<table cellspacing="0" class="sf_admin_list">
  <thead>
  <tr>
    <th id="sf_admin_list_th_dia">Evento</th>
  </tr>
Пример #19
0
">
      <input type="hidden" name="filter" value="1"/>
      <div class="missions-available-filter">
        <div class="bg">
          <div class="characteristic_clean">
            <div class="holder">
              <div>
                <label for="ff_miss_ext_id">Mission External ID</label>
                <input type="text" class="text" value="<?php 
echo $miss_ext_id;
?>
" id="ff_miss_ext_id" name="miss_ext_id"/>
                <br clear="left"/>
                <label for="ff_mission_type">Mission Type</label>
                <?php 
echo select_tag('miss_type', options_for_select($types, $miss_type, array('include_custom' => '- any -')), array('id' => 'ff_mission_type', 'class' => 'text'));
?>
              </div>
               <div>
                <label for="ff_miss_date1">Start Date</label>
                <?php 
echo $date_widget->render('miss_date1', $miss_date1);
?>
                <br clear="left"/>
                <label for="ff_miss_date2">End Date</label>
                <?php 
echo $date_widget->render('miss_date2', $miss_date2);
?>
              </div>
               <div>
                <label for="ff_pass_fname">Passenger First Name</label>
Пример #20
0
 form-error<?php 
}
?>
">
  <?php 
if ($sf_request->hasError('tarea{id_estado_tarea}')) {
    ?>
    <?php 
    echo form_error('tarea{id_estado_tarea}', array('class' => 'form-error-msg'));
    ?>
  <?php 
}
?>
  <?php 
$opciones = TareaPeer::getAllEstadosTareas();
$value = select_tag('tarea[id_estado_tarea]', objects_for_select($opciones, 'getPrimaryKey', '__toString', $tarea->getIdEstadoTarea(), array('include_blank' => false, 'control_name' => 'tarea[id_estado_tarea]')));
echo $value ? $value : "&nbsp";
?>
  </div>
</div>

<div class="form-row">
  <?php 
echo label_for('tarea[fecha_inicio]', __($labels['tarea{fecha_inicio}']) . ":", '');
?>
  <div class="content<?php 
if ($sf_request->hasError('tarea{fecha_inicio}')) {
    ?>
 form-error<?php 
}
?>
Пример #21
0
<?php

$c = new Criteria();
$c->AddAscendingOrderByColumn(CuentaPeer::NOMBRE);
$cuentas = CuentaPeer::doSelect($c);
$optCuenta[""] = "";
foreach ($cuentas as $cuenta) {
    $optCuenta[$cuenta->getId()] = $cuenta->getNombre();
}
echo select_tag('alumno[fk_cuenta_id]', options_for_select($optCuenta, $alumno->getFkCuentaId()));
Пример #22
0
echo input_hidden_tag('employee_2', $employee_id);
?>

<table class="form">
<tr><td class="form">
	<table class="form_content" width="100%">
	<tbody>
    	<tr>
           <td class='first' width="20%" style="vertical-align:middle;"><label><?php 
echo __('Ditujukan Untuk');
?>
</label></td>
           <td class="first" width="2%" style="text-align:center; vertical-align:middle;">:</td>
		   <td class="first" style="vertical-align:middle;">
		   <?php 
echo select_tag('toward', options_for_select(array('', PublicInformation::STUDENT => __('Siswa'), PublicInformation::EMPLOYEE => __('Guru')), ''));
echo observe_field('toward', array('url' => 'employee_email/loadAttributes', 'update' => 'email_attribute', 'script' => 'true', 'with' => "'toward='+\$('toward').value+'&id='+\$('id').value"));
?>
           </td>
        </tr>
        <tr>
			<td colspan="3" class="first">
				<div id="email_attribute">
					<?php 
if (isset($email_attr_tmpl)) {
    include $email_attr_tmpl;
}
?>
				</div>
			</td>
		</tr>
Пример #23
0
/**
 * Returns a <select> tag populated with all the timezones in the world.
 *
 * The select_timezone_tag builds off the traditional select_tag function, and is conveniently populated with 
 * all the timezones in the world (sorted alphabetically). Each option in the list has a unique timezone identifier 
 * for its value and the timezone's locale as its display title.  The timezone data is retrieved via the sfCultureInfo
 * class, which stores a wide variety of i18n and i10n settings for various countries and cultures throughout the world.
 * Here's an example of an <option> tag generated by the select_timezone_tag:
 *
 * <b>Options:</b>
 * - display - 
 *     identifer         - Display the PHP timezone identifier (e.g. America/Denver)
 *     timezone          - Display the full timezone name (e.g. Mountain Standard Time)
 *     timezone_abbr     - Display the timezone abbreviation (e.g. MST)
 *     timzone_dst       - Display the full timezone name with daylight savings time (e.g. Mountain Daylight Time)
 *     timezone_dst_abbr - Display the timezone abbreviation with daylight savings time (e.g. MDT)
 *     city              - Display the city/region that relates to the timezone (e.g. Denver)
 * 
 * <samp>
 *  <option value="America/Denver">America/Denver</option>
 * </samp>
 *
 * <b>Examples:</b>
 * <code>
 *  echo select_timezone_tag('timezone', 'America/Denver');
 * </code>
 *
 * @param  string field name 
 * @param  string selected field value (timezone identifier)
 * @param  array  additional HTML compliant <select> tag parameters
 * @return string <select> tag populated with all the timezones in the world.
 * @see select_tag, options_for_select, sfCultureInfo
 */
function select_timezone_tag($name, $selected = null, $options = array())
{
    if (!isset($options['display'])) {
        $options['display'] = 'identifier';
    }
    $c = new sfCultureInfo(sfContext::getInstance()->getUser()->getCulture());
    $timezone_groups = $c->getTimeZones();
    $display_key = 0;
    switch ($options['display']) {
        case "identifier":
            $display_key = 0;
            break;
        case "timezone":
            $display_key = 1;
            break;
        case "timezone_abbr":
            $display_key = 2;
            break;
        case "timezone_dst":
            $display_key = 3;
            break;
        case "timezone_dst_abbr":
            $display_key = 4;
            break;
        case "city":
            $display_key = 5;
            break;
        default:
            $display_key = 0;
            break;
    }
    unset($options['display']);
    $timezones = array();
    foreach ($timezone_groups as $tz_group_key => $tz_group) {
        $array_key = null;
        foreach ($tz_group as $tz_key => $tz) {
            if ($tz_key == 0) {
                $array_key = $tz;
            }
            if ($tz_key == $display_key and !empty($tz)) {
                $timezones[$array_key] = $tz;
            }
        }
    }
    if ($timezone_option = _get_option($options, 'timezones')) {
        $diff = array_diff_key($timezones, array_flip((array) $timezone_option));
        foreach ($diff as $key => $v) {
            unset($timezones[$key]);
        }
    }
    // Remove duplicate values
    $timezones = array_unique($timezones);
    asort($timezones);
    $option_tags = options_for_select($timezones, $selected);
    return select_tag($name, $option_tags, $options);
}
Пример #24
0
}
?>

		<?php 
if ($oAppCommon->ssButtonTopMenu) {
    include_partial('global/buttonTopMenu');
}
echo jq_form_remote_tag(array('update' => $oAppCommon->ssDivId, 'url' => $oAppCommon->ssLink), array('name' => 'frmSearch', 'id' => 'frmSearch', 'method' => 'post', 'class' => 'fright'));
echo input_hidden_tag('ssSortOn', $oAppCommon->ssSortOn);
echo input_hidden_tag('ssSortBy', $oAppCommon->ssSortBy);
?>
		<div><?php 
echo __("Search By");
?>
&nbsp; <?php 
echo select_tag('ssSearchOption', options_for_select($oAppCommon->aSearchOptions, $sf_params->get('ssSearchOption')), array('tabindex' => 2));
?>
		</div>
		<div class="searchinput"><?php 
echo __('Search For');
?>
&nbsp;<?php 
echo input_tag('ssSearchWord', trim($sf_params->get('ssSearchWord')), array('size' => '20', 'maxlength' => '100', 'tabindex' => 1));
?>
</div>
		<div class="menu padding0"><?php 
echo submit_tag(__('Search'), array('title' => __('Search'), 'tabindex' => 1));
?>
		</div>
		<div class="menu padding0"><?php 
echo link_to(__('Show All'), $oAppCommon->ssLink, array('title' => __('Show All'), 'tabindex' => 1));
    echo input_tag('title', '', 'id=topic_title');
    ?>
    <?php 
    if (isset($forum)) {
        ?>
      <?php 
        echo input_hidden_tag('forum_name', $forum->getStrippedName());
        ?>
    <?php 
    } else {
        ?>
      <?php 
        echo label_for('forum', __('Forum', null, 'sfSimpleForum'));
        ?>
      <?php 
        echo select_tag('forum_name', options_for_select(sfSimpleForumForumPeer::getAllAsArray()));
        ?>
    <?php 
    }
    ?>
    
  <?php 
}
?>
  
  <?php 
echo form_error('body');
?>
  <?php 
echo label_for('body', __('Body', null, 'sfSimpleForum'));
?>
Пример #26
0
?>
</td>
					<td class='filter'><?php 
echo object_select_tag(isset($filters['CURRICULUM_ID']) ? $filters['CURRICULUM_ID'] : null, null, array('include_blank' => true, 'related_class' => 'Curriculum', 'text_method' => '__toString', 'control_name' => 'filters[CURRICULUM_ID]', 'peer_method' => 'doSelectFiltered'));
?>
</td>
					<td class='filter'><?php 
echo object_select_tag(isset($filters['ACADEMIC_CALENDAR_ID']) ? $filters['ACADEMIC_CALENDAR_ID'] : null, null, array('include_blank' => true, 'related_class' => 'AcademicCalendar', 'text_method' => '__toString', 'control_name' => 'filters[ACADEMIC_CALENDAR_ID]', 'peer_method' => 'doSelectFiltered'));
?>
</td>
					<td class='filter'><?php 
echo object_select_tag(isset($filters['CLASS_GROUP_ID']) ? $filters['CLASS_GROUP_ID'] : null, null, array('include_blank' => true, 'related_class' => 'ClassGroup', 'peer_method' => 'doSelectOrdered', 'control_name' => 'filters[CLASS_GROUP_ID]'));
?>
					</td>
					<td class='filter'><?php 
echo select_tag('filters[STATUS]', options_for_select(array(Student::STATUS_ACTIVE => __('_STUDENT_STATUS_ACTIVE_'), Student::STATUS_INACTIVE => __('_STUDENT_STATUS_INACTIVE_'), Student::STATUS_OVERDUE => __('_STUDENT_STATUS_OVERDUE_'), Student::STATUS_FINAL => __('_STUDENT_STATUS_FINAL_'), Student::STATUS_GRADUATE => __('_STUDENT_STATUS_GRADUATE_')), isset($filters['STATUS']) ? $filters['STATUS'] : null, array('include_blank' => true)));
?>
</td>
				</tr>
			</thead>
			<tbody>
			<?php 
if ($pager->getNbResults() < 1) {
    ?>
				<tr class="list">
					<td colspan="100">
					<div class="no_record"><?php 
    echo __('No record found');
    ?>
</div>
					</td>
Пример #27
0
?>


<?php 
if ($DefParametro->getCampoOtroObjeto() != "") {
    $valoresObjeto = explode('#', $DefParametro->getCampoOtroObjeto());
    eval(trim($valoresObjeto[1]));
    ?>
<div class="form-row">
	<?php 
    echo label_for('otroObjeto', __(trim($valoresObjeto[0])));
    ?>
	<div class="row-data">
	<?php 
    $objects_for_select = objects_for_select($valorObjeto, trim($valoresObjeto[2]), trim($valoresObjeto[3]), $parametro->getOtroobjeto());
    echo select_tag('otroObjeto', $objects_for_select, array('style' => 'auto'));
    ?>
  </div>
</div>
<?php 
}
?>


<?php 
if ($DefParametro->getCamposino() != "") {
    ?>
<div class="form-row">
	<?php 
    echo label_for('sino', __($DefParametro->getCamposino()));
    ?>
Пример #28
0
<?php

use_helper('Validation');
use_helper('Object');
include_partial('global/page_header', array('title' => 'Weryfikacja właściciela bloga'));
echo form_tag('blog/verification');
?>
    <fieldset>
        <div class="row">
            <label for="login">Wybierz swój blog: </label>
            <?php 
echo select_tag('blog_id', objects_for_select($blogs, 'getId', 'getName'));
?>
        </div>
    
        <div class="infobox"><p class="center">Podaj swój login i hasło z <a href="http://forum.php.pl">Forum PHP.pl</a></p></div>
    
        <div class="row">
            <?php 
echo form_error('login');
?>
            <label for="login">Login: </label>
            <?php 
echo input_tag('login');
?>
        </div>
        
        <div class="row">
            <?php 
echo form_error('password');
?>
Пример #29
0
 form-error<?php 
}
?>
">
    <?php 
if ($sf_request->hasError('legajopedagogico{fk_legajocategoria_id}')) {
    ?>
        <?php 
    echo form_error('legajopedagogico{fk_legajocategoria_id}', array('class' => 'form-error-msg'));
    ?>
    <?php 
}
?>

        <?php 
echo select_tag('legajopedagogico[fk_legajocategoria_id]', options_for_select($optionsCategoriaLegajo, $legajo_categoria_id));
?>
   </div>
        
        

</div>

        <div class="form-row">
        <?php 
echo label_for('adjunto', __('Agregar un nuevo adjunto:'));
?>
        <?php 
echo input_file_tag('file');
?>
        <?php 
Пример #30
0
    echo form_error('sf_asset{type}', array('class' => 'form-error-msg'));
    ?>
      <?php 
}
?>
      <?php 
foreach (sfConfig::get('app_sfAssetsLibrary_types', array('image', 'txt', 'archive', 'pdf', 'xls', 'doc', 'ppt')) as $type) {
    ?>
        <?php 
    $options[$type] = $type;
    ?>
      <?php 
}
?>
      <?php 
echo select_tag('sf_asset[type]', options_for_select($options, $sf_asset->getType()));
?>
    </div>
  </div>

  <?php 
include_partial('sfAsset/edit_form_custom', array('sf_asset' => $sf_asset));
?>

</fieldset>

<?php 
include_partial('edit_actions', array('sf_asset' => $sf_asset));
?>

</form>