One Hat Cyber Team
Your IP :
216.73.216.80
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
ojs-nosc
/
plugins
/
pubIds
/
urn
/
js
/
View File Name :
FieldTextUrn.js
/** * @defgroup plugins_pubIds_urn_js */ /** * @file plugins/pubIds/urn/js/FieldTextUrn.js * * Copyright (c) 2014-2021 Simon Fraser University * Copyright (c) 2003-2021 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * * @brief A Vue.js component for URN text form field, that is used for custom suffixes, and that considers adding a check number. */ pkp.registry.registerComponent('FieldTextUrn', { name: 'FieldTextUrn', extends: pkp.registry.getComponent('PkpFieldText'), template: '<div class="pkpFormField pkpFormField--text pkpFormField--urn" :class="classes">' + ' <form-field-label' + ' :controlId="controlId"' + ' :label="label"' + ' :localeLabel="localeLabel"' + ' :isRequired="isRequired"' + ' :requiredLabel="t(\'common.required\')"' + ' :multilingualLabel="multilingualLabel"' + ' />' + ' <div' + ' v-if="isPrimaryLocale && description"' + ' class="pkpFormField__description"' + ' v-strip-unsafe-html="description"' + ' :id="describedByDescriptionId"' + ' />' + ' <div class="pkpFormField__control" :class="controlClasses">' + ' <input' + ' class="pkpFormField__input pkpFormField--text__input pkpFormField--urn__input"' + ' ref="input"' + ' v-model="currentValue"' + ' :type="inputType"' + ' :id="controlId"' + ' :name="localizedName"' + ' :aria-describedby="describedByIds"' + ' :aria-invalid="!!errors.length"' + ' :required="isRequired"' + ' :style="inputStyles"' + ' />' + ' <pkp-button' + ' v-if="applyCheckNumber"' + ' @click.prevent="addCheckNumber"' + ' :disabled="currentValue === null || currentValue?.length === 0"' + ' >' + ' {{ addCheckNumberLabel }}' + ' </pkp-button>' + ' <field-error' + ' v-if="errors.length"' + ' :id="describedByErrorId"' + ' :messages="errors"' + ' />' + ' </div>' + ' </div>', props: { addCheckNumberLabel: { type: String, required: true, }, urnPrefix: { type: String, required: true, }, applyCheckNumber: { type: Boolean, required: true, }, }, methods: { /** * Add a check number to the end of the URN */ addCheckNumber() { this.currentValue += $.pkp.plugins.generic.urn.getCheckNumber( this.currentValue || '', this.urnPrefix, ); }, }, });