PATH: /home/hwyuvbry/www/kerbau/assets/js
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 app-access-permission.js
↓
X
📄 app-access-roles.js
↓
X
📄 app-calendar-events.js
↓
X
📄 app-calendar.js
↓
X
📄 app-chat.js
↓
X
📄 app-email.js
↓
X
📄 app-invoice-add.js
↓
X
📄 app-invoice-edit.js
↓
X
📄 app-invoice-list.js
↓
X
📄 app-invoice-print.js
↓
X
📄 app-kanban.js
↓
X
📄 app-user-list.js
↓
X
📄 app-user-view-account.js
↓
X
📄 app-user-view-billing.js
↓
X
📄 app-user-view-security.js
↓
X
📄 app-user-view.js
↓
X
📄 cards-actions.js
↓
X
📄 cards-advance.js
↓
X
📄 cards-analytics.js
↓
X
📄 cards-statistics.js
↓
X
📄 charts-apex.js
↓
X
📄 charts-chartjs.js
↓
X
📄 config.js
↓
X
📄 dashboards-analytics.js
↓
X
📄 dashboards-crm.js
↓
X
📄 dashboards-ecommerce.js
↓
X
📄 extended-ui-blockui.js
↓
X
📄 extended-ui-drag-and-drop.js
↓
X
📄 extended-ui-media-player.js
↓
X
📄 extended-ui-misc-clipboardjs.js
↓
X
📄 extended-ui-misc-idle-timer.js
↓
X
📄 extended-ui-misc-numeraljs.js
↓
X
📄 extended-ui-perfect-scrollbar.js
↓
X
📄 extended-ui-star-ratings.js
↓
X
📄 extended-ui-sweetalert2.js
↓
X
📄 extended-ui-timeline.js
↓
X
📄 extended-ui-tour.js
↓
X
📄 extended-ui-treeview.js
↓
X
📄 form-basic-inputs.js
↓
X
📄 form-layouts.js
↓
X
📄 form-validation.js
↓
X
📄 form-wizard-icons.js
↓
X
📄 form-wizard-numbered.js
↓
X
📄 form-wizard-validation.js
↓
X
📄 forms-editors.js
↓
X
📄 forms-extras.js
↓
X
📄 forms-file-upload.js
↓
X
📄 forms-pickers.js
↓
X
📄 forms-selects.js
↓
X
📄 forms-sliders.js
↓
X
📄 forms-tagify.js
↓
X
📄 forms-typeahead.js
↓
X
📄 jquery.priceformat.min.js
↓
X
📄 main.js
↓
X
📄 maps-leaflet.js
↓
X
📄 modal-add-new-address.js
↓
X
📄 modal-add-new-cc.js
↓
X
📄 modal-add-permission.js
↓
X
📄 modal-add-role.js
↓
X
📄 modal-create-app.js
↓
X
📄 modal-edit-cc.js
↓
X
📄 modal-edit-permission.js
↓
X
📄 modal-edit-user.js
↓
X
📄 modal-enable-otp.js
↓
X
📄 modal-share-project.js
↓
X
📄 modal-two-factor-auth.js
↓
X
📄 offcanvas-add-payment.js
↓
X
📄 offcanvas-send-invoice.js
↓
X
📄 pages-account-settings-account.js
↓
X
📄 pages-account-settings-billing.js
↓
X
📄 pages-account-settings-security.js
↓
X
📄 pages-auth-multisteps.js
↓
X
📄 pages-auth-two-steps.js
↓
X
📄 pages-auth.js
↓
X
📄 pages-pricing.js
↓
X
📄 pages-profile.js
↓
X
📁 particles/
X
📄 tables-datatables-advanced.js
↓
X
📄 tables-datatables-basic.js
↓
X
📄 tables-datatables-extensions.js
↓
X
📄 ui-app-brand.js
↓
X
📄 ui-carousel.js
↓
X
📄 ui-menu.js
↓
X
📄 ui-modals.js
↓
X
📄 ui-navbar.js
↓
X
📄 ui-popover.js
↓
X
📄 ui-toasts.js
↓
X
📄 waves.js
↓
X
📄 wizard-ex-checkout.js
↓
X
📄 wizard-ex-create-deal.js
↓
X
📄 wizard-ex-property-listing.js
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: wizard-ex-create-deal.js
/** * Form Wizard */ 'use strict'; (function () { // flatpickrRange const flatpickrRange = document.querySelector('#dealDuration'); if (flatpickrRange) { flatpickrRange.flatpickr({ mode: 'range' }); } // Init custom option check window.Helpers.initCustomOptionCheck(); // Vertical Wizard // -------------------------------------------------------------------- const wizardCreateDeal = document.querySelector('#wizard-create-deal'); if (typeof wizardCreateDeal !== undefined && wizardCreateDeal !== null) { // Wizard form const wizardCreateDealForm = wizardCreateDeal.querySelector('#wizard-create-deal-form'); // Wizard steps const wizardCreateDealFormStep1 = wizardCreateDealForm.querySelector('#deal-type'); const wizardCreateDealFormStep2 = wizardCreateDealForm.querySelector('#deal-details'); const wizardCreateDealFormStep3 = wizardCreateDealForm.querySelector('#deal-usage'); const wizardCreateDealFormStep4 = wizardCreateDealForm.querySelector('#review-complete'); // Wizard next prev button const wizardCreateDealNext = [].slice.call(wizardCreateDealForm.querySelectorAll('.btn-next')); const wizardCreateDealPrev = [].slice.call(wizardCreateDealForm.querySelectorAll('.btn-prev')); let validationStepper = new Stepper(wizardCreateDeal, { linear: true }); // Deal Type const FormValidation1 = FormValidation.formValidation(wizardCreateDealFormStep1, { fields: { dealAmount: { validators: { notEmpty: { message: 'Please enter amount' }, numeric: { message: 'The amount must be a number' } } }, dealRegion: { validators: { notEmpty: { message: 'Please select region' } } } }, plugins: { trigger: new FormValidation.plugins.Trigger(), bootstrap5: new FormValidation.plugins.Bootstrap5({ // Use this for enabling/changing valid/invalid class // eleInvalidClass: '', eleValidClass: '', rowSelector: '.col-sm-6' }), autoFocus: new FormValidation.plugins.AutoFocus(), submitButton: new FormValidation.plugins.SubmitButton() } }).on('core.form.valid', function () { // Jump to the next step when all fields in the current step are valid validationStepper.next(); }); // select2 (Region) const dealRegion = $('#dealRegion'); if (dealRegion.length) { dealRegion.wrap('<div class="position-relative"></div>'); dealRegion .select2({ placeholder: 'Select an region', dropdownParent: dealRegion.parent() }) .on('change.select2', function () { // Revalidate the region field when an option is chosen FormValidation1.revalidateField('dealRegion'); }); } // Deal Details const FormValidation2 = FormValidation.formValidation(wizardCreateDealFormStep2, { fields: { // * Validate the fields here based on your requirements dealTitle: { validators: { notEmpty: { message: 'Please enter deal title' } } }, dealCode: { validators: { notEmpty: { message: 'Please enter deal code' }, stringLength: { min: 4, max: 10, message: 'The deal code must be more than 4 and less than 10 characters long' }, regexp: { regexp: /^[A-Z0-9]+$/, message: 'The deal code can only consist of capital alphabetical and number' } } } }, plugins: { trigger: new FormValidation.plugins.Trigger(), bootstrap5: new FormValidation.plugins.Bootstrap5({ // Use this for enabling/changing valid/invalid class // eleInvalidClass: '', eleValidClass: '', rowSelector: '.col-sm-6' }), autoFocus: new FormValidation.plugins.AutoFocus(), submitButton: new FormValidation.plugins.SubmitButton() } }).on('core.form.valid', function () { // Jump to the next step when all fields in the current step are valid validationStepper.next(); }); // select2 (Offered Item) const dealOfferedItem = $('#dealOfferedItem'); if (dealOfferedItem.length) { dealOfferedItem.wrap('<div class="position-relative"></div>'); dealOfferedItem .select2({ placeholder: 'Select an offered item', dropdownParent: dealOfferedItem.parent() }) .on('change.select2', function () { // Revalidate the field if needed when an option is chosen // FormValidation2.revalidateField('dealOfferedItem'); }); } // Deal Usage const FormValidation3 = FormValidation.formValidation(wizardCreateDealFormStep3, { fields: { // * Validate the fields here based on your requirements }, plugins: { trigger: new FormValidation.plugins.Trigger(), bootstrap5: new FormValidation.plugins.Bootstrap5({ // Use this for enabling/changing valid/invalid class // eleInvalidClass: '', eleValidClass: '', rowSelector: '.col-sm-6' }), autoFocus: new FormValidation.plugins.AutoFocus(), submitButton: new FormValidation.plugins.SubmitButton() } }).on('core.form.valid', function () { validationStepper.next(); }); // Deal Usage const FormValidation4 = FormValidation.formValidation(wizardCreateDealFormStep4, { fields: { // * Validate the fields here based on your requirements }, plugins: { trigger: new FormValidation.plugins.Trigger(), bootstrap5: new FormValidation.plugins.Bootstrap5({ // Use this for enabling/changing valid/invalid class // eleInvalidClass: '', eleValidClass: '', rowSelector: '.col-md-12' }), autoFocus: new FormValidation.plugins.AutoFocus(), submitButton: new FormValidation.plugins.SubmitButton() } }).on('core.form.valid', function () { // You can submit the form // wizardCreateDealForm.submit() // or send the form data to server via an Ajax request // To make the demo simple, I just placed an alert alert('Submitted..!!'); }); wizardCreateDealNext.forEach(item => { item.addEventListener('click', event => { // When click the Next button, we will validate the current step switch (validationStepper._currentIndex) { case 0: FormValidation1.validate(); break; case 1: FormValidation2.validate(); break; case 2: FormValidation3.validate(); break; case 3: FormValidation4.validate(); break; default: break; } }); }); wizardCreateDealPrev.forEach(item => { item.addEventListener('click', event => { switch (validationStepper._currentIndex) { case 3: validationStepper.previous(); break; case 2: validationStepper.previous(); break; case 1: validationStepper.previous(); break; case 0: default: break; } }); }); } })();
SIMPAN PERUBAHAN