Example #1
0
 /**
  * Generate html code for an options block.
  *
  * @param array $options the options
  * @param mixed $selected which one is selected?
  * @param array $params the parameters
  * @return string html options
  * @since 8.0.0
  */
 public static function html_select_options($options, $selected, $params = array())
 {
     return \html_select_options($options, $selected, $params);
 }
Example #2
0
function html_select($name, $options, $value = NULL, $attrs = array())
{
    $attrs += array('#option' => array(), 'name' => $name, 'id' => $name);
    return html_tag('select', $attrs, html_select_options($options, $value, $attrs['#option']));
}
Example #3
0
?>
</label>
            <input type="text" id="av_path" name="av_path" value="<?php 
p($_['av_path']);
?>
" title="<?php 
p($l->t('Path to clamscan executable.')) . ' ' . $l->t('Not required in Daemon Mode.');
?>
">
        </p>
        <p class='infected_action'>
            <label for="infected_action"><?php 
p($l->t('Action for infected files found while scanning'));
?>
</label>
            <select id="infected_action" name="infected_action"><?php 
print_unescaped(html_select_options(array('only_log' => $l->t('Only log'), 'delete' => $l->t('Delete file')), $_['infected_action']));
?>
</select>
        </p>
        <input type="hidden" name="requesttoken" value="<?php 
p($_['requesttoken']);
?>
" />
        <input type="submit" value="<?php 
p($l->t('Save'));
?>
" />
    </fieldset>
</form>
Example #4
0
    function form(array $options)
    {
        ?>
		<p><label for="<?php 
        echo $this->get_field_id('color');
        ?>
"><?php 
        _e('Color');
        ?>
</label>
        <select name="<?php 
        echo $this->get_field_name('color');
        ?>
">
        <?php 
        echo html_select_options(array('gray-tile' => 'Gray', 'blue-tile' => 'Blue', 'goldenrod-tile' => 'Goldenrod', 'amber-tile' => 'Amber'), $options['color'], true);
        ?>
        </select></p>

		<p><label for="<?php 
        echo $this->get_field_id('icon');
        ?>
"><?php 
        _e('Icon');
        ?>
</label>
        <select name="<?php 
        echo $this->get_field_name('icon');
        ?>
">
        <?php 
        echo html_select_options(array('compass' => 'Compass', 'download' => 'Download', 'developer' => 'Developer'), $options['icon'], true);
        ?>
        </select></p>
        
		<p><label for="<?php 
        echo $this->get_field_id('text');
        ?>
"><?php 
        _e('Text');
        ?>
</label>
		<textarea type="text" name="<?php 
        echo $this->get_field_name('text');
        ?>
" id="<?php 
        echo $this->get_field_id('text');
        ?>
" class="widefat"><?php 
        echo $options['text'];
        ?>
</textarea></p>

		<p><label for="<?php 
        echo $this->get_field_id('subtext');
        ?>
"><?php 
        _e('Sub Text');
        ?>
</label>
		<textarea type="text" name="<?php 
        echo $this->get_field_name('subtext');
        ?>
" id="<?php 
        echo $this->get_field_id('subtext');
        ?>
" class="widefat"><?php 
        echo $options['subtext'];
        ?>
</textarea></p>

		<p><label for="<?php 
        echo $this->get_field_id('url');
        ?>
"><?php 
        _e('Link URL');
        ?>
</label>
		<input type="text" name="<?php 
        echo $this->get_field_name('url');
        ?>
" id="<?php 
        echo $this->get_field_id('url');
        ?>
" class="widefat" value="<?php 
        echo $options['url'];
        ?>
"></p>

		<?php 
    }