当前位置: 首页>>代码示例>>PHP>>正文


PHP GFFormSettings类代码示例

本文整理汇总了PHP中GFFormSettings的典型用法代码示例。如果您正苦于以下问题:PHP GFFormSettings类的具体用法?PHP GFFormSettings怎么用?PHP GFFormSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了GFFormSettings类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: form_settings_page

 /**
  * Form settings page
  *
  * @since 1.3.0
  */
 public function form_settings_page()
 {
     GFFormSettings::page_header();
     printf('<h3>%s</h3>', esc_html__('Pay Feeds', 'pronamic_ideal'));
     printf('<p>%s</p>', wp_kses(sprintf(esc_html__('You can find your pay feeds under %s.', 'pronamic_ideal'), sprintf('<a href="%s">%s</a>', esc_attr(add_query_arg('post_type', 'pronamic_pay_gf', admin_url('edit.php'))), esc_html__('Forms » iDEAL', 'pronamic_ideal'))), array('a' => array('href' => true))));
     GFFormSettings::page_footer();
 }
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:12,代码来源:PaymentAddOn.php

示例2: form_settings_page

    /**
     * Form settings page
     *
     * @since 1.3.0
     */
    public function form_settings_page()
    {
        GFFormSettings::page_header();
        printf('<h3>
				<span>
					<i class="fa fa-money"></i> %s
					<a id="add-new-pronamic-pay-feed" class="add-new-h2" href="%s">%s</a>
				</span>
			</h3>', esc_html__('Pay', 'pronamic_ideal'), esc_url(add_query_arg('post_type', 'pronamic_pay_gf', admin_url('post-new.php'))), esc_html__('Add New', 'pronamic_ideal'));
        printf('<p>%s</p>', wp_kses(sprintf(esc_html__('You can find your pay feeds under %s.', 'pronamic_ideal'), sprintf('<a href="%s">%s</a>', esc_url(add_query_arg('post_type', 'pronamic_pay_gf', admin_url('edit.php'))), esc_html__('Forms » iDEAL', 'pronamic_ideal'))), array('a' => array('href' => true))));
        GFFormSettings::page_footer();
    }
开发者ID:wp-pay-extensions,项目名称:gravityforms,代码行数:17,代码来源:PaymentAddOn.php

示例3: get_form_settings_sub_menu_items

 public static function get_form_settings_sub_menu_items($form_id)
 {
     require_once GFCommon::get_base_path() . '/form_settings.php';
     $sub_menu_items = array();
     $tabs = GFFormSettings::get_tabs($form_id);
     foreach ($tabs as $tab) {
         if ($tab['name'] == 'settings') {
             $form_setting_menu_item['label'] = 'Settings';
         }
         $sub_menu_items[] = array('url' => admin_url("admin.php?page=gf_edit_forms&view=settings&subview={$tab['name']}&id={$form_id}"), 'label' => $tab['label'], 'capabilities' => array('gravityforms_edit_forms'));
     }
     return $sub_menu_items;
 }
开发者ID:kidaak,项目名称:gravityforms,代码行数:13,代码来源:gravityforms.php

示例4: form_settings_page

    /**
     * Renders the form settings page.
     *
     * Not intended to be overridden or called directly by Add-Ons.
     * Sets up the form settings page.
     *
     * @ignore
     */
    public function form_settings_page()
    {
        GFFormSettings::page_header($this->_title);
        ?>
        <div class="gform_panel gform_panel_form_settings" id="form_settings">

            <form id="gform-settings" action="" method="post">

                <?php 
        $form = $this->get_current_form();
        $form_id = $form["id"];
        $form = apply_filters("gform_admin_pre_render_{$form_id}", apply_filters("gform_admin_pre_render", $form));
        if ($this->method_is_overridden('form_settings')) {
            //enables plugins to override settings page by implementing a form_settings() function
            $this->form_settings($form);
        } else {
            //saves form settings if save button was pressed
            $this->maybe_save_form_settings($form);
            //reads current form settings
            $settings = $this->get_form_settings($form);
            $this->set_settings($settings);
            //reading addon fields
            $sections = $this->form_settings_fields($form);
            GFCommon::display_admin_message();
            $page_title = $this->form_settings_page_title();
            if (empty($page_title)) {
                $page_title = rgar($sections[0], "title");
                //using first section title as page title, so disable section title
                $sections[0]["title"] = false;
            }
            $icon = $this->form_settings_icon();
            if (empty($icon)) {
                $icon = '<i class="fa fa-cogs"></i>';
            }
            ?>
                    <h3><span><?php 
            echo $icon;
            ?>
 <?php 
            echo $page_title;
            ?>
</span></h3>
                    <?php 
            //rendering settings based on fields and current settings
            $this->render_settings($sections);
        }
        ?>

            </form>
            <script type="text/javascript">
                var form = <?php 
        echo json_encode($this->get_current_form());
        ?>
;
            </script>
        </div>
        <?php 
        GFFormSettings::page_footer();
    }
开发者ID:BisongT,项目名称:Myevent_website,代码行数:67,代码来源:class-gf-addon.php

示例5: form_settings_page

    /**
     * Renders the form settings page.
     *
     * Not intended to be overridden or called directly by Add-Ons.
     * Sets up the form settings page.
     *
     * @ignore
     */
    public function form_settings_page()
    {
        GFFormSettings::page_header($this->_title);
        ?>
        <div class="gform_panel gform_panel_form_settings" id="form_settings">

            <form id="gform-settings" action="" method="post">

                <?php 
        $form = $this->get_current_form();
        $form_id = $form["id"];
        $form = apply_filters("gform_admin_pre_render_{$form_id}", apply_filters("gform_admin_pre_render", $form));
        if ($this->method_is_overridden('form_settings')) {
            //enables plugins to override settings page by implementing a form_settings() function
            $this->form_settings($form);
        } else {
            //saves form settings if save button was pressed
            $this->maybe_save_form_settings($form);
            //reads current form settings
            $settings = $this->get_form_settings($form);
            $this->set_settings($settings);
            //reading addon fields
            $sections = $this->form_settings_fields();
            //rendering settings based on fields and current settings
            $this->render_settings($sections);
        }
        ?>

            </form>
            <script type="text/javascript">
                var form = <?php 
        echo json_encode($this->get_current_form());
        ?>
;
            </script>
        </div>
        <?php 
        GFFormSettings::page_footer();
    }
开发者ID:jonnSmith,项目名称:btforms,代码行数:47,代码来源:class-gf-addon.php

示例6: notification_list_page

    public static function notification_list_page($form_id)
    {
        // handle form actions
        self::maybe_process_notification_list_action();
        $form = RGFormsModel::get_form_meta($form_id);
        GFFormSettings::page_header(__('Notifications', 'gravityforms'));
        $add_new_url = add_query_arg(array("nid" => 0));
        ?>

        <h3><span><i class="fa fa-envelope-o"></i> <?php 
        _e("Notifications", "gravityforms");
        ?>
<a id="add-new-confirmation" class="add-new-h2" href="<?php 
        echo $add_new_url;
        ?>
"><?php 
        _e("Add New", "gravityforms");
        ?>
</a></span></h3>

        <script type="text/javascript">
        function ToggleActive(img, notification_id){
            var is_active = img.src.indexOf("active1.png") >=0
            if(is_active){
            img.src = img.src.replace("active1.png", "active0.png");
            jQuery(img).attr('title','<?php 
        _e("Inactive", "gravityforms");
        ?>
').attr('alt', '<?php 
        _e("Inactive", "gravityforms");
        ?>
');
            }
            else{
            img.src = img.src.replace("active0.png", "active1.png");
            jQuery(img).attr('title','<?php 
        _e("Active", "gravityforms");
        ?>
').attr('alt', '<?php 
        _e("Active", "gravityforms");
        ?>
');
            }

            var mysack = new sack("<?php 
        echo admin_url("admin-ajax.php");
        ?>
" );
            mysack.execute = 1;
            mysack.method = 'POST';
            mysack.setVar( "action", "rg_update_notification_active" );
            mysack.setVar( "rg_update_notification_active", "<?php 
        echo wp_create_nonce("rg_update_notification_active");
        ?>
" );
            mysack.setVar( "form_id", <?php 
        echo intval($form_id);
        ?>
);
            mysack.setVar( "notification_id", notification_id);
            mysack.setVar( "is_active", is_active ? 0 : 1);
            mysack.onError = function() { alert('<?php 
        echo esc_js(__("Ajax error while updating notification", "gravityforms"));
        ?>
' )};
            mysack.runAJAX();

            return true;
        }
        </script>
    <?php 
        $notification_table = new GFNotificationTable($form);
        $notification_table->prepare_items();
        ?>

    <form id="notification_list_form" method="post">

        <?php 
        $notification_table->display();
        ?>

        <input id="action_argument" name="action_argument" type="hidden" />
        <input id="action" name="action" type="hidden" />

        <?php 
        wp_nonce_field('gform_notification_list_action', 'gform_notification_list_action');
        ?>

    </form>

    <?php 
        GFFormSettings::page_footer();
    }
开发者ID:rushabhrakholiya,项目名称:TEST,代码行数:93,代码来源:notification.php

示例7: feed_edit_page

    protected function feed_edit_page($form, $feed_id)
    {
        // Save feed if appropriate
        $feed_id = $this->maybe_save_feed_settings($feed_id, $form['id']);
        $this->_current_feed_id = $feed_id;
        //So that current feed functions work when creating a new feed
        ?>
		<script type="text/javascript">
			<?php 
        GFFormSettings::output_field_scripts();
        ?>
		</script>

		<h3><span><?php 
        echo $this->feed_settings_title();
        ?>
</span></h3>

		<?php 
        $feed = $this->get_feed($feed_id);
        $this->set_settings($feed['meta']);
        GFCommon::display_admin_message();
        $this->render_settings($this->get_feed_settings_fields($form));
    }
开发者ID:sbayer55,项目名称:The-Road-Gallery,代码行数:24,代码来源:class-gf-feed-addon.php

示例8: page_header

    public static function page_header($title = '')
    {
        // register admin styles
        wp_register_style('gform_admin', GFCommon::get_base_url() . '/css/admin.css');
        wp_print_styles(array('jquery-ui-styles', 'gform_admin', 'wp-pointer'));
        $form = GFFormsModel::get_form_meta(rgget('id'));
        $current_tab = rgempty('subview', $_GET) ? 'settings' : rgget('subview');
        $setting_tabs = GFFormSettings::get_tabs($form['id']);
        // kind of boring having to pass the title, optionally get it from the settings tab
        if (!$title) {
            foreach ($setting_tabs as $tab) {
                if ($tab['name'] == $current_tab) {
                    $title = $tab['label'];
                }
            }
        }
        ?>

		<div class="wrap gforms_edit_form <?php 
        echo GFCommon::get_browser_class();
        ?>
">
			<h2 class="gf_admin_page_title">
				<span><?php 
        echo $title;
        ?>
</span><span class="gf_admin_page_subtitle"><span class="gf_admin_page_formid">ID: <?php 
        echo $form['id'];
        ?>
</span><span class="gf_admin_page_formname"><?php 
        _e('Form Name', 'gravityforms');
        ?>
: <?php 
        echo $form['title'];
        ?>
</span></span>
			</h2>

			<?php 
        GFCommon::display_admin_message();
        ?>

			<?php 
        RGForms::top_toolbar();
        ?>

			<div id="gform_tab_group" class="gform_tab_group vertical_tabs">
				<ul id="gform_tabs" class="gform_tabs">
				<?php 
        foreach ($setting_tabs as $tab) {
            $query = array('subview' => $tab['name']);
            if (isset($tab['query'])) {
                $query = array_merge($query, $tab['query']);
            }
            $url = add_query_arg($query);
            ?>
					<li <?php 
            echo $current_tab == $tab['name'] ? "class='active'" : '';
            ?>
>
						<a href="<?php 
            echo esc_url($url);
            ?>
"><?php 
            echo esc_html($tab['label']);
            ?>
</a><span></span>
					</li>
				<?php 
        }
        ?>
				</ul>

				<div id="gform_tab_container_1" class="gform_tab_container">
					<div class="gform_tab_content" id="tab_<?php 
        echo $current_tab;
        ?>
">

	<?php 
    }
开发者ID:renztoygwapo,项目名称:lincoln,代码行数:81,代码来源:form_settings.php

示例9: feed_edit_page

    public function feed_edit_page($form, $feed_id)
    {
        $title = '<h3><span>' . $this->feed_settings_title() . '</span></h3>';
        if (!$this->can_create_feed()) {
            echo $title . '<div>' . $this->configure_addon_message() . '</div>';
            return;
        }
        // Save feed if appropriate
        $feed_id = $this->maybe_save_feed_settings($feed_id, $form['id']);
        $this->_current_feed_id = $feed_id;
        // So that current feed functions work when creating a new feed
        ?>
		<script type="text/javascript">
			<?php 
        GFFormSettings::output_field_scripts();
        ?>
		</script>
		<?php 
        echo $title;
        $feed = $this->get_feed($feed_id);
        $this->set_settings($feed['meta']);
        GFCommon::display_admin_message();
        $this->render_settings($this->get_feed_settings_fields($form));
    }
开发者ID:fjbeteiligung,项目名称:development,代码行数:24,代码来源:class-gf-feed-addon.php

示例10: notification_list_page

    public static function notification_list_page($form_id)
    {
        // handle form actions
        self::maybe_process_notification_list_action();
        $form = RGFormsModel::get_form_meta($form_id);
        GFFormSettings::page_header(__('Notifications', 'gravityforms'));
        $add_new_url = add_query_arg(array("nid" => 0));
        ?>
    <h3><span>
            <?php 
        _e("Notifications", "gravityforms");
        ?>
        <a id="add-new-confirmation" class="add-new-h2" href="<?php 
        echo $add_new_url;
        ?>
"><?php 
        _e("Add New", "gravityforms");
        ?>
</a>
        </span></h3>

    <?php 
        $notification_table = new GFNotificationTable($form);
        $notification_table->prepare_items();
        ?>

    <form id="notification_list_form" method="post">

        <?php 
        $notification_table->display();
        ?>

        <input id="action_argument" name="action_argument" type="hidden" />
        <input id="action" name="action" type="hidden" />

        <?php 
        wp_nonce_field('gform_notification_list_action', 'gform_notification_list_action');
        ?>

    </form>

    <?php 
        GFFormSettings::page_footer();
    }
开发者ID:ascarius,项目名称:wordpress-bootstrap,代码行数:44,代码来源:notification.php

示例11: page_header

    public static function page_header($title = '')
    {
        // register admin styles
        $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG || isset($_GET['gform_debug']) ? '' : '.min';
        wp_register_style('gform_admin', GFCommon::get_base_url() . "/css/admin{$min}.css");
        wp_print_styles(array('jquery-ui-styles', 'gform_admin', 'wp-pointer'));
        $form = GFFormsModel::get_form_meta(rgget('id'));
        $current_tab = rgempty('subview', $_GET) ? 'settings' : rgget('subview');
        $setting_tabs = GFFormSettings::get_tabs($form['id']);
        // kind of boring having to pass the title, optionally get it from the settings tab
        if (!$title) {
            foreach ($setting_tabs as $tab) {
                if ($tab['name'] == $current_tab) {
                    $title = $tab['label'];
                }
            }
        }
        ?>

		<div class="wrap gforms_edit_form gforms_form_settings_wrap <?php 
        echo GFCommon::get_browser_class();
        ?>
">

			<?php 
        GFCommon::form_page_title($form);
        ?>

			<?php 
        GFCommon::display_dismissible_message();
        ?>

			<?php 
        GFCommon::display_admin_message();
        ?>

			<?php 
        RGForms::top_toolbar();
        ?>

			<div id="gform_tab_group" class="gform_tab_group vertical_tabs">
				<ul id="gform_tabs" class="gform_tabs">
				<?php 
        foreach ($setting_tabs as $tab) {
            $query = array('subview' => $tab['name']);
            if (isset($tab['query'])) {
                $query = array_merge($query, $tab['query']);
            }
            $url = add_query_arg($query);
            ?>
					<li <?php 
            echo $current_tab == $tab['name'] ? "class='active'" : '';
            ?>
>
						<a href="<?php 
            echo esc_url($url);
            ?>
"><?php 
            echo esc_html($tab['label']);
            ?>
</a><span></span>
					</li>
				<?php 
        }
        ?>
				</ul>

				<div id="gform_tab_container_1" class="gform_tab_container">
					<div class="gform_tab_content" id="tab_<?php 
        echo esc_attr($current_tab);
        ?>
">

	<?php 
    }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:75,代码来源:form_settings.php

示例12: zapier_edit_page

    private static function zapier_edit_page($form_id, $zap_id)
    {
        $zap = empty($zap_id) ? array() : GFZapierData::get_feed($zap_id);
        $is_new_zap = empty($zap_id) || empty($zap);
        $is_valid = true;
        $is_update = false;
        $form = RGFormsModel::get_form_meta($form_id);
        if (rgpost("save")) {
            check_admin_referer('gforms_save_zap', 'gforms_save_zap');
            if (rgar($zap, "url") != rgpost("gform_zapier_url")) {
                $is_update = true;
            }
            $zap["name"] = rgpost("gform_zapier_name");
            $zap["url"] = rgpost("gform_zapier_url");
            $zap["is_active"] = rgpost("gform_zapier_active");
            //conditional
            $zap["meta"]["zapier_conditional_enabled"] = rgpost("gf_zapier_conditional_enabled");
            $zap["meta"]["zapier_conditional_field_id"] = rgpost("gf_zapier_conditional_field_id");
            $zap["meta"]["zapier_conditional_operator"] = rgpost("gf_zapier_conditional_operator");
            $zap["meta"]["zapier_conditional_value"] = rgpost("gf_zapier_conditional_value");
            if (empty($zap["url"]) || empty($zap["name"])) {
                $is_valid = false;
            }
            if ($is_valid) {
                $zap = apply_filters('gform_zap_before_save', apply_filters("gform_zap_before_save_{$form['id']}", $zap, $form), $form);
                $zap_id = GFZapierData::update_feed($zap_id, $form_id, $zap["is_active"], $zap["name"], $zap["url"], $zap["meta"]);
                GFCommon::add_message(sprintf(__('Zap saved successfully. %sBack to list.%s', 'gravityformszapier'), '<a href="' . esc_url(remove_query_arg('zid')) . '">', '</a>'));
                if ($is_new_zap || $is_update) {
                    //send field info to zap when new or url has changed
                    $sent = self::send_form_data_to_zapier("", $form);
                }
            } else {
                GFCommon::add_error_message(__('Zap could not be updated. Please enter all required information below.', 'gravityformszapier'));
            }
        }
        GFFormSettings::page_header(__('Zapier', 'gravityformszapier'));
        ?>
		<style type="text/css">
            a.limit-text { display: block; height: 18px; line-height: 18px; overflow: hidden; padding-right: 5px;
                color: #555; text-overflow: ellipsis; white-space: nowrap; }
                a.limit-text:hover { color: #555; }

            th.column-name { width: 30%; }
            th.column-type { width: 20%; }
        </style>
        <div style="<?php 
        echo $is_new_zap ? "display:block" : "display:none";
        ?>
">
        	<?php 
        _e(sprintf("To create a new zap, you must have the Webhook URL. The Webhook URL may be found when you go to your %sZapier dashboard%s and create a new zap, or when you edit an existing zap. Once you have saved your new feed the form fields will be available for mapping on the Zapier site.", "<a href='https://zapier.com/app/dashboard' target='_blank'>", "</a>"));
        ?>
        </div>
        <form method="post" id="gform_zapier_form">
         	<?php 
        wp_nonce_field('gforms_save_zap', 'gforms_save_zap');
        ?>
         	<input type="hidden" id="gform_zap_id" name="gform_zap_id" value="<?php 
        echo $zap_id;
        ?>
" />
        	<table class="form-table">
				<tr valign="top">
		            <th scope="row">
		                <label for="gform_zapier_name">
		                    <?php 
        _e("Zap Name", "gravityformszapier");
        ?>
<span class="gfield_required">*</span>
		                    <?php 
        gform_tooltip("zapier_name");
        ?>
		                </label>
		            </th>
		            <td>
		                <input type="text" class="fieldwidth-2" name="gform_zapier_name" id="gform_zapier_name" value="<?php 
        echo esc_attr(rgar($zap, "name"));
        ?>
"/>
		            </td>
		        </tr>
    			<tr valign="top">
		            <th scope="row">
		                <label for="gform_zapier_url">
		                    <?php 
        _e("Webhook URL", "gravityformszapier");
        ?>
<span class="gfield_required">*</span>
		                    <?php 
        gform_tooltip("zapier_url");
        ?>
		                </label>
		            </th>
		            <td>
		                <input type="text" class="fieldwidth-2" name="gform_zapier_url" id="gform_zapier_url" value="<?php 
        echo esc_attr(rgar($zap, "url"));
        ?>
"/>
		            </td>
		        </tr>
//.........这里部分代码省略.........
开发者ID:Friends-School-Atlanta,项目名称:Deployable-WordPress,代码行数:101,代码来源:zapier.php

示例13: show_notification_settings

 /** This is a GF 1.7+ UI */
 public function show_notification_settings()
 {
     GFFormSettings::page_header();
     echo '<form method="post">';
     echo $this->add_notification_settings('');
     echo '<input type="submit" id="gform_save_settings" name="save" value="Update" class="button-primary gfbutton"></form>';
     GFFormSettings::page_footer();
 }
开发者ID:hansstam,项目名称:makerfaire,代码行数:9,代码来源:gravityforms-digest.php

示例14: form_settings_page

    /**
     * Renders the form settings page.
     *
     * Not intended to be overridden or called directly by Add-Ons.
     * Sets up the form settings page.
     *
     * @ignore
     */
    public function form_settings_page()
    {
        GFFormSettings::page_header($this->_title);
        ?>

        <div class="gform_panel gform_panel_form_settings" id="form_settings">



            <form id="gform-settings" action="" method="post">



                <?php 
        $form = $this->get_current_form();
        if (is_callable(array($this, 'form_settings'))) {
            //enables plugins to override settings page by implementing a form_settings() function
            call_user_func(array($this, 'form_settings'), $form);
        } else {
            //saves form settings if save button was pressed
            $this->maybe_save_form_settings($form);
            //reads current form settings
            $settings = $this->get_form_settings($form);
            //reading addon fields
            $sections = $this->form_settings_fields();
            //rendering settings based on fields and current settings
            $this->render_settings($sections);
        }
        ?>



            </form>

            <script type="text/javascript">

                var form = <?php 
        echo json_encode($this->get_current_form());
        ?>
;

            </script>

        </div>

        <?php 
        GFFormSettings::page_footer();
    }
开发者ID:kmzdn,项目名称:bootstrap,代码行数:56,代码来源:class-gf-addon.php


注:本文中的GFFormSettings类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。