File indexing completed on 2024-12-29 05:24:48
0001 <?php 0002 /** 0003 * ocs-webserver 0004 * 0005 * Copyright 2016 by pling GmbH. 0006 * 0007 * This file is part of ocs-webserver. 0008 * 0009 * This program is free software: you can redistribute it and/or modify 0010 * it under the terms of the GNU Affero General Public License as 0011 * published by the Free Software Foundation, either version 3 of the 0012 * License, or (at your option) any later version. 0013 * 0014 * This program is distributed in the hope that it will be useful, 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 * GNU Affero General Public License for more details. 0018 * 0019 * You should have received a copy of the GNU Affero General Public License 0020 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 **/ 0022 ?> 0023 <style type="text/css"> 0024 0025 .settings-main #form-picture-background .image-preview > img { 0026 width: 200px !important; 0027 height: 46px !important; 0028 } 0029 </style> 0030 0031 <!--partialajaxbg--> 0032 <div class="panel-collapse " id="picture-bg-collapse"> 0033 <div class="panel-body"> 0034 <form class="standard-form partialajaxbg well" action="<?= $this->pictureformbg->getAction(); ?>" 0035 method="<?= $this->pictureformbg->getMethod(); ?>" data-target="#form-picture-background" 0036 data-trigger="#picture-background-trigger" enctype="multipart/form-data"> 0037 <div class="row"> 0038 <div class="col-md-4 col-lg-4 col-sm-4 col-xs-4 center"> 0039 <?= $this->pictureformbg->profile_picture_background_upload ?> 0040 <?= $this->pictureformbg->profile_image_url_bg ?> 0041 </div> 0042 <!-- /.span4 --> 0043 <div class="col-md-4 col-lg-4 col-sm-4 col-xs-4"> 0044 <div class="image-info"> 0045 <p> 0046 <em class="icon info-icon"></em> 0047 </p> 0048 0049 <p class="italic"> 0050 <?= $this->translate('You can use <br><span class="purple">JPG, PNG, GIF</span> formats') ?> 0051 </p> 0052 </div> 0053 </div> 0054 <!-- /.span4 --> 0055 </div> 0056 <!-- /.row-fluid --> 0057 <hr> 0058 <div class="row"> 0059 <div class="box pull-left margin-left-15" style="padding-left: 15px;"> 0060 <?php echo $this->formResult($this->pictureformbg, $this->save, true, 'Changes saved. Some picture elements will be updated at next login.'); ?> 0061 </div> 0062 <button type="submit" class="btn btn-native pull-right" 0063 tabindex="14"><?= $this->translate('Save & Update') ?></button> 0064 </div> 0065 </form> 0066 <!-- /.standard-form --> 0067 </div> 0068 </div> 0069 <script type="text/javascript"> 0070 $(document).ready(function () { 0071 ImagePreview.initProfilePictureBackground(); 0072 PartialFormsAjaxMemberBg.setup(); 0073 0074 //init delete bg pic 0075 $('body').on('click', '.delete_bg_img', function (event) { 0076 event.stopPropagation(); 0077 jQuery.ajax({ 0078 data: '', 0079 url: '/settings/deletepicturebackground', 0080 type: 'GET', 0081 error: function () { 0082 return false; 0083 }, 0084 success: function (results) { 0085 $('#profile-picture-background-preview').attr('src', '/img/default.png'); 0086 return false; 0087 } 0088 }); 0089 }); 0090 }); 0091 </script>