provide ways to over-ride the datetime pickers
This commit is contained in:
parent
f1a1660709
commit
47292c612c
@ -1158,6 +1158,8 @@ function status_editor($a, $x, $popup = false) {
|
|||||||
$preview = '';
|
$preview = '';
|
||||||
|
|
||||||
$defexpire = ((($z = get_pconfig($x['profile_uid'], 'system', 'default_post_expire')) && (! $webpage)) ? $z : '');
|
$defexpire = ((($z = get_pconfig($x['profile_uid'], 'system', 'default_post_expire')) && (! $webpage)) ? $z : '');
|
||||||
|
if($defexpire)
|
||||||
|
$defexpire = datetime_convert('UTC',date_default_timezone_get(),$defexpire,'Y-m-d H:i');
|
||||||
|
|
||||||
$cipher = get_pconfig($x['profile_uid'], 'system', 'default_cipher');
|
$cipher = get_pconfig($x['profile_uid'], 'system', 'default_cipher');
|
||||||
if(! $cipher)
|
if(! $cipher)
|
||||||
|
@ -175,6 +175,8 @@ function timesel($format, $h, $m, $id='timepicker') {
|
|||||||
* set maximum date from picker with id $maxfrom (none by default)
|
* set maximum date from picker with id $maxfrom (none by default)
|
||||||
*/
|
*/
|
||||||
function datetimesel($format, $min, $max, $default, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '',$required = false) {
|
function datetimesel($format, $min, $max, $default, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '',$required = false) {
|
||||||
|
|
||||||
|
|
||||||
// Once browser support is better this could probably be replaced with native HTML5 date picker
|
// Once browser support is better this could probably be replaced with native HTML5 date picker
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
|
@ -548,12 +548,14 @@ function events_content(&$a) {
|
|||||||
if(! x($orig_event))
|
if(! x($orig_event))
|
||||||
$sh_checked = '';
|
$sh_checked = '';
|
||||||
else
|
else
|
||||||
$sh_checked = (($orig_event['allow_cid'] === '<' . $channel['channel_hash'] . '>' && (! $orig_event['allow_gid']) && (! $orig_event['deny_cid']) && (! $orig_event['deny_gid'])) ? '' : ' checked="checked" ' );
|
$sh_checked = ((($orig_event['allow_cid'] === '<' . $channel['channel_hash'] . '>' || (! $orig_event['allow_cid'])) && (! $orig_event['allow_gid']) && (! $orig_event['deny_cid']) && (! $orig_event['deny_gid'])) ? '' : ' checked="checked" ' );
|
||||||
|
|
||||||
if($orig_event['event_xchan'])
|
if($orig_event['event_xchan'])
|
||||||
$sh_checked .= ' disabled="disabled" ';
|
$sh_checked .= ' disabled="disabled" ';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$sdt = ((x($orig_event)) ? $orig_event['start'] : 'now');
|
$sdt = ((x($orig_event)) ? $orig_event['start'] : 'now');
|
||||||
$fdt = ((x($orig_event)) ? $orig_event['finish'] : 'now');
|
$fdt = ((x($orig_event)) ? $orig_event['finish'] : 'now');
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2015-03-25.982
|
2015-03-26.983
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<div class='field checkbox'>
|
<div class='field checkbox'>
|
||||||
<label class="mainlabel" for='id_nofinish'>{{$n_text}}</label>
|
<label class="mainlabel" for='id_nofinish'>{{$n_text}}</label>
|
||||||
<div><input type="checkbox" name='nofinish' id='id_nofinish' value="1" {{$n_checked}} onclick="showHideFinishDate(); return true;" >
|
<div class="pull-right"><input type="checkbox" name='nofinish' id='id_nofinish' value="1" {{$n_checked}} onclick="showHideFinishDate(); return true;" >
|
||||||
<label class="switchlabel" for='id_nofinish'> <span class="onoffswitch-inner" data-on='' data-off='' ></span>
|
<label class="switchlabel" for='id_nofinish'> <span class="onoffswitch-inner" data-on='' data-off='' ></span>
|
||||||
<span class="onoffswitch-switch"></span> </label></div><span class='field_help'></span>
|
<span class="onoffswitch-switch"></span> </label></div><span class='field_help'></span>
|
||||||
</div>
|
</div>
|
||||||
@ -157,7 +157,7 @@
|
|||||||
|
|
||||||
<div class='field checkbox'>
|
<div class='field checkbox'>
|
||||||
<label class="mainlabel" for='id_share'>{{$sh_text}}</label>
|
<label class="mainlabel" for='id_share'>{{$sh_text}}</label>
|
||||||
<div><input type="checkbox" name='share' id='id_share' value="1" {{$sh_checked}} >
|
<div class="pull-right"><input type="checkbox" name='share' id='id_share' value="1" {{$sh_checked}} >
|
||||||
<label class="switchlabel" for='id_share'> <span class="onoffswitch-inner" data-on='' data-off='' ></span>
|
<label class="switchlabel" for='id_share'> <span class="onoffswitch-inner" data-on='' data-off='' ></span>
|
||||||
<span class="onoffswitch-switch"></span> </label></div><span class='field_help'></span>
|
<span class="onoffswitch-switch"></span> </label></div><span class='field_help'></span>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user