/**
  * 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();
 }
    /**
     * 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();
    }
    /**
     * 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();
    }
Beispiel #4
0
    /**
     * 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();
    }
Beispiel #5
0
    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();
    }
    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();
    }
 public static function zapier_page()
 {
     //see if there is a form id in the querystring
     $form_id = RGForms::get("id");
     $zapier_id = rgempty("gform_zap_id") ? rgget("zid") : rgpost("gform_zap_id");
     if (!rgblank($zapier_id)) {
         self::zapier_edit_page($form_id, $zapier_id);
     } else {
         self::zapier_list_page($form_id);
     }
     GFFormSettings::page_footer();
 }
 /** 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();
 }
Beispiel #9
0
    /**
     * 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();
    }