tinymce for event fields
This commit is contained in:
parent
bbc65f9832
commit
fcb4316c29
2 changed files with 11 additions and 7 deletions
|
@ -122,14 +122,14 @@ function datesel($pre,$ymin,$ymax,$allow_blank,$y,$m,$d) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= "</select> <select name=\"{$pre}month\" class=\"{$pre}month\" size=\"1\">";
|
$o .= "</select> <select name=\"{$pre}month\" class=\"{$pre}month\" size=\"1\">";
|
||||||
for($x = 0; $x <= 12; $x ++) {
|
for($x = (($allow_blank) ? 0 : 1); $x <= 12; $x ++) {
|
||||||
$sel = (($x == $m) ? " selected=\"selected\" " : "");
|
$sel = (($x == $m) ? " selected=\"selected\" " : "");
|
||||||
$y = (($x) ? $x : '');
|
$y = (($x) ? $x : '');
|
||||||
$o .= "<option value=\"$x\" $sel>$y</option>";
|
$o .= "<option value=\"$x\" $sel>$y</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= "</select> <select name=\"{$pre}day\" class=\"{$pre}day\" size=\"1\">";
|
$o .= "</select> <select name=\"{$pre}day\" class=\"{$pre}day\" size=\"1\">";
|
||||||
for($x = 0; $x <= 31; $x ++) {
|
for($x = (($allow_blank) ? 0 : 1); $x <= 31; $x ++) {
|
||||||
$sel = (($x == $d) ? " selected=\"selected\" " : "");
|
$sel = (($x == $d) ? " selected=\"selected\" " : "");
|
||||||
$y = (($x) ? $x : '');
|
$y = (($x) ? $x : '');
|
||||||
$o .= "<option value=\"$x\" $sel>$y</option>";
|
$o .= "<option value=\"$x\" $sel>$y</option>";
|
||||||
|
|
|
@ -158,19 +158,23 @@ function events_content(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($mode === 'edit' || $mode === 'new') {
|
if($mode === 'edit' || $mode === 'new') {
|
||||||
|
$htpl = get_markup_template('profed_head.tpl');
|
||||||
|
$a->page['htmlhead'] .= replace_macros($htpl,array('$baseurl' => $a->get_baseurl()));
|
||||||
|
|
||||||
$tpl = get_markup_template('event_form.tpl');
|
$tpl = get_markup_template('event_form.tpl');
|
||||||
|
|
||||||
$year = datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y');
|
$year = datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y');
|
||||||
|
$month = datetime_convert('UTC', date_default_timezone_get(), 'now', 'm');
|
||||||
|
$day = datetime_convert('UTC', date_default_timezone_get(), 'now', 'd');
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl,array(
|
||||||
'$post' => $a->get_baseurl() . '/events',
|
'$post' => $a->get_baseurl() . '/events',
|
||||||
'$e_text' => t('Event details'),
|
'$e_text' => t('Event details'),
|
||||||
'$s_text' => t('Starting date/time:'),
|
'$s_text' => t('Start: year-month-day hour:minute'),
|
||||||
'$s_dsel' => datesel('start',$year+5,$year,false,$year,0,0),
|
'$s_dsel' => datesel('start',$year+5,$year,false,$year,$month,$day),
|
||||||
'$s_tsel' => timesel('start',0,0),
|
'$s_tsel' => timesel('start',0,0),
|
||||||
'$f_text' => t('Finish date/time:'),
|
'$f_text' => t('Finish: year-month-day hour:minute'),
|
||||||
'$f_dsel' => datesel('start',$year+5,$year,false,$year,0,0),
|
'$f_dsel' => datesel('start',$year+5,$year,false,$year,$month,$day),
|
||||||
'$f_tsel' => timesel('start',0,0),
|
'$f_tsel' => timesel('start',0,0),
|
||||||
'$d_text' => t('Description:'),
|
'$d_text' => t('Description:'),
|
||||||
'$d_orig' => '',
|
'$d_orig' => '',
|
||||||
|
|
Loading…
Reference in a new issue