public static function _init() { static::$_properties['name']['label'] = term('member.name'); static::$_properties['name']['validation']['min_length'][] = conf('member.name.validation.length.min'); static::$_properties['name']['validation']['max_length'][] = conf('member.name.validation.length.max'); if (is_enabled('notice') && conf('mention.isEnabled', 'notice')) { static::$_properties['name']['validation']['match_pattern'][] = sprintf('/^(%s)$/u', conf('member.name.validation.match_patterns.register')); $method = conf('member.name.validation.blacklist.method'); if (is_callable($method)) { static::$_properties['name']['validation']['not_in_array'][] = call_user_func($method); } } static::$_properties['register_type']['validation']['in_array'][] = Site_Member::get_accept_member_register_types(); $sex_options = Site_Form::get_form_options4config('term.member.sex.options'); static::$_properties['sex']['label'] = term('member.sex.label'); static::$_properties['sex']['form']['options'] = $sex_options; static::$_properties['sex']['validation']['in_array'][] = array_keys($sex_options); $options_public_flag = Site_Util::get_public_flags(); static::$_properties['sex_public_flag']['label'] = sprintf('%sの%s', term('member.sex.label'), term('public_flag.label')); static::$_properties['sex_public_flag']['form'] = Site_Form::get_public_flag_configs(); static::$_properties['sex_public_flag']['validation']['in_array'][] = $options_public_flag; static::$_properties['birthyear']['label'] = term('member.birthyear'); $options = Form_Util::get_year_options(conf('member.profile.birthday.year_from'), conf('member.profile.birthday.year_to')); static::$_properties['birthyear']['form']['options'] = $options; static::$_properties['birthyear']['validation']['in_array'][] = array_keys($options); static::$_properties['birthyear_public_flag']['label'] = sprintf('%sの%s', term('member.birthyear'), term('public_flag.label')); static::$_properties['birthyear_public_flag']['form'] = Site_Form::get_public_flag_configs(); static::$_properties['birthyear_public_flag']['validation']['in_array'][] = $options_public_flag; static::$_properties['birthday']['label'] = term('member.birthday'); static::$_properties['birthday_public_flag']['label'] = sprintf('%sの%s', term('member.birthday'), term('public_flag.label')); static::$_properties['birthday_public_flag']['form'] = Site_Form::get_public_flag_configs(); static::$_properties['birthday_public_flag']['validation']['in_array'][] = $options_public_flag; static::$_properties['invite_member_id'] = Util_Orm::get_relational_numeric_key_prop(false); }
public static function get_fieid_attribute(Validation $val, $name, $default_value = null, $is_textarea = false, $optional_attr = array()) { $field = $val->fieldset()->field($name); $label = ''; $input_attr = array(); $is_required = false; if (is_callable(array($field, 'get_attribute'))) { $input_attr = $field->get_attribute(); $input_attr = Arr::filter_keys($input_attr, array('validation', 'label'), true); if ((is_null($default_value) || empty($default_value) && !strlen($default_value)) && !is_null($field->get_attribute('value'))) { $default_value = $field->get_attribute('value'); } $is_required = $field->get_attribute('required') == 'required'; $label = $field->get_attribute('label'); } if (!is_array($optional_attr)) { $optional_attr = (array) $optional_attr; } if ($optional_attr) { $input_attr += $optional_attr; } if (empty($input_attr['id'])) { $input_attr['id'] = Site_Form::get_field_id($name); } if (empty($input_attr['class'])) { $input_attr['class'] = 'form-control'; } return array($default_value, $label, $is_required, $input_attr); }
public static function _init() { $format_options = conf('form.formats.options', 'news'); static::$_properties['format']['form']['options'] = $format_options; static::$_properties['format']['validation']['in_array'][] = array_keys($format_options); if (\Config::get('news.category.isEnabled')) { static::$_properties['news_category_id']['label'] = term('news.category.simple'); $news_category_id_options = \Util_Orm::conv_cols2assoc(Model_NewsCategory::get_all(array('sort_order' => 'asc')), 'id', 'label'); static::$_properties['news_category_id']['form']['options'] = $news_category_id_options; static::$_properties['news_category_id']['validation']['in_array'][] = array_keys($news_category_id_options); } else { static::$_properties['news_category_id']['form']['type'] = false; } //if (!Site_Util::check_editor_enabled('html_editor') || !(conf('image.isEnabled', 'news') && conf('image.isInsertBody', 'news'))) //{ // static::$_properties['body']['validation'][] = 'required'; //} if (conf('form.isSecure.isEnabled', 'news')) { $is_secure_options = \Site_Form::get_form_options4config('term.isSecure.options'); static::$_properties['is_secure']['form']['type'] = 'radio'; static::$_properties['is_secure']['label'] = term('isSecure.label'); static::$_properties['is_secure']['form']['options'] = $is_secure_options; static::$_properties['is_secure']['validation'] = array('required'); static::$_properties['is_secure']['validation']['in_array'][] = array_keys($is_secure_options); } }
public static function _init() { static::$_properties['default_public_flag']['form'] = Site_Form::get_public_flag_configs(); static::$_properties['default_public_flag']['validation']['in_array'][] = Site_Util::get_public_flags(); $option_keys = array('form_type', 'display_type', 'value_type', 'is_edit_public_flag', 'is_unique', 'is_disp_regist' => 'get_is_disp_options', 'is_disp_config' => 'get_is_disp_options', 'is_disp_search' => 'get_is_disp_options'); foreach ($option_keys as $option_key => $method) { if (is_int($option_key)) { $option_key = $method; $method = sprintf('get_%s_options', $option_key); } self::set_properties_options($option_key, $method); } }
public static function _init() { static::$_properties['public_flag']['form'] = \Site_Form::get_public_flag_configs(); static::$_properties['public_flag']['validation']['in_array'][] = \Site_Util::get_public_flags(); if (is_enabled('notice')) { static::$_observers['MyOrm\\Observer_DeleteNotice'] = array('events' => array('before_delete'), 'conditions' => array('foreign_table' => array('note' => 'value'), 'foreign_id' => array('id' => 'property'))); } if (is_enabled('timeline')) { $type_note = \Config::get('timeline.types.note'); // 更新時に timeline の sort_datetime, comment_count を更新 static::$_observers['MyOrm\\Observer_UpdateRelationalTables'] = array('events' => array('after_update'), 'relations' => array('model_to' => '\\Timeline\\Model_Timeline', 'conditions' => array('foreign_table' => array('note' => 'value'), 'foreign_id' => array('id' => 'property'), 'type' => array($type_note => 'value')), 'check_changed' => array('check_properties' => array('title', 'body', 'public_flag', 'sort_datetime', 'comment_count', 'like_count')), 'update_properties' => array('public_flag', 'sort_datetime', 'comment_count', 'like_count', 'updated_at'))); } }
public static function _init() { $format_options = conf('page.form.formats.options', 'content'); static::$_properties['format']['form']['options'] = $format_options; static::$_properties['format']['validation']['in_array'][] = array_keys($format_options); $is_secure_options = \Site_Form::get_form_options4config('term.isSecure.options'); static::$_properties['is_secure']['label'] = term('isSecure.label'); static::$_properties['is_secure']['form']['options'] = $is_secure_options; static::$_properties['is_secure']['validation']['in_array'][] = array_keys($is_secure_options); //if (!Site_Util::check_editor_enabled('html_editor')) //{ // static::$_properties['body']['validation'][] = 'required'; //} }
function field_public_flag($value = null, $type = 'select', $atter = array(), $name = 'public_flag') { if (!in_array($type, array('select', 'radio'))) { throw new InvalidArgumentException('Second parameter is invalid.'); } if (is_null($value)) { $value = conf('public_flag.default'); } $options = Site_Form::get_public_flag_options(); $data = array('value' => $value, 'name' => $name, 'atter' => $atter, 'options' => $options); if ($type == 'select') { $atter['class'] = 'form-control'; $data['atter'] = $atter; return render('_parts/field/select', $data); } return render('_parts/field/radio', $data); }
public static function _init() { static::$_properties['name']['label'] = term('album') . '名'; static::$_properties['public_flag']['form'] = \Site_Form::get_public_flag_configs(); static::$_properties['public_flag']['validation']['in_array'][] = \Site_Util::get_public_flags(); static::$_properties['foreign_table']['validation']['in_array'][] = Site_Util::get_album_foreign_tables(); if (is_enabled('notice')) { static::$_observers['MyOrm\\Observer_DeleteNotice'] = array('events' => array('before_delete'), 'conditions' => array('foreign_table' => array('album' => 'value'), 'foreign_id' => array('id' => 'property'))); } if (\Module::loaded('timeline')) { // 更新時に timeline の sort_datetime を更新 $observer_key = \Config::get('timeline.types.album'); static::$_observers['MyOrm\\Observer_UpdateRelationalTables'] = array('events' => array('after_update'), 'relations' => array('model_to' => '\\Timeline\\Model_Timeline', 'conditions' => array('foreign_table' => array('album' => 'value'), 'foreign_id' => array('id' => 'property'), 'type' => array($observer_key => 'value')), 'check_changed' => array('check_properties' => array('name', 'body', 'public_flag')), 'update_properties' => array('sort_datetime' => array('updated_at' => 'property')))); if (\Config::get('timeline.articles.cache.is_use')) { static::$_observers['MyOrm\\Observer_ExecuteToRelations'] = array('events' => array('after_update'), 'relations' => array('model_to' => '\\Timeline\\Model_Timeline', 'execute_func' => array('method' => '\\Timeline\\Site_Util::delete_cache', 'params' => array('id' => 'property')), 'conditions' => array('foreign_table' => array('album' => 'value'), 'foreign_id' => array('id' => 'property')))); } } }
public static function _init() { static::$_properties['type']['validation']['in_array'][] = \Config::get('timeline.types'); static::$_properties['foreign_table']['validation']['in_array'][] = Site_Util::get_accept_timeline_foreign_tables(); static::$_properties['public_flag']['form'] = \Site_Form::get_public_flag_configs(); static::$_properties['public_flag']['validation']['in_array'][] = \Site_Util::get_public_flags(); if (is_enabled('notice')) { static::$_observers['MyOrm\\Observer_InsertNotice'] = array('events' => array('after_insert'), 'update_properties' => array('foreign_table' => array('timeline' => 'value'), 'foreign_id' => array('id' => 'property'), 'type_key' => array('create' => 'value'), 'member_id_from' => array('member_id' => 'property'))); static::$_observers['MyOrm\\Observer_DeleteNotice'] = array('events' => array('before_delete'), 'conditions' => array('foreign_table' => array('timeline' => 'value'), 'foreign_id' => array('id' => 'property'))); } if (\Config::get('timeline.articles.cache.is_use')) { // 更新・削除時に timeline の cache を削除 static::$_observers['MyOrm\\Observer_UpdateTimeline'] = array('events' => array('after_update'), 'check_changed' => array('check_properties' => array('body', 'source', 'source_uri', 'public_flag', 'sort_datetime' => array('ignore_property' => 'comment_count')))); static::$_observers['MyOrm\\Observer_DeleteTimeline'] = array('events' => array('before_delete')); } if (\Config::get('timeline.importanceLevel.isEnabled')) { // 更新時に timeline の importance_level を更新 static::$_observers['MyOrm\\Observer_UpdateTimelineImportanceLevel'] = array('events' => array('before_update')); } }
public static function _init() { static::$_properties['name']['label'] = term('site.picture', 'site.title'); static::$_properties['public_flag']['form'] = \Site_Form::get_public_flag_configs(); static::$_properties['public_flag']['validation']['in_array'][] = \Site_Util::get_public_flags(); if (conf('albumImageLoction.saveFromExif', 'album')) { static::$_observers['MyOrm\\Observer_SaveAlbumImageLocation'] = array('events' => array('after_insert')); } if (is_enabled('notice')) { static::$_observers['MyOrm\\Observer_InsertNotice'] = array('events' => array('after_insert'), 'update_properties' => array('foreign_table' => array('album' => 'value'), 'foreign_id' => array('album_id' => 'property'), 'type_key' => array('child_data' => 'value'), 'member_id_from' => array('related' => array('album' => 'member_id')))); static::$_observers['MyOrm\\Observer_DeleteNotice'] = array('events' => array('before_delete'), 'conditions' => array('foreign_table' => array('album_image' => 'value'), 'foreign_id' => array('id' => 'property'))); } if (\Module::loaded('timeline')) { $type_album_image_profile = \Config::get('timeline.types.album_image_profile'); // 更新時に timeline の sort_datetime, comment_count を更新 static::$_observers['MyOrm\\Observer_UpdateRelationalTables'] = array('events' => array('after_update'), 'relations' => array('model_to' => '\\Timeline\\Model_Timeline', 'conditions' => array('foreign_table' => array('album_image' => 'value'), 'foreign_id' => array('id' => 'property'), 'type' => array($type_album_image_profile => 'value')), 'check_changed' => array('check_properties' => array('public_flag', 'sort_datetime', 'comment_count', 'like_count')), 'update_properties' => array('public_flag', 'sort_datetime', 'updated_at', 'comment_count', 'like_count'))); if (\Config::get('timeline.articles.cache.is_use')) { static::$_observers['MyOrm\\Observer_ExecuteToRelations'] = array('events' => array('after_update'), 'relations' => array('model_to' => '\\Timeline\\Model_TimelineChildData', 'conditions' => array('foreign_table' => array('album_image' => 'value'), 'foreign_id' => array('id' => 'property')), 'check_changed' => array('check_properties' => array('name', 'public_flag')), 'execute_func' => array('method' => '\\Timeline\\Site_Util::delete_cache', 'params' => array('timeline_id' => 'property')))); } } }
?> </td> <td><?php echo Site_Profile::get_display_type_options($profile->display_type, true); ?> </td> <td><?php echo symbol_bool($profile->is_required); ?> </td> <td><?php echo symbol_bool($profile->is_edit_public_flag); ?> </td> <td><?php echo Site_Form::get_public_flag_options($profile->default_public_flag); ?> </td> <td><?php echo symbol_bool(!$profile->is_unique); ?> </td> <td><?php echo Site_Profile::get_form_type_options($profile->form_type); ?> </td> <td><?php echo symbol_bool($profile->is_disp_regist); ?> </td> <td><?php
public static function get_validation_birthday() { $val = \Validation::forge('site_config_profile_birthday'); $name_prefix = 'birthday'; $name = self::get_name($name_prefix, 'isEnable'); $value = self::get_values($name, 0); $options_enable = array('0' => '無効', '1' => '有効'); $val->add($name, term('member.birthday') . '設定を有効にするか', array('type' => 'radio', 'options' => $options_enable, 'value' => $value))->add_rule('valid_string', 'numeric', 'required')->add_rule('in_array', array_keys($options_enable)); $name = self::get_name($name_prefix, 'isDispRegist'); $value = self::get_values($name, 1); $options_is_disp = array('1' => '表示する', '0' => '表示しない'); $val->add($name, '新規登録', array('type' => 'radio', 'options' => $options_is_disp, 'value' => $value))->add_rule('valid_string', 'numeric', 'required')->add_rule('in_array', array_keys($options_is_disp)); $name = self::get_name($name_prefix, 'isDispConfig'); $value = self::get_values($name, 1); $val->add($name, 'プロフィール変更', array('type' => 'radio', 'options' => $options_is_disp, 'value' => $value))->add_rule('valid_string', 'numeric', 'required')->add_rule('in_array', array_keys($options_is_disp)); $name = self::get_name($name_prefix, 'isDispSearch'); $value = self::get_values($name, 1); $val->add($name, 'メンバー検索', array('type' => 'radio', 'options' => $options_is_disp, 'value' => $value))->add_rule('valid_string', 'numeric', 'required')->add_rule('in_array', array_keys($options_is_disp)); $name_prefix = 'birthday_birthyear'; $name = self::get_name($name_prefix, 'viewType'); $value = self::get_values($name, 0); $options = array('0' => '生年表示', '1' => '年齢表示'); $val->add($name, '生年表示タイプ', array('type' => 'radio', 'options' => $options, 'value' => $value))->add_rule('valid_string', 'numeric')->add_rule('in_array', array_keys($options)); $name = self::get_name($name_prefix, 'displayType'); $value = self::get_values($name, 0); $options_display_type = \Site_Profile::get_display_type_options(); $val->add($name, '表示場所(生年)', array('type' => 'select', 'options' => $options_display_type, 'value' => $value))->add_rule('valid_string', 'numeric')->add_rule('in_array', array_keys($options_display_type)); $name = self::get_name($name_prefix, 'isRequired'); $value = self::get_values($name, 0); $options_is_required = array('1' => ''); $val->add($name, '必須(生年)', array('type' => 'checkbox', 'options' => $options_is_required, 'value' => $value))->add_rule('checkbox_val', $options_is_required); $name_prefix .= '_publicFlag'; $name = self::get_name($name_prefix, 'isEdit'); $value = self::get_values($name, 0); $options_is_edit_public_flag = array('0' => '固定', '1' => 'メンバー選択'); $val->add($name, '公開設定の選択(生年)', array('type' => 'radio', 'options' => $options_is_edit_public_flag, 'value' => $value))->add_rule('valid_string', 'numeric')->add_rule('in_array', array_keys($options_is_edit_public_flag)); $name = self::get_name($name_prefix, 'default'); $atters = \Site_Form::get_public_flag_configs(); $atters['value'] = self::get_values($name, conf('public_flag.default')); $val->add($name, '公開設定デフォルト値(生年)', $atters)->add_rule('valid_string', 'numeric')->add_rule('in_array', \Site_Util::get_public_flags()); $name_prefix = 'birthday_birthday'; $name = self::get_name($name_prefix, 'displayType'); $value = self::get_values($name, 0); $options_display_type = \Site_Profile::get_display_type_options(); $val->add($name, '表示場所(誕生日)', array('type' => 'select', 'options' => $options_display_type, 'value' => $value))->add_rule('valid_string', 'numeric')->add_rule('in_array', array_keys($options_display_type)); $name = self::get_name($name_prefix, 'isRequired'); $value = self::get_values($name, 0); $options_is_required = array('1' => ''); $val->add($name, '必須(誕生日)', array('type' => 'checkbox', 'options' => $options_is_required, 'value' => $value))->add_rule('checkbox_val', $options_is_required); $name_prefix .= '_publicFlag'; $name = self::get_name($name_prefix, 'isEdit'); $value = self::get_values($name, 0); $val->add($name, '公開設定の選択(誕生日)', array('type' => 'radio', 'options' => $options_is_edit_public_flag, 'value' => $value))->add_rule('valid_string', 'numeric')->add_rule('in_array', array_keys($options_is_edit_public_flag)); $name = self::get_name($name_prefix, 'default'); $atters = \Site_Form::get_public_flag_configs(); $atters['value'] = self::get_values($name, conf('public_flag.default')); $val->add($name, '公開設定デフォルト値(誕生日)', $atters)->add_rule('valid_string', 'numeric')->add_rule('in_array', \Site_Util::get_public_flags()); if (conf('member.profile.birthday.use_generation_view')) { $name_prefix = 'birthday_generationView'; $name = self::get_name($name_prefix, 'isEnable'); $value = self::get_values($name, 0); $val->add($name, '年代表示を有効にするか', array('type' => 'radio', 'options' => $options_enable, 'value' => $value))->add_rule('valid_string', 'numeric')->add_rule('in_array', array_keys($options_enable)); $name = self::get_name($name_prefix, 'unit'); $value = self::get_values($name, 0); $options = array('0' => '10年単位', '1' => '5年単位'); $val->add($name, '年代区切り', array('type' => 'radio', 'options' => $options, 'value' => $value))->add_rule('valid_string', 'numeric')->add_rule('in_array', array_keys($options)); $name_prefix .= '_publicFlag'; $name = self::get_name($name_prefix, 'isEdit'); $value = self::get_values($name, 0); $val->add($name, '公開設定の選択(年代)', array('type' => 'radio', 'options' => $options_is_edit_public_flag, 'value' => $value))->add_rule('valid_string', 'numeric')->add_rule('in_array', array_keys($options_is_edit_public_flag)); $name = self::get_name($name_prefix, 'default'); $atters = \Site_Form::get_public_flag_configs(); $atters['value'] = self::get_values($name, conf('public_flag.default')); $val->add($name, '公開設定デフォルト値(年代)', $atters)->add_rule('valid_string', 'numeric')->add_rule('in_array', \Site_Util::get_public_flags()); } return $val; }
private static function get_validation_public_flag() { $val = \Validation::forge(); $options = \Site_Form::get_public_flag_options(); $val->add('public_flag', term('public_flag.label'), array('options' => $options, 'type' => 'radio'))->add_rule('required')->add_rule('in_array', array_keys($options)); return $val; }
<?php $input_id = Site_Form::get_field_id($name); if (empty($type)) { $type = 'image'; } if (isset($type) && $type == 'img') { $type = 'image'; } if ($type == 'image' && empty($accept_type)) { $accept_type = 'image/*'; } $input_attr = array('id' => $input_id, 'class' => 'js-file_input hidden', 'data-type' => $type, 'data-input' => '#dummy_input_' . $input_id); if (!empty($input_attr_additional)) { $input_attr += (array) $input_attr_additional; } if (!empty($accept_type)) { $input_attr['accept'] = $accept_type; } echo Form::file($name, $input_attr); ?> <div class="pull-left form-inline"> <div class="input-group"> <span class="input-group-btn"> <button class="btn btn-default" type="button" onclick="$('#<?php echo $input_id; ?> ').click();"> <i class="glyphicon glyphicon-<?php if ($type == 'image') { ?>
} else { ?> <td class="small"><?php echo symbol('noValue'); ?> </td> <?php } ?> <td><?php echo Html::anchor('admin/member/' . $member->id, $member->name); ?> </td> <td><?php echo isset($member->sex) && strlen($member->sex) ? \Site_Form::get_form_options4config('term.member.sex.options', $member->sex) : symbol('noValue'); ?> </td> <td class="fs12"><?php echo site_get_time($member->created_at, 'relative', 'Y/m/d H:i'); ?> </td> <td class="fs12"><?php echo site_get_time($member->last_login, 'relative', 'Y/m/d H:i'); ?> </td> </tr> <?php } ?> </table>
?> > <?php echo member_name($member, $display_type != 'detail' ? $profile_page_uri : '', true); if (conf('memberRelation.follow.isEnabled') && empty($is_hide_fallow_btn) && Auth::check() && $member->id != $u->id) { ?> <?php echo render('_parts/button_follow', array('member_id_from' => Auth::check() ? $u->id : 0, 'member_id_to' => $member->id, 'size' => $button_follow_size, 'attrs' => array('class' => array('ml10')))); } ?> </<?php echo $member_name_tag; ?> > <?php if (!$is_simple_list && check_display_type(conf('profile.sex.displayType'), $display_type) && check_public_flag($member->sex_public_flag, $access_from) && ($sex = Site_Form::get_form_options4config('term.member.sex.options', $member->sex, true))) { ?> <div class="row"> <div class="col-xs-4 u-alr"><label><?php echo term('member.sex.label'); ?> </label></div> <div class="col-xs-8"><?php echo $sex; ?> </div> </div> <?php } if (!$is_simple_list && $member->birthyear && check_display_type(conf('profile.birthday.birthyear.displayType'), $display_type) && check_public_flag($member->birthyear_public_flag, $access_from)) { ?>
public static function _init() { static::$_properties['type']['validation']['in_array'][] = \Config::get('timeline.types'); static::$_properties['public_flag']['form'] = \Site_Form::get_public_flag_configs(); static::$_properties['public_flag']['validation']['in_array'][] = \Site_Util::get_public_flags(); }
function form_date(Validation $val, $label, $name_month, $name_day, $label_col_sm_size = 2, $help = '', $optional_public_flag = array(), $def_val_month = null, $def_val_day = null) { $fields = array(); $atters = array(); $options = array(); $names = array('month', 'day'); foreach ($names as $name) { $val_name = 'name_' . $name; $val_name = 'name_' . $name; $fields[$name] = $val->fieldset()->field(${$val_name}); $atters[$name] = array('id' => Site_Form::get_field_id($name), 'class' => 'form-control'); if ($fields[$name]->get_attribute('required') == 'required') { $atters[$name]['required'] = 'required'; } $val_name = 'def_val_' . $name; if (!is_null($fields[$name]->get_attribute('value'))) { ${$val_name} = $fields[$name]->get_attribute('value'); } elseif (is_null(${$val_name})) { ${$val_name} = 1; } $options[$name] = !is_null($fields[$name]->get_options()) ? $fields[$name]->get_options() : Form_Util::get_int_options(1, $name == 'month' ? 12 : 31); } $data = array('val' => $val, 'name_month' => $name_month, 'name_day' => $name_day, 'def_val_month' => $def_val_month, 'def_val_day' => $def_val_day, 'label' => $label, 'options' => $options, 'atters' => $atters, 'is_required' => !empty($atters['month']['required']) && !empty($atters['day']['required']), 'label_col_sm_size' => $label_col_sm_size, 'help' => $help, 'optional_public_flag' => $optional_public_flag); return render('_parts/form/date', $data); }