CiviCRM Forums
News: You can learn more about CiviCRM from our new free book: Understanding CiviCRM. Also Check the CiviCRM Blog for updated information on CiviCRM
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 02, 2010, 08:49:22 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Where do I edit "{$form.buttons.html}"?  (Read 273 times)
mariagwyn
I post frequently
***

Karma: 1
Offline Offline

CiviCRM: 3.1.1
CMS: Drupal 6.15
MySQL: 5.x
Posts: 126



View Profile
« on: March 10, 2010, 12:08:28 pm »

I would like to edit the text that appears in the 'submit' button.  I thought it was in the tpl file, but it turns out the tpl file calls this little function: {$form.buttons.html}.  Where is this and where can I edit it? 

thanks,
Maria
Logged
Yashodha Chaku
Forum Godess / God
Ask me questions
*****

Karma: 48
Offline Offline

Posts: 439



View Profile WWW
« Reply #1 on: March 10, 2010, 08:53:38 pm »

Maria :
You might want to check the corresponding php file for changes in button text.

HTH
-Yashodha
Logged
mariagwyn
I post frequently
***

Karma: 1
Offline Offline

CiviCRM: 3.1.1
CMS: Drupal 6.15
MySQL: 5.x
Posts: 126



View Profile
« Reply #2 on: March 10, 2010, 10:42:02 pm »

What is the corresponding file?  That is what I can't figure it out.  Lots of .tpl  files are listed, but if they have the buttons.html code in it, it looks just like the file in question.  I assume there is something somewhere that actually generates the html code specified in "buttons.html" but I can't find that file and am not even sure where to look.
Logged
Yashodha Chaku
Forum Godess / God
Ask me questions
*****

Karma: 48
Offline Offline

Posts: 439



View Profile WWW
« Reply #3 on: March 10, 2010, 10:43:41 pm »

On which form do you want to change the button text?
Logged
mariagwyn
I post frequently
***

Karma: 1
Offline Offline

CiviCRM: 3.1.1
CMS: Drupal 6.15
MySQL: 5.x
Posts: 126



View Profile
« Reply #4 on: March 10, 2010, 10:46:22 pm »

it is in CRM/Event/Form/Registration/Register.tpl around line 139.  This is the code:
Code:
   <div id="crm-submit-buttons">
     {$form.buttons.html}
   </div>
Logged
Yashodha Chaku
Forum Godess / God
Ask me questions
*****

Karma: 48
Offline Offline

Posts: 439



View Profile WWW
« Reply #5 on: March 10, 2010, 11:30:12 pm »

You might want to change the name (Continue >>) to whatever string you want in CRM/Event/Form/Registration/Register.php
 
Code:
$this->addButtons(array(
                                    array ( 'type'      => 'upload',
                                            'name'      => ts('Continue >>'),
                                            'spacing'   => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
                                            'isDefault' => true,
                                            'js'        => $js ),
                                    )
                              );

HTH
-Yashodha
Logged
xavier
Forum Godess / God
I live on this forum
*****

Karma: 58
Offline Offline

Posts: 1272


View Profile WWW
« Reply #6 on: March 11, 2010, 02:15:19 am »

It would really be easier/nicer/more logical to have the array of buttons assigned to the template and let the template do its job of layouting the buttons instead of assigning an html blob.

Kyle, what do you think ?

(stupid question probably, but is it possible to include sub templates within the main and assigning variables ?

eg: {$forms.buttons} contains the array
being able to have something like:

{include "part/buttons.tpl"  buttons=$forms.buttons}

and part/buttons.tpl contains

{foreach button...
...
Logged
mariagwyn
I post frequently
***

Karma: 1
Offline Offline

CiviCRM: 3.1.1
CMS: Drupal 6.15
MySQL: 5.x
Posts: 126



View Profile
« Reply #7 on: March 11, 2010, 09:23:09 am »

I agree with Kyle, but in the meantime,

Yoshodha - are you saying I should replace the {$form...blob with the code you gave?  I am not a coder, so could you clarify the exact way to insert into the .tpl, with curly brackets and all?  I did insert it and it simply printed the code on the page.  Right place, but not exactly what I am looking for.

Thanks,
Maria
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM