Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
4c87b1db
Commit
4c87b1db
authored
Mar 05, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
work in progress proxy feature
parent
230575ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
51 deletions
+56
-51
index.volt
src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt
+56
-51
No files found.
src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt
View file @
4c87b1db
<div>
<ul class="nav nav-tabs" id="myTab">
<li><a data-toggle="tab" href="#sectionA">Section A</a></li>
<li><a data-toggle="tab" href="#sectionB">Section B</a></li>
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a data-toggle="tab" href="#dropdown1">Dropdown1</a></li>
<li><a data-toggle="tab" href="#dropdown2">Dropdown2</a></li>
</ul>
</li>
</ul>
<div class="tab-content">
<div id="sectionA" class="tab-pane fade in active">
<form id="frm_general">
{{ partial("layout_partials/form_input", ['id': 'general.port','label':'test']) }}
<div class="checkbox">
<label>
<input type="checkbox" id="general.enabled"> check
</label>
</div>
</form>
</div>
<div id="sectionB" class="tab-pane fade">
</div>
<div id="dropdown1" class="tab-pane fade">
</div>
<div id="dropdown2" class="tab-pane fade">
</div>
</div>
</div>
<br/>
<button class="btn btn-default" id="save" type="button">save</button>
<script type="text/javascript">
<script type="text/javascript">
$( document ).ready(function() {
$( document ).ready(function() {
// load initial data
ajaxGet(url="/api/proxy/settings/get",sendData={},callback=function(data,status) {
ajaxGet(url="/api/proxy/settings/get",sendData={},callback=function(data,status) {
if (status == "success") {
if (status == "success") {
setFormData('frm_general',data);
setFormData('frm_general',data);
}
}
});
});
});
// form event handlers
$("#save").click(function(){
$("#save").click(function(){
data = getFormData("frm_general");
data = getFormData("frm_general");
ajaxCall(url="/api/proxy/settings/set",sendData=data,callback=function(data,status){
ajaxCall(url="/api/proxy/settings/set",sendData=data,callback=function(data,status){
if ( status == "success") {
if ( status == "success") {
handleFormValidation("frm_general",data['validations']);
handleFormValidation("frm_general",data['validations']);
if (data['validations'] != undefined) {
BootstrapDialog.show({
type:BootstrapDialog.TYPE_WARNING,
title: 'Input validation',
message: 'Please correct validation errors in form'
});
}
}
}
// TODO: implement error handling
// TODO: implement error handling
//alert(status);
//alert(status);
...
@@ -63,5 +30,43 @@
...
@@ -63,5 +30,43 @@
});
});
});
</script>
</script>
<ul class="nav nav-tabs nav-justified" role="tablist" id="maintabs">
<li class="active"><a data-toggle="tab" href="#tabGeneral">General</a></li>
<li><a data-toggle="tab" href="#sectionB">Section B</a></li>
</ul>
<div class="content-box tab-content">
<div id="tabGeneral" class="tab-pane fade in active">
<form id="frm_general" class="form-inline">
<table class="table table-striped">
<colgroup>
<col class="col-md-3">
<col class="col-md-4">
<col class="col-md-5">
</colgroup>
<tbody>
{{ partial("layout_partials/form_input_tr",
['id': 'general.enabled',
'label':'enabled',
'type':'checkbox',
'help':'gfvjhgghfh'
])
}}
{{ partial("layout_partials/form_input_tr", ['id': 'general.port','label':'test','type':'text']) }}
<tr>
<td colspan="3"><button class="btn btn-primary" id="save" type="button">Save</button></td>
</tr>
</tbody>
</table>
</form>
</div>
<div id="sectionB" class="tab-pane fade">
</div>
</div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment