| 1 |
<?php |
| 2 |
namespace Hurrytimer; |
| 3 |
?> |
| 4 |
|
| 5 |
<div id="hurrytimer-actions" class="hurrytimer-tabcontent"> |
| 6 |
<?php $i = 0; |
| 7 |
foreach ($campaign->actions as $action): ?> |
| 8 |
<div class="hurrytimer-action-block "> |
| 9 |
<div> |
| 10 |
<div class="hurrytimer-action-block-choices"> |
| 11 |
<div class="hurrytimer-action-block-label"> |
| 12 |
<label for="active"><?php _e("Action", "hurrytimer") ?></label> |
| 13 |
</div> |
| 14 |
<div class="hurrytimer-action-block-input"> |
| 15 |
<select name="actions[<?php echo $i ?>][id]" |
| 16 |
class="hurrytimer-action-select"> |
| 17 |
<optgroup label="General"> |
| 18 |
<option value="<?php echo C::ACTION_NONE ?>" |
| 19 |
data-subfields="hurrytimer-action-none-subfields" |
| 20 |
<?php echo selected($action['id'], C::ACTION_NONE) ?>> |
| 21 |
<?php _e("None", "hurrytimer") ?> |
| 22 |
</option> |
| 23 |
<option value="<?php echo C::ACTION_HIDE ?>" |
| 24 |
data-subfields="hurrytimer-action-hide-subfields" |
| 25 |
<?php echo selected($action['id'], C::ACTION_HIDE) ?>> |
| 26 |
<?php _e("Hide countdown timer", "hurrytimer") ?> |
| 27 |
</option> |
| 28 |
<option value="<?php echo C::ACTION_REDIRECT ?>" |
| 29 |
data-subfields="hurrytimer-action-redirect-subfields" |
| 30 |
<?php echo selected($action['id'], C::ACTION_REDIRECT) ?>> |
| 31 |
<?php _e("Redirect to...", "hurrytimer") ?> |
| 32 |
<option value="<?php echo C::ACTION_DISPLAY_MESSAGE ?>" |
| 33 |
data-subfields="hurrytimer-action-display-message-subfields" |
| 34 |
<?php echo selected($action['id'], |
| 35 |
C::ACTION_DISPLAY_MESSAGE) ?>> |
| 36 |
<?php _e("Display message...", "hurrytimer") ?> |
| 37 |
</option> |
| 38 |
</optgroup> |
| 39 |
|
| 40 |
<optgroup label="WooCommerce"> |
| 41 |
<option value="<?php echo C::ACTION_HIDE_ADD_TO_CART_BUTTON ?>" |
| 42 |
data-subfields="hurrytimer-action-hide-addtocart-subfields" |
| 43 |
<?php echo selected($action['id'], |
| 44 |
C::ACTION_HIDE_ADD_TO_CART_BUTTON) ?>> |
| 45 |
|
| 46 |
Hide "Add to cart" button |
| 47 |
</option> |
| 48 |
<option value="<?php echo C::ACTION_CHANGE_STOCK_STATUS ?>" |
| 49 |
data-subfields="hurrytimer-action-stockstatus-subfields" |
| 50 |
<?php echo selected($action['id'], |
| 51 |
C::ACTION_CHANGE_STOCK_STATUS) ?>> |
| 52 |
Change stock status |
| 53 |
</option> |
| 54 |
</optgroup> |
| 55 |
</select> |
| 56 |
<div class="hurryt-compat-info description hidden"> |
| 57 |
Regular mode only. |
| 58 |
</div> |
| 59 |
</div> |
| 60 |
</div> |
| 61 |
<div class="hurrytimer-action-block-subfields hurrytimer-action-redirect-subfields hidden"> |
| 62 |
<div class="hurrytimer-action-block-label"> |
| 63 |
|
| 64 |
<label for=""><?php _e("Redirect URL", "hurrytimer") ?></label> |
| 65 |
</div> |
| 66 |
<div class="hurrytimer-action-block-input"> |
| 67 |
<input type="text" |
| 68 |
id="hurrytimer-redirect-url" |
| 69 |
placeholder="http://" |
| 70 |
name="actions[<?php echo $i ?>][redirectUrl]" |
| 71 |
value="<?php echo $action['redirectUrl'] ?>" |
| 72 |
class="hurrytimer-redirect-url"/> |
| 73 |
</div> |
| 74 |
</div> |
| 75 |
<div class="hurrytimer-action-block-subfields hurrytimer-action-display-message-subfields hidden"> |
| 76 |
<div class="hurrytimer-action-block-label"> |
| 77 |
|
| 78 |
<label for=""><?php _e("Message", "hurrytimer") ?></label> |
| 79 |
</div> |
| 80 |
<div class="hurrytimer-action-block-input"> |
| 81 |
<textarea type="text" |
| 82 |
id="hurrytimer-action-message" |
| 83 |
name="actions[<?php echo $i ?>][message]" |
| 84 |
rows="2" |
| 85 |
class="hurrytimer-action-message hurryt-w-full"><?php echo $action['message'] ?></textarea> |
| 86 |
</div> |
| 87 |
</div> |
| 88 |
<div class="hurrytimer-action-block-subfields hurrytimer-action-stockstatus-subfields hidden"> |
| 89 |
<div class="hurrytimer-action-block-label"> |
| 90 |
<label for=""><?php _e("Stock status", "hurrytimer") ?></label> |
| 91 |
</div> |
| 92 |
<div class="hurrytimer-action-block-input"> |
| 93 |
<select name="actions[<?php echo $i ?>][wcStockStatus]"> |
| 94 |
<option value="<?php echo C::WC_IN_STOCK ?>" <?php echo selected($action['wcStockStatus'], |
| 95 |
C::WC_IN_STOCK) ?>>In stock |
| 96 |
</option> |
| 97 |
<option value="<?php echo C::WC_OUT_OF_STOCK ?>" |
| 98 |
p<?php echo selected($action['wcStockStatus'], |
| 99 |
C::WC_OUT_OF_STOCK) ?>>Out of stock |
| 100 |
</option> |
| 101 |
<option value="<?php echo C::WC_ON_BACKORDER ?>" |
| 102 |
p<?php echo selected($action['wcStockStatus'], |
| 103 |
C::WC_ON_BACKORDER) ?>>On backorder |
| 104 |
</option> |
| 105 |
</select> |
| 106 |
</div> |
| 107 |
</div> |
| 108 |
</div> |
| 109 |
<div> |
| 110 |
<button class="button button-default hurrytimer-delete-action <?php echo count($campaign->actions) ===1 ? 'hidden': ''?>" type="button"> |
| 111 |
Delete |
| 112 |
</button> |
| 113 |
</div> |
| 114 |
</div> |
| 115 |
|
| 116 |
<?php $i++; endforeach; ?> |
| 117 |
<div class="hurryt-add-action"> |
| 118 |
<button class="button button-default" type="button" id="hurrytimer-new-action">Set additional |
| 119 |
action |
| 120 |
</button> |
| 121 |
</div> |
| 122 |
</div> |
| 123 |
|
| 124 |
|
| 125 |
<?php //removeIf(pro) ?> |
| 126 |
<div id="hurryt-upgrade-alert-actions-feat" |
| 127 |
class="modal hurryt-upgrade-alert"> |
| 128 |
<div class="hurryt-upgrade-alert-header"> |
| 129 |
<span class="dashicons dashicons-lock"></span> |
| 130 |
<h3>Multiple Actions is a PRO feature.</h3> |
| 131 |
</div> |
| 132 |
<div class="hurryt-upgrade-alert-body"> |
| 133 |
Unlock to set more actions. |
| 134 |
</div> |
| 135 |
<div class="hurryt-upgrade-alert-footer"> |
| 136 |
<a href="http://hurrytimer.com/pricing?utm_source=plugin&utm_medium=actions&utm_campaign=learn_more" target="_blank" class="button hurryt-button">Upgrade now</a> |
| 137 |
<a href="http://hurrytimer.com?utm_source=plugin&utm_medium=actions&utm_campaign=learn_more" target="_blank" class="button">Learn more</a> |
| 138 |
</div> |
| 139 |
|
| 140 |
</div> |
| 141 |
<?php //endRemoveIf(pro) ?> |