View upload photo button only if you have permission.

Check if post_photos permission is available otherwise hide the photo
upload button.
Or should we show the button and just disable it with a title, about
missing permission to upload photos?
In comments we use the same icon, but just add [img] bb-code. Should we
provide this if no permission to upload photos. Do we need different
icons for [img] and photo upload buttons?
This commit is contained in:
Klaus Weidenbach 2015-03-10 21:42:26 +01:00
parent e0ba373147
commit 946beb6191
2 changed files with 77 additions and 80 deletions

View file

@ -1081,7 +1081,7 @@ function format_like($cnt,$arr,$type,$id) {
} }
function status_editor($a,$x,$popup=false) { function status_editor($a, $x, $popup = false) {
$o = ''; $o = '';
@ -1092,28 +1092,28 @@ function status_editor($a,$x,$popup=false) {
// if(feature_enabled(local_channel(),'richtext')) // if(feature_enabled(local_channel(),'richtext'))
// $plaintext = false; // $plaintext = false;
$voting = feature_enabled(local_channel(),'consensus_tools'); $voting = feature_enabled(local_channel(), 'consensus_tools');
$mimeselect = ''; $mimeselect = '';
if(array_key_exists('mimetype',$x) && $x['mimetype']) { if(array_key_exists('mimetype', $x) && $x['mimetype']) {
if($x['mimetype'] != 'text/bbcode') if($x['mimetype'] != 'text/bbcode')
$plaintext = true; $plaintext = true;
if($x['mimetype'] === 'choose') { if($x['mimetype'] === 'choose') {
$mimeselect = mimetype_select($x['profile_uid']); $mimeselect = mimetype_select($x['profile_uid']);
} }
else else
$mimeselect = '<input type="hidden" name="mimetype" value="' . $x['mimetype'] . '" />'; $mimeselect = '<input type="hidden" name="mimetype" value="' . $x['mimetype'] . '" />';
} }
$layoutselect = ''; $layoutselect = '';
if(array_key_exists('layout',$x) && $x['layout']) { if(array_key_exists('layout', $x) && $x['layout']) {
if($x['layout'] === 'choose') { if($x['layout'] === 'choose') {
$layoutselect = layout_select($x['profile_uid']); $layoutselect = layout_select($x['profile_uid']);
} }
else else
$layoutselect = '<input type="hidden" name="layout_mid" value="' . $x['layout'] . '" />'; $layoutselect = '<input type="hidden" name="layout_mid" value="' . $x['layout'] . '" />';
} }
if(array_key_exists('channel_select',$x) && $x['channel_select']) { if(array_key_exists('channel_select',$x) && $x['channel_select']) {
require_once('include/identity.php'); require_once('include/identity.php');
@ -1126,7 +1126,7 @@ function status_editor($a,$x,$popup=false) {
$webpage = ((x($x,'webpage')) ? $x['webpage'] : ''); $webpage = ((x($x,'webpage')) ? $x['webpage'] : '');
$tpl = get_markup_template('jot-header.tpl'); $tpl = get_markup_template('jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array( $a->page['htmlhead'] .= replace_macros($tpl, array(
'$newpost' => 'true', '$newpost' => 'true',
'$baseurl' => $a->get_baseurl(true), '$baseurl' => $a->get_baseurl(true),
@ -1135,8 +1135,8 @@ function status_editor($a,$x,$popup=false) {
'$nickname' => $x['nickname'], '$nickname' => $x['nickname'],
'$ispublic' => t('Visible to <strong>everybody</strong>'), '$ispublic' => t('Visible to <strong>everybody</strong>'),
'$linkurl' => t('Please enter a link URL:'), '$linkurl' => t('Please enter a link URL:'),
'$vidurl' => t("Please enter a video link/URL:"), '$vidurl' => t('Please enter a video link/URL:'),
'$audurl' => t("Please enter an audio link/URL:"), '$audurl' => t('Please enter an audio link/URL:'),
'$term' => t('Tag term:'), '$term' => t('Tag term:'),
'$fileas' => t('Save to Folder:'), '$fileas' => t('Save to Folder:'),
'$whereareu' => t('Where are you right now?'), '$whereareu' => t('Where are you right now?'),
@ -1144,35 +1144,35 @@ function status_editor($a,$x,$popup=false) {
)); ));
$tpl = get_markup_template("jot.tpl"); $tpl = get_markup_template('jot.tpl');
$jotplugins = ''; $jotplugins = '';
$jotnets = ''; $jotnets = '';
$preview = t('Preview'); $preview = t('Preview');
// $preview = ((feature_enabled($x['profile_uid'],'preview')) ? t('Preview') : ''); // $preview = ((feature_enabled($x['profile_uid'],'preview')) ? t('Preview') : '');
if(x($x,'nopreview')) if(x($x, 'nopreview'))
$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 : '');
$cipher = get_pconfig($x['profile_uid'], 'system', 'default_cipher');
$cipher = get_pconfig($x['profile_uid'],'system','default_cipher');
if(! $cipher) if(! $cipher)
$cipher = 'aes256'; $cipher = 'aes256';
call_hooks('jot_tool', $jotplugins); call_hooks('jot_tool', $jotplugins);
call_hooks('jot_networks', $jotnets); call_hooks('jot_networks', $jotnets);
$o .= replace_macros($tpl,array( $o .= replace_macros($tpl, array(
'$return_path' => ((x($x,'return_path')) ? $x['return_path'] : $a->query_string), '$return_path' => ((x($x, 'return_path')) ? $x['return_path'] : $a->query_string),
'$action' => $a->get_baseurl(true) . '/item', '$action' => $a->get_baseurl(true) . '/item',
'$share' => (x($x,'button') ? $x['button'] : t('Share')), '$share' => (x($x,'button') ? $x['button'] : t('Share')),
'$webpage' => $webpage, '$webpage' => $webpage,
'$placeholdpagetitle' => ((x($x,'ptlabel')) ? $x['ptlabel'] : t('Page link title')), '$placeholdpagetitle' => ((x($x,'ptlabel')) ? $x['ptlabel'] : t('Page link title')),
'$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''), '$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''),
'$id_select' => $id_select, '$id_select' => $id_select,
'$id_seltext' => t('Post as'), '$id_seltext' => t('Post as'),
'$writephoto' => perm_is_allowed($x['profile_uid'], get_observer_hash(), 'post_photos'),
'$upload' => t('Upload photo'), '$upload' => t('Upload photo'),
'$shortupload' => t('upload photo'), '$shortupload' => t('upload photo'),
'$attach' => t('Attach file'), '$attach' => t('Attach file'),
@ -1188,11 +1188,11 @@ function status_editor($a,$x,$popup=false) {
'$voting' => t('Toggle voting'), '$voting' => t('Toggle voting'),
'$feature_voting' => $voting, '$feature_voting' => $voting,
'$consensus' => 0, '$consensus' => 0,
'$noloc' => ((get_pconfig($x['profile_uid'],'system','use_browser_location')) ? t('Clear browser location') : ''), '$noloc' => ((get_pconfig($x['profile_uid'], 'system', 'use_browser_location')) ? t('Clear browser location') : ''),
'$shortnoloc' => t('clear location'), '$shortnoloc' => t('clear location'),
'$title' => ((x($x,'title')) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8') : ''), '$title' => ((x($x, 'title')) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8') : ''),
'$placeholdertitle' => t('Title (optional)'), '$placeholdertitle' => t('Title (optional)'),
'$catsenabled' => ((feature_enabled($x['profile_uid'],'categories') && (! $webpage)) ? 'categories' : ''), '$catsenabled' => ((feature_enabled($x['profile_uid'], 'categories') && (! $webpage)) ? 'categories' : ''),
'$category' => "", '$category' => "",
'$placeholdercategory' => t('Categories (optional, comma-separated list)'), '$placeholdercategory' => t('Categories (optional, comma-separated list)'),
'$wait' => t('Please wait'), '$wait' => t('Please wait'),
@ -1211,26 +1211,24 @@ function status_editor($a,$x,$popup=false) {
'$acl' => $x['acl'], '$acl' => $x['acl'],
'$mimeselect' => $mimeselect, '$mimeselect' => $mimeselect,
'$layoutselect' => $layoutselect, '$layoutselect' => $layoutselect,
'$showacl' => ((array_key_exists('showacl',$x)) ? $x['showacl'] : true), '$showacl' => ((array_key_exists('showacl', $x)) ? $x['showacl'] : true),
'$bang' => $x['bang'], '$bang' => $x['bang'],
'$profile_uid' => $x['profile_uid'], '$profile_uid' => $x['profile_uid'],
'$preview' => $preview, '$preview' => $preview,
'$source' => ((x($x,'source')) ? $x['source'] : ''), '$source' => ((x($x, 'source')) ? $x['source'] : ''),
'$jotplugins' => $jotplugins, '$jotplugins' => $jotplugins,
'$defexpire' => $defexpire, '$defexpire' => $defexpire,
'$feature_expire' => ((feature_enabled($x['profile_uid'],'content_expire') && (! $webpage)) ? true : false), '$feature_expire' => ((feature_enabled($x['profile_uid'], 'content_expire') && (! $webpage)) ? true : false),
'$expires' => t('Set expiration date'), '$expires' => t('Set expiration date'),
'$feature_encrypt' => ((feature_enabled($x['profile_uid'],'content_encrypt') && (! $webpage)) ? true : false), '$feature_encrypt' => ((feature_enabled($x['profile_uid'], 'content_encrypt') && (! $webpage)) ? true : false),
'$encrypt' => t('Encrypt text'), '$encrypt' => t('Encrypt text'),
'$cipher' => $cipher, '$cipher' => $cipher,
'$expiryModalOK' => t('OK'), '$expiryModalOK' => t('OK'),
'$expiryModalCANCEL' => t('Cancel') '$expiryModalCANCEL' => t('Cancel')
)); ));
if ($popup === true) {
if ($popup==true){ $o = '<div id="jot-popup" style="display:none">' . $o . '</div>';
$o = '<div id="jot-popup" style="display: none;">'.$o.'</div>';
} }
return $o; return $o;
@ -1279,13 +1277,12 @@ function add_children_to_list($children, &$arr) {
} }
} }
function conv_sort($arr,$order) { function conv_sort($arr, $order) {
if((!(is_array($arr) && count($arr)))) if((!(is_array($arr) && count($arr))))
return array(); return array();
$parents = array(); $parents = array();
$children = array();
foreach($arr as $x) foreach($arr as $x)
if($x['id'] == $x['parent']) if($x['id'] == $x['parent'])
@ -1340,6 +1337,7 @@ function find_thread_parent_index($arr,$x) {
foreach($arr as $k => $v) foreach($arr as $k => $v)
if($v['id'] == $x['parent']) if($v['id'] == $x['parent'])
return $k; return $k;
return false; return false;
} }
@ -1368,6 +1366,7 @@ function render_location_default($item) {
else else
$location = '<span class="smalltext">' . $coord . '</span>'; $location = '<span class="smalltext">' . $coord . '</span>';
} }
return $location; return $location;
} }
@ -1389,14 +1388,15 @@ function prepare_page($item) {
// prepare_body calls unobscure() as a side effect. Do it here so that // prepare_body calls unobscure() as a side effect. Do it here so that
// the template will get passed an unobscured title. // the template will get passed an unobscured title.
$body = prepare_body($item,true); $body = prepare_body($item, true);
$tpl = get_pconfig($item['uid'],'system','pagetemplate'); $tpl = get_pconfig($item['uid'], 'system', 'pagetemplate');
if (! $tpl) if (! $tpl)
$tpl = 'page_display.tpl'; $tpl = 'page_display.tpl';
return replace_macros(get_markup_template($tpl),array(
return replace_macros(get_markup_template($tpl), array(
'$author' => (($naked) ? '' : $item['author']['xchan_name']), '$author' => (($naked) ? '' : $item['author']['xchan_name']),
'$auth_url' => (($naked) ? '' : zid($item['author']['xchan_url'])), '$auth_url' => (($naked) ? '' : zid($item['author']['xchan_url'])),
'$date' => (($naked) ? '' : datetime_convert('UTC',date_default_timezone_get(),$item['created'],'Y-m-d H:i')), '$date' => (($naked) ? '' : datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'Y-m-d H:i')),
'$title' => smilies(bbcode($item['title'])), '$title' => smilies(bbcode($item['title'])),
'$body' => $body, '$body' => $body,
'$preview' => $preview, '$preview' => $preview,
@ -1420,15 +1420,15 @@ function network_tabs() {
if(x($_GET,'new')) { if(x($_GET,'new')) {
$new_active = 'active'; $new_active = 'active';
} }
if(x($_GET,'search')) { if(x($_GET,'search')) {
$search_active = 'active'; $search_active = 'active';
} }
if(x($_GET,'star')) { if(x($_GET,'star')) {
$starred_active = 'active'; $starred_active = 'active';
} }
if(x($_GET,'conv')) { if(x($_GET,'conv')) {
$conv_active = 'active'; $conv_active = 'active';
} }
@ -1441,8 +1441,7 @@ function network_tabs() {
$public_active = 'active'; $public_active = 'active';
} }
if (($new_active == '') if (($new_active == '')
&& ($starred_active == '') && ($starred_active == '')
&& ($conv_active == '') && ($conv_active == '')
@ -1458,7 +1457,7 @@ function network_tabs() {
case 'comment' : $all_active = 'active'; $no_active=''; break; case 'comment' : $all_active = 'active'; $no_active=''; break;
} }
} }
if ($no_active=='active') $all_active='active'; if ($no_active=='active') $all_active='active';
$cmd = $a->cmd; $cmd = $a->cmd;
@ -1469,22 +1468,22 @@ function network_tabs() {
if(! get_config('system','disable_discover_tab')) { if(! get_config('system','disable_discover_tab')) {
$tabs[] = array( $tabs[] = array(
'label' => t('Discover'), 'label' => t('Discover'),
'url'=>z_root() . '/' . $cmd . '?f=&fh=1' , 'url' => z_root() . '/' . $cmd . '?f=&fh=1' ,
'sel'=> $public_active, 'sel' => $public_active,
'title'=> t('Imported public streams'), 'title' => t('Imported public streams'),
); );
} }
$tabs[] = array( $tabs[] = array(
'label' => t('Commented Order'), 'label' => t('Commented Order'),
'url'=>z_root() . '/' . $cmd . '?f=&order=comment' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''), 'url'=>z_root() . '/' . $cmd . '?f=&order=comment' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
'sel'=>$all_active, 'sel'=>$all_active,
'title'=> t('Sort by Comment Date'), 'title'=> t('Sort by Comment Date'),
); );
$tabs[] = array( $tabs[] = array(
'label' => t('Posted Order'), 'label' => t('Posted Order'),
'url'=>z_root() . '/' . $cmd . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''), 'url'=>z_root() . '/' . $cmd . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
'sel'=>$postord_active, 'sel'=>$postord_active,
'title' => t('Sort by Post Date'), 'title' => t('Sort by Post Date'),
); );
@ -1498,7 +1497,7 @@ function network_tabs() {
); );
} }
if(feature_enabled(local_channel(),'new_tab')) { if(feature_enabled(local_channel(),'new_tab')) {
$tabs[] = array( $tabs[] = array(
'label' => t('New'), 'label' => t('New'),
'url' => z_root() . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&new=1' . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''), 'url' => z_root() . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&new=1' . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
@ -1524,15 +1523,14 @@ function network_tabs() {
'sel'=> $spam_active, 'sel'=> $spam_active,
'title' => t('Posts flagged as SPAM'), 'title' => t('Posts flagged as SPAM'),
); );
} }
$arr = array('tabs' => $tabs); $arr = array('tabs' => $tabs);
call_hooks('network_tabs', $arr); call_hooks('network_tabs', $arr);
$tpl = get_markup_template('common_tabs.tpl'); $tpl = get_markup_template('common_tabs.tpl');
return replace_macros($tpl,array('$tabs' => $arr['tabs'])); return replace_macros($tpl, array('$tabs' => $arr['tabs']));
} }
@ -1550,13 +1548,13 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
$nickname = $channel['channel_address']; $nickname = $channel['channel_address'];
$uid = (($a->profile['profile_uid']) ? $a->profile['profile_uid'] : local_channel()); $uid = (($a->profile['profile_uid']) ? $a->profile['profile_uid'] : local_channel());
if (get_pconfig($uid,'system','noprofiletabs')) if (get_pconfig($uid,'system','noprofiletabs'))
return; return;
if(x($_GET,'tab')) if(x($_GET,'tab'))
$tab = notags(trim($_GET['tab'])); $tab = notags(trim($_GET['tab']));
$url = $a->get_baseurl() . '/channel/' . $nickname; $url = $a->get_baseurl() . '/channel/' . $nickname;
$pr = $a->get_baseurl() . '/profile/' . $nickname; $pr = $a->get_baseurl() . '/profile/' . $nickname;
@ -1636,13 +1634,10 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
'id' => 'webpages-tab', 'id' => 'webpages-tab',
); );
} }
else { else {
// FIXME // FIXME
// we probably need a listing of events that were created by // we probably need a listing of events that were created by
// this channel and are visible to the observer // this channel and are visible to the observer
} }
$arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs); $arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);

