/** * Configures the current widget. * * @param array $options An array of options * @param array $attributes An array of default HTML attributes * * @see sfWidgetForm */ protected function configure($options = array(), $attributes = array()) { parent::configure($options, $attributes); $this->addOption('image', false); $this->addOption('date_widget', new sfWidgetFormDate()); $this->addOption('time_widget', new sfWidgetFormTime()); }
/** * options: * * form: Required sfForm instance rendered by this widget * * archiver: provide an archiver to sanitize results into a specific format (XML, YAML, etc). Default is array. * * global_attributes: if specified, attributes are passed as if to a widget. Apply to ALL widgets * * @param string $options * @param string $attributes * @return null * @author Brent Shaffer */ public function configure($options = array(), $attributes = array()) { $this->addRequiredOption('form'); $this->addOption('archiver'); $this->addOption('global_attributes', true); return parent::configure($options, $attributes); }
protected function configure($options = array(), $attributes = array()) { $this->addOption('image', false); $this->addOption('include_time', false); $this->addOption('date_widget', new sfWidgetFormInput()); parent::configure($options, $attributes); }
protected function configure($options = array(), $attributes = array()) { parent::configure($options, $attributes); $this->addOption('from_date'); $this->addOption('to_date'); if (LeavePeriodService::getLeavePeriodStatus() == LeavePeriodService::LEAVE_PERIOD_STATUS_FORCED) { $this->addOption('choices', null); $this->addOption('from_label', ''); $this->addOption('to_label', ''); $this->addOption('leave_period', ''); $this->addOption('from_label_template', ""); $this->addOption('to_label_template', ""); $this->addOption('template', '%leave_period% %from_date% %to_date%'); $this->setOption('from_date', new sfWidgetFormInputHidden(array(), array('id' => 'date_from'))); $this->setOption('to_date', new sfWidgetFormInputHidden(array(), array('id' => 'date_to'))); $this->setOption('leave_period', new sfWidgetFormChoice(array('choices' => array()), array('id' => 'period'))); } else { $this->addOption('from_label', ''); $this->addOption('to_label', 'to'); $this->addOption('from_label_template', "<label for='%from_id%' class='date_range_label'>%from_label%</label>"); $this->addOption('to_label_template', "<label for='%to_id%' class='date_range_label'>%to_label%</label>"); $this->addOption('template', '%from_label% %from_date% %to_label% %to_date%'); $this->setOption('from_date', new ohrmWidgetDatePicker(array(), array('id' => 'date_from'))); $this->setOption('to_date', new ohrmWidgetDatePicker(array(), array('id' => 'date_to'))); } }
public function configure($options = array(), $attributes = array()) { parent::configure($options, $attributes); /* Options used to create the embedded form */ $this->addRequiredOption('form_creation_method'); $this->addRequiredOption('edit_form_creation_method'); $this->addRequiredOption('child_form_name'); $this->addOption('child_form_title_method', ''); $this->addOption('title', ''); $this->addOption('form_creation_method_params', array()); $this->addOption('form_formatter', 'table'); $this->addOption('renderer_class', 'mtWidgetFormEmbedRenderer'); /* Options used to update the parent form */ $this->addRequiredOption('parent_form'); /* Initial object */ $this->addRequiredOption('objects'); /* Format options */ $this->addOption('toolbar-add', true); $this->addOption('toolbar-add-image', '/dcFormExtraPlugin/images/plus.png'); $this->addOption('toolbar-add-text', 'add'); $this->addOption('toolbar-clean', true); $this->addOption('toolbar-clean-text', 'clean'); $this->addOption('toolbar-clean-image', '/dcFormExtraPlugin/images/clean.png'); $this->addOption('toolbar-reset', true); $this->addOption('toolbar-reset-text', 'reset'); $this->addOption('toolbar-reset-image', '/dcFormExtraPlugin/images/update.png'); $this->addOption('delete-button-image', '/dcFormExtraPlugin/images/close-action.png'); $this->addOption('delete-button-text', 'delete'); }
public function configure($options = array(), $attributes = array()) { parent::configure($options, $attributes); $this->addOption('prefix_widget', new sfWidgetFormInput(array(), array('class' => 'mtWidgetFormCuilPrefix'))); $this->addOption('middle_widget', new sfWidgetFormInput(array(), array('class' => 'mtWidgetFormCuilMiddle'))); $this->addOption('suffix_widget', new sfWidgetFormInput(array(), array('class' => 'mtWidgetFormCuilSuffix'))); $this->addOption('separator', '-'); }
/** * @param array $options An array of options * @param array $attributes An array of default HTML attributes * * @see sfWidgetFormInput */ protected function configure($options = array(), $attributes = array()) { parent::configure($options, $attributes); $this->addOption('partial'); $this->addOption('buttons', array('add_file' => 'Add files...', 'upload' => 'Start upload', 'cancel' => 'Cancel upload')); $this->addOption('module_partial', false); $this->addOption('include_js', false); }
protected function configure($options = array(), $attributes = array()) { $attributes['size'] = "5"; $attributes['maxlength'] = "5"; $this->addOption('time_widget', new sfWidgetFormInput(array(), $attributes)); $this->addOption('start_stop', false); $this->addOption('interval', false); parent::configure($options, $attributes); }
public function configure($options = array(), $attributes = array()) { $this->addRequiredOption('choice_widget'); $this->addRequiredOption('update'); $this->addRequiredOption('url'); $this->addOption('on_empty'); $this->addOption('update_on_load', true); parent::configure($options, $attributes); }
protected function configure($options = array(), $attributes = array()) { parent::configure($options, $attributes); sfContext::getInstance()->getConfiguration()->loadHelpers('I18N'); $this->addOption('config', array()); $this->addOption('enable_timerange', false); $this->addOption('from_label', __('From:')); $this->addOption('to_label', __('To:')); }
/** * @param array $options An array of options * @param array $attributes An array of default HTML attributes * * @see sfWidgetFormInput * * * In reality builds an array of two controls using the [] form field * name syntax */ protected function configure($options = array(), $attributes = array()) { parent::configure($options, $attributes); $this->addOption('type', 'file'); $this->addOption('existing-html', false); $this->addOption('image-preview', null); $this->addOption('default-preview', null); $this->setOption('needs_multipart', true); }
/** * Configures the current widget. * * Available options: * * * image: The image path to represent the widget (false by default) * * config: A JavaScript array that configures the JQuery date widget * * culture: The user culture * * date_widget: The date widget instance to use as a "base" class * * @param array $options An array of options * @param array $attributes An array of default HTML attributes * * @see sfWidgetForm */ protected function configure($options = array(), $attributes = array()) { $this->addOption('image', false); $this->addOption('config', '{}'); $this->addOption('culture', ''); $this->addOption('date_widget', new sfWidgetFormDate()); parent::configure($options, $attributes); if ('en' == $this->getOption('culture')) { $this->setOption('culture', 'en'); } }
public function configure($options = array(), $attributes = array()) { $this->addOption('end_date', null); $this->addOption('start_date', date('Y-m-d')); $this->addOption('starts_on', 'Sunday'); $this->addOption('ends_on', 'Saturday'); $this->addOption('index_format', 'Y-m-d'); $this->addOption('display_format', 'F jS'); $this->addOption('display_end', false); $this->addOption('add_empty', true); parent::configure($options, $attributes); }
/** * Configures the current widget. * * Available options: * * @param array $options An array of options * @param array $attributes An array of default HTML attributes * * @see sfWidgetForm */ protected function configure($options = array(), $attributes = array()) { $this->addOption('format', '%day%/%month%/%year%'); if (isset($options['years'])) { $years = $options['years']; } else { $years = range(date('Y') - 15, date('Y') + 5); } $this->addOption('years', array_combine($years, $years)); $this->addOption('date_widget', new sfWidgetFormDate(array('format' => $this->getOption('format'), 'years' => $this->getOption('years')))); parent::configure($options, $attributes); }
/** * * @param array $options An array of options * @param array $attributes An array of default HTML attributes * @see sfWidgetFormInput * * * In reality builds an array of two controls using the [] form field * name syntax */ protected function configure($options = array(), $attributes = array()) { parent::configure($options, $attributes); $this->addOption('type', 'file'); $this->addOption('existing-html', false); // Provides an inline preview. You can also call getPreviewUrl() to get the // current preview URL for the image if there is one, which allows you to // preview outside the widget $this->addOption('image-preview', null); $this->addOption('default-preview', null); $this->setOption('needs_multipart', true); }
public function configure($options = array(), $attributes = array()) { $this->addOption('content', ''); $this->addOption('post_content', ''); $this->addOption('wrapper', 'div'); $this->addOption('id', null); $this->addOption('ajax_loader_css', 'display: none; width: 20px; margin-left: 5px; margin-right: 5px; float: right;'); $this->addOption('ajax_loader_id', null); $this->addOption('ajax_loader_url', '/dcFormExtraPlugin/images/ajax-loader.gif'); $this->addOption('provide_ajax_loader', false); parent::configure($options, $attributes); }
/** * Configures the current widget. * * Available options details in * http://www.symfony-project.org/plugins/sfDependentSelectPlugin * * @param array $options An array of options * @param array $attributes An array of default HTML attributes * * @see sfWidgetForm */ protected function configure($options = array(), $attributes = array()) { $this->addOption('depends', ''); $this->addOption('add_empty', true); // ajax $this->addOption('ajax', false); $this->addOption('cache', true); $this->addOption('params', array()); $this->addOption('url', sfContext::getInstance()->getController()->genUrl('sfDependentSelectAuto/_ajax')); // source $this->addRequiredOption('source_class', ''); $this->addOption('source_params', array()); parent::configure($options, $attributes); }
/** * Configures the current widget. * * Available options: * * @param string culture Sets culture for the widget * @param boolean change_month If date chooser attached to widget has month select dropdown, defaults to false * @param boolean change_year If date chooser attached to widget has year select dropdown, defaults to false * @param integer number_of_months Number of months visible in date chooser, defaults to 1 * @param boolean show_button_panel If date chooser shows panel with 'today' and 'done' buttons, defaults to false * @param string theme css theme for jquery ui interface, defaults to '/sfJQueryUIPlugin/css/ui-lightness/jquery-ui.css' * * @see sfWidgetForm */ protected function configure($options = array(), $attributes = array()) { if (sfContext::hasInstance()) { $this->addOption('culture', sfContext::getInstance()->getUser()->getCulture()); } else { $this->addOption('culture', "en"); } $this->addOption('change_month', false); $this->addOption('change_year', false); $this->addOption('number_of_months', 1); $this->addOption('show_button_panel', false); $this->addOption('theme', '/sfJQueryUIPlugin/css/ui-lightness/jquery-ui.css'); parent::configure($options, $attributes); }
protected function configure($options = array(), $attributes = array()) { sfContext::getInstance()->getConfiguration()->loadHelpers(array('Asset', 'Tag', 'JavascriptBase', 'Url')); parent::configure($options, $attributes); $this->addRequiredOption('widget'); $this->addRequiredOption('observed_id'); $this->addOption('evaluate_method', array('dcWidgetFormActivator', 'doDefaultEvaluation')); $this->addOption('evaluate_method_extra_params', array()); $this->addOption('callback', url_for('@dc_widget_form_activator')); $this->addOption('event', 'change'); $this->addOption('observed_boolean_ids', array()); $this->addOption('render_after_method', array('dcWidgetFormActivator', 'renderAfterUpdate')); $this->addOption('loading_image', image_tag('/dcReloadedFormExtraPlugin/images/ajax-loader.gif', array('class' => 'ajax-loader-image', 'alt_title' => 'loading'))); }
protected function configure($options = array(), $attributes = array()) { sfContext::getInstance()->getConfiguration()->loadHelpers(array('Asset', 'Tag', 'Javascript', 'Url')); parent::configure($options, $attributes); $this->addRequiredOption('title'); $this->addOption('criteria', new Criteria()); $this->addOption('update_container'); $this->addOption('fixed_values', array()); $this->addOption('associated'); $this->addOption('associated_container'); $this->addOption('associated_name'); $this->addOption('associated_student_url', url_for('csWidgetFormStudentMany/associatedStudents')); $this->addOption('associate_label', 'Add'); }
protected function configure($options = array(), $attributes = array()) { sfContext::getInstance()->getConfiguration()->loadHelpers(array('Asset', 'Tag', 'JavascriptBase', 'Url')); parent::configure($options, $attributes); $this->addRequiredOption('dependant_widget'); $this->addRequiredOption('observe_widget_id'); $this->addOption('observe_widget_is_boolean', false); $this->addOption('observe_callback', url_for('@dc_widget_form_ajax_dependence_changed')); $this->addOption('observe_event', 'change'); $this->addOption('indicator', image_tag('/dcReloadedFormExtraPlugin/images/ajax-loader.gif', array('class' => 'ajax-loader-image', 'alt_title' => 'loading'))); $this->addOption('get_observed_value_callback', null); $this->addoption('observed_value_callback_extra_param', null); $this->addOption('message_with_no_value', 'Please select a dependant value to update'); $this->addOption('after_ajax_js', ''); }
/** * Configures the current widget. * * Available options: * * @param string culture Sets culture for the widget * @param boolean change_month If date chooser attached to widget has month select dropdown, defaults to false * @param boolean change_year If date chooser attached to widget has year select dropdown, defaults to false * @param integer number_of_months Number of months visible in date chooser, defaults to 1 * @param boolean show_button_panel If date chooser shows panel with 'today' and 'done' buttons, defaults to false * @param string theme css theme for jquery ui interface, defaults to '/sfJQueryUIPlugin/css/ui-lightness/jquery-ui.css' * * @see sfWidgetForm */ protected function configure($options = array(), $attributes = array()) { if (sfContext::hasInstance()) { $this->addOption('culture', sfContext::getInstance()->getUser()->getCulture()); } else { $this->addOption('culture', "en"); } $this->addOption('change_month', false); $this->addOption('change_year', false); $this->addOption('number_of_months', 1); $this->addOption('show_button_panel', false); $this->addOption('date_format', null); $this->addOption('theme', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/cupertino/jquery-ui.css'); parent::configure($options, $attributes); }
/** * Configures the current widget. * * Available options: * * @param string culture Sets culture for the widget * @param boolean change_month If date chooser attached to widget has month select dropdown, defaults to false * @param boolean change_year If date chooser attached to widget has year select dropdown, defaults to false * @param integer number_of_months Number of months visible in date chooser, defaults to 1 * @param boolean show_button_panel If date chooser shows panel with 'today' and 'done' buttons, defaults to false * @param string theme css theme for jquery ui interface, defaults to '/sfJQueryUIPlugin/css/ui-lightness/jquery-ui.css' * * @see sfWidgetForm */ protected function configure($options = array(), $attributes = array()) { if (sfContext::hasInstance()) { $this->addOption('culture', sfContext::getInstance()->getUser()->getCulture()); } else { $this->addOption('culture', "en"); } $this->addOption('change_month', false); $this->addOption('change_year', false); $this->addOption('number_of_months', 1); $this->addOption('show_button_panel', false); $this->addOption('show_on', "both"); $this->addOption('button_image', "/images/icons/calendar.png"); $this->addOption('button_image_only', true); parent::configure($options, $attributes); }
protected function configure($options = array(), $attributes = array()) { $attributes['size'] = '8'; $attributes['maxlength'] = '8'; $this->addOption('widget_name'); $this->addOption('params', false); $this->addOption('default_date', false); $this->addOption('default_time', false); $this->addOption('date_widget', new sfWidgetFormInput()); $this->addOption('time_widget', new sfWidgetFormInput(array(), $attributes)); $this->addOption('date_time', new sfWidgetFormInputHidden()); $this->addOption('time_image', false); $this->addOption('time_start_stop', false); $this->addOption('time_interval', false); parent::configure($options, $attributes); }
protected function configure($options = array(), $attributes = array()) { sfContext::getInstance()->getConfiguration()->loadHelpers(array('Asset', 'Tag', 'JavascriptBase', 'Url')); parent::configure($options, $attributes); $this->addRequiredOption('widget'); $this->addRequiredOption('observed_id'); $this->addRequiredOption('on_change'); $this->addOption('callback', url_for('@dc_widget_form_jquery_dependence_changed')); $this->addOption('event', 'change'); $this->addOption('observed_boolean_ids', array()); $this->addOption('observed_can_be_empty_ids', array()); $this->addOption('loading_image', image_tag('/dcReloadedFormExtraPlugin/images/ajax-loader.gif', array('class' => 'ajax-loader-image', 'alt_title' => 'loading'))); $this->addOption('no_value_text', 'Please select a dependant value to update'); $this->addOption('or_null', false); $this->addOption('check_all_values_before_render_widget', false); }
/** * Configures the current widget. * * Available options: * * @param string culture Sets culture for the widget * @param boolean change_month If date chooser attached to widget has month select dropdown, defaults to false * @param boolean change_year If date chooser attached to widget has year select dropdown, defaults to false * @param integer number_of_months Number of months visible in date chooser, defaults to 1 * @param boolean show_button_panel If date chooser shows panel with 'today' and 'done' buttons, defaults to false * @param string theme css theme for jquery ui interface, defaults to '/sfFormExtraPlugin/css/ui-lightness/jquery-ui.css' * * @see sfWidgetForm */ protected function configure($options = array(), $attributes = array()) { if (sfContext::hasInstance()) { $this->addOption('culture', sfContext::getInstance()->getUser()->getCulture()); } else { $this->addOption('culture', "hu"); } $this->addOption('change_month', true); $this->addOption('change_year', true); $this->addOption('number_of_months', 1); $this->addOption('show_button_panel', false); $this->addOption('image', '/sfFormExtraPlugin/images/calendar.gif'); $this->addOption('theme', '/sfFormExtraPlugin/css/ui-lightness/jquery-ui.css'); $this->addOption('year_range', '-20:+20'); $this->addOption('show_week', false); $this->addOption('inline', false); parent::configure($options, $attributes); }
/** * Constructor. * * Available options: * * * choices: An array of possible choices (required) * * source: url, array of data or javascript function (required) * * template: The HTML template to use to render this widget * The available placeholders are: * * class * * autocomplete * * list * * @param array $options An array of options * @param array $attributes An array of default HTML attributes * * @see sfWidgetForm */ protected function configure($options = array(), $attributes = array()) { parent::configure($options, $attributes); $this->addRequiredOption('choices'); $this->addRequiredOption('source'); $this->addOption('list_options', array()); $this->addOption('help', 'Search here...'); $this->addOption('config', '{ }'); $this->addOption('template', <<<EOF <div class="%class% ui-widget"> \t<div class="%class%_autocomplete"> \t\t%autocomplete% \t</div> \t<div class="%class%_list" id="%id%_list"> \t\t%list% \t</div> </div> EOF ); }
/** * Constructor. * * Available options: * * * criteria: A default criteria for prefilter students * * filter_criterias: An array of csWidgetFormStudentManyFilterCriteria objects * * unassociate_label: String to show for unassociate button * * associate_label: String to show for associate buton * * fixed_values: An array of student ids that will not be allowed to be unset */ protected function configure($options = array(), $attributes = array()) { sfContext::getInstance()->getConfiguration()->loadHelpers(array('Asset', 'Tag', 'Javascript', 'Url')); parent::configure($options, $attributes); $this->addRequiredOption('criteria'); $this->addOption('unassociate_label', 'Delete'); $this->addOption('associate_label', 'Add'); $this->addOption('associated_title', 'Selected'); $this->addOption('unassociated_title', 'Select new values'); $this->addOption('fixed_values', array()); $this->addOption('fixed_values_help', "Highlighted students can't be deleted"); $this->addOption('update_filter_criterias', url_for('csWidgetFormStudentMany/updateFilterCriterias')); $this->addOption('filter_criterias', array(new csWidgetFormStudentManyFilterCriteriaAllStudents())); $this->addOption('template', <<<EOF <div class="cs_student_many"> <div class="associated"> <div class="title">%associated_title%</div> <ul class="associated_actions"> %associated_students_actions% </ul> <span class="help">%fixed_help%</span> <ul id="%associated_students_container%" class="associated_container"> %associated_students% </ul> </div> <div class="unassociated"> <div class="title">%unassociated_title%</div> <div class="unassociated_container"> %unassociated_criterias% <div id="%unassociated_criteria_container_id%"> %unassociated_criteria_container% </div> </div> </div> <div style="clear: both"></div> </div> EOF ); }
public function configure($options = array(), $attributes = array()) { //widget options $this->addRequiredOption('widget'); $this->addOption('add_button_label', 'Add'); $this->addOption('refresh_button_label', 'Refresh'); //popup window options $this->addRequiredOption('window_internal_url'); $this->addOption('window_options', "channelmode=1,width=700,height=500,location=0"); $this->addOption('window_title', 'Create'); //remote function options $this->addRequiredOption('peer_method'); $this->addRequiredOption('peer_class'); $this->addOption('peer_value_method', '__toString'); $this->addOption('peer_key_method', 'getPrimaryKey'); $this->addOption('add_empty', false); $this->addOption('peer_params', array()); //ajax loader $this->addOption('ajax_loader_css', 'display: none; width: 20px; margin-left: 5px; margin-right: 5px; float: right;'); $this->addOption('ajax_loader_id'); $this->addOption('ajax_loader_url', '/dcFormExtraPlugin/images/ajax-loader.gif'); parent::configure($options, $attributes); }
/** * Configures the widget. * * Available options: * * * value_widget: The widget that holds the searched value * * search_widget: The widget that performs the search * * selected_label: The label for the selected value * * search_label: The label inside the search button * * search_template: The search template * The available placeholders are: * * selected_label * * preview_div_id * * value_widget * * value * * search_widget * * search_label * * update_div_id * * widget_initialization_js * * value * * js_var * * results_partial The partial that displays the results * * select_image: The image for selecting a result * * deselect_image: The image for deselecting a result * * no_results_found_label: The text for empty results search * * @param array $options An array of options * @param array $attributes An array of default HTML attributes * * @see sfWidgetForm */ protected function configure($options = array(), $attributes = array()) { parent::configure($options, $attributes); $this->addRequiredOption("url"); $this->addOption("value_widget", new sfWidgetFormInputHidden()); $this->addOption("search_widget", new sfWidgetFormInput()); $this->addOption("selected_label", "Selected element"); $this->addOption("search_label", "Search"); $this->addOption("limit", 10); $this->addOption("search_template", <<<EOF <div class="preview">%selected_label%: <span id="%preview_div_id%">%value%</span></div> %value_widget% %search_widget% <button onclick="%js_var%.search(); return false;">%search_label%</button> <div id="%update_div_id%"></div> %widget_initialization_js% EOF ); $this->addOption("results_partial", "dc_ajax/pmWidgetFormJQuerySearch"); $this->addOption("select_image", "/dcReloadedFormExtraPlugin/images/accept.png"); $this->addOption("deselect_image", "/dcReloadedFormExtraPlugin/images/delete.png"); $this->addOption("no_results_found_label", "No results found"); }