You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

393 lines
17 KiB

<div class="edit-device" data-id="{{id}}">
<div class="title-bar clearfix">
<div class="device-title pull-left">
{{#if provision.endpoint_brand}}
<div class="device-image model-image" style="background-image: url('css/assets/models/{{toLowerCase provision.endpoint_brand}}_{{toLowerCase provision.endpoint_family}}_{{toLowerCase provision.endpoint_model}}.jpg');"></div>
<div class="device-model">{{provision.endpoint_brand}} - {{provision.endpoint_model}}</div>
{{else}}
<div class="device-icon">
<i class="icon-telicon-voip-phone"></i>
</div>
{{#if id}}
<div class="device-model">{{name}}</div>
{{else}}
<div class="device-model">{{i18n.devices.sip_device.new}}</div>
{{/if}}
{{/if}}
</div>
<ul class="nav nav-pills pull-right">
<li class="tabs-main-selector main-section active">
<a class="tabs-selector change-section" data-section="basic" href="javascript:void(0)">{{ i18n.devices.popupSettings.basicTitle }}</a>
</li>
<li class="tabs-main-selector main-section dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">{{ i18n.devices.popupSettings.advancedTitle }}
<b class="caret"></b>
</a>
<ul class="dropdown-menu pull-right">
{{#if provision}}
<li><a class="tabs-selector change-section" data-section="sip" href="javascript:void(0)"><i class="fa fa-user"></i>{{ i18n.devices.popupSettings.sip.menuTitle }}</a></li>
{{/if}}
<li><a class="tabs-selector change-section" data-section="audio" href="javascript:void(0)"><i class="fa fa-music"></i>{{ i18n.devices.popupSettings.audio.menuTitle }}</a></li>
<li><a class="tabs-selector change-section" data-section="video" href="javascript:void(0)"><i class="fa fa-video-camera"></i>{{ i18n.devices.popupSettings.video.menuTitle }}</a></li>
<li><a class="tabs-selector change-section" data-section="restrictions" href="javascript:void(0)"><i class="fa fa-ban"></i>{{ i18n.devices.popupSettings.restrictions.menuTitle }}</a></li>
{{#if showEmergencyCnam}}
<li><a class="tabs-selector change-section" data-section="callerId" href="javascript:void(0)"><i class="fa fa-ambulance"></i>{{ i18n.devices.popupSettings.callerId.menuTitle }}</a></li>
{{/if}}
<li><a class="tabs-selector change-section" data-section="miscellaneous" href="javascript:void(0)"><i class="fa fa-cogs"></i>{{ i18n.devices.popupSettings.miscellaneous.menuTitle }}</a></li>
{{#each extra.provision.keys}}
<li><a class="tabs-selector change-section" data-section="{{type}}" href="javascript:void(0);"><i class="fa fa-lightbulb-o"></i>{{title}}</a></li>
{{/each}}
</ul>
</li>
</ul>
</div>
<div class="content">
<form id="form_device" class="form-horizontal">
<div class="tabs-section active" data-section="basic">
<div class="control-group">
<label class="control-label" for="name">{{ i18n.devices.sip_device.deviceName }}</label>
<div class="controls">
<input type="text" id="name" name="name" value="{{name}}">
</div>
</div>
{{#if provision}}
<div class="control-group">
<label class="control-label" for="mac_address">{{ i18n.devices.sip_device.macAddress }}</label>
<div class="controls">
<input id="mac_address" type="text" name="mac_address" placeholder="{{ i18n.devices.sip_device.macAddressPlaceholder }}" value="{{mac_address}}">
</div>
</div>
{{else}}
<div class="control-group">
<label class="control-label" for="sip_username">{{ i18n.devices.sip.username }}</label>
<div class="controls">
<input type="text" id="sip_username" name="sip.username" value="{{sip.username}}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="sip_password">{{ i18n.devices.sip.password }}</label>
<div class="controls">
<input type="password" id="sip_password" name="sip.password" value="{{sip.password}}">
</div>
</div>
<div class="control-group">
<label class="control-label">{{ i18n.devices.sip.realm }}</label>
<div class="controls">
<span class="displayed-realm">{{ sip.realm }}</span>
</div>
</div>
{{/if}}
</div>
{{#if provision}}
<div class="tabs-section clearfix" data-section="sip">
<div class="title">
{{ i18n.devices.popupSettings.sip.sectionTitle }}
</div>
<div class="control-group">
<label class="control-label" for="sip_username">{{ i18n.devices.sip.username }}</label>
<div class="controls">
<input type="text" id="sip_username" name="sip.username" value="{{sip.username}}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="sip_password">{{ i18n.devices.sip.password }}</label>
<div class="controls">
<input type="password" id="sip_password" name="sip.password" value="{{sip.password}}">
</div>
</div>
<div class="control-group">
<label class="control-label">{{ i18n.devices.sip.realm }}</label>
<div class="controls">
<span class="displayed-realm">{{ sip.realm }}</span>
</div>
</div>
</div>
{{/if}}
<div class="tabs-section clearfix" data-section="audio">
<div class="title">
{{ i18n.devices.popupSettings.audio.sectionTitle }}
</div>
<div class="helper">
<i class="fa fa-info-circle"></i>
{{ i18n.devices.popupSettings.dragAndDrop }}
</div>
<div class="items-selector codec-selector clearfix" id="audio_codec_selector"></div>
</div>
<div class="tabs-section clearfix" data-section="video">
<div class="title">
{{ i18n.devices.popupSettings.video.sectionTitle }}
</div>
<div class="helper">
<i class="fa fa-info-circle"></i>
{{ i18n.devices.popupSettings.dragAndDrop }}
</div>
<div class="items-selector codec-selector" id="video_codec_selector"></div>
</div>
<div class="tabs-section clearfix" data-section="restrictions">
<div class="restrictions-container">
<div class="restriction-matcher-div">
<i class="help-popover fa fa-question-circle fa-lg" data-original-title="{{i18n.devices.popupSettings.restrictions.matcher.help}}" data-placement="top" data-toggle="tooltip"></i>
<input type="text" class="restriction-matcher-input" placeholder="{{i18n.devices.popupSettings.restrictions.matcher.placeholder}}" />
<button type="button" class="monster-button monster-button-primary restriction-matcher-button">{{i18n.devices.popupSettings.restrictions.matcher.button}}</button>
</div>
<div class="title">
{{ i18n.devices.popupSettings.restrictions.sectionTitle }}
</div>
<div class="restriction-list">
{{#each extra.restrictions}}
<div class="control-group restriction-line{{#if this.disabled}} disabled{{/if}}" data-restriction="{{@key}}">
<label class="control-label">{{this.friendly_name}}
{{#if this.help}}
<i class="help-popover fa fa-question-circle" data-original-title="{{this.help}}" data-placement="top" data-toggle="tooltip"></i>
{{/if}}
</label>
<div class="controls">
<div class="switch">
{{#monsterSwitch}}
<input class="restrictions-switch" type="checkbox" name="call_restriction.{{@key}}.action" data-on="{{@root.i18n.devices.popupSettings.restrictions.allow}}" data-off="{{@root.i18n.devices.popupSettings.restrictions.deny}}" {{#compare this.action '===' 'inherit'}}{{#unless this.disabled}} checked{{/unless}}{{/compare}}{{#if this.disabled}} disabled{{/if}}></input>
{{/monsterSwitch}}
</div>
<i class="restriction-matcher-sign fa-lg fa fa-check monster-green"></i>
</div>
</div>
{{/each}}
</div>
<div class="restriction-message help-box">
</div>
{{#if extra.hasDisabledRestrictions}}
{{#monsterText 'info' 'disabled-restrictions-info'}}
<p>{{ i18n.devices.popupSettings.restrictions.disabledRestrictionsInfo }}</p>
{{/monsterText}}
{{/if}}
</div>
</div>
{{#if showEmergencyCnam}}
<div class="tabs-section clearfix" data-section="callerId">
<div class="title">
{{ i18n.devices.popupSettings.callerId.sectionTitle }}
</div>
{{#if extra.hasE911Numbers}}
<div class="control-group">
<label class="control-label">{{ i18n.devices.popupSettings.callerId.emergency }}</label>
<div class="controls emergency-number"></div>
</div>
<div class="control-group number-address">
<label class="control-label">{{i18n.devices.popupSettings.callerId.address}}</label>
<div class="controls">
<p></p>
</div>
</div>
{{else}}
{{#monsterText 'error'}}
{{ i18n.devices.popupSettings.callerId.noE911Numbers }}
{{/monsterText}}
{{/if}}
</div>
{{/if}}
<div class="tabs-section clearfix" data-section="miscellaneous">
<div class="title">
{{ i18n.devices.popupSettings.miscellaneous.sectionTitle }}
</div>
<div class="control-group">
<label class="control-label checkbox">
{{#monsterCheckbox i18n.devices.popupSettings.miscellaneous.ignoreCompletedElsewhere.label }}
<input type="checkbox" name="ignore_completed_elsewhere" id="ignore_completed_elsewhere" {{#if ignore_completed_elsewhere }}checked{{/if}}/>
{{/monsterCheckbox}}
<i class="help-popover fa fa-question-circle fa-lg" data-original-title="{{i18n.devices.popupSettings.miscellaneous.ignoreCompletedElsewhere.help}}" data-placement="top" data-toggle="tooltip"></i>
</label>
</div>
<div class="control-group">
<label class="control-label checkbox">
{{#monsterCheckbox i18n.devices.popupSettings.miscellaneous.unregisterNotifications.label }}
<input type="checkbox" name="extra.notify_unregister" id="notify_unregister" {{#unless suppress_unregister_notifications}}checked{{/unless}} />
{{/monsterCheckbox}}
<i class="help-popover fa fa-question-circle fa-lg" data-original-title="{{i18n.devices.popupSettings.miscellaneous.unregisterNotifications.help}}" data-placement="top" data-toggle="tooltip"></i>
</label>
</div>
<div class="control-group">
<label for="outbound_privacy" class="control-label checkbox">
{{i18n.commonMisc.outboundPrivacy.label}}
<i class="fa fa-question-circle fa-lg" data-toggle="tooltip" title="{{i18n.commonMisc.outboundPrivacy.tooltip}}"></i>
</label>
<div class="controls">
<select name="caller_id_options.outbound_privacy" id="outbound_privacy" class="input-medium">
{{#select caller_id_options.outbound_privacy}}
{{#each extra.outboundPrivacy}}
<option value="{{key}}">
{{value}}
</option>
{{/each}}
{{/select}}
</select>
</div>
</div>
<div class="rtp-line clearfix">
<div class="control-group">
<label class="control-label checkbox">
{{#monsterCheckbox i18n.devices.popupSettings.miscellaneous.rtp.enable }}
<input type="checkbox" id="secure_rtp" name="media.encryption.enforce_security"{{#if media.encryption.enforce_security}} checked="checked"{{/if}}></input>
{{/monsterCheckbox}}
</label>
</div>
<div id="rtp_method">
<span>{{ i18n.devices.popupSettings.miscellaneous.rtp.type }}</span>
<select class="input-small" name="extra.rtpMethod">
<option value="srtp"{{#compare extra.rtpMethod "===" "srtp"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.rtp.srtp }}</option>
<option value="zrtp"{{#compare extra.rtpMethod "===" "zrtp"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.rtp.zrtp }}</option>
</select>
</div>
</div>
{{#if provision}}
<div class="control-group">
<label class="control-label checkbox">{{ i18n.devices.popupSettings.miscellaneous.restart.label }}</label>
<div class="controls">
<button id="restart_device" type="button" class="monster-button monster-button-primary{{#unless extra.isRegistered}} disabled{{/unless}}">{{ i18n.devices.popupSettings.miscellaneous.restart.button }}</button>
<i class="help-popover fa fa-question-circle" data-original-title="{{ i18n.devices.popupSettings.miscellaneous.restart.help }}" data-placement="top" data-toggle="tooltip"></i>
</div>
</div>
{{#if isProvisionerConfigured}}
<div class="control-group">
<label class="control-label checkbox">{{ i18n.devices.popupSettings.miscellaneous.unlock.label }}</label>
<div class="controls">
<button id="unlock_device" type="button" class="monster-button-primary">
{{ i18n.devices.popupSettings.miscellaneous.unlock.button }}
</button>
</div>
</div>
{{/if}}
{{/if}}
</div>
{{#each extra.provision.keys}}
<div class="tabs-section clearfix keys" data-section="{{type}}">
<div class="title">
{{{title}}}
</div>
<div class="type-info helper">
<a href="javascript:void(0);" data-toggle="collapse" data-target="#info_content_{{type}}">
<i class="fa fa-question-circle"></i>
<span class="text">
{{ @root.i18n.devices.popupSettings.keys.info.link.showInfo }}
</span>
</a>
<div id="info_content_{{type}}" class="collapse">
{{#each @root.extra.provision.keyActions}}
{{#if info}}
<p>
<strong>
{{text}}
</strong>
: {{info}}
</p>
{{/if}}
{{/each}}
{{#compare id '===' 'combo_keys'}}
<p>
<strong>
{{@root.i18n.devices.popupSettings.keys.types.line}}
</strong>
: {{@root.i18n.devices.popupSettings.keys.info.types.line}}
</p>
{{/compare}}
</div>
</div>
{{#each data}}
<div class="control-group{{#compare ../id '===' 'combo_keys'}}{{#compare @key '===' '0'}} error{{/compare}}{{/compare}}" data-id="{{@key}}">
{{#compare ../id '===' 'combo_keys'}}
{{#compare @key '===' '0'}}
<div class="alert alert-error">
{{@root.i18n.devices.popupSettings.keys.alertMessage}}
</div>
{{/compare}}
{{/compare}}
<label for="provision.keys.{{../id}}[{{@key}}].type" class="control-label">
<i class="fa fa-reorder monster-gray"></i>
{{ ../label }} <span class="feature-key-index">{{@key}}</span>
</label>
<div class="controls">
<select name="provision.keys.{{../id}}[{{@key}}].type" class="feature-key-type span2">
{{#select type}}
{{#each @root.extra.provision.keyActions}}
<option value="{{id}}">{{text}}</option>
{{/each}}
{{#compare ../id '===' 'combo_keys'}}
<option value="line">{{@root.i18n.devices.popupSettings.keys.types.line}}</option>
{{/compare}}
{{/select}}
</select>
<div class="feature-key-value" data-type="presence">
<label for="provision.keys.{{../id}}[{{@key}}].value">{{ @root.i18n.devices.popupSettings.keys.labels.user }}</label>
<select name="provision.keys.{{../id}}[{{@key}}].value" class="chosen-feature-key-user">
{{#each @root.extra.provision.users}}
<option value="{{id}}">{{first_name}} {{last_name}}</option>
{{/each}}
</select>
</div>
<div class="feature-key-value" data-type="parking">
<label for="provision.keys.{{../id}}[{{@key}}].value">{{ @root.i18n.devices.popupSettings.keys.labels.parkingSpot }}</label>
<select class="span1" name="provision.keys.{{../id}}[{{@key}}].value">
{{#each @root.extra.provision.parkingSpots}}
<option value="{{this}}">{{this}}</option>
{{/each}}
</select>
</div>
<div class="feature-key-value" data-type="personal_parking">
<label for="provision.keys.{{../id}}[{{@key}}].value">{{ @root.i18n.devices.popupSettings.keys.labels.user }}</label>
<select name="provision.keys.{{../id}}[{{@key}}].value" class="chosen-feature-key-user">
{{#each @root.extra.provision.users}}
<option value="{{id}}">{{first_name}} {{last_name}}</option>
{{/each}}
</select>
</div>
<div class="feature-key-value" data-type="speed_dial">
<label for="provision.keys.{{../id}}[{{@key}}].value">{{ @root.i18n.devices.popupSettings.keys.labels.value }}</label>
<input type="text" value="" name="provision.keys.{{../id}}[{{@key}}].value">
</div>
</div>
</div>
{{/each}}
</div>
{{/each}}
</form>
</div>
<div class="actions clearfix">
{{#if id}}
<a id="delete_device" class="monster-link"><i class="fa fa-trash-o monster-red"></i>{{ i18n.devices.deleteDevice }}</a>
{{/if}}
<div class="pull-right">
<a class="cancel-link monster-link blue" href="javascript:void(0);">{{ i18n.cancel }}</a>
<button type="button" class="monster-button monster-button-success save">
{{#if id}}
{{ i18n.saveChanges }}
{{else}}
{{ i18n.devices.createDevice }}
{{/if}}
</button>
</div>
</div>
</div>