mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
show deprecated warning for country states
This commit is contained in:
@@ -51,7 +51,9 @@
|
||||
var lang_qrbcalc_title = '<?= __("Compute QRB and QTF"); ?>';
|
||||
var lang_qrbcalc_errmsg = '<?= __("Error in locators. Please check."); ?>';
|
||||
var lang_general_refresh_list = '<?= __("Refresh List"); ?>';
|
||||
var lang_general_word_please_wait = "<?= __("Please Wait ..."); ?>"
|
||||
var lang_general_word_please_wait = "<?= __("Please Wait ..."); ?>";
|
||||
var lang_general_states_deprecated = "<?= _pgettext("Word for country states that are deprecated but kept for legacy reasons.", "deprecated"); ?>";
|
||||
|
||||
</script>
|
||||
|
||||
<!-- General JS Files used across Wavelog -->
|
||||
|
||||
@@ -950,10 +950,16 @@ function statesDropdown(states, set_state = null, dropdown = '#stateDropdown') {
|
||||
if (states.status == 'ok') {
|
||||
dropdown.prop('disabled', false);
|
||||
$.each(states.data, function(index, state) {
|
||||
var option = $('<option>', {
|
||||
value: state.state,
|
||||
text: state.subdivision + ' (' + state.state + ')'
|
||||
});
|
||||
var d_text = '';
|
||||
if (state.deprecated == '1') {
|
||||
d_text = '\u26A0\uFE0F [' + lang_general_states_deprecated + '] - ';
|
||||
}
|
||||
if (state.state == set_state || state.deprecated != '1') {
|
||||
var option = $('<option>', {
|
||||
value: state.state,
|
||||
text: d_text + state.subdivision + ' (' + state.state + ')'
|
||||
});
|
||||
}
|
||||
dropdown.append(option);
|
||||
});
|
||||
$(dropdown).val(set_state);
|
||||
|
||||
Reference in New Issue
Block a user