Esempio n. 1
0
<?php

$jquery_themes = FrmStylesHelper::jquery_themes();
$alt_img_name = array('ui-lightness' => 'ui_light', 'ui-darkness' => 'ui_dark', 'start' => 'start_menu', 'redmond' => 'windoze', 'vader' => 'black_matte', 'mint-choc' => 'mint_choco');
$theme_names = array_keys($jquery_themes);
$theme_names = array_combine($theme_names, $theme_names);
foreach ($theme_names as $k => $v) {
    $theme_names[$k] = str_replace('-', '_', $v);
    unset($k, $v);
}
$alt_img_name = array_merge($theme_names, $alt_img_name);
unset($theme_names);
?>

<div class="field-group clearfix frm-half frm-first-row">
	<label><?php 
_e('Theme', 'formidable');
?>
</label>
	<select name="<?php 
echo esc_attr($frm_style->get_field_name('theme_selector'));
?>
">
	    <?php 
foreach ($jquery_themes as $theme_name => $theme_title) {
    ?>
        <option value="<?php 
    echo esc_attr($theme_name);
    ?>
" id="90_<?php 
    echo esc_attr($alt_img_name[$theme_name]);
Esempio n. 2
0
</option>
        	    <option value="before" <?php 
selected($style->post_content['collapse_pos'], 'before');
?>
><?php 
_e('Before Heading', 'formidable');
?>
</option>
        	</select>
        </div>
        <div class="clear"></div>
	</div><!-- /.tabs-panel -->

	<div id="tabs-panel-repeat" class="tabs-panel <?php 
echo 'repeat' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive';
?>
">
	    <div class="field-group frm-half">
        	<label><?php 
_e('Icons', 'formidable');
?>
</label>
            <?php 
FrmStylesHelper::bs_icon_select($style, $frm_style, 'minus');
?>
        </div>
        <div class="clear"></div>
	</div><!-- /.tabs-panel -->

</div>
 private static function maybe_enqueue_jquery_css()
 {
     global $frm_vars;
     if (isset($frm_vars['datepicker_loaded']) && !empty($frm_vars['datepicker_loaded'])) {
         FrmStylesHelper::enqueue_jquery_css();
     }
 }
Esempio n. 4
0
<div class="nav-menus-php">
<div class="wrap">
    <?php 
FrmStylesHelper::style_menu('manage');
?>

	<p><?php 
printf(__('Easily change which template your forms are using by making changes below or %1$screate a new style%2$s.', 'formidable'), '<a href="?page=formidable-styles&frm_action=new_style">', '</a>');
?>
</p>

	<?php 
include FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php';
?>

	<div id="menu-locations-wrap">
	<form method="post">
	    <input type="hidden" name="frm_action" value="manage_styles"/>
		<table class="widefat fixed" id="menu-locations-table">
			<thead>
			<tr>
				<th scope="col" class="manage-column column-locations"><?php 
_e('Form Title', 'formidable');
?>
</th>
				<th scope="col" class="manage-column column-menus"><?php 
_e('Assigned Style Templates', 'formidable');
?>
</th>
			</tr>
			</thead>
Esempio n. 5
0
<div class="nav-menus-php">
<div class="wrap">
    <?php 
FrmStylesHelper::style_menu('custom_css');
?>

    <p><?php 
_e('You can add custom css here or in your theme style.css', 'formidable');
?>
</p>

    <?php 
include FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php';
?>

	<form method="post">
	    <input type="hidden" name="ID" value="<?php 
echo esc_attr($style->ID);
?>
" />
        <input type="hidden" name="<?php 
echo esc_attr($frm_style->get_field_name('post_title', ''));
?>
" value="<?php 
echo esc_attr($style->post_title);
?>
" />
        <input type="hidden" name="<?php 
echo esc_attr($frm_style->get_field_name('menu_order', ''));
?>
" value="<?php 
 .frm_focus_field input[type=search],
.frm_form_fields_active_style,
.<?php 
echo esc_html($style_class);
?>
 .chosen-container-active .chosen-choices{
    background-color:#<?php 
echo esc_html($bg_color_active . $important);
?>
;
    border-color:#<?php 
echo esc_html($border_color_active . $important);
?>
;
    box-shadow:0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(<?php 
echo esc_html(FrmStylesHelper::hex2rgb($border_color_active));
?>
, 0.6);
}

<?php 
if (!$submit_style) {
    ?>
.<?php 
    echo esc_html($style_class);
    ?>
 input[type=submit],
.<?php 
    echo esc_html($style_class);
    ?>
 .frm_submit input[type=button],
 .frm_focus_field input[type=search],
.frm_form_fields_active_style,
.<?php 
echo $style_class;
?>
 .chosen-container-active .chosen-choices{
    background-color:#<?php 
echo $bg_color_active . $important;
?>
;
    border-color:#<?php 
echo $border_color_active . $important;
?>
;
    box-shadow:0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(<?php 
echo FrmStylesHelper::hex2rgb($border_color_active);
?>
, 0.6);
}

<?php 
if (!$submit_style) {
    ?>
.<?php 
    echo $style_class;
    ?>
 input[type=submit],
.<?php 
    echo $style_class;
    ?>
 .frm_submit input[type=button],
    private static function entry_link_collapse($entries, $atts, array &$content)
    {
        FrmStylesHelper::enqueue_jquery_css();
        wp_enqueue_script('jquery-ui-core');
        wp_enqueue_script('formidable');
        $content[] = '<div class="frm_collapse">';
        $year = $month = '';
        $prev_year = $prev_month = false;
        foreach ($entries as $entry) {
            $value = self::entry_link_meta_value($entry, $atts);
            $link = self::entry_link_href($entry, $atts);
            $new_year = strftime('%G', strtotime($entry->created_at));
            $new_month = strftime('%B', strtotime($entry->created_at));
            if ($new_year != $year) {
                if ($prev_year) {
                    if ($prev_month) {
                        $content[] = '</ul></div>';
                    }
                    $content[] = '</div>';
                    $prev_month = false;
                }
                $class = $prev_year ? ' frm_hidden' : '';
                $triangle = $prev_year ? 'e' : 's';
                $content[] = "\n" . '<div class="frm_year_heading frm_year_heading_' . esc_attr($atts['id']) . '">
					<span class="ui-icon ui-icon-triangle-1-' . esc_attr($triangle) . '"></span>' . "\n" . '<a>' . sanitize_text_field($new_year) . '</a></div>' . "\n" . '<div class="frm_toggle_container' . esc_attr($class) . '">' . "\n";
                $prev_year = true;
            }
            if ($new_month != $month) {
                if ($prev_month) {
                    $content[] = '</ul></div>';
                }
                $class = $prev_month ? ' frm_hidden' : '';
                $triangle = $prev_month ? 'e' : 's';
                $content[] = '<div class="frm_month_heading frm_month_heading_' . esc_attr($atts['id']) . '">
					<span class="ui-icon ui-icon-triangle-1-' . esc_attr($triangle) . '"></span>' . "\n" . '<a>' . sanitize_text_field($new_month) . '</a>' . "\n" . '</div>' . "\n" . '<div class="frm_toggle_container frm_month_listing' . esc_attr($class) . '"><ul>' . "\n";
                $prev_month = true;
            }
            $content[] = '<li><a href="' . esc_url($link) . '">' . $value . '</a>';
            if ($atts['show_delete'] && FrmProEntriesHelper::user_can_delete($entry)) {
                $content[] = ' <a href="' . esc_url(add_query_arg(array('frm_action' => 'destroy', 'entry' => $entry->id), $atts['permalink'])) . '" class="frm_delete_list" data-frmconfirm="' . esc_attr($atts['confirm']) . '">' . $atts['show_delete'] . '</a>' . "\n";
            }
            $content[] = "</li>\n";
            $year = $new_year;
            $month = $new_month;
        }
        if ($prev_year) {
            $content[] = '</div>';
        }
        if ($prev_month) {
            $content[] = '</ul></div>';
        }
        $content[] = '</div>';
    }
Esempio n. 9
0
<div class="nav-menus-php">
<div class="wrap">
    <?php 
FrmStylesHelper::style_menu();
?>

	<?php 
include FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php';
?>

	<?php 
do_action('frm_style_switcher', $style, $styles);
?>

	<form id="frm_styling_form" action="" name="frm_styling_form" method="post">
	    <input type="hidden" name="ID" value="<?php 
echo esc_attr($style->ID);
?>
" />
		<input type="hidden" name="frm_action" value="save" />
        <textarea name="<?php 
echo esc_attr($frm_style->get_field_name('custom_css'));
?>
" class="frm_hidden"><?php 
echo FrmAppHelper::esc_textarea($style->post_content['custom_css']);
?>
</textarea>
		<?php 
wp_nonce_field('frm_style_nonce', 'frm_style');
?>
Esempio n. 10
0
 public static function hex2rgb($hex)
 {
     _deprecated_function(__FUNCTION__, '2.0', 'FrmStylesHelper::hex2rgb');
     return FrmStylesHelper::hex2rgb($hex);
 }