CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • 'Save & Continue Later' hack to refresh current page
Pages: [1]

Author Topic: 'Save & Continue Later' hack to refresh current page  (Read 3273 times)

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
'Save & Continue Later' hack to refresh current page
November 10, 2008, 12:38:17 pm
I have staff composing long html mailings for CiviMail. There has been some incidents where they lose what they're typing because of some mistake they are making. So I am teaching them to use the 'Save and Continue Later' button every 3 minutes so they don't lose too much info if something happens. However, they are getting very frustrated that it then takes them to the drafts page where they have to find the mailing, click continue, go through the wizard, and get back to the compose page.

How can I hack it so that clicking this button will just save the draft and refresh back to the same page they are currently on?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: 'Save & Continue Later' hack to refresh current page
November 10, 2008, 02:24:02 pm
You will have to make changes in all the pages that have "Save and Continue Later" option.

Quote
array ( 'type'      => 'submit',
           'name'      => ts('Save & Continue Later'),

Change the type to  "refresh", that should solve your problem.

HTH

Kurund
Found this reply helpful? Support CiviCRM

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: 'Save & Continue Later' hack to refresh current page
November 10, 2008, 04:26:15 pm
Hey Kurund,

So I'm looking around but don't see any code like that. In /CRM/Mailing/Form/Upload.php, however, I do see this on line 299:

Code: [Select]
if ($this->_submitValues['_qf_Upload_upload'] == 'Save & Continue Later') {
            CRM_Core_Session::setStatus( ts("Your mailing has been saved. Click the 'Continue' action to resume working on it.") );
            $url = CRM_Utils_System::url( 'civicrm/mailing/browse/unscheduled', 'scheduled=false&reset=1' );
            CRM_Utils_System::redirect($url);
        }

Should I be editing this?? In the .tpl file there is nothing like you mentioned; in fact, the buttons are rendered through this call:
Code: [Select]
{$form.buttons.html}

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: 'Save & Continue Later' hack to refresh current page
November 11, 2008, 05:38:18 am
On upload page you can comment below code:

Quote
if ($this->_submitValues['_qf_Upload_upload'] == 'Save & Continue Later') {
            CRM_Core_Session::setStatus( ts("Your mailing has been saved. Click the 'Continue' action to resume working on it.") );
            $url = CRM_Utils_System::url( 'civicrm/mailing/browse/unscheduled', 'scheduled=false&reset=1' );
            CRM_Utils_System::redirect($url);
        }

HTH

Kurund
Found this reply helpful? Support CiviCRM

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: 'Save & Continue Later' hack to refresh current page
November 11, 2008, 07:18:23 am
So I commented out those lines, but then the 'Save & Continue Later' button takes me to the next page of the wizard when I click it. I need it to just save the draft and keep me on the same page (the compose mailing page). If it can't do a refresh, is there a way to force it to the compose message page? That's the only page I'll ever need that button to take me.....

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • 'Save & Continue Later' hack to refresh current page

This forum was archived on 2017-11-26.