admin-menu-settings-licenses.html.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php if( ! $licenses ): ?>
  2. <?php echo sprintf( __( 'To activate licenses for Ninja Forms extensions you must first %sinstall and activate%s the chosen extension. License settings will then appear below.', 'ninja-forms' ), '<a target="_blank" href="https://ninjaforms.com/docs/installation/">', '</a>' ); ?>
  3. <?php else: ?>
  4. <table class="form-table">
  5. <tbody>
  6. <?php foreach( $licenses as $license ): ?>
  7. <tr>
  8. <th>
  9. <?php echo $license[ 'name' ]; ?>
  10. <br /><small>v<?php echo $license[ 'version' ]; ?></small>
  11. </th>
  12. <td>
  13. <form action="" method="POST">
  14. <input type="hidden" name="ninja_forms_license[name]" value="<?php echo $license[ 'id' ]; ?>">
  15. <input type="text" class="widefat" name="ninja_forms_license[key]" value="<?php echo $license[ 'license' ];?>">
  16. <?php if( $license[ 'error' ] ): ?>
  17. <div>
  18. <?php echo $license[ 'error' ]; ?>
  19. </div>
  20. <?php endif; ?>
  21. <?php if( ! $license[ 'is_valid' ] ): ?>
  22. <button type="submit" class="button button-primary" name="ninja_forms_license[action]" value="activate"><?php _e( 'Activate', 'ninja-forms' ); ?></button>
  23. <?php else: ?>
  24. <button type="submit" class="button button-secondary" name="ninja_forms_license[action]" value="deactivate"><?php _e( 'De-activate', 'ninja-forms' ); ?></button>
  25. <?php endif; ?>
  26. </form>
  27. </td>
  28. </tr>
  29. <?php endforeach; ?>
  30. </table>
  31. <?php endif; ?>