XF 2.0 Hourly warning option

@Recep Baltaş just edit the "member_warn" template.

Change this section:
XML:
<xf:select name="expiry_unit" value="months" class="input--inline">
   <xf:option value="days">{{ phrase('days') }}</xf:option>
   <xf:option value="weeks">{{ phrase('weeks') }}</xf:option>
   <xf:option value="months">{{ phrase('months') }}</xf:option>
   <xf:option value="years">{{ phrase('years') }}</xf:option>
</xf:select>

To something like:
XML:
<xf:select name="expiry_unit" value="months" class="input--inline">
   <xf:option value="seconds">{{ phrase('units_seconds') }}</xf:option>
   <xf:option value="minutes">{{ phrase('units_minutes') }}</xf:option>
   <xf:option value="hours">{{ phrase('units_hours') }}</xf:option>
   <xf:option value="days">{{ phrase('days') }}</xf:option>
   <xf:option value="weeks">{{ phrase('weeks') }}</xf:option>
   <xf:option value="months">{{ phrase('months') }}</xf:option>
   <xf:option value="years">{{ phrase('years') }}</xf:option>
</xf:select>

The value of expiry_unit is passed to strtotime, so you've got a fairly wide range of acceptable inputs
 
That was for the front-end.

Editing the back-end default warning units requires an add-on as it requires a database schema change, updating XF validation and an admin template to be edited.
 
Back
Top Bottom