Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean default settings modal and theme #193

Merged
merged 6 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions wizard/app/scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,11 @@ var appConfig = {
next: 'routes/outbound'
},
outbound: {
prev: 'routes/inbound',
next: 'devices'
},
devices: {
prev: 'routes/inbound',
next: 'devices/inventory'
},
inventory: {
prev: 'devices',
prev: 'routes/outbound',
next: 'devices/models'
},
models: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ angular.module('nethvoiceWizardUiApp')
"type": "list",
"options": GenericPhoneUtilsService.getToneZones()
},
{
"variable": "timezone",
"description": "Time zone",
"type": "list",
"options": GenericPhoneUtilsService.getTimeZones()
}
]
}
}
Expand Down
69 changes: 20 additions & 49 deletions wizard/app/views/templates/defaults-modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,59 +47,30 @@ <h4 class="modal-title" id="dfSettingsMLabel">{{'Default settings' | translate}}
<!-- if is pinned section -->
<div ng-if="sectionKey == 'pinned'" style="display: flow-root !important;">
<div ng-repeat="item in section.data track by $index" class="col-lg-6 mb-15">
<label class="control-label">{{::item.description | translate}}</label>
<div class="{{item.type != 'password' ? 'col-lg-12' : ''}}">
<!-- list -->
<div ng-if="item.type == 'list'" class="form-group">
<select
id="default-select-{{$index}}"
class="{{item.options.length > 10 ? 'combobox' : 'selectpicker'}} form-control"
ng-change="pinnedChange(item.variable)"
ng-model="defaultSettings[item.variable]"
autocomplete="off">
<option value="" ng-disabled="true" ng-hide="true">-</option>
<!-- selectpicker -->
<option ng-repeat="option in item.options"
value="{{option.value}}" on-finish-render="selectpickerRepeatEnd">{{::option.text | translate}}
</option>
</select>
</div>
<!-- input -->
<div ng-if="item.type == 'input'" class="form-group {{(connectivityCheckRes.is_reachable === false) && (item.variable == 'hostname') ? 'has-error' : ''}}">
<input
type="text"
id="default-select-{{$index}}"
placeholder="-"
ng-change="pinnedChange(item.variable)"
ng-model="defaultSettings[item.variable]"
autocomplete="off"
class="form-control">
</input>
</div>
<!-- password -->
<div ng-if="item.type == 'password'" class="input-group display-flex">
<input
id="{{sectionKey}}-input-{{$index}}"
ng-model="defaultSettings[item.variable]"
ng-change="pinnedChange(item.variable)"
type="password"
autocomplete="off"
show-password="shownPasswords[item.variable]"
class="form-control">
</input>
<button
tabindex="-1"
type="button"
class="btn btn-default mln-1 zindex-2"
ng-click="toggleShowPassword(item.variable)">
<span ng-class="shownPasswords[item.variable] ? 'fa fa-eye-slash' : 'fa fa-eye'"></span>
</button>
</div>
<label class="control-label" ng-if="item.description === 'Admin password' || item.description === 'User password'">{{::item.description | translate}}</label>
<!-- password -->
<div ng-if="item.type == 'password'" class="input-group display-flex">
<input
id="{{sectionKey}}-input-{{$index}}"
ng-model="defaultSettings[item.variable]"
ng-change="pinnedChange(item.variable)"
type="password"
autocomplete="off"
show-password="shownPasswords[item.variable]"
class="form-control">
</input>
<button
tabindex="-1"
type="button"
class="btn btn-default mln-1 zindex-2"
ng-click="toggleShowPassword(item.variable)">
<span ng-class="shownPasswords[item.variable] ? 'fa fa-eye-slash' : 'fa fa-eye'"></span>
</button>
</div>
</div>
</div>
<!-- if is section -->
<div class="mt-20 globalsSectionContainer col-lg-12" ng-if="sectionKey != 'pinned'">
<div class="mt-20 globalsSectionContainer col-lg-12" ng-if="sectionKey != 'pinned' && sectionKey != 'phonebook'">
<h2 ng-click="openSection(sectionKey)"
class="adjust-header adjust-profile-header pl-20 ng-binding pointer">
{{::section.name | translate}}
Expand Down
Loading