[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: edit.vue
<template> <div> <!-- breadcrumbs Start --> <breadcrumbs :items="breadcrumbs" :current="breadcrumbsCurrent" /> <!-- breadcrumbs end --> <div class="row"> <div class="col-12 col-xl-3"> <SettingsSidebar /> </div> <div class="col-12 col-xl-9"> <form role="form" @submit.prevent="updatePermission" @keydown="form.onKeydown($event)"> <div class="card"> <div class="card-header setings-header"> <div class="col-xl-4 col-4"> <h3 class="card-title"> {{ $t("setup.permissions.edit.form_title") }} </h3> </div> <div class="col-xl-8 col-8 float-right text-right"> <router-link :to="{ name: 'permissions.index' }" class="btn btn-dark float-right"> <i class="fas fa-long-arrow-alt-left" /> {{ $t("common.back") }} </router-link> </div> </div> <div class="card-body"> <div class="form-group col-md-12"> <label for="name">{{ $t("common.name") }} <span class="required">*</span></label> <input id="name" v-model="form.name" type="text" class="form-control" :class="{ 'is-invalid': form.errors.has('name') }" name="name" :placeholder="$t('common.name_placeholder')" /> <has-error :form="form" field="name" /> </div> <div class="form-group col-md-12"> <label for="guardName">{{ $t("setup.permissions.common.guard_name") }} <span class="required">*</span></label> <input id="guardName" v-model="form.guardName" type="text" class="form-control" :class="{ 'is-invalid': form.errors.has('guardName') }" name="guardName" :placeholder="$t('setup.permissions.common.guard_name_placeholder') " /> <has-error :form="form" field="guardName" /> </div> <div class="form-group col-md-12"> <label for="slug">{{ $t("setup.permissions.common.slug") }} <span class="required">*</span></label> <input id="slug" v-model="form.slug" type="text" class="form-control" :class="{ 'is-invalid': form.errors.has('slug') }" name="slug" :placeholder="$t('setup.permissions.common.slug_placeholder')" /> <has-error :form="form" field="slug" /> </div> </div> <div class="card-footer"> <v-button :loading="form.busy" class="btn btn-primary"> <i class="fas fa-edit" /> {{ $t("common.save_changes") }} </v-button> </div> </div> </form> </div> </div> </div> </template> <script> import axios from "axios"; import Form from "vform"; export default { middleware: ["auth", "check-permissions"], metaInfo() { return { title: this.$t("setup.permissions.edit.page_title") }; }, data: () => ({ breadcrumbsCurrent: "setup.permissions.edit.breadcrumbs_current", breadcrumbs: [ { name: "setup.permissions.edit.breadcrumbs_first", url: "home", }, { name: "setup.permissions.edit.breadcrumbs_second", url: "setup.index", }, { name: "setup.permissions.edit.breadcrumbs_third", url: "permissions.index", }, { name: "setup.permissions.edit.breadcrumbs_active", url: "", }, ], form: new Form({ name: "", guardName: "", slug: "", }), loading: true, }), created() { this.getPermission(); }, methods: { // get permission async getPermission() { const { data } = await axios.get( window.location.origin + "/api/permissions/" + this.$route.params.slug ); this.form.name = data.data.name; this.form.guardName = data.data.guardName; this.form.slug = data.data.slug; }, // update permission async updatePermission() { await this.form .patch( window.location.origin + "/api/permissions/" + this.$route.params.slug ) .then((response) => { toast.fire({ type: "success", title: this.$t("setup.permissions.edit.success_msg"), }); this.$router.push({ name: "permissions.index" }); }) .catch(() => { toast.fire({ type: "error", title: this.$t("common.error_msg"), }); }); }, }, }; </script>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.67 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002