Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    HEADS UP: print_info_box_np() - R.I.P

    Scheduled Pinned Locked Moved 2.3-RC Snapshot Feedback and Issues - ARCHIVED
    1 Posts 1 Posters 1.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Steve_B Netgate
      last edited by

      Package developers please note:

      The function print_info_box_np() has been retired. (Actually buried) It used to do some trickery such as detecting the word "apply" in a text string and automatically generating an "Apply" button.

      This proved to be problematic  when you wanted to use that word but did NOT want a button, when you wanted a button called something else, or when you were using a language other than English which used a different word for "apply".

      The function print_info_box() now accepts a button name and button text explicitly so you can create any button you like (or not), and to make things easier still, a new function print_apply_box() automatically creates an information box with an apply button in your language of choice. You might use it like this:

      print_apply_box(sprintf(gettext("The package configuration has been changed.%sYou must apply the changes in order for them to take effect.”), "
      "));
      

      Als ik kan

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.