Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-5990

Allow form buttons to be themed by injected spans with specific class names around each button

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.3
    • Fix Version/s: 3.1.NYSS
    • Labels:
      None

      Description

      Created a new common template which can be used to render buttons for any form. To convert a form...
      Use:

      {include file="CRM/common/formButtons.tpl"}

      Instead of:
      {$form.buttons.html}

      Buttons in 'converted' forms will be rendered w/ a surrounding <span> tag, and assigned a sequence of crm-button classes:
      crm-button
      crm-button-type-$btnType
      crm-button$buttonName

      Button types are: upload, next, back, refresh, cancel. We will be adding some specific css styles to differentiate back and cancel type buttons ('low priority').

      Example:
      <span class="crm-button crm-button-type-upload crm-button_qf_Main_upload">
      <input type="submit" id="_qf_Main_upload" value="Confirm Contribution" name="_qf_Main_upload" class="form-submit default">
      </span>

      I've 'converted' the buttons in the following forms to use the new include:
      templates/CRM/Contact/Form/Contact.tpl
      templates/CRM/Contribute/Form/Contribution/Main.tpl
      templates/CRM/Contribute/Form/Contribution/Confirm.tpl

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dgg David Greenberg
                Reporter:
                dgg David Greenberg
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: