Plugin Directory

Changeset 1880152


Ignore:
Timestamp:
05/23/2018 03:09:59 PM (8 years ago)
Author:
iteras
Message:

Make landing page setting depend on access action setting

Location:
iteras/trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • iteras/trunk/admin/assets/js/admin.js

    r1333589 r1880152  
    55        $("#paywall_display_type").change(function() {
    66            $(".box-type").toggle($(this).val() == "samepage");
     7            $(".landing-page-type").toggle($(this).val() == "redirect");
    78        }).change();
    89
  • iteras/trunk/admin/views/admin.php

    r1872759 r1880152  
    6161
    6262      <tr>
    63         <th scope="row"><label for="subscribeurl"><?php _e('Subscribe landing page', $domain); ?></label></th>
    64         <td>
    65           <input class="regular-text" id="subscribeurl" name="subscribe_url" placeholder="<?php _e('e.g. /?page_id=1', $domain); ?>" type="text" value="<?=$settings['subscribe_url']; ?>">
    66           <p class="description"><?php _e('URL to the landing page for logging in or becoming a <b>paying subscriber</b>.', $domain); ?></p>
    67         </td>
    68       </tr>
    69 
    70       <tr style="display: none">
    71         <th scope="row"><label for="userurl"><?php _e('User landing page', $domain); ?></label></th>
    72         <td>
    73           <input class="regular-text" id="userurl" name="user_url" placeholder="<?php _e('e.g. /?page_id=2', $domain); ?>" type="text" value="<?=$settings['user_url']; ?>">
    74           <p class="description"><?php _e('URL to the landing page for logging in or registering as a <b>user</b>. The subscribe and user landing page can point to the same Wordpress page.', $domain); ?></p>
    75         </td>
    76       </tr>
    77 
    78       <tr>
    7963        <th scope="row"><label for="paywall_display_type"><?php _e('Access restriction', $domain); ?></label></th>
    8064        <td>
     
    8670
    8771          <p class="description"><?php _e("How users will be greeted on an article they don't have access to.", $domain); ?></p>
     72        </td>
     73      </tr>
     74
     75      <tr class="landing-page-type">
     76        <th scope="row"><label for="subscribeurl"><?php _e('Subscribe landing page', $domain); ?></label></th>
     77        <td>
     78          <input class="regular-text" id="subscribeurl" name="subscribe_url" placeholder="<?php _e('e.g. /?page_id=1', $domain); ?>" type="text" value="<?=$settings['subscribe_url']; ?>">
     79          <p class="description"><?php _e('URL to the landing page for logging in or becoming a <b>paying subscriber</b>.', $domain); ?></p>
    8880        </td>
    8981      </tr>
Note: See TracChangeset for help on using the changeset viewer.