View file

@ -1,5 +1,5 @@
<div id="profile-jot-wrapper" > <div id="profile-jot-wrapper">
<form id="profile-jot-form" action="{{$action}}" method="post" > <form id="profile-jot-form" action="{{$action}}" method="post">
<input type="hidden" name="type" value="{{$ptyp}}" /> <input type="hidden" name="type" value="{{$ptyp}}" />
<input type="hidden" name="profile_uid" value="{{$profile_uid}}" /> <input type="hidden" name="profile_uid" value="{{$profile_uid}}" />
<input type="hidden" name="return" value="{{$return_path}}" /> <input type="hidden" name="return" value="{{$return_path}}" />
@ -16,21 +16,21 @@
{{$mimeselect}} {{$mimeselect}}
{{$layoutselect}} {{$layoutselect}}
{{if $id_select}} {{if $id_select}}
<div class="channel-id-select-div"> <div class="channel-id-select-div">
<span class="channel-id-select-desc">{{$id_seltext}}</span> {{$id_select}} <span class="channel-id-select-desc">{{$id_seltext}}</span> {{$id_select}}
</div> </div>
{{/if}} {{/if}}
<div id="jot-title-wrap" class="jothidden" style="display:none"> <div id="jot-title-wrap" class="jothidden" style="display:none">
<input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" tabindex=1 value="{{$title}}"> <input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" tabindex=1 value="{{$title}}">
</div> </div>
{{if $catsenabled}} {{if $catsenabled}}
<div id="jot-category-wrap" class="jothidden" style="display:none"> <div id="jot-category-wrap" class="jothidden" style="display:none">
<input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" data-role="tagsinput"/> <input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" data-role="tagsinput">
</div> </div>
{{/if}} {{/if}}
{{if $webpage}} {{if $webpage}}
<div id="jot-pagetitle-wrap" class="jothidden" style="display:none"> <div id="jot-pagetitle-wrap" class="jothidden" style="display:none">
<input name="pagetitle" id="jot-pagetitle" type="text" placeholder="{{$placeholdpagetitle}}" value="{{$pagetitle}}" /> <input name="pagetitle" id="jot-pagetitle" type="text" placeholder="{{$placeholdpagetitle}}" value="{{$pagetitle}}">
</div> </div>
{{/if}} {{/if}}
<div id="jot-text-wrap"> <div id="jot-text-wrap">
@ -57,9 +57,11 @@
</div> </div>
{{if $visitor}} {{if $visitor}}
<div class="btn-group hidden-xs"> <div class="btn-group hidden-xs">
{{if $writephoto}}
<button id="wall-image-upload" class="btn btn-default btn-sm" title="{{$upload}}" > <button id="wall-image-upload" class="btn btn-default btn-sm" title="{{$upload}}" >
<i class="icon-camera jot-icons"></i> <i class="icon-camera jot-icons"></i>
</button> </button>
{{/if}}
<button id="wall-file-upload" class="btn btn-default btn-sm" title="{{$attach}}" > <button id="wall-file-upload" class="btn btn-default btn-sm" title="{{$attach}}" >
<i id="wall-file-upload-icon" class="icon-paper-clip jot-icons"></i> <i id="wall-file-upload-icon" class="icon-paper-clip jot-icons"></i>
</button> </button>
@ -109,7 +111,7 @@
<li class="visible-xs"><a href="#" onclick="preview_post();return false;"><i class="icon-eye-open"></i>&nbsp;{{$preview}}</a></li> <li class="visible-xs"><a href="#" onclick="preview_post();return false;"><i class="icon-eye-open"></i>&nbsp;{{$preview}}</a></li>
{{if $visitor}} {{if $visitor}}
<li class="divider visible-xs"></li> <li class="divider visible-xs"></li>
<li class="visible-xs"><a id="wall-image-upload-sub" href="#" ><i class="icon-camera"></i>&nbsp;{{$upload}}</a></li> {{if $writephoto}}<li class="visible-xs"><a id="wall-image-upload-sub" href="#" ><i class="icon-camera"></i>&nbsp;{{$upload}}</a></li>{{/if}}
<li class="visible-xs"><a id="wall-file-upload-sub" href="#" ><i class="icon-paper-clip"></i>&nbsp;{{$attach}}</a></li> <li class="visible-xs"><a id="wall-file-upload-sub" href="#" ><i class="icon-paper-clip"></i>&nbsp;{{$attach}}</a></li>
<li class="visible-xs"><a href="#" onclick="jotGetLink(); return false;"><i class="icon-link"></i>&nbsp;{{$weblink}}</a></li> <li class="visible-xs"><a href="#" onclick="jotGetLink(); return false;"><i class="icon-link"></i>&nbsp;{{$weblink}}</a></li>
<li class="visible-xs"><a href="#" onclick="jotVideoURL(); return false;"><i class="icon-facetime-video"></i>&nbsp;{{$video}}</a></li> <li class="visible-xs"><a href="#" onclick="jotVideoURL(); return false;"><i class="icon-facetime-video"></i>&nbsp;{{$video}}</a></li>
@ -180,19 +182,19 @@
</div><!-- /.modal-dialog --> </div><!-- /.modal-dialog -->
</div><!-- /.modal --> </div><!-- /.modal -->
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
$('#datetimepicker1').datetimepicker({ $('#datetimepicker1').datetimepicker({
language: 'us', language: 'us',
icons: { icons: {
time: "icon-time", time: "icon-time",
date: "icon-calendar", date: "icon-calendar",
up: "icon-arrow-up", up: "icon-arrow-up",
down: "icon-arrow-down" down: "icon-arrow-down"
} }
}); });
}); });
</script> </script>
{{if $content}} {{if $content}}
<script>initEditor();</script> <script>initEditor();</script>
{{/if}} {{/if}}