From ecb8fc2c5b3c1b42e15e3e44d287a650ef3b6aa6 Mon Sep 17 00:00:00 2001
From: A. Täffner <darkalex@firesplash.de>
Date: Wed, 27 Jan 2016 05:18:26 -0500
Subject: [PATCH] removed orphaned SPF type from one last file Added sone lines to rmeoting api description file for dns (I hope thats correct...)
---
interface/web/admin/templates/system_config_misc_edit.htm | 97 ++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 93 insertions(+), 4 deletions(-)
diff --git a/interface/web/admin/templates/system_config_misc_edit.htm b/interface/web/admin/templates/system_config_misc_edit.htm
index f36962f..5e2f191 100644
--- a/interface/web/admin/templates/system_config_misc_edit.htm
+++ b/interface/web/admin/templates/system_config_misc_edit.htm
@@ -3,8 +3,23 @@
</div>
<p><tmpl_var name="list_desc_txt"></p>
-
- <legend>Misc</legend>
+ <div class="form-group">
+ <label for="file" class="col-sm-3 control-label">{tmpl_var name='logo_txt'}</label>
+ <div class="col-sm-3 col-text"><input name="file" id="file" size="30" type="file" class="fileUpload" /></div><div class="col-sm-6"><button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" id="start_upload">{tmpl_var name='upload_txt'}</button></div>
+ </div>
+ <div class="form-group">
+ <label for="dashboard_atom_url_admin" class="col-sm-3 control-label">{tmpl_var name='used_logo_txt'}</label>
+ <div class="col-sm-9" id="used_logo">{tmpl_var name='used_logo'}</div>
+ </div>
+ <div class="form-group">
+ <label for="page_title" class="col-sm-3 control-label">{tmpl_var name='company_name_txt'}</label>
+ <div class="col-sm-9"><input type="text" name="company_name" id="company_name" value="{tmpl_var name='company_name'}" size="" maxlength="" class="form-control" /></div></div>
+ <div class="form-group">
+ <label for="page_title" class="col-sm-3 control-label">{tmpl_var name='custom_login_text_txt'}</label>
+ <div class="col-sm-9"><input type="text" name="custom_login_text" id="custom_login_text" value="{tmpl_var name='custom_login_text'}" size="" maxlength="" class="form-control" /></div></div>
+ <div class="form-group">
+ <label for="page_title" class="col-sm-3 control-label">{tmpl_var name='custom_login_link_txt'}</label>
+ <div class="col-sm-9"><input type="text" name="custom_login_link" id="custom_login_link" value="{tmpl_var name='custom_login_link'}" size="" maxlength="" class="form-control" /></div></div>
<div class="form-group">
<label for="dashboard_atom_url_admin" class="col-sm-3 control-label">{tmpl_var name='dashboard_atom_url_admin_txt'}</label>
<div class="col-sm-9"><input type="text" name="dashboard_atom_url_admin" id="dashboard_atom_url_admin" value="{tmpl_var name='dashboard_atom_url_admin'}" size="" maxlength="" class="form-control" /></div></div>
@@ -98,9 +113,83 @@
{tmpl_var name='maintenance_mode'}
</div>
</div>
+
+ <tmpl_if name="msg">
+ <div id="OKMsg"><p><tmpl_var name="msg"></p></div>
+ </tmpl_if>
+ <tmpl_if name="error">
+ <div id="errorMsg"><h3><tmpl_var name="error_txt"></h3><ol><tmpl_var name="error"></ol></div>
+ </tmpl_if>
- <input type="hidden" name="id" value="{tmpl_var name='id'}">
+ <input type="hidden" name="id" id="id" value="{tmpl_var name='id'}">
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/system_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_list.php">{tmpl_var name='btn_cancel_txt'}</button>
- </div></div>
\ No newline at end of file
+ </div></div>
+<script language="JavaScript" type="text/javascript">
+ var defaultLogo = '{tmpl_var name='default_logo'}';
+ $(document).on('click', '#del_custom_logo', function(){
+ delCustomLogo();
+ });
+
+ function delCustomLogo() {
+ var id = jQuery('input[name="id"]').val();
+
+ jQuery.getJSON('admin/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {'id': id, 'type': "delcustomlogo"}, function(data) {
+ //console.log(data);
+ $('#used_logo').html(defaultLogo);
+ $('#logo').css({ "background": "url("+data.data+") no-repeat", "width": data.width, "height": data.height });
+ });
+ }
+
+ // Variable to store your files
+ var files;
+ // Add events
+ $('input[type="file"]').on('change', prepareUpload);
+ $('#start_upload').on('click', uploadFiles);
+
+ // Grab the files and set them to our variable
+ function prepareUpload(event){
+ files = event.target.files;
+ }
+
+ // Catch the form submit and upload the files
+ function uploadFiles(event){
+ event.stopPropagation(); // Stop stuff happening
+ event.preventDefault(); // Totally stop stuff happening
+
+ var id = jQuery('input[name="id"]').val();
+
+ // Create a formdata object and add the files
+ var data = new FormData();
+ $.each(files, function(key, value){
+ data.append(key, value);
+ });
+
+ $.ajax({
+ url: 'admin/ajax_get_json.php?id='+id+'&type=uploadfile',
+ type: 'POST',
+ data: data,
+ cache: false,
+ dataType: 'json',
+ processData: false, // Don't process the files
+ contentType: false, // Set content type to false as jQuery will tell the server its a query string request
+ success: function(data, textStatus, jqXHR){
+ if(typeof data.error === 'undefined'){
+ // Success so call function to process the form
+ //console.log(data);
+ $('#used_logo').html('<img src="'+data.data+'" /> <a href="#" class="btn btn-default formbutton-danger formbutton-narrow" style="margin:5px" id="del_custom_logo"><span class="icon icon-delete"></span></a>');
+ $('#logo').css({ "background": "url("+data.data+") no-repeat", "width": data.width, "height": data.height });
+ } else {
+ // Handle errors here
+ //console.log(data);
+ }
+ },
+ error: function(jqXHR, textStatus, errorThrown){
+ // Handle errors here
+ //console.log(data);
+ }
+ });
+ }
+
+</script>
--
Gitblit v1.9.1