Нет описания

register.php 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
  2. <div class="um-admin-metabox">
  3. <?php $role = $object['data'];
  4. UM()->admin_forms( array(
  5. 'class' => 'um-role-register um-half-column',
  6. 'prefix_id' => 'role',
  7. 'fields' => array(
  8. array(
  9. 'id' => '_um_status',
  10. 'type' => 'select',
  11. 'label' => __( 'Registration Status', 'ultimate-member' ),
  12. 'tooltip' => __( 'Select the status you would like this user role to have after they register on your site', 'ultimate-member' ),
  13. 'value' => ! empty( $role['_um_status'] ) ? __( $role['_um_status'] , 'ultimate-member' ) : array(),
  14. 'options' => array(
  15. 'approved' => __( 'Auto Approve', 'ultimate-member' ),
  16. 'checkmail' => __( 'Require Email Activation', 'ultimate-member' ),
  17. 'pending' => __( 'Require Admin Review', 'ultimate-member' )
  18. ),
  19. ),
  20. array(
  21. 'id' => '_um_auto_approve_act',
  22. 'type' => 'select',
  23. 'label' => __( 'Action to be taken after registration', 'ultimate-member' ),
  24. 'tooltip' => __( 'Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message', 'ultimate-member' ),
  25. 'value' => ! empty( $role['_um_auto_approve_act'] ) ? __( $role['_um_auto_approve_act'], 'ultimate-member' ) : array(),
  26. 'options' => array(
  27. 'redirect_profile' => __( 'Redirect to profile', 'ultimate-member' ),
  28. 'redirect_url' => __( 'Redirect to URL', 'ultimate-member' ),
  29. ),
  30. 'conditional' => array( '_um_status', '=', 'approved' )
  31. ),
  32. array(
  33. 'id' => '_um_auto_approve_url',
  34. 'type' => 'text',
  35. 'label' => __( 'Set Custom Redirect URL', 'ultimate-member' ),
  36. 'value' => ! empty( $role['_um_auto_approve_url'] ) ? __( $role['_um_auto_approve_url'], 'ultimate-member' ) : '',
  37. 'conditional' => array( '_um_auto_approve_act', '=', 'redirect_url' )
  38. ),
  39. array(
  40. 'id' => '_um_login_email_activate',
  41. 'type' => 'checkbox',
  42. 'label' => __( 'Login user after validating the activation link?', 'ultimate-member' ),
  43. 'tooltip' => __( 'Login the user after validating the activation link', 'ultimate-member' ),
  44. 'value' => ! empty( $role['_um_login_email_activate'] ) ? __( $role['_um_login_email_activate'], 'ultimate-member' ) : 0,
  45. 'conditional' => array( '_um_status', '=', 'checkmail' )
  46. ),
  47. array(
  48. 'id' => '_um_checkmail_action',
  49. 'type' => 'select',
  50. 'label' => __( 'Action to be taken after registration', 'ultimate-member' ),
  51. 'tooltip' => __( 'Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message', 'ultimate-member' ),
  52. 'value' => ! empty( $role['_um_checkmail_action'] ) ? __( $role['_um_checkmail_action'], 'ultimate-member' ) : array(),
  53. 'options' => array(
  54. 'show_message' => __( 'Show custom message', 'ultimate-member' ),
  55. 'redirect_url' => __( 'Redirect to URL', 'ultimate-member' ),
  56. ),
  57. 'conditional' => array( '_um_status', '=', 'checkmail' )
  58. ),
  59. array(
  60. 'id' => '_um_checkmail_message',
  61. 'type' => 'textarea',
  62. 'label' => __( 'Personalize the custom message', 'ultimate-member' ),
  63. 'value' => ! empty( $role['_um_checkmail_message'] ) ? __( $role['_um_checkmail_message'], 'ultimate-member' ) : __('Thank you for registering. Before you can login we need you to activate your account by clicking the activation link in the email we just sent you.','ultimate-member'),
  64. 'conditional' => array( '_um_checkmail_action', '=', 'show_message' )
  65. ),
  66. array(
  67. 'id' => '_um_checkmail_url',
  68. 'type' => 'text',
  69. 'label' => __( 'Set Custom Redirect URL', 'ultimate-member' ),
  70. 'value' => ! empty( $role['_um_checkmail_url'] ) ? __( $role['_um_checkmail_url'], 'ultimate-member' ) : '',
  71. 'conditional' => array( '_um_checkmail_action', '=', 'redirect_url' )
  72. ),
  73. array(
  74. 'id' => '_um_url_email_activate',
  75. 'type' => 'text',
  76. 'label' => __( 'URL redirect after e-mail activation', 'ultimate-member' ),
  77. 'tooltip' => __( 'If you want users to go to a specific page other than login page after e-mail activation, enter the URL here.', 'ultimate-member' ),
  78. 'value' => ! empty( $role['_um_url_email_activate'] ) ? __( $role['_um_url_email_activate'], 'ultimate-member' ) : '',
  79. 'conditional' => array( '_um_status', '=', 'checkmail' ),
  80. ),
  81. array(
  82. 'id' => '_um_pending_action',
  83. 'type' => 'select',
  84. 'label' => __( 'Action to be taken after registration', 'ultimate-member' ),
  85. 'tooltip' => __( 'Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message', 'ultimate-member' ),
  86. 'value' => ! empty( $role['_um_pending_action'] ) ? __( $role['_um_pending_action'], 'ultimate-member' ) : array(),
  87. 'options' => array(
  88. 'show_message' => __( 'Show custom message', 'ultimate-member' ),
  89. 'redirect_url' => __( 'Redirect to URL', 'ultimate-member' ),
  90. ),
  91. 'conditional' => array( '_um_status', '=', 'pending' )
  92. ),
  93. array(
  94. 'id' => '_um_pending_message',
  95. 'type' => 'textarea',
  96. 'label' => __( 'Personalize the custom message', 'ultimate-member' ),
  97. 'value' => ! empty( $role['_um_pending_message'] ) ? __( $role['_um_pending_message'], 'ultimate-member' ) : __('Thank you for applying for membership to our site. We will review your details and send you an email letting you know whether your application has been successful or not.','ultimate-member'),
  98. 'conditional' => array( '_um_pending_action', '=', 'show_message' )
  99. ),
  100. array(
  101. 'id' => '_um_pending_url',
  102. 'type' => 'text',
  103. 'label' => __( 'Set Custom Redirect URL', 'ultimate-member' ),
  104. 'conditional' => array( '_um_pending_action', '=', 'redirect_url' ),
  105. 'value' => ! empty( $role['_um_pending_url'] ) ? __( $role['_um_pending_url'], 'ultimate-member' ) : '',
  106. ),
  107. )
  108. ) )->render_form(); ?>
  109. </div>