[% IF subscriber.provisioning_voip_subscriber.is_pbx_group; site_config.title = c.loc('PBX Group Preferences for [_1]@[_2]', subscriber.username, subscriber.domain.domain); ELSE; site_config.title = c.loc('Subscriber Preferences for [_1]@[_2]', subscriber.username, subscriber.domain.domain); END; -%] [% helper.name = c.loc('Subscriber'); helper.messages = messages; helper.edit_preference = edit_preference; helper.preference = preference; helper.preference_meta = preference_meta; helper.preference_values = preference_values; helper.pref_groups = pref_groups; helper.form = form; helper.base_uri = c.uri_for(subscriber.id,'preferences'); helper.rewrite_rule_sets = rwr_sets; helper.ncos_levels = ncos_levels; helper.sound_sets = sound_sets; helper.contract_sound_sets = contract_sound_sets; helper.aip_grp_rs = aip_grp_rs; helper.man_aip_grp_rs = man_aip_grp_rs; helper.skip_head = 1; PROCESS "helpers/modal.tt"; %]
[% c.loc('Back') %]
[% back_created = 1 %] [% IF helper.messages -%]
[% FOREACH m IN helper.messages -%]
[% m.text %]
[% END -%]
[% END -%]
[% IF ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && special_prefs.check && special_prefs.callforward.active) || ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && !special_prefs.check) || c.user.roles == "admin" || c.user.roles == "reseller" -%]
[% # one for actions -%] [% FOR cf IN [ { type = "cfu", desc = c.loc("Call Forward Unconditional") }, { type = "cfb", desc = c.loc("Call Forward Busy") }, { type = "cft", desc = c.loc("Call Forward Timeout") }, { type = "cfna", desc = c.loc("Call Forward Unavailable") } ] -%] [% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" -%] [% NEXT IF special_prefs.check && !special_prefs.callforward.${cf.type} -%] [% END -%] [% END -%]
[% c.loc('Type') %] [% c.loc('Answer Timeout') %] [% c.loc('Destinations') %] [% c.loc('Timeset') %]
[% cf.desc %] [% cf_ringtimeout _ 's' IF cf.type == "cft" && cf_destinations.${cf.type}.size %] [% idx = 0 -%] [% FOR maps IN cf_destinations.${cf.type} -%] [% IF maps.dset_name.search('^quickset_') && maps.destinations.size == 1 %] [% maps.destinations.0.as_string %] for [% maps.destinations.0.timeout %]s [% ELSE %] [% jdx = 0 -%] [% maps.dset_name -%] [% dset_unique_id = cf.type _ "dset" _ idx _ jdx _ maps.id -%] [% modal_header_dynamic(m.header = c.loc('Destination Set "[_1]" Details', maps.dset_name), m.id=dset_unique_id) %] [% modal_footer() %] [% idx = idx + 1 -%] [% END %]
[% END -%]
[% idx = 0 -%] [% FOR maps IN cf_destinations.${cf.type} -%] [% jdx = 0 -%] [% UNLESS maps.tset_name.defined -%] always [% jdx = jdx + 1 %] [% END -%] [% maps.tset_name -%] [% IF maps.tset_name.defined -%] [% tset_unique_id = cf.type _ idx _ jdx _ maps.id -%] [% modal_header_dynamic(m.header = c.loc('Timeset "[_1]" Details', maps.tset_name), m.id=tset_unique_id) %] [% modal_footer() %] [% END %] [% idx = idx + 1 -%]
[% END -%]
[% UNLESS (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only -%] [% c.loc('Edit') %] [% IF cf_destinations.${cf.type}.size -%] [% c.loc('Delete') %] [% END -%] [% END -%]
[% END -%] [% IF ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && special_prefs.check && special_prefs.voice_mail.active) || ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && !special_prefs.check) || c.user.roles == "admin" || c.user.roles == "reseller" -%]
[% # one for actions -%]
[% c.loc('Name') %] [% c.loc('Value') %]
[% c.loc('PIN') %] [% subscriber.provisioning_voip_subscriber.voicemail_user.password %]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit') %] [% END -%]
[% c.loc('Email') %] [% subscriber.provisioning_voip_subscriber.voicemail_user.email %]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit') %] [% END -%]
[% c.loc('Delete after sending Email') %] [% subscriber.provisioning_voip_subscriber.voicemail_user.get_column('delete') %]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit') %] [% END -%]
[% c.loc('Attach WAV in Email') %] [% subscriber.provisioning_voip_subscriber.voicemail_user.attach %]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit') %] [% END -%]
[% END -%] [% IF c.config.features.faxserver && ( ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && special_prefs.check && special_prefs.fax_server.active) || ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && !special_prefs.check) || c.user.roles == "admin" || c.user.roles == "reseller" ) -%]
[% # one for actions -%] [% faxpref = subscriber.provisioning_voip_subscriber.voip_fax_preference; faxdests = subscriber.provisioning_voip_subscriber.voip_fax_destinations.all; -%]
[% c.loc('Name') %] [% c.loc('Value') %]
[% c.loc('Name in Fax Header for Sendfax') %] [% faxpref.name %]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit') %] [% END -%]
[% c.loc('Password for Sendfax') %] [% faxpref.password %]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit') %] [% END -%]
[% c.loc('Active') %] [% faxpref.active ? c.loc('yes') : c.loc('no') %]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit') %] [% END -%]
[% c.loc('Send Reports') %] [% faxpref.send_status ? c.loc('yes') : ('no') %]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit') %] [% END -%]
[% c.loc('Send Copies') %] [% faxpref.send_copy ? c.loc('yes') : c.loc('no') %]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit') %] [% END -%]
[% c.loc('Destinations') %] [% FOR faxdest IN faxdests -%] [% c.loc('[_1] as [_2]', faxdest.destination, faxdest.filetype) %]
[% END -%]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit') %] [% END -%]
[% END -%] [% IF c.config.features.cloudpbx && billing_mapping.product.class == 'pbxaccount' && ( ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && special_prefs.check && special_prefs.auto_attendant.active) || ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && !special_prefs.check) || c.user.roles == "admin" || c.user.roles == "reseller" ) -%]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit Slots') %] [% END -%] [% helper.messages = ''; helper.name = c.loc('Autoattendant'); helper.identifier = 'autoattendant'; helper.column_sort = 'choice'; helper.dt_columns = aa_dt_columns; helper.length_change = 1; helper.ajax_uri = c.uri_for_action('/subscriber/ajax_autoattendant', [c.req.captures.0]); helper.dt_buttons = [ { name = c.loc('Delete'), uri = "preferences/autoattendant/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; PROCESS 'helpers/datatables.tt'; %]
[% END -%] [% IF ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && special_prefs.check && special_prefs.speed_dial.active) || ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && !special_prefs.check) || c.user.roles == "admin" || c.user.roles == "reseller" -%]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Create Slot') %] [% END -%] [% helper.messages = ''; helper.name = c.loc('Speeddial'); helper.identifier = 'subs_speeddial'; helper.column_sort = 'slot'; helper.dt_columns = sd_dt_columns; helper.ajax_uri = c.uri_for_action('/subscriber/ajax_speeddial', [c.req.captures.0]); helper.dt_buttons = [ { name = c.loc('Edit'), uri = "preferences/speeddial/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, { name = c.loc('Delete'), uri = "preferences/speeddial/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; PROCESS 'helpers/datatables.tt'; %]
[% END -%] [% IF ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && special_prefs.check && special_prefs.reminder.active) || ((c.user.roles == "subscriber" || c.user.roles == "subscriberadmin") && !special_prefs.check) || c.user.roles == "admin" || c.user.roles == "reseller" -%]
[% # one for actions -%]
[% c.loc('Time') %] [% c.loc('Recurrence') %]
[% subscriber.provisioning_voip_subscriber.voip_reminder.get_column('time') %] [% subscriber.provisioning_voip_subscriber.voip_reminder.recur %]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit') %] [% END -%]
[% END -%] [% IF c.config.features.callingcard && ( c.user.roles == "admin" || c.user.roles == "reseller" ) -%]
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1) -%] [% c.loc('Edit Callthrough CLIs') %] [% END -%] [% helper.messages = ''; helper.name = c.loc('foobar'); helper.identifier = 'ccmapentries'; helper.column_sort = undef; helper.dt_columns = ccmap_dt_columns; helper.length_change = 1; helper.ajax_uri = c.uri_for_action('/subscriber/ajax_ccmappings', [c.req.captures.0]); helper.dt_buttons = [ { name = c.loc('Delete'), uri = "/subscriber/"_ c.req.captures.0 _"/preferences/ccmappings/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; PROCESS 'helpers/datatables.tt'; %]
[% END -%] [% UNLESS c.user.roles == 'subscriber' || c.user.roles == 'subscriberadmin' -%]
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%] [% c.loc('Create') %] [% END -%]
[% # one for actions -%] [% FOR trusted IN subscriber.provisioning_voip_subscriber.voip_trusted_sources.all -%] [% END %]
[% c.loc('Source IP') %] [% c.loc('Protocol') %] [% c.loc('From-Pattern') %]
[% trusted.src_ip %] [% trusted.protocol %] [% trusted.from_pattern %]
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%] [% c.loc('Edit') %] [% c.loc('Delete') %] [% END -%]
[% END -%] [% PROCESS 'helpers/pref_table.tt'; %] [% IF edit_cf_flag -%] [% PROCESS "helpers/modal.tt"; modal_header(m.name = cf_description); -%] [% IF cf_form.has_for_js -%] [% cf_form.render_repeatable_js %] [% END -%] [% translate_form(cf_form).render %] [% modal_footer(); modal_script(m.close_target = close_target ? close_target : c.uri_for_action('/subscriber/preferences', [c.req.captures.0])); -%] [% ELSIF edit_cfset_flag -%] [% PROCESS "helpers/modal.tt"; modal_header(m.name = cf_description); -%] [% modal_footer(); modal_script(m.close_target = close_target ? close_target : c.uri_for_action('/subscriber/preferences', [c.req.captures.0])); -%] [% ELSIF edit_timeset_flag -%] [% PROCESS "helpers/modal.tt"; modal_header(m.name = cf_description); -%] [% modal_footer(); modal_script(m.close_target = close_target ? close_target : c.uri_for_action('/subscriber/preferences', [c.req.captures.0])); -%] [% ELSIF edit_ccmap_flag -%] [% PROCESS "helpers/modal.tt"; modal_header(m.name = 'Callthrough CLIs'); -%] [% IF ccmap_form.has_for_js -%] [% ccmap_form.render_repeatable_js %] [% END -%] [% translate_form(ccmap_form).render %] [% modal_footer(); modal_script(m.close_target = close_target ? close_target : c.uri_for_action('/subscriber/preferences', [c.req.captures.0])); -%] [% END -%] [% # vim: set tabstop=4 syntax=html expandtab: -%]