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
4760cfda
Commit
4760cfda
authored
Nov 23, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interfaces: repair ppp mobile selection in main edit
parent
e0c24b5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
30 deletions
+29
-30
interfaces.php
src/www/interfaces.php
+23
-28
ppps_edit.js
src/www/javascript/interfaces_ppps_edit/ppps_edit.js
+6
-2
No files found.
src/www/interfaces.php
View file @
4760cfda
...
...
@@ -1743,12 +1743,9 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
success
:
function
(
response
)
{
var
responseTextArr
=
response
.
split
(
"
\n
"
);
responseTextArr
.
sort
();
responseTextArr
.
each
(
function
(
value
)
{
var
option
=
new
Element
(
'
option
'
);
country
=
value
.
split
(
"
:
"
);
option
.
text
=
country
[
0
];
option
.
value
=
country
[
1
];
jQuery
(
'
#country
'
).
append
(
option
);
jQuery
.
each
(
responseTextArr
,
function
(
index
,
value
)
{
country
=
value
.
split
(
'
:
'
);
jQuery
(
'
#country
'
).
append
(
new
Option
(
country
[
0
],
country
[
1
]));
});
}
});
...
...
@@ -1764,11 +1761,8 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
success
:
function
(
response
)
{
var
responseTextArr
=
response
.
split
(
"
\n
"
);
responseTextArr
.
sort
();
responseTextArr
.
each
(
function
(
value
)
{
var
option
=
new
Element
(
'
option
'
);
option
.
text
=
value
;
option
.
value
=
value
;
jQuery
(
'
#provider_list
'
).
append
(
option
);
jQuery
.
each
(
responseTextArr
,
function
(
index
,
value
)
{
jQuery
(
'
#provider_list
'
).
append
(
new
Option
(
value
,
value
));
});
}
});
...
...
@@ -1778,21 +1772,20 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
function
providerplan_list
()
{
jQuery
(
'
#providerplan
'
).
children
().
remove
();
jQuery
(
'
#providerplan
'
).
append
(
new
Element
(
'
option
'
)
);
jQuery
.
ajax
(
"
getserviceproviders.php
"
,
{
jQuery
(
'
#providerplan
'
).
append
(
new
Option
(
''
,
''
)
);
jQuery
.
ajax
(
'
getserviceproviders.php
'
,
{
type
:
'
post
'
,
data
:
{
country
:
jQuery
(
'
#country
'
).
val
(),
provider
:
jQuery
(
'
#provider_list
'
).
val
()},
success
:
function
(
response
)
{
var
responseTextArr
=
response
.
split
(
"
\n
"
);
responseTextArr
.
sort
();
responseTextArr
.
each
(
function
(
value
)
{
if
(
value
!=
""
)
{
providerplan
=
value
.
split
(
"
:
"
);
var
option
=
new
Element
(
'
option
'
);
option
.
text
=
providerplan
[
0
]
+
"
-
"
+
providerplan
[
1
];
option
.
value
=
providerplan
[
1
];
jQuery
(
'
#providerplan
'
).
append
(
option
);
jQuery
.
each
(
responseTextArr
,
function
(
index
,
value
)
{
if
(
value
!=
''
)
{
providerplan
=
value
.
split
(
'
:
'
);
jQuery
(
'
#providerplan
'
).
append
(
new
Option
(
providerplan
[
0
]
+
'
-
'
+
providerplan
[
1
],
providerplan
[
1
]
));
}
});
}
...
...
@@ -1816,10 +1809,12 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
jQuery
(
'
#phone
'
).
val
(
'
*99#
'
);
jQuery
(
'
#apn
'
).
val
(
provider
.
getElementsByTagName
(
'
apn
'
)[
0
].
firstChild
.
data
);
}
username
=
provider
.
getElementsByTagName
(
'
username
'
)[
0
].
firstChild
.
data
;
password
=
provider
.
getElementsByTagName
(
'
password
'
)[
0
].
firstChild
.
data
;
jQuery
(
'
#username
'
).
val
(
username
);
jQuery
(
'
#password
'
).
val
(
password
);
if
(
provider
.
getElementsByTagName
(
'
username
'
)[
0
].
firstChild
!=
null
)
{
jQuery
(
'
#username
'
).
val
(
provider
.
getElementsByTagName
(
'
username
'
)[
0
].
firstChild
.
data
);
}
if
(
provider
.
getElementsByTagName
(
'
password
'
)[
0
].
firstChild
!=
null
)
{
jQuery
(
'
#password
'
).
val
(
provider
.
getElementsByTagName
(
'
password
'
)[
0
].
firstChild
.
data
);
}
}
});
}
...
...
@@ -2816,7 +2811,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
<tr
id=
"trcountry"
>
<td>
<?=
gettext
(
"Country:"
);
?>
</td>
<td>
<select
class=
"
selectpicker"
data-style=
"btn-default
"
name=
"country"
id=
"country"
onchange=
"providers_list()"
>
<select
class=
"
form-control
"
name=
"country"
id=
"country"
onchange=
"providers_list()"
>
<option></option>
</select>
</td>
...
...
@@ -2824,7 +2819,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
<tr
id=
"trprovider"
style=
"display:none"
>
<td>
<?=
gettext
(
"Provider:"
);
?>
</td>
<td>
<select
class=
"
selectpicker"
data-style=
"btn-default
"
name=
"provider_list"
id=
"provider_list"
onchange=
"providerplan_list()"
>
<select
class=
"
form-control
"
name=
"provider_list"
id=
"provider_list"
onchange=
"providerplan_list()"
>
<option></option>
</select>
</td>
...
...
@@ -2832,7 +2827,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
<tr
id=
"trproviderplan"
style=
"display:none"
>
<td>
<?=
gettext
(
"Plan:"
);
?>
</td>
<td>
<select
class=
"
selectpicker"
data-style=
"btn-default
"
name=
"providerplan"
id=
"providerplan"
onchange=
"prefill_provider()"
>
<select
class=
"
form-control
"
name=
"providerplan"
id=
"providerplan"
onchange=
"prefill_provider()"
>
<option></option>
</select>
</td>
...
...
src/www/javascript/interfaces_ppps_edit/ppps_edit.js
View file @
4760cfda
...
...
@@ -251,8 +251,12 @@ function prefill_provider() {
jQuery
(
'
#phone
'
).
val
(
'
*99#
'
);
jQuery
(
'
#apn
'
).
val
(
provider
.
getElementsByTagName
(
'
apn
'
)[
0
].
firstChild
.
data
);
}
jQuery
(
'
#username
'
).
val
(
provider
.
getElementsByTagName
(
'
username
'
)[
0
].
firstChild
.
data
);
jQuery
(
'
#password
'
).
val
(
provider
.
getElementsByTagName
(
'
password
'
)[
0
].
firstChild
.
data
);
if
(
provider
.
getElementsByTagName
(
'
username
'
)[
0
].
firstChild
!=
null
)
{
jQuery
(
'
#username
'
).
val
(
provider
.
getElementsByTagName
(
'
username
'
)[
0
].
firstChild
.
data
);
}
if
(
provider
.
getElementsByTagName
(
'
password
'
)[
0
].
firstChild
!=
null
)
{
jQuery
(
'
#password
'
).
val
(
provider
.
getElementsByTagName
(
'
password
'
)[
0
].
firstChild
.
data
);
}
}
});
}
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