Commit 930752c8 authored by Felipe Fonseca's avatar Felipe Fonseca
Browse files

Merge branch 'release/1.3.7'

parents 79bb93f1 9061050a
......@@ -355,6 +355,7 @@ function update_schedules() {
} else {
$(':button[type="submit"]').prop('disabled', true);
}
autoSelectVlans(schedules);
}
}
......@@ -366,14 +367,17 @@ function updateNetworkTab(schedules) {
html = ''
$.each(schedules, function(index, schedule) {
availableVlans = ''
$.each(schedule["availableVlans"], function(index, vlan) {
availableVlans += `<option value="${vlan}">${vlan}</option>`
$.each(schedule["availableVlans"], function(indexVlan, vlan) {
if (indexVlan == 0) {
availableVlans += `<option value="${vlan}" selected>${vlan}</option>`;
} else {
availableVlans += `<option value="${vlan}">${vlan}</option>`;
}
});
html += `<div class="row">
<div class="col-sm-12 vlan-container">
<label for="vlans">"Schedule ${index + 1}: VLAN ID"</label>
<select class="form-control" name="vlans" onchange="updateScheduleVlan(${index}, this.value)">
<option value="-1" disabled selected>"Select a vlan"</option>
${availableVlans}
</select>
</div>
......@@ -385,4 +389,10 @@ function updateNetworkTab(schedules) {
function updateScheduleVlan(index, value) {
window.selected_schedules[index]["vlan"] = value
$("input[name=schedules]").val(JSON.stringify(window.selected_schedules));
}
function autoSelectVlans(schedules) {
$.each(schedules, function(index, schedule) {
updateScheduleVlan(index, schedule["availableVlans"][0]);
});
}
\ No newline at end of file
......@@ -52,7 +52,8 @@
{% if not request.session.member_urn %}
<div style="border: 1px solid; border-color: #ddd; width:480px;" class="center-block">
<div style="display: flex;">
<div style="border: 1px solid; border-color: #eee; width:480; border-radius: 5px;" class="center-block">
<!--
<div style="height:60px; background-color:#f3f3f3">
......@@ -61,19 +62,46 @@
</div>
</div> -->
<img src="{% static "images/fibre_brand.png" %}" class="img-responsive center-block">
<div style="display: flex;" class="center-block">
<div style="width: 50%; margin: 15px;" class="center-block">
<a href="https://portal.fibre.org.br/Login" role="button" class="btn btn-primary btn-lg btn-block">Sign in</a>
<a style="margin-top: 10px; display: inline-block;" href="{% url 'portal:password_reset_form' %}" >Forgot your password?</a>
</div>
<div style="width: 50%; margin: 15px;" class="center-block">
<a href="{% url 'portal:account_request_form' %}" role="button" class="btn btn-primary btn-lg btn-block">Sign up</a>
<div style="display: flex; flex-direction: column; width: 100%;">
<img src="{% static "images/fibre_brand.png" %}" class="img-responsive ">
<div style="display: flex;">
<div style="width: 50%; margin: 15px;" class="center-block">
<a href="https://portal.fibre.org.br/Login" role="button" class="btn btn-primary btn-lg btn-block">Sign in</a>
<a style="margin-top: 10px; display: inline-block;" href="{% url 'portal:password_reset_form' %}" >Forgot your password?</a>
</div>
<div style="width: 50%; margin: 15px;" class="center-block">
<a href="{% url 'portal:account_request_form' %}" role="button" class="btn btn-primary btn-lg btn-block">Sign up</a>
</div>
</div>
</div>
</div>
</div>
<div style="border: 1px solid; border-color: #eee; width:480; border-radius: 5px; align-self: center;" class="center-block">
<!--
<div style="height:60px; background-color:#f3f3f3">
<div class="col-xs-12" style="height:100%; margin:10px">
<h4 style="text-align:center">I have an account</h4>
</div>
</div> -->
<div style="display: flex;" class="center-block">
<div style="width: 50%; padding: 15px; display: flex; flex-direction: column; align-self: flex-end;" class="center-block">
<img src="{% static "images/cafe_logo.png" %}" alt="">
<a href="https://portal.fibre.org.br/Cafe" role="button" class="btn btn-primary btn-lg btn-block">Login with CAFe</a>
</div>
<div style="width: 50%; padding: 15px; display: flex; flex-direction: column; align-self: flex-end;" class="center-block">
<img src="{% static "images/cafex_logo.png" %}" alt="">
<a href="https://portal.fibre.org.br/DS" role="button" class="btn btn-primary btn-lg btn-block">Login with<br>CAFe Expresso</a>
</div>
</div>
</div></div>
<!-- <div style="border: 1px solid; border-color: #ddd; width:480px; display: table; margin: 0 auto; display: none;" id="local-sign-in"> -->
<!--
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment