Commit 931669b1 by Violinna

new versi

parent a90a2b9c
......@@ -24,71 +24,110 @@ class OrangTuaController extends Controller
public function create()
{
$this->data['title'] = 'Mendaftar';
return view('calonsiswa.orangtua.create',$this->data);
return view('calonsiswa.orangtua.create');
}
public function store(Request $request)
{
$this->validate($request,[
'id_pendaftar'=>'required',
'nama_ayah'=>'required',
'tahun_lahir_ayah'=>'required',
'nik_ayah'=>'required',
'kebutuhan_khusus_ayah'=>'required',
'kebutuhan_khus_ayah'=>'required',
'pekerjaan_ayah'=>'required',
'pendidikan_ayah'=>'required',
'penghasilan_bulanan_ayah'=>'required',
'nama_ibu'=>'required',
'tahun_lahir_ibu'=>'required',
'nik_ibu'=>'required',
'kebutuhan_khusus_ibu'=>'required',
'kebutuhan_khus_ibu'=>'required',
'pekerjaan_ibu'=>'required',
'pendidikan_ibu'=>'required',
'penghasilan_bulanan_ibu'=>'required',
'penghasilan_bulanan_ibu'=>'required'
]);
$input['nama_ayah'] = $request->input('nama_ayah');
$input['tahun_lahir_ayah'] = $request->input('tahun_lahir_ayah');
$input['nik_ayah'] = $request->input('nik_ayah');
$input['kebutuhan_khus_ayah'] = $request->input('kebutuhan_khus_ayah');
$input['pekerjaan_ayah'] = $request->input('pekerjaan_ayah');
$input['pendidikan_ayah'] = $request->input('pendidikan_ayah');
$input['penghasilan_bulanan_ayah'] = $request->input('penghasilan_bulanan_ayah');
$input['nama_ibu'] = $request->input('nama_ibu');
$input['tahun_lahir_ibu'] = $request->input('tahun_lahir_ibu');
$input['nik_ibu'] = $request->input('nik_ibu');
$input['kebutuhan_khus_ibu'] = $request->input('kebutuhan_khus_ibu');
$input['pekerjaan_ibu'] = $request->input('pekerjaan_ibu');
$input['pendidikan_ibu'] = $request->input('pendidikan_ibu');
$input['penghasilan_bulanan_ibu'] = $request->input('penghasilan_bulanan_ibu');
//wali
$input['nama_wali'] = null;
$input['tahun_lahir_wali'] = null;
$input['nik_wali'] = null;
$input['kebutuhan_khus_wali'] = null;
$input['pekerjaan_wali'] = null;
$input['pendidikan_wali'] = null;
$input['penghasilan_bulanan_wali'] = null;
$input['id_pendaftar'] = $request->user()->pendaftar->id;
$id = $request->input('id');
OrangTua::UpdateOrCreate($input);
return redirect()->route('orangtua.index')->with('info','Berhasil menambah data orang tua');
}
public function storewali(Request $request){
$this->validate($request,[
'nama_wali'=>'required',
'tahun_lahir_wali'=>'required',
'nik_wali'=>'required',
'kebutuhan_khusus_wali'=>'required',
'kebutuhan_khus_wali'=>'required',
'pekerjaan_wali'=>'required',
'pendidikan_wali'=>'required',
'penghasilan_bulanan_wali'=>'required',
]);
$pen = OrangTua
::updateOrCreate(
[
'id_pendaftar'=> $request->user()->pendaftar->id,
'nama_ayah'=> $request -> nama_ayah,
'tahun_lahir_ayah'=> $request -> tahun_lahir_ayah,
'nik_ayah'=> $request -> nik_ayah,
'kebutuhan_khusus_ayah'=>$request -> kebutuhan_khusus_ayah,
'pekerjaan_ayah'=> $request -> pekerjaan_ayah,
'pendidikan_ayah'=>$request -> pendidikan_ayah,
'penghasilan_bulanan_ayah'=>$request -> penghasilan_bulanan_ayah,
'nama_ibu'=> $request -> nama_ibu,
'tahun_lahir_ibu'=> $request -> tahun_lahir_ibu,
'nik_ibu'=> $request -> nik_ibu,
'kebutuhan_khusus_ibu'=>$request -> kebutuhan_khusus_ibu,
'pekerjaan_ibu'=> $request -> pekerjaan_ibu,
'pendidikan_ibu'=>$request -> pendidikan_ibu,
'penghasilan_bulanan_ibu'=>$request -> penghasilan_bulanan_ibu,
'nama_wali'=> $request -> nama_wali,
'tahun_lahir_wali'=> $request -> tahun_lahir_wali,
'nik_wali'=> $request -> nik_wali,
'kebutuhan_khusus_wali'=>$request -> kebutuhan_khusus_wali,
'pekerjaan_wali'=> $request -> pekerjaan_wali,
'pendidikan_wali'=>$request -> pendidikan_wali,
'penghasilan_bulanan_wali'=>$request -> penghasilan_bulanan_wali,
]);
return redirect()->route('orangtua.index')->with('info','Anda sudah mendaftar');
'penghasilan_bulanan_wali'=>'required'
]);
$input['nama_ayah'] = null;
$input['tahun_lahir_ayah'] = null;
$input['nik_ayah'] = null;
$input['kebutuhan_khus_ayah'] = null;
$input['pekerjaan_ayah'] = null;
$input['pendidikan_ayah'] = null;
$input['penghasilan_bulanan_ayah'] = null;
$input['nama_ibu'] = null;
$input['tahun_lahir_ibu'] = null;
$input['nik_ibu'] = null;
$input['kebutuhan_khus_ibu'] = null;
$input['pekerjaan_ibu'] = null;
$input['pendidikan_ibu'] = null;
$input['penghasilan_bulanan_ibu'] = null;
//wali
$input['nama_wali'] = $request->input('nama_wali');
$input['tahun_lahir_wali'] = $request->input('tahun_lahir_wali');
$input['nik_wali'] = $request->input('nik_wali');;
$input['kebutuhan_khus_wali'] = $request->input('kebutuhan_khus_wali');;
$input['pekerjaan_wali'] = $request->input('pekerjaan_wali');;
$input['pendidikan_wali'] = $request->input('pendidikan_wali');;
$input['penghasilan_bulanan_wali'] = $request->input('penghasilan_bulanan_wali');;
$input['id_pendaftar'] = $request->user()->pendaftar->id;
$id = $request->input('id');
OrangTua::UpdateOrCreate($input);
return redirect()->route('orangtua.index')->with('info','Berhasil menambah data orang tua');
}
public function show($id)
{
//
......
......@@ -6,14 +6,22 @@ use App\Http\Requests;
use Illuminate\Http\Request;
use PDF;
use App\Models\Pendaftar;
use Session;
use App\Models\Periodik;
use App\Models\AsalSekolah;
use App\Models\Prestasi;
use App\Models\OrangTua;
use Auth;
class PDFController extends Controller
{
public function index()
public function index(Request $req)
{
$this->data['kartu'] = Auth::user()->pendaftar;
$id = Auth::user()->pendaftar->id;
$this->data['periodik'] = Periodik::where('id_pendaftar',$id)->first();
$this->data['smp'] = AsalSekolah::where('id_pendaftar',$id)->first();
$this->data['ot'] = OrangTua::where('id_pendaftar',$id)->first();
$this->data['pres'] = Prestasi::where('id_pendaftar',$id)->first();
return view('calonsiswa.pdf.index',$this->data);
}
......@@ -21,7 +29,8 @@ class PDFController extends Controller
public function getPDF(Request $request)
{
$id = Auth::user()->id;
$kartu = Pendaftar::where('user_id',$id)->get();
$kartu = Pendaftar::where('user_id','=',$id)->get();
view()->share('pendaftar',$kartu);
$pdf = PDF::loadView('calonsiswa.pdf.kartu');
return $pdf->download('kartu.pdf');
......
......@@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Models\Pendaftar;
use App\Models\Periodik;
use App\Models\Tahunajaran;
use App\Models\AsalSekolah;
use App\User;
......@@ -15,16 +16,14 @@ class PendaftarController extends Controller
{
public function index()
{
return view('calonsiswa.pendaftar.index');
return view('calonsiswa.pendaftar.create');
}
public function hasilujian(Request $req)
{
$this->data['title'] = 'Hasil Ujian';
$id = Auth::user()->id;
$this->data['pen'] = Pendaftar::where('user_id',$id)->get();
$this->data['as'] = AsalSekolah::where('id_pendaftar',$id_as)->get();
$this->data['pendaftar'] = Pendaftar::all();
return view('calonsiswa.hasilujian.index',$this->data);
}
......@@ -35,10 +34,11 @@ class PendaftarController extends Controller
return view('calonsiswa.pendaftar.create',$this->data);
}
public function store(Request $request)
{
$this->validate($request,[
'no_pendaftar'=>'required',
'nama'=>'required',
'jeniskelamin'=>'required',
'tempatlahir'=>'required',
......@@ -47,34 +47,64 @@ class PendaftarController extends Controller
'alamat'=>'required',
'kebutuhan_khusus'=>'required',
'no_hp'=>'required'
]);
$this->validate($request,[
'tinggi_badan'=>'required',
'berat_badan'=>'required',
'jarak_kesekolah'=>'required',
'waktu_tempuh'=>'required',
'jumlah_saudara'=>'required'
]);
$input['user_id'] = $request->user()->id;
$input['no_pendaftar'] = $request->input('no_pendaftar');
$input['nama'] = $request->input('nama');
$input['jeniskelamin'] = $request->input('jeniskelamin');
$input['tempatlahir'] = $request->input('tempatlahir');
$input['tanggallahir'] = $request->input('tanggallahir');
$input['agama'] = $request->input('agama');
$input['alamat'] = $request->input('alamat');
$input['kebutuhan_khusus'] = $request->input('kebutuhan_khusus');
$input['no_hp'] = $request->input('no_hp');
$input['status'] = 'Request';
if (Pendaftar::where('user_id',$request->user()->id)->first()!=null) {
return redirect()->route('pendaftar.index')->with('info','Selesai Mendaftar, Lengkapi Data Periodik Anda!');
}
$pendaftar = new Pendaftar;
$ko = mt_rand(100000,999999).mt_rand(100000,9999999);
$string = str_shuffle($ko);
$pendaftar->no_pendaftar = $string;
$pendaftar ->nama = $request ->nama;
$pendaftar ->jeniskelamin = $request ->jeniskelamin;
$pendaftar ->tempatlahir = $request ->tempatlahir;
$pendaftar ->tanggallahir = $request ->tanggallahir;
$pendaftar ->agama = $request ->agama;
$pendaftar ->alamat =$request->alamat;
$pendaftar ->kebutuhan_khusus =$request->kebutuhan_khusus;
$pendaftar ->status = 'Request';
$pendaftar ->no_hp = $request->no_hp;
$pendaftar ->user_id = $request->user()->id;
Pendaftar::updateOrCreate($input);
if ($request->user()->id_pendaftar == $pendaftar ->user_id) {
return redirect()->route('pendaftar.index')->with('info','Fail');
}
$id = $pendaftar ->save();
// Periodik
$input['tinggi_badan'] = $request->input('tinggi_badan');
$input['berat_badan'] = $request->input('berat_badan');
$input['jarak_kesekolah'] = $request->input('jarak_kesekolah');
$input['waktu_tempuh'] = $request->input('waktu_tempuh');
$input['jumlah_saudara'] = $request->input('jumlah_saudara');
$input['id_pendaftar'] = $request->user()->pendaftar->id;
$id = $request->input('id');
Periodik::UpdateOrCreate($input);
$asal = new AsalSekolah;
$asal->id_pendaftar =$request->user()->Pendaftar->id;
$asal ->nama_sekolah = $request ->nama_sekolah;
$asal ->alamat_sekolah = $request ->alamat_sekolah;
$asal ->nisn = $request ->nisn;
$asal ->nik = $request ->nik;
$asal ->no_ijazah = $request ->no_ijazah;
$asal ->no_skhun = $request ->no_skhun;
$asal ->no_ujiannasional = $request ->no_ujiannasional;
$id = $asal ->save();
return redirect()->route('pendaftar.index')->with('info','Selesai Mendaftar');
}
}
public function show($id)
{
......@@ -83,6 +113,40 @@ class PendaftarController extends Controller
return view('calonsiswa.pendaftar.show',$this->data);
}
public function edit($id)
{
$this->data['kartu'] = Pendaftar::findOrFail($id);
return view('calonsiswa.pendaftar.edit',$this->data);
}
public function update($id, Request $request)
{
//validate
$this->validate($request,[
'nama'=>'required',
'jeniskelamin'=>'required',
'tempatlahir'=>'required',
'tanggallahir'=>'required',
'agama'=>'required',
'alamat'=>'required',
'kebutuhan_khusus'=>'required',
'no_hp'=>'required'
]);
$kartu = Pendaftar::findOrFail($id);
$kartu -> nama = $request->nama;
$kartu -> jeniskelamin = $request->jeniskelamin;
$kartu -> tempatlahir = $request->tempatlahir;
$kartu -> tanggallahir = $request->tanggallahir;
$kartu -> agama = $request->agama;
$kartu -> alamat = $request->alamat;
$kartu -> kebutuhan_khusus = $request->kebutuhan_khusus;
$kartu -> no_hp = $request->no_hp;
$kartu-> save();
return view('calonsiswa.dashboard')->with('info','Berhasil diubah');
}
public function destroy($id)
{
Pendaftar::destroy($id);
......
......@@ -14,55 +14,38 @@ class PeriodikController extends Controller
{
public function index()
{
// $this->data['title'] = 'Data Periodik';
// // $this->data['periodik'] = Auth::user()->periodik;
return view('calonsiswa.dashboard');
}
public function create()
public function edit($id)
{
$this->data['title'] = 'Lengkapi Form Data Periodik';
return view('calonsiswa.periodik.create',$this->data);
$this->data['kartu'] = Periodik::findOrFail($id);
return view('calonsiswa.periodik.edit',$this->data);
}
public function update($id, Request $request)
{
//validate
$this->validate($request,[
'tinggi_badan'=>'required',
'berat_badan'=>'required',
'jarak_kesekolah'=>'required',
'waktu_tempuh'=>'required',
'jumlah_saudara'=>'required'
]);
$kartu = Periodik::findOrFail($id);
$kartu -> tinggi_badan = $request->tinggi_badan;
$kartu -> berat_badan = $request->berat_badan;
$kartu -> jarak_kesekolah = $request->jarak_kesekolah;
$kartu -> waktu_tempuh = $request->waktu_tempuh;
$kartu -> jumlah_saudara = $request->jumlah_saudara;
$kartu-> save();
return view('calonsiswa.dashboard')->with('info','Berhasil diubah');
public function store(Request $request)
{
$this->validate($request,[
'tinggi_badan'=>'required',
'berat_badan'=>'required',
'jarak_kesekolah'=>'required',
'waktu_tempuh'=>'required',
'jumlah_saudara'=>'required',
]);
$input['tinggi_badan'] = $request->input('tinggi_badan');
$input['berat_badan'] = $request->input('berat_badan');
$input['jarak_kesekolah'] = $request->input('jarak_kesekolah');
$input['waktu_tempuh'] = $request->input('waktu_tempuh');
$input['jumlah_saudara'] = $request->input('jumlah_saudara');
$input['id_pendaftar'] = $request->user()->pendaftar->id;
$id = $request->input('id');
do {
Periodik::UpdateOrCreate($input);
return redirect()->route('periodik.index')->with('info','Selesai mendaftar, Lengkapi Data Prestasi Anda!');
}while ($request->user()->id_pendaftar == $id);
}
}
public function show($id)
public function show($id)
{ //
$this->data['periodik'] = Periodik::where('id_pendaftar',$id)->get();
return view('calonsiswa.periodik.show',$this->data);
......
......@@ -30,10 +30,7 @@ class PrestasiController extends Controller
'jenis_prestasi'=>'required',
'nama_prestasi'=>'required',
'tahun_prestasi'=>'required',
'penyelenggara'=>'required',
'jenis_beasiswa'=>'required',
'tahun_mulai'=>'required',
'tahun_selesai'=>'required',
'penyelenggara'=>'required'
]);
......@@ -42,9 +39,6 @@ class PrestasiController extends Controller
$input['nama_prestasi'] = $request->input('nama_prestasi');
$input['tahun_prestasi'] = $request->input('tahun_prestasi');
$input['penyelenggara'] = $request->input('penyelenggara');
$input['jenis_beasiswa'] = $request->input('jenis_beasiswa');
$input['tahun_mulai'] = $request->input('tahun_mulai');
$input['tahun_selesai'] = $request->input('tahun_selesai');
$input['id_pendaftar'] = $request->user()->pendaftar->id;
......
......@@ -31,9 +31,9 @@ class DaftarCtrl extends Controller
public function show($id)
{
$this->data['Daftar'] = Pendaftar::findOrFail($id);
$this->data['periodik'] = Periodik::where('id_pendaftar',$id)->firstOrFail();
$this->data['prestasi'] = Prestasi::where('id_pendaftar',$id)->firstOrFail();
$this->data['asal_sekolah'] = AsalSekolah::where('id_pendaftar',$id)->firstOrFail();
$this->data['periodik'] = Periodik::where('id_pendaftar',$id)->first();
$this->data['prestasi'] = Prestasi::where('id_pendaftar',$id)->first();
$this->data['asal_sekolah'] = AsalSekolah::where('id_pendaftar',$id)->first();
return view('tatausaha.Daftar.detail',$this->data);
}
......@@ -59,7 +59,7 @@ class DaftarCtrl extends Controller
public function destroy($id)
{
Daftar::destroy($id);
Pendaftar::destroy($id);
Session::flash('flash_message', 'Daftar deleted!');
......
<?php
namespace App\Http\Controllers\tatausaha;
use Illuminate\Support\Facades\Response;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Ruang;
class RuangController extends Controller
{
public function index()
{
$ruang = Ruang::all();
return view('tatausaha.ruang.index',['ruang'=>$ruang]);
}
public function store(Request $request)
{
$this->validate($request,['kode'=> 'required','keterangan'=>'required']);
$ruang = new Ruang();
$ruang->kode = $request->kode;
$ruang->keterangan = $request->keterangan;
$ruang->save();
return response()->json( $ruang );
}
public function update(Request $request)
{
$this->validate($request,[
'kode'=>'required',
'keterangan' => 'required'
]);
$ruang = Ruang::findOrFail($request->id);
$ruang-> kode = $request->kode;
$ruang-> keterangan = $request->keterangan;
$ruang->save();
return response()->json($ruang);
}
public function destroy(Request $request)
{
$ruang = Ruang::find($request->id);
$ruang->delete();
return response()->json($ruang);
}
}
......@@ -45,10 +45,20 @@ class T_ajarController extends Controller
return response()->json($tahunajaran);
}
public function show($id)
{
$this->data['Daftar'] = Pendaftar::findOrFail($id);
$this->data['periodik'] = Periodik::where('',$id)->first();
$this->data['prestasi'] = Prestasi::where('id_pendaftar',$id)->first();
$this->data['asal_sekolah'] = AsalSekolah::where('id_pendaftar',$id)->first();
return view('tatausaha.Daftar.detail',$this->data);
}
public function destroy(Request $request)
{
$tahunajaran = Tahunajaran::find($request->id);
$tahunajaran->delete();
return response()->json($tahunajaran);
}
}
......@@ -6,9 +6,8 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class OrangTua extends Model
{
use SoftDeletes;
protected $table = 't_orangtua';
protected $dates = ['deleted_at'];
protected $fillable = ['nama_ayah','tahun_lahir_ayah','nik_ayah','kebutuhan_khus_ayah','pekerjaan_ayah','pendidikan_ayah','penghasilan_bulanan_ayah','nama_ibu','tahun_lahir_ibu','nik_ibu','kebutuhan_khus_ibu','pekerjaan_ibu','pendidikan_ibu','penghasilan_bulanan_ibu','nama_wali','tahun_lahir_wali','nik_wali','kebutuhan_khus_wali','pekerjaan_wali','pendidikan_wali','penghasilan_bulanan_wali','id_pendaftar'];
/**
* The database primary key value.
*
......
......@@ -36,8 +36,13 @@ class Pendaftar extends Model
public function prestasis(){
return $this->hasMany('App\Models\Prestasis', 'id_pendaftar');
}
public function tahun(){
return $this->hasOne('App\Models\Tahunajaran','thnajaran_id','id');
}
public function ruang(){
return $this->hasOne('App\Models\Ruang','ruang_id','id');
}
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Ruang extends Model
{
protected $table = 't_ruang';
protected $fillable = ['kode','keterangan'];
protected $primaryKey = 'id';
public function pendaftar(){
return $this->hasMany('App\Models\Pendaftar','id','ruang_id');
}
}
File added
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token')->index();
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('password_resets');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTahunajaranMigrate extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('t_tahunajaran', function (Blueprint $table) {
$table->increments('id');
$table->string('kode');
$table->string('keterangan');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('t_tahunajaran');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTablePribadi extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('t_pendaftar', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->unsigned()->index();
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
$table->integer('thnajaran_id')->unsigned()->nullable();
$table->foreign('thnajaran_id')
->references('id')->on('t_tahunajaran')
->onDelete('cascade');
$table->string('no_pendaftar')->index();
$table->string('nama');
$table->string('jeniskelamin');
$table->string('tempatlahir');
$table->date('tanggallahir');
$table->string('agama');
$table->string('alamat');
$table->string('kebutuhan_khusus');
$table->string('no_hp');
$table->string('status')->nullable();
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('t_pendaftar');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePengumumansTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('t_pengumuman', function (Blueprint $table) {
$table->increments('id');
$table->string('jenis');
$table->string('judul');
$table->string('keterangan');
$table->string('file')->nullable();
$table->string('mime');
$table->string('original_filename');
$table->integer('id_users')->unsigned();
$table->foreign('id_users')
->references('id')->on('users')
->onDelete('cascade');
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('t_pengumuman');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRuangTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('t_ruang', function (Blueprint $table) {
$table->increments('id');
$table->string('kode');
$table->string('keterangan');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('t_ruang');
}
}
......@@ -15,7 +15,6 @@ class CreateOrangtuaTable extends Migration
{
Schema::create('t_orangtua', function (Blueprint $table) {
$table->increments('id');
$table->string('jenistinggal');
$table->string('nama_ayah')->nullable();
$table->date('tahun_lahir_ayah')->nullable();
$table->string('nik_ayah')->nullable();
......
......@@ -19,9 +19,6 @@ class CreatePrestasisTable extends Migration
$table->string('nama_prestasi');
$table->string('tahun_prestasi');
$table->string('penyelenggara');
$table->string('jenis_beasiswa');
$table->string('tahun_mulai');
$table->string('tahun_selesai');
$table->integer('id_pendaftar')->unsigned();
$table->foreign('id_pendaftar')
->references('id')->on('t_pendaftar')
......
......@@ -31,7 +31,7 @@ class CreateTablePribadi extends Migration
$table->string('agama');
$table->string('alamat');
$table->string('kebutuhan_khusus');
$table->string('no_tlp_rumah');
$table->string('no_hp');
$table->string('status')->nullable();
$table->softDeletes();
$table->timestamps();
......
input[type="text"],
input[type="password"],
textarea,
textarea.form-control {
height: 44px;
margin: 0;
padding: 0 20px;
vertical-align: middle;
background: #fff;
border: 1px solid #ddd;
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 300;
line-height: 44px;
color: #888;
-moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;
-moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none;
-o-transition: all .3s; -moz-transition: all .3s; -webkit-transition: all .3s; -ms-transition: all .3s; transition: all .3s;
}
textarea,
textarea.form-control {
height: 90px;
padding-top: 8px;
padding-bottom: 8px;
line-height: 30px;
}
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
textarea.form-control:focus {
outline: 0;
background: #fff;
border: 1px solid #ccc;
-moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none;
}
input[type="text"]:-moz-placeholder, input[type="password"]:-moz-placeholder,
textarea:-moz-placeholder, textarea.form-control:-moz-placeholder { color: #888; }
input[type="text"]:-ms-input-placeholder, input[type="password"]:-ms-input-placeholder,
textarea:-ms-input-placeholder, textarea.form-control:-ms-input-placeholder { color: #888; }
input[type="text"]::-webkit-input-placeholder, input[type="password"]::-webkit-input-placeholder,
textarea::-webkit-input-placeholder, textarea.form-control::-webkit-input-placeholder { color: #888; }
label { font-weight: 300; }
button.btn {
min-width: 105px;
height: 40px;
margin: 0;
padding: 0 20px;
vertical-align: middle;
border: 0;
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 300;
line-height: 40px;
color: #fff;
-moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;
text-shadow: none;
-moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none;
-o-transition: all .3s; -moz-transition: all .3s; -webkit-transition: all .3s; -ms-transition: all .3s; transition: all .3s;
}
button.btn:hover { opacity: 0.6; color: #fff; }
button.btn:active { outline: 0; opacity: 0.6; color: #fff; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
button.btn:focus,
button.btn:active:focus,
button.btn.active:focus { outline: 0; opacity: 0.6; color: #fff; }
button.btn.btn-next,
button.btn.btn-next:focus,
button.btn.btn-next:active:focus, button.btn.btn-next.active:focus { background: #f35b3f; }
button.btn.btn-submit,
button.btn.btn-submit:focus,
button.btn.btn-submit:active:focus, button.btn.btn-submit.active:focus { background: #f35b3f; }
button.btn.btn-previous,
button.btn.btn-previous:focus,
button.btn.btn-previous:active:focus, button.btn.btn-previous.active:focus { background: #bbb; }
body {
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 300;
color: #888;
line-height: 30px;
text-align: center;
}
strong { font-weight: 500; }
a, a:hover, a:focus {
color: #f35b3f;
text-decoration: none;
-o-transition: all .3s; -moz-transition: all .3s; -webkit-transition: all .3s; -ms-transition: all .3s; transition: all .3s;
}
h1, h2 {
margin-top: 10px;
font-size: 38px;
font-weight: 100;
color: #555;
line-height: 50px;
}
h3 {
font-size: 22px;
font-weight: 300;
color: #555;
line-height: 30px;
}
h4 {
font-size: 18px;
font-weight: 300;
color: #555;
line-height: 26px;
}
img { max-width: 100%; }
::-moz-selection { background: #f35b3f; color: #fff; text-shadow: none; }
::selection { background: #f35b3f; color: #fff; text-shadow: none; }
/***** Top menu *****/
.navbar {
padding-top: 10px;
background: #333;
background: rgba(51, 51, 51, 0.3);
border: 0;
-o-transition: all .3s; -moz-transition: all .3s; -webkit-transition: all .3s; -ms-transition: all .3s; transition: all .3s;
}
.navbar.navbar-no-bg { background: none; }
ul.navbar-nav {
font-size: 16px;
color: #fff;
}
.navbar-inverse ul.navbar-nav li { padding-top: 8px; padding-bottom: 8px; }
.navbar-inverse ul.navbar-nav li .li-text { opacity: 0.8; }
.navbar-inverse ul.navbar-nav li a { display: inline; padding: 0; color: #fff; }
.navbar-inverse ul.navbar-nav li a:hover { color: #fff; opacity: 1; border-bottom: 1px dotted #fff; }
.navbar-inverse ul.navbar-nav li a:focus { color: #fff; outline: 0; opacity: 1; border-bottom: 1px dotted #fff; }
.navbar-inverse ul.navbar-nav li .li-social a {
margin: 0 5px;
font-size: 28px;
vertical-align: middle;
}
.navbar-inverse ul.navbar-nav li .li-social a:hover,
.navbar-inverse ul.navbar-nav li .li-social a:focus { border: 0; color: #f35b3f; }
.navbar-brand {
width: 162px;
background: url(../img/logo.png) left center no-repeat;
text-indent: -99999px;
}
/***** Top content *****/
.top-content { padding: 40px 0 170px 0; }
.top-content .text { color: #fff; }
.top-content .text h1 { color: #fff; }
.top-content .description { margin: 20px 0 10px 0; }
.top-content .description p { opacity: 0.8; }
.top-content .description a { color: #fff; }
.top-content .description a:hover,
.top-content .description a:focus { border-bottom: 1px dotted #fff; }
.form-box { padding-top: 40px; }
.f1 {
padding: 25px; background: #fff;
-moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;
}
.f1 h3 { margin-top: 0; margin-bottom: 5px; text-transform: uppercase; }
.f1-steps { overflow: hidden; position: relative; margin-top: 20px; }
.f1-progress { position: absolute; top: 24px; left: 0; width: 100%; height: 1px; background: #ddd; }
.f1-progress-line { position: absolute; top: 0; left: 0; height: 1px; background: #f35b3f; }
.f1-step { position: relative; float: left; width: 33.333333%; padding: 0 5px; }
.f1-step-icon {
display: inline-block; width: 40px; height: 40px; margin-top: 4px; background: #ddd;
font-size: 16px; color: #fff; line-height: 40px;
-moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%;
}
.f1-step.activated .f1-step-icon {
background: #fff; border: 1px solid #f35b3f; color: #f35b3f; line-height: 38px;
}
.f1-step.active .f1-step-icon {
width: 48px; height: 48px; margin-top: 0; background: #f35b3f; font-size: 22px; line-height: 48px;
}
.f1-step p { color: #ccc; }
.f1-step.activated p { color: #f35b3f; }
.f1-step.active p { color: #f35b3f; }
.f1 fieldset { display: none; text-align: left; }
.f1-buttons { text-align: right; }
.f1 .input-error { border-color: #f35b3f; }
/***** Media queries *****/
@media (min-width: 992px) and (max-width: 1199px) {}
@media (min-width: 768px) and (max-width: 991px) {}
@media (max-width: 767px) {
.navbar { padding-top: 0; }
.navbar.navbar-no-bg { background: #333; background: rgba(51, 51, 51, 0.9); }
.navbar-brand { height: 60px; margin-left: 15px; }
.navbar-collapse { border: 0; }
.navbar-toggle { margin-top: 12px; }
.top-content { padding: 40px 0 110px 0; }
}
@media (max-width: 415px) {
h1, h2 { font-size: 32px; }
.f1 { padding-bottom: 20px; }
.f1-buttons button { margin-bottom: 5px; }
}
/* Retina-ize images/icons */
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
only screen and ( min-resolution: 192dpi),
only screen and ( min-resolution: 2dppx) {
/* logo */
.navbar-brand {
background-image: url(../img/logo@2x.png) !important; background-repeat: no-repeat !important; background-size: 162px 36px !important;
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/*! Backstretch - v2.0.4 - 2013-06-19
* http://srobbin.com/jquery-plugins/backstretch/
* Copyright (c) 2013 Scott Robbin; Licensed MIT */
(function(a,d,p){a.fn.backstretch=function(c,b){(c===p||0===c.length)&&a.error("No images were supplied for Backstretch");0===a(d).scrollTop()&&d.scrollTo(0,0);return this.each(function(){var d=a(this),g=d.data("backstretch");if(g){if("string"==typeof c&&"function"==typeof g[c]){g[c](b);return}b=a.extend(g.options,b);g.destroy(!0)}g=new q(this,c,b);d.data("backstretch",g)})};a.backstretch=function(c,b){return a("body").backstretch(c,b).data("backstretch")};a.expr[":"].backstretch=function(c){return a(c).data("backstretch")!==p};a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5E3,fade:0};var r={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},s={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},q=function(c,b,e){this.options=a.extend({},a.fn.backstretch.defaults,e||{});this.images=a.isArray(b)?b:[b];a.each(this.images,function(){a("<img />")[0].src=this});this.isBody=c===document.body;this.$container=a(c);this.$root=this.isBody?l?a(d):a(document):this.$container;c=this.$container.children(".backstretch").first();this.$wrap=c.length?c:a('<div class="backstretch"></div>').css(r).appendTo(this.$container);this.isBody||(c=this.$container.css("position"),b=this.$container.css("zIndex"),this.$container.css({position:"static"===c?"relative":c,zIndex:"auto"===b?0:b,background:"none"}),this.$wrap.css({zIndex:-999998}));this.$wrap.css({position:this.isBody&&l?"fixed":"absolute"});this.index=0;this.show(this.index);a(d).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===d.pageYOffset&&(d.scrollTo(0,1),this.resize())},this))};q.prototype={resize:function(){try{var a={left:0,top:0},b=this.isBody?this.$root.width():this.$root.innerWidth(),e=b,g=this.isBody?d.innerHeight?d.innerHeight:this.$root.height():this.$root.innerHeight(),j=e/this.$img.data("ratio"),f;j>=g?(f=(j-g)/2,this.options.centeredY&&(a.top="-"+f+"px")):(j=g,e=j*this.$img.data("ratio"),f=(e-b)/2,this.options.centeredX&&(a.left="-"+f+"px"));this.$wrap.css({width:b,height:g}).find("img:not(.deleteable)").css({width:e,height:j}).css(a)}catch(h){}return this},show:function(c){if(!(Math.abs(c)>this.images.length-1)){var b=this,e=b.$wrap.find("img").addClass("deleteable"),d={relatedTarget:b.$container[0]};b.$container.trigger(a.Event("backstretch.before",d),[b,c]);this.index=c;clearInterval(b.interval);b.$img=a("<img />").css(s).bind("load",function(f){var h=this.width||a(f.target).width();f=this.height||a(f.target).height();a(this).data("ratio",h/f);a(this).fadeIn(b.options.speed||b.options.fade,function(){e.remove();b.paused||b.cycle();a(["after","show"]).each(function(){b.$container.trigger(a.Event("backstretch."+this,d),[b,c])})});b.resize()}).appendTo(b.$wrap);b.$img.attr("src",b.images[c]);return b}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){this.paused=!0;return this},resume:function(){this.paused=!1;this.next();return this},cycle:function(){1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration));return this},destroy:function(c){a(d).off("resize.backstretch orientationchange.backstretch");clearInterval(this.interval);c||this.$wrap.remove();this.$container.removeData("backstretch")}};var l,f=navigator.userAgent,m=navigator.platform,e=f.match(/AppleWebKit\/([0-9]+)/),e=!!e&&e[1],h=f.match(/Fennec\/([0-9]+)/),h=!!h&&h[1],n=f.match(/Opera Mobi\/([0-9]+)/),t=!!n&&n[1],k=f.match(/MSIE ([0-9]+)/),k=!!k&&k[1];l=!((-1<m.indexOf("iPhone")||-1<m.indexOf("iPad")||-1<m.indexOf("iPod"))&&e&&534>e||d.operamini&&"[object OperaMini]"==={}.toString.call(d.operamini)||n&&7458>t||-1<f.indexOf("Android")&&e&&533>e||h&&6>h||"palmGetResource"in d&&e&&534>e||-1<f.indexOf("MeeGo")&&-1<f.indexOf("NokiaBrowser/8.5.0")||k&&6>=k)})(jQuery,window);
\ No newline at end of file
$(document).ready(function(){
$('input[type="text"], input[type="password"], textarea').each(function() {
$(this).val( $(this).attr('placeholder') );
});
});
\ No newline at end of file
/*!
* Retina.js v1.1.0
*
* Copyright 2013 Imulus, LLC
* Released under the MIT license
*
* Retina.js is an open source script that makes it easy to serve
* high-resolution images to devices with retina displays.
*/
(function() {
var root = (typeof exports == 'undefined' ? window : exports);
var config = {
// Ensure Content-Type is an image before trying to load @2x image
// https://github.com/imulus/retinajs/pull/45)
check_mime_type: true
};
root.Retina = Retina;
function Retina() {}
Retina.configure = function(options) {
if (options == null) options = {};
for (var prop in options) config[prop] = options[prop];
};
Retina.init = function(context) {
if (context == null) context = root;
var existing_onload = context.onload || new Function;
context.onload = function() {
var images = document.getElementsByTagName("img"), retinaImages = [], i, image;
for (i = 0; i < images.length; i++) {
image = images[i];
retinaImages.push(new RetinaImage(image));
}
existing_onload();
}
};
Retina.isRetina = function(){
var mediaQuery = "(-webkit-min-device-pixel-ratio: 1.5),\
(min--moz-device-pixel-ratio: 1.5),\
(-o-min-device-pixel-ratio: 3/2),\
(min-resolution: 1.5dppx)";
if (root.devicePixelRatio > 1)
return true;
if (root.matchMedia && root.matchMedia(mediaQuery).matches)
return true;
return false;
};
root.RetinaImagePath = RetinaImagePath;
function RetinaImagePath(path, at_2x_path) {
this.path = path;
if (typeof at_2x_path !== "undefined" && at_2x_path !== null) {
this.at_2x_path = at_2x_path;
this.perform_check = false;
} else {
this.at_2x_path = path.replace(/\.\w+$/, function(match) { return "@2x" + match; });
this.perform_check = true;
}
}
RetinaImagePath.confirmed_paths = [];
RetinaImagePath.prototype.is_external = function() {
return !!(this.path.match(/^https?\:/i) && !this.path.match('//' + document.domain) )
}
RetinaImagePath.prototype.check_2x_variant = function(callback) {
var http, that = this;
if (this.is_external()) {
return callback(false);
} else if (!this.perform_check && typeof this.at_2x_path !== "undefined" && this.at_2x_path !== null) {
return callback(true);
} else if (this.at_2x_path in RetinaImagePath.confirmed_paths) {
return callback(true);
} else {
http = new XMLHttpRequest;
http.open('HEAD', this.at_2x_path);
http.onreadystatechange = function() {
if (http.readyState != 4) {
return callback(false);
}
if (http.status >= 200 && http.status <= 399) {
if (config.check_mime_type) {
var type = http.getResponseHeader('Content-Type');
if (type == null || !type.match(/^image/i)) {
return callback(false);
}
}
RetinaImagePath.confirmed_paths.push(that.at_2x_path);
return callback(true);
} else {
return callback(false);
}
}
http.send();
}
}
function RetinaImage(el) {
this.el = el;
this.path = new RetinaImagePath(this.el.getAttribute('src'), this.el.getAttribute('data-at2x'));
var that = this;
this.path.check_2x_variant(function(hasVariant) {
if (hasVariant) that.swap();
});
}
root.RetinaImage = RetinaImage;
RetinaImage.prototype.swap = function(path) {
if (typeof path == 'undefined') path = this.path.at_2x_path;
var that = this;
function load() {
if (! that.el.complete) {
setTimeout(load, 5);
} else {
that.el.setAttribute('width', that.el.offsetWidth);
that.el.setAttribute('height', that.el.offsetHeight);
that.el.setAttribute('src', path);
}
}
load();
}
if (Retina.isRetina()) {
Retina.init(root);
}
})();
/*!
* Retina.js v1.1.0
*
* Copyright 2013 Imulus, LLC
* Released under the MIT license
*
* Retina.js is an open source script that makes it easy to serve
* high-resolution images to devices with retina displays.
*/
(function(){var root=typeof exports=="undefined"?window:exports;var config={check_mime_type:true};root.Retina=Retina;function Retina(){}Retina.configure=function(options){if(options==null)options={};for(var prop in options)config[prop]=options[prop]};Retina.init=function(context){if(context==null)context=root;var existing_onload=context.onload||new Function;context.onload=function(){var images=document.getElementsByTagName("img"),retinaImages=[],i,image;for(i=0;i<images.length;i++){image=images[i];retinaImages.push(new RetinaImage(image))}existing_onload()}};Retina.isRetina=function(){var mediaQuery="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";if(root.devicePixelRatio>1)return true;if(root.matchMedia&&root.matchMedia(mediaQuery).matches)return true;return false};root.RetinaImagePath=RetinaImagePath;function RetinaImagePath(path,at_2x_path){this.path=path;if(typeof at_2x_path!=="undefined"&&at_2x_path!==null){this.at_2x_path=at_2x_path;this.perform_check=false}else{this.at_2x_path=path.replace(/\.\w+$/,function(match){return"@2x"+match});this.perform_check=true}}RetinaImagePath.confirmed_paths=[];RetinaImagePath.prototype.is_external=function(){return!!(this.path.match(/^https?\:/i)&&!this.path.match("//"+document.domain))};RetinaImagePath.prototype.check_2x_variant=function(callback){var http,that=this;if(this.is_external()){return callback(false)}else if(!this.perform_check&&typeof this.at_2x_path!=="undefined"&&this.at_2x_path!==null){return callback(true)}else if(this.at_2x_path in RetinaImagePath.confirmed_paths){return callback(true)}else{http=new XMLHttpRequest;http.open("HEAD",this.at_2x_path);http.onreadystatechange=function(){if(http.readyState!=4){return callback(false)}if(http.status>=200&&http.status<=399){if(config.check_mime_type){var type=http.getResponseHeader("Content-Type");if(type==null||!type.match(/^image/i)){return callback(false)}}RetinaImagePath.confirmed_paths.push(that.at_2x_path);return callback(true)}else{return callback(false)}};http.send()}};function RetinaImage(el){this.el=el;this.path=new RetinaImagePath(this.el.getAttribute("src"),this.el.getAttribute("data-at2x"));var that=this;this.path.check_2x_variant(function(hasVariant){if(hasVariant)that.swap()})}root.RetinaImage=RetinaImage;RetinaImage.prototype.swap=function(path){if(typeof path=="undefined")path=this.path.at_2x_path;var that=this;function load(){if(!that.el.complete){setTimeout(load,5)}else{that.el.setAttribute("width",that.el.offsetWidth);that.el.setAttribute("height",that.el.offsetHeight);that.el.setAttribute("src",path)}}load()};if(Retina.isRetina()){Retina.init(root)}})();
\ No newline at end of file
function scroll_to_class(element_class, removed_height) {
var scroll_to = $(element_class).offset().top - removed_height;
if($(window).scrollTop() != scroll_to) {
$('html, body').stop().animate({scrollTop: scroll_to}, 0);
}
}
function bar_progress(progress_line_object, direction) {
var number_of_steps = progress_line_object.data('number-of-steps');
var now_value = progress_line_object.data('now-value');
var new_value = 0;
if(direction == 'right') {
new_value = now_value + ( 100 / number_of_steps );
}
else if(direction == 'left') {
new_value = now_value - ( 100 / number_of_steps );
}
progress_line_object.attr('style', 'width: ' + new_value + '%;').data('now-value', new_value);
}
jQuery(document).ready(function() {
/*
Fullscreen background
*/
$.backstretch("assets/img/backgrounds/1.jpg");
$('#top-navbar-1').on('shown.bs.collapse', function(){
$.backstretch("resize");
});
$('#top-navbar-1').on('hidden.bs.collapse', function(){
$.backstretch("resize");
});
/*
Form
*/
$('.f1 fieldset:first').fadeIn('slow');
$('.f1 input[type="text"], .f1 input[type="password"], .f1 textarea').on('focus', function() {
$(this).removeClass('input-error');
});
// next step
$('.f1 .btn-next').on('click', function() {
var parent_fieldset = $(this).parents('fieldset');
var next_step = true;
// navigation steps / progress steps
var current_active_step = $(this).parents('.f1').find('.f1-step.active');
var progress_line = $(this).parents('.f1').find('.f1-progress-line');
// fields validation
parent_fieldset.find('input[type="text"], input[type="password"], textarea').each(function() {
if( $(this).val() == "" ) {
$(this).addClass('input-error');
next_step = false;
}
else {
$(this).removeClass('input-error');
}
});
// fields validation
if( next_step ) {
parent_fieldset.fadeOut(400, function() {
// change icons
current_active_step.removeClass('active').addClass('activated').next().addClass('active');
// progress bar
bar_progress(progress_line, 'right');
// show next step
$(this).next().fadeIn();
// scroll window to beginning of the form
scroll_to_class( $('.f1'), 20 );
});
}
});
// previous step
$('.f1 .btn-previous').on('click', function() {
// navigation steps / progress steps
var current_active_step = $(this).parents('.f1').find('.f1-step.active');
var progress_line = $(this).parents('.f1').find('.f1-progress-line');
$(this).parents('fieldset').fadeOut(400, function() {
// change icons
current_active_step.removeClass('active').prev().removeClass('activated').addClass('active');
// progress bar
bar_progress(progress_line, 'left');
// show previous step
$(this).prev().fadeIn();
// scroll window to beginning of the form
scroll_to_class( $('.f1'), 20 );
});
});
// submit
$('.f1').on('submit', function(e) {
// fields validation
$(this).find('input[type="text"], input[type="password"], textarea').each(function() {
if( $(this).val() == "" ) {
e.preventDefault();
$(this).addClass('input-error');
}
else {
$(this).removeClass('input-error');
}
});
// fields validation
});
});
This source diff could not be displayed because it is too large. You can view the blob instead.
button.btn {
min-width: 105px;
height: 40px;
margin: 0;
padding: 0 20px;
vertical-align: middle;
border: 0;
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 300;
line-height: 40px;
-moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;
text-shadow: none;
-moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none;
-o-transition: all .3s; -moz-transition: all .3s; -webkit-transition: all .3s; -ms-transition: all .3s; transition: all .3s;
}
button.btn.btn-next,
button.btn.btn-next:focus,
button.btn.btn-next:active:focus, button.btn.btn-next.active:focus { background: #f35b3f; }
button.btn.btn-submit,
button.btn.btn-submit:focus,
button.btn.btn-submit:active:focus, button.btn.btn-submit.active:focus { background: #f35b3f; }
button.btn.btn-previous,
button.btn.btn-previous:focus,
button.btn.btn-previous:active:focus, button.btn.btn-previous.active:focus { background: #bbb; }
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(http://fonts.gstatic.com/s/opensans/v10/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v10/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
}
\ No newline at end of file
......@@ -381,26 +381,6 @@ fieldset[disabled] .btn-primary.active {
background-color: #128f76;
border-color: #11866f;
}
.btn-file {
position: relative;
overflow: hidden;
}
.btn-file input[type=file] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
font-size: 100px;
text-align: right;
filter: alpha(opacity=0);
opacity: 0;
outline: none;
background: white;
cursor: inherit;
display: block;
}
.btn-success:active,
.btn-success.active,
.open .dropdown-toggle.btn-success {
......
/***** Top content *****/
.top-content { padding: 40px 0 170px 0; }
.top-content .text { color: #fff; }
.top-content .text h1 { color: #fff; }
.top-content .description { margin: 20px 0 10px 0; }
.top-content .description p { opacity: 0.8; }
.top-content .description a { color: #fff; }
.top-content .description a:hover,
.top-content .description a:focus { border-bottom: 1px dotted #fff; }
.form-box { padding-top: 40px; }
.f1 {
padding: 25px; background: #fff;
-moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;
}
.f1 h3 { margin-top: 0; margin-bottom: 5px; text-transform: uppercase; }
.f1-steps { overflow: hidden; position: relative; margin-top: 20px; }
.f1-progress { position: absolute; top: 24px; right: 20px; left: 10px; width: 100%; height: 1px; background: #ddd; }
.f1-progress-line { position: absolute; top: 0; left: 20; height: 1px; background: #f35b3f; }
.f1-step { position: relative; float: left ;width: 33.333333%; padding: 0 5px; }
.f1-step-icon {
display: inline-block; width: 40px; height: 40px; margin-top: 4px; background: #ddd;
font-size: 16px; color: #fff; line-height: 40px;
-moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%;
}
.f1-step.activated .f1-step-icon {
background: #fff; border: 1px solid #f35b3f; color: #f35b3f; line-height: 38px;
}
.f1-step.active .f1-step-icon {
width: 48px; height: 48px; margin-top: 0; background: #f35b3f; font-size: 22px; line-height: 48px;
}
.f1-step p { color: #ccc; }
.f1-step.activated p { color: #f35b3f; }
.f1-step.active p { color: #f35b3f; }
.f1 fieldset { display: none; text-align: left; }
.f1-buttons { text-align: right; }
.f1 .input-error { border-color: #f35b3f; }
/*
jQuery twitter bootstrap wizard plugin
Examples and documentation at: http://github.com/VinceG/twitter-bootstrap-wizard
version 1.4.2
Requires jQuery v1.3.2 or later
Supports Bootstrap 2.2.x, 2.3.x, 3.0
Dual licensed under the MIT and GPL licenses:
http://www.opensource.org/licenses/mit-license.php
http://www.gnu.org/licenses/gpl.html
Authors: Vadim Vincent Gabriel (http://vadimg.com), Jason Gill (www.gilluminate.com)
*/
(function(c){var n=function(d,k){d=c(d);var a=this,h=[],b=c.extend({},c.fn.bootstrapWizard.defaults,k),f=null,e=null;this.rebindClick=function(b,a){b.unbind("click",a).bind("click",a)};this.fixNavigationButtons=function(){f.length||(e.find("a:first").tab("show"),f=e.find('li:has([data-toggle="tab"]):first'));c(b.previousSelector,d).toggleClass("disabled",a.firstIndex()>=a.currentIndex());c(b.nextSelector,d).toggleClass("disabled",a.currentIndex()>=a.navigationLength());c(b.nextSelector,d).toggleClass("hidden",
a.currentIndex()>=a.navigationLength()&&0<c(b.finishSelector,d).length);c(b.lastSelector,d).toggleClass("hidden",a.currentIndex()>=a.navigationLength()&&0<c(b.finishSelector,d).length);c(b.finishSelector,d).toggleClass("hidden",a.currentIndex()<a.navigationLength());c(b.backSelector,d).toggleClass("disabled",0==h.length);c(b.backSelector,d).toggleClass("hidden",a.currentIndex()>=a.navigationLength()&&0<c(b.finishSelector,d).length);a.rebindClick(c(b.nextSelector,d),a.next);a.rebindClick(c(b.previousSelector,
d),a.previous);a.rebindClick(c(b.lastSelector,d),a.last);a.rebindClick(c(b.firstSelector,d),a.first);a.rebindClick(c(b.finishSelector,d),a.finish);a.rebindClick(c(b.backSelector,d),a.back);if(b.onTabShow&&"function"===typeof b.onTabShow&&!1===b.onTabShow(f,e,a.currentIndex()))return!1};this.next=function(g){if(d.hasClass("last")||b.onNext&&"function"===typeof b.onNext&&!1===b.onNext(f,e,a.nextIndex()))return!1;g=a.currentIndex();var c=a.nextIndex();c>a.navigationLength()||(h.push(g),e.find('li:has([data-toggle="tab"])'+
(b.withVisible?":visible":"")+":eq("+c+") a").tab("show"))};this.previous=function(g){if(d.hasClass("first")||b.onPrevious&&"function"===typeof b.onPrevious&&!1===b.onPrevious(f,e,a.previousIndex()))return!1;g=a.currentIndex();var c=a.previousIndex();0>c||(h.push(g),e.find('li:has([data-toggle="tab"])'+(b.withVisible?":visible":"")+":eq("+c+") a").tab("show"))};this.first=function(g){if(b.onFirst&&"function"===typeof b.onFirst&&!1===b.onFirst(f,e,a.firstIndex())||d.hasClass("disabled"))return!1;h.push(a.currentIndex());
e.find('li:has([data-toggle="tab"]):eq(0) a').tab("show")};this.last=function(g){if(b.onLast&&"function"===typeof b.onLast&&!1===b.onLast(f,e,a.lastIndex())||d.hasClass("disabled"))return!1;h.push(a.currentIndex());e.find('li:has([data-toggle="tab"]):eq('+a.navigationLength()+") a").tab("show")};this.finish=function(g){if(b.onFinish&&"function"===typeof b.onFinish)b.onFinish(f,e,a.lastIndex())};this.back=function(){if(0==h.length)return null;var a=h.pop();if(b.onBack&&"function"===typeof b.onBack&&
!1===b.onBack(f,e,a))return h.push(a),!1;d.find('li:has([data-toggle="tab"]):eq('+a+") a").tab("show")};this.currentIndex=function(){return e.find('li:has([data-toggle="tab"])'+(b.withVisible?":visible":"")).index(f)};this.firstIndex=function(){return 0};this.lastIndex=function(){return a.navigationLength()};this.getIndex=function(a){return e.find('li:has([data-toggle="tab"])'+(b.withVisible?":visible":"")).index(a)};this.nextIndex=function(){var a=this.currentIndex(),c;do a++,c=e.find('li:has([data-toggle="tab"])'+
(b.withVisible?":visible":"")+":eq("+a+")");while(c&&c.hasClass("disabled"));return a};this.previousIndex=function(){var a=this.currentIndex(),c;do a--,c=e.find('li:has([data-toggle="tab"])'+(b.withVisible?":visible":"")+":eq("+a+")");while(c&&c.hasClass("disabled"));return a};this.navigationLength=function(){return e.find('li:has([data-toggle="tab"])'+(b.withVisible?":visible":"")).length-1};this.activeTab=function(){return f};this.nextTab=function(){return e.find('li:has([data-toggle="tab"]):eq('+
(a.currentIndex()+1)+")").length?e.find('li:has([data-toggle="tab"]):eq('+(a.currentIndex()+1)+")"):null};this.previousTab=function(){return 0>=a.currentIndex()?null:e.find('li:has([data-toggle="tab"]):eq('+parseInt(a.currentIndex()-1)+")")};this.show=function(b){b=isNaN(b)?d.find('li:has([data-toggle="tab"]) a[href="#'+b+'"]'):d.find('li:has([data-toggle="tab"]):eq('+b+") a");0<b.length&&(h.push(a.currentIndex()),b.tab("show"))};this.disable=function(a){e.find('li:has([data-toggle="tab"]):eq('+a+
")").addClass("disabled")};this.enable=function(a){e.find('li:has([data-toggle="tab"]):eq('+a+")").removeClass("disabled")};this.hide=function(a){e.find('li:has([data-toggle="tab"]):eq('+a+")").hide()};this.display=function(a){e.find('li:has([data-toggle="tab"]):eq('+a+")").show()};this.remove=function(a){var b="undefined"!=typeof a[1]?a[1]:!1;a=e.find('li:has([data-toggle="tab"]):eq('+a[0]+")");b&&(b=a.find("a").attr("href"),c(b).remove());a.remove()};var l=function(d){var g=e.find('li:has([data-toggle="tab"])');
d=g.index(c(d.currentTarget).parent('li:has([data-toggle="tab"])'));g=c(g[d]);if(b.onTabClick&&"function"===typeof b.onTabClick&&!1===b.onTabClick(f,e,a.currentIndex(),d,g))return!1},m=function(d){d=c(d.target).parent();var g=e.find('li:has([data-toggle="tab"])').index(d);if(d.hasClass("disabled")||b.onTabChange&&"function"===typeof b.onTabChange&&!1===b.onTabChange(f,e,a.currentIndex(),g))return!1;f=d;a.fixNavigationButtons()};this.resetWizard=function(){c('a[data-toggle="tab"]',e).off("click",l);
c('a[data-toggle="tab"]',e).off("show show.bs.tab",m);e=d.find("ul:first",d);f=e.find('li:has([data-toggle="tab"]).active',d);c('a[data-toggle="tab"]',e).on("click",l);c('a[data-toggle="tab"]',e).on("show show.bs.tab",m);a.fixNavigationButtons()};e=d.find("ul:first",d);f=e.find('li:has([data-toggle="tab"]).active',d);e.hasClass(b.tabClass)||e.addClass(b.tabClass);if(b.onInit&&"function"===typeof b.onInit)b.onInit(f,e,0);if(b.onShow&&"function"===typeof b.onShow)b.onShow(f,e,a.nextIndex());c('a[data-toggle="tab"]',
e).on("click",l);c('a[data-toggle="tab"]',e).on("show show.bs.tab",m)};c.fn.bootstrapWizard=function(d){if("string"==typeof d){var k=Array.prototype.slice.call(arguments,1);1===k.length&&k.toString();return this.data("bootstrapWizard")[d](k)}return this.each(function(a){a=c(this);if(!a.data("bootstrapWizard")){var h=new n(a,d);a.data("bootstrapWizard",h);h.fixNavigationButtons()}})};c.fn.bootstrapWizard.defaults={withVisible:!0,tabClass:"nav nav-pills",nextSelector:".wizard li.next",previousSelector:".wizard li.previous",
firstSelector:".wizard li.first",lastSelector:".wizard li.last",finishSelector:".wizard li.finish",backSelector:".wizard li.back",onShow:null,onInit:null,onNext:null,onPrevious:null,onLast:null,onFirst:null,onFinish:null,onBack:null,onTabChange:null,onTabClick:null,onTabShow:null}})(jQuery);
\ No newline at end of file
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - EASING EQUATIONS
*
* Open source under the BSD License.
*
* Copyright © 2001 Robert Penner
* All rights reserved.
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});
This source diff could not be displayed because it is too large. You can view the blob instead.
/*! Backstretch - v2.0.4 - 2013-06-19
* http://srobbin.com/jquery-plugins/backstretch/
* Copyright (c) 2013 Scott Robbin; Licensed MIT */
(function(a,d,p){a.fn.backstretch=function(c,b){(c===p||0===c.length)&&a.error("No images were supplied for Backstretch");0===a(d).scrollTop()&&d.scrollTo(0,0);return this.each(function(){var d=a(this),g=d.data("backstretch");if(g){if("string"==typeof c&&"function"==typeof g[c]){g[c](b);return}b=a.extend(g.options,b);g.destroy(!0)}g=new q(this,c,b);d.data("backstretch",g)})};a.backstretch=function(c,b){return a("body").backstretch(c,b).data("backstretch")};a.expr[":"].backstretch=function(c){return a(c).data("backstretch")!==p};a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5E3,fade:0};var r={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},s={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},q=function(c,b,e){this.options=a.extend({},a.fn.backstretch.defaults,e||{});this.images=a.isArray(b)?b:[b];a.each(this.images,function(){a("<img />")[0].src=this});this.isBody=c===document.body;this.$container=a(c);this.$root=this.isBody?l?a(d):a(document):this.$container;c=this.$container.children(".backstretch").first();this.$wrap=c.length?c:a('<div class="backstretch"></div>').css(r).appendTo(this.$container);this.isBody||(c=this.$container.css("position"),b=this.$container.css("zIndex"),this.$container.css({position:"static"===c?"relative":c,zIndex:"auto"===b?0:b,background:"none"}),this.$wrap.css({zIndex:-999998}));this.$wrap.css({position:this.isBody&&l?"fixed":"absolute"});this.index=0;this.show(this.index);a(d).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===d.pageYOffset&&(d.scrollTo(0,1),this.resize())},this))};q.prototype={resize:function(){try{var a={left:0,top:0},b=this.isBody?this.$root.width():this.$root.innerWidth(),e=b,g=this.isBody?d.innerHeight?d.innerHeight:this.$root.height():this.$root.innerHeight(),j=e/this.$img.data("ratio"),f;j>=g?(f=(j-g)/2,this.options.centeredY&&(a.top="-"+f+"px")):(j=g,e=j*this.$img.data("ratio"),f=(e-b)/2,this.options.centeredX&&(a.left="-"+f+"px"));this.$wrap.css({width:b,height:g}).find("img:not(.deleteable)").css({width:e,height:j}).css(a)}catch(h){}return this},show:function(c){if(!(Math.abs(c)>this.images.length-1)){var b=this,e=b.$wrap.find("img").addClass("deleteable"),d={relatedTarget:b.$container[0]};b.$container.trigger(a.Event("backstretch.before",d),[b,c]);this.index=c;clearInterval(b.interval);b.$img=a("<img />").css(s).bind("load",function(f){var h=this.width||a(f.target).width();f=this.height||a(f.target).height();a(this).data("ratio",h/f);a(this).fadeIn(b.options.speed||b.options.fade,function(){e.remove();b.paused||b.cycle();a(["after","show"]).each(function(){b.$container.trigger(a.Event("backstretch."+this,d),[b,c])})});b.resize()}).appendTo(b.$wrap);b.$img.attr("src",b.images[c]);return b}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){this.paused=!0;return this},resume:function(){this.paused=!1;this.next();return this},cycle:function(){1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration));return this},destroy:function(c){a(d).off("resize.backstretch orientationchange.backstretch");clearInterval(this.interval);c||this.$wrap.remove();this.$container.removeData("backstretch")}};var l,f=navigator.userAgent,m=navigator.platform,e=f.match(/AppleWebKit\/([0-9]+)/),e=!!e&&e[1],h=f.match(/Fennec\/([0-9]+)/),h=!!h&&h[1],n=f.match(/Opera Mobi\/([0-9]+)/),t=!!n&&n[1],k=f.match(/MSIE ([0-9]+)/),k=!!k&&k[1];l=!((-1<m.indexOf("iPhone")||-1<m.indexOf("iPad")||-1<m.indexOf("iPod"))&&e&&534>e||d.operamini&&"[object OperaMini]"==={}.toString.call(d.operamini)||n&&7458>t||-1<f.indexOf("Android")&&e&&533>e||h&&6>h||"palmGetResource"in d&&e&&534>e||-1<f.indexOf("MeeGo")&&-1<f.indexOf("NokiaBrowser/8.5.0")||k&&6>=k)})(jQuery,window);
\ No newline at end of file
$(document).ready(function(){
$('input[type="text"], input[type="password"], textarea').each(function() {
$(this).val( $(this).attr('placeholder') );
});
});
\ No newline at end of file
/*!
* Retina.js v1.1.0
*
* Copyright 2013 Imulus, LLC
* Released under the MIT license
*
* Retina.js is an open source script that makes it easy to serve
* high-resolution images to devices with retina displays.
*/
(function() {
var root = (typeof exports == 'undefined' ? window : exports);
var config = {
// Ensure Content-Type is an image before trying to load @2x image
// https://github.com/imulus/retinajs/pull/45)
check_mime_type: true
};
root.Retina = Retina;
function Retina() {}
Retina.configure = function(options) {
if (options == null) options = {};
for (var prop in options) config[prop] = options[prop];
};
Retina.init = function(context) {
if (context == null) context = root;
var existing_onload = context.onload || new Function;
context.onload = function() {
var images = document.getElementsByTagName("img"), retinaImages = [], i, image;
for (i = 0; i < images.length; i++) {
image = images[i];
retinaImages.push(new RetinaImage(image));
}
existing_onload();
}
};
Retina.isRetina = function(){
var mediaQuery = "(-webkit-min-device-pixel-ratio: 1.5),\
(min--moz-device-pixel-ratio: 1.5),\
(-o-min-device-pixel-ratio: 3/2),\
(min-resolution: 1.5dppx)";
if (root.devicePixelRatio > 1)
return true;
if (root.matchMedia && root.matchMedia(mediaQuery).matches)
return true;
return false;
};
root.RetinaImagePath = RetinaImagePath;
function RetinaImagePath(path, at_2x_path) {
this.path = path;
if (typeof at_2x_path !== "undefined" && at_2x_path !== null) {
this.at_2x_path = at_2x_path;
this.perform_check = false;
} else {
this.at_2x_path = path.replace(/\.\w+$/, function(match) { return "@2x" + match; });
this.perform_check = true;
}
}
RetinaImagePath.confirmed_paths = [];
RetinaImagePath.prototype.is_external = function() {
return !!(this.path.match(/^https?\:/i) && !this.path.match('//' + document.domain) )
}
RetinaImagePath.prototype.check_2x_variant = function(callback) {
var http, that = this;
if (this.is_external()) {
return callback(false);
} else if (!this.perform_check && typeof this.at_2x_path !== "undefined" && this.at_2x_path !== null) {
return callback(true);
} else if (this.at_2x_path in RetinaImagePath.confirmed_paths) {
return callback(true);
} else {
http = new XMLHttpRequest;
http.open('HEAD', this.at_2x_path);
http.onreadystatechange = function() {
if (http.readyState != 4) {
return callback(false);
}
if (http.status >= 200 && http.status <= 399) {
if (config.check_mime_type) {
var type = http.getResponseHeader('Content-Type');
if (type == null || !type.match(/^image/i)) {
return callback(false);
}
}
RetinaImagePath.confirmed_paths.push(that.at_2x_path);
return callback(true);
} else {
return callback(false);
}
}
http.send();
}
}
function RetinaImage(el) {
this.el = el;
this.path = new RetinaImagePath(this.el.getAttribute('src'), this.el.getAttribute('data-at2x'));
var that = this;
this.path.check_2x_variant(function(hasVariant) {
if (hasVariant) that.swap();
});
}
root.RetinaImage = RetinaImage;
RetinaImage.prototype.swap = function(path) {
if (typeof path == 'undefined') path = this.path.at_2x_path;
var that = this;
function load() {
if (! that.el.complete) {
setTimeout(load, 5);
} else {
that.el.setAttribute('width', that.el.offsetWidth);
that.el.setAttribute('height', that.el.offsetHeight);
that.el.setAttribute('src', path);
}
}
load();
}
if (Retina.isRetina()) {
Retina.init(root);
}
})();
/*!
* Retina.js v1.1.0
*
* Copyright 2013 Imulus, LLC
* Released under the MIT license
*
* Retina.js is an open source script that makes it easy to serve
* high-resolution images to devices with retina displays.
*/
(function(){var root=typeof exports=="undefined"?window:exports;var config={check_mime_type:true};root.Retina=Retina;function Retina(){}Retina.configure=function(options){if(options==null)options={};for(var prop in options)config[prop]=options[prop]};Retina.init=function(context){if(context==null)context=root;var existing_onload=context.onload||new Function;context.onload=function(){var images=document.getElementsByTagName("img"),retinaImages=[],i,image;for(i=0;i<images.length;i++){image=images[i];retinaImages.push(new RetinaImage(image))}existing_onload()}};Retina.isRetina=function(){var mediaQuery="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";if(root.devicePixelRatio>1)return true;if(root.matchMedia&&root.matchMedia(mediaQuery).matches)return true;return false};root.RetinaImagePath=RetinaImagePath;function RetinaImagePath(path,at_2x_path){this.path=path;if(typeof at_2x_path!=="undefined"&&at_2x_path!==null){this.at_2x_path=at_2x_path;this.perform_check=false}else{this.at_2x_path=path.replace(/\.\w+$/,function(match){return"@2x"+match});this.perform_check=true}}RetinaImagePath.confirmed_paths=[];RetinaImagePath.prototype.is_external=function(){return!!(this.path.match(/^https?\:/i)&&!this.path.match("//"+document.domain))};RetinaImagePath.prototype.check_2x_variant=function(callback){var http,that=this;if(this.is_external()){return callback(false)}else if(!this.perform_check&&typeof this.at_2x_path!=="undefined"&&this.at_2x_path!==null){return callback(true)}else if(this.at_2x_path in RetinaImagePath.confirmed_paths){return callback(true)}else{http=new XMLHttpRequest;http.open("HEAD",this.at_2x_path);http.onreadystatechange=function(){if(http.readyState!=4){return callback(false)}if(http.status>=200&&http.status<=399){if(config.check_mime_type){var type=http.getResponseHeader("Content-Type");if(type==null||!type.match(/^image/i)){return callback(false)}}RetinaImagePath.confirmed_paths.push(that.at_2x_path);return callback(true)}else{return callback(false)}};http.send()}};function RetinaImage(el){this.el=el;this.path=new RetinaImagePath(this.el.getAttribute("src"),this.el.getAttribute("data-at2x"));var that=this;this.path.check_2x_variant(function(hasVariant){if(hasVariant)that.swap()})}root.RetinaImage=RetinaImage;RetinaImage.prototype.swap=function(path){if(typeof path=="undefined")path=this.path.at_2x_path;var that=this;function load(){if(!that.el.complete){setTimeout(load,5)}else{that.el.setAttribute("width",that.el.offsetWidth);that.el.setAttribute("height",that.el.offsetHeight);that.el.setAttribute("src",path)}}load()};if(Retina.isRetina()){Retina.init(root)}})();
\ No newline at end of file
function scroll_to_class(element_class, removed_height) {
var scroll_to = $(element_class).offset().top - removed_height;
if($(window).scrollTop() != scroll_to) {
$('html, body').stop().animate({scrollTop: scroll_to}, 0);
}
}
function bar_progress(progress_line_object, direction) {
var number_of_steps = progress_line_object.data('number-of-steps');
var now_value = progress_line_object.data('now-value');
var new_value = 0;
if(direction == 'right') {
new_value = now_value + ( 100 / number_of_steps );
}
else if(direction == 'left') {
new_value = now_value - ( 100 / number_of_steps );
}
progress_line_object.attr('style', 'width: ' + new_value + '%;').data('now-value', new_value);
}
jQuery(document).ready(function() {
/*
Fullscreen background
*/
$.backstretch("assets/img/backgrounds/1.jpg");
$('#top-navbar-1').on('shown.bs.collapse', function(){
$.backstretch("resize");
});
$('#top-navbar-1').on('hidden.bs.collapse', function(){
$.backstretch("resize");
});
/*
Form
*/
$('.f1 fieldset:first').fadeIn('slow');
$('.f1 input[type="text"], .f1 input[type="password"], .f1 textarea').on('focus', function() {
$(this).removeClass('input-error');
});
// next step
$('.f1 .btn-next').on('click', function() {
var parent_fieldset = $(this).parents('fieldset');
var next_step = true;
// navigation steps / progress steps
var current_active_step = $(this).parents('.f1').find('.f1-step.active');
var progress_line = $(this).parents('.f1').find('.f1-progress-line');
// fields validation
parent_fieldset.find('input[type="text"], input[type="password"], textarea').each(function() {
if( $(this).val() == "" ) {
$(this).addClass('input-error');
next_step = false;
}
else {
$(this).removeClass('input-error');
}
});
// fields validation
if( next_step ) {
parent_fieldset.fadeOut(400, function() {
// change icons
current_active_step.removeClass('active').addClass('activated').next().addClass('active');
// progress bar
bar_progress(progress_line, 'right');
// show next step
$(this).next().fadeIn();
// scroll window to beginning of the form
scroll_to_class( $('.f1'), 20 );
});
}
});
// previous step
$('.f1 .btn-previous').on('click', function() {
// navigation steps / progress steps
var current_active_step = $(this).parents('.f1').find('.f1-step.active');
var progress_line = $(this).parents('.f1').find('.f1-progress-line');
$(this).parents('fieldset').fadeOut(400, function() {
// change icons
current_active_step.removeClass('active').prev().removeClass('activated').addClass('active');
// progress bar
bar_progress(progress_line, 'left');
// show previous step
$(this).prev().fadeIn();
// scroll window to beginning of the form
scroll_to_class( $('.f1'), 20 );
});
});
// submit
$('.f1').on('submit', function(e) {
// fields validation
$(this).find('input[type="text"], input[type="password"], textarea').each(function() {
if( $(this).val() == "" ) {
e.preventDefault();
$(this).addClass('input-error');
}
else {
$(this).removeClass('input-error');
}
});
// fields validation
});
});
$(document).ready(function(){
jQuery('#sucess').hide();
var current_fs, next_fs, previous_fs; //fieldsets
var left, opacity, scale; //fieldset properties which we will animate
var animating; //flag to prevent quick multi-click glitches
$(".next").click(function(event){
var fv=formValidation(event);
if(fv){
}else{
return false;
}
if(animating) return false;
animating = true;
current_fs = $(this).parent();
next_fs = $(this).parent().next();
//activate next step on progressbar using the index of next_fs
$("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
//show the next fieldset
next_fs.show();
//hide the current fieldset with style
current_fs.animate({opacity: 0}, {
step: function(now, mx) {
//as the opacity of current_fs reduces to 0 - stored in "now"
//1. scale current_fs down to 80%
scale = 1 - (1 - now) * 0.2;
//2. bring next_fs from the right(50%)
left = (now * 50)+"%";
//3. increase opacity of next_fs to 1 as it moves in
opacity = 1 - now;
current_fs.css({'transform': 'scale('+scale+')'});
next_fs.css({'left': left, 'opacity': opacity});
},
duration: 800,
complete: function(){
current_fs.hide();
animating = false;
},
//this comes from the custom easing plugin
easing: 'easeInOutBack'
});
});
$(".previous").click(function(){
if(animating) return false;
animating = true;
current_fs = $(this).parent();
previous_fs = $(this).parent().prev();
//de-activate current step on progressbar
$("#progressbar li").eq($("fieldset").index(current_fs)).removeClass("active");
//show the previous fieldset
previous_fs.show();
//hide the current fieldset with style
current_fs.animate({opacity: 0}, {
step: function(now, mx) {
//as the opacity of current_fs reduces to 0 - stored in "now"
//1. scale previous_fs from 80% to 100%
scale = 0.8 + (1 - now) * 0.2;
//2. take current_fs to the right(50%) - from 0%
left = ((1-now) * 50)+"%";
//3. increase opacity of previous_fs to 1 as it moves in
opacity = 1 - now;
current_fs.css({'left': left});
previous_fs.css({'transform': 'scale('+scale+')', 'opacity': opacity});
},
duration: 800,
complete: function(){
current_fs.hide();
animating = false;
},
//this comes from the custom easing plugin
easing: 'easeInOutBack'
});
});
$("#msform").submit(function(){
var fname=jQuery('#fname').val();
if ($.trim(fname).length == 0) {
document.getElementById("fname").style.borderColor = "#E34234";
jQuery('.fs-error').html('<span style="color:red;"> Please Enter First Name !</span>');
jQuery('.fs-error').show();
return false;
}
else{
jQuery('.fs-error').hide();
var serializedReturn = formData();
window.location = "http://localhost/multistepform/success.php";
return false;
}
});
});
function formData() {
var serializedValues = jQuery("#msform").serialize();
var form_data = {
action: 'ajax_data',
type: 'post',
data: serializedValues,
};
jQuery.post('insert.php', form_data, function(response) {
alert(response);
// document.getElementById("sucess").style.color = "#006600";
// jQuery('#sucess').show();
});
return serializedValues;
}
function formValidation(e){
var emailval=jQuery('#email').val();
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
// Checking Empty Fields
var vemail=mailformat.test(emailval)
if ($.trim(emailval).length == 0 || vemail==false) {
jQuery('.fs-error').html('<span style="color:red;"> Email is invalid !</span>');
return false;
}
else{
jQuery('.fs-error').hide();
}
var pass1 = document.getElementById("pass").value;
var pass2 = document.getElementById("cpass").value;
if (pass1 != pass2 || pass1 == '') {
//alert("Passwords Do not match");
document.getElementById("pass").style.borderColor = "#E34234";
document.getElementById("cpass").style.borderColor = "#E34234";
jQuery('.fs-error').html('<span style="color:red;"> Passords do not match !</span>');
jQuery('.fs-error').show();
return false
}
else {
document.getElementById("pass").style.borderColor = "#006600";
document.getElementById("cpass").style.borderColor = "#006600";
jQuery('.fs-error').hide();
return true;
}
}
......@@ -15,7 +15,7 @@
<label for="username" class="col-md-4 control-label">Username</label>
<div class="col-md-6">
<input id="username" type="username" class="form-control" name="username" value="{{ old('username') }}" required autofocus>
<input id="username" type="username" class="form-control" name="username" required autofocus>
@if ($errors->has('username'))
<span class="help-block">
......
......@@ -9,18 +9,21 @@
<div class="content table-responsive table-full-width" id="table">
<table class="table table-borderless">
<tr>
<th>No</th>
<th>No Pendaftar</th>
<th>Nama</th>
<th>Asal Sekolah</th>
<th>Status</th>
<th></th>
</tr>
<?php $no =1?>
<tr>
@foreach($pendaftar as $pen)
<td>{{$no++}}</td>
<td>{{$pen->no_pendaftar}}</td>
<td>{{$pen->nama}}</td>
<td>{{$as->nama_sekolah}}</td>
<td>{{$pen->status}}</td>
</tr>
@endforeach
</table>
</div>
</div>
......
@extends('layouts.Layout')
@section('content')
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title">Data</h4>
<p class="category"></p>
<div id="rootwizard">
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<button class="btn btn-secondary"><a href="#tab1" data-toggle="tab">Data Diri</a></button>
<button class="btn btn-secondary"><a href="#tab2" data-toggle="tab">Periodik</a></button>
<button class="btn btn-secondary"><a href="#tab3" data-toggle="tab">Asal sekolah</a></button>
<button class="btn btn-secondary"><a href="#tab4" data-toggle="tab">Orangtua</a></button>
<button class="btn btn-secondary"><a href="#tab5" data-toggle="tab">Prestasi</a></button>
@if(@$kartu->status != 'Request')
<button class="btn btn-primary-right"><a href="{{url('calonsiswa/getPDF/kartu')}}"><i class="glyphicon glyphicon-download"></i> Cetak Kartu Ujian</a>
</button>
@endif
</div>
</div>
</div>
<div class="tab-content">
<div class="tab-pane" id="tab1">
<div class="col-md-12">
<div class="card">
<div class="content">
<p>No Pendaftar : {{@$kartu->no_pendaftar}}</p>
<p>Nama : {{@$kartu->nama}}</p>
<p>Jenis Kelamin : {{@$kartu->jeniskelamin}}</p>
<p>Tempat/Tanggal lahir : {{@$kartu->tempatlahir}}/{{@$kartu->tanggallahir}}</p>
<p>Agama : {{@$kartu->agama}}</p>
<p>Alamat : {{@$kartu->alamat}}</p>
<p>Berkebutuhan Khusus : {{@$kartu->kebutuhan_khusus}}</p>
<p>No Telp : {{@$kartu->no_hp}}</p>
</div>
</div>
<div>
<a href="{{route('pendaftar.edit',$kartu->id)}}" class="btn btn-primary">Edit</a>
</div>
</div>
</div>
<div class="tab-pane" id="tab2">
<div class="col-md-12">
<div class="card">
<div class="content">
<p>Tinggi badan : {{@$periodik->tinggi_badan}} meter</p>
<p>Berat badan : {{@$periodik->berat_badan}} Kg</p>
<p>Jarak kesekolah : {{@$periodik->jarak_kesekolah}} meter</p>
<p>Waktu tempuh ke sekolah : {{@$periodik->waktu_tempuh}} menit</p>
<p>Saudara kandung : {{@$periodik->jumlah_saudara}} orang</p>
</div>
</div>
<div>
<a href="{{route('periodik.edit',$kartu->id)}}" class="btn btn-primary">Edit</a>
</div>
</div>
</div>
<div class="tab-pane" id="tab3">
<div class="col-md-12">
<div class="card">
<div class="content">
<p>Nama Sekolah : {{@$smp->nama_sekolah}}</p>
<p>Alamat Sekolah : {{@$smp->alamat_sekolah}}</p>
<p>NISN : {{@$smp->nisn}}</p>
<p>NIK : {{@$smp->nik}}</p>
<p>Nomor Ijazah : {{@$smp->no_ijazah}}</p>
<p>Nomor SKHUN : {{@$smp->no_skhun}}</p>
<p>Nomor Ujian Nasional : {{@$smp->no_ujiannasional}}</p>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="tab4">
<div class="col-md-12">
<div class="card">
<div class="content">
<h5>Data Ayah</h5>
<p>Nama : {{@$ot->nama_ayah}}</p>
<p>Tahun lahir : {{@$ot->tahun_lahir_ayah}}</p>
<p>NIK : {{@$ot->nik_ayah}}</p>
<p>Berkebutuhan Khusus : {{@$ot->kebutuhan_khus_ayah}}</p>
<p>Pekerjaan : {{@$ot->pekerjaan_ayah}}</p>
<p>Pendidikan : {{@$ot->pendidikan_ayah}}</p>
<p>Penghasilan Per Bulan: {{@$ot->penghasilan_bulanan_ayah}}</p>
<h5>Data Ibu</h5>
<p>Nama : {{@$ot->nama_ibu}}</p>
<p>Tahun lahir : {{@$ot->tahun_lahir_ibu}}</p>
<p>NIK : {{@$ot->nik_ibu}}</p>
<p>Berkebutuhan Khusus : {{@$ot->kebutuhan_khus_ibu}}</p>
<p>Pekerjaan : {{@$ot->pekerjaan_ibu}}</p>
<p>Pendidikan : {{@$ot->pendidikan_ibu}}</p>
<p>Penghasilan Per Bulan: {{@$ot->penghasilan_bulanan_ibu}}</p>
</div>
</div>
</div>
</div>
<div class="content">
<p>No Pendaftar : {{$kartu->no_pendaftar}}</p>
<p>Nama : {{$kartu->nama}}</p>
<p>Jenis Kelamin : {{$kartu->jeniskelamin}}</p>
<p>NISN : {{$kartu->nisn}}</p>
<p>No Seri Ijazah : {{$kartu->no_serijazah}}</p>
<p>No Seri SKHUN : {{$kartu->no_seriskhun}}</p>
<p>No Ujian Nasional : {{$kartu->no_ujiannasional}}</p>
<p>NIK : {{$kartu->nik}}</p>
<p>Tempat/Tanggal lahir : {{$kartu->tempatlahir}}/{{$kartu->tanggallahir}}</p>
<p>Agama : {{$kartu->agama}}</p>
<p>Alamat : {{$kartu->alamat}}</p>
<p>Berkebutuhan Khusus : {{$kartu->kebutuhan_khusus}}</p>
<p>Transportasi Ke Sekolah : {{$kartu->alat_transport}}</p>
<p>Jenis Tinggal : {{$kartu->jenistinggal}}</p>
<p>No Telp : {{$kartu->no_tlp_rumah}}</p>
<button class="btn btn-primary"><a href="{{url('calonsiswa/getPDF')}}" ><i class="glyphicon glyphicon-download"></i>Download</a></button>
<div class="tab-pane" id="tab5">
<div class="col-md-12">
<div class="card">
<div class="content">
<p>Jenis Prestasi : {{@$pres->jenis_prestasi}}</p>
<p>Nama Prestasi : {{@$pres->nama_prestasi}}</p>
<p>Tahun : {{@$pres->tahun_prestasi}}</p>
<p>Penyelenggara: {{@$pres->penyelenggara}}</p>
</div>
</div>
</div>
</div>
</div>
</div>
......
<style type="text/css">
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.normal1{
width: 600px;
height: 170px;
border: 1px solid black;
width: 550px;
height: 130px;
border: 0.1px solid black;
text-align: center;
}
.normal2{
width: 600px;
height: 330px;
width: 550px;
height: 370px;
border: 1px solid black;
text-align: center;
}
.table{
margin-top: 15px;
margin-left: 10px;
}
.size {
padding-bottom: 210px;
text-align: center;
margin-top: -50px;
margin-left: 50px;
text-align: center;
}
</style>
</head>
<div class="normal1"> <img src="images/logo.png" style="padding-right:30em" />
<h3 class="size">KARTU PESERTA UJIAN MASUK <br>SMA N 2 BALIGE <br>TAHUN 2017</h3>
</div>
<div class="normal2">
.img{
margin-left: -430px;
margin-top: 25px;
}
.img1{
margin-top: 25px;
}
a{
margin-top: 90px;
margin-left: 210px;
}
p{
margin-top: -120px;
margin-left: 210px
}
</style>
</head>
<body>
<div class="normal2">
<div class="container">
<br/>
<div class="normal1"> <img class="img1" src="images/logo.png" style="padding-right:25em" />
<h3 class="size">KARTU PESERTA UJIAN MASUK <br>SMA N 2 BALIGE <br>TAHUN 2017</h3>
</div>
<div class="panel panel-info">
<div class="panel-body">
<table class="table">
@foreach ($pendaftar as $value)
<tr>
<td>Nomor Peserta</td><td>:</td><td>{{ $value->no_pendaftar }}</td>
</tr>
<tr>
<td>Nama Peserta</td><td>:</td><td>{{ $value->nama }}</td>
</tr>
<tr>
<td>Tempat/Tgl Lahir</td><td>:</td><td>{{ $value->tempatlahir }}/{{ $value->tanggallahir }}</td>
</tr>
@endforeach
</table>
<div>
<img class="img" src="images/PasPhoto.png" />
<div class="panel-body">
<table class="table">
@foreach ($pendaftar as $value)
<tr>
<td>Nomor Peserta</td><td><td><td><td><td><td><td>{{ $value->id }}</td>
</tr>
<tr>
<td>Nama Peserta</td><td><td><td><td><td><td><td>{{ $value->nama }}</td>
</tr>
<tr>
<td>Tempat/Tgl Lahir</td><td><td><td><td><td><td><td>{{ $value->tempatlahir }}</td>
</tr>
@endforeach
</table>
<table>
<tr><p></p><?php
echo date('d F Y');
?>
<br>
<td><td><td><td><img src="images/PasPhoto.png" /></td>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<br><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Aldon Samosir, S.Pd., M.Si
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NIP. 1971122411998011001</td>
Kepala Sekolah Penyelenggara,</br>
</tr>
</table>
</div>
<p>Balige, <?php echo date('d F Y');?><br><br><br>
Aldon Samosir, S.Pd., M.Si <br>
NIP. 1971122411998011001<br>
Kepala Sekolah Penyelenggara,</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
......@@ -4,33 +4,100 @@
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title">{{$title}}</h4>
<h4 class="title">Ubah Data</h4>
<p class="category"></p>
</div>
<div class="content">
<form action="{{route('pendaftar.update',$pendaftar->id_pendaftar)}}" method="POST">
<form action="{{route('pendaftar.update',$kartu->id)}}" method="POST">
{{ csrf_field() }}
<input type="hidden" name="_method" value="PUT">
<input type="hidden" name="peng_id" value="{{$pendaftar->id}}">
<input type="hidden" name="id_pendaftar" value="{{$kartu->id}}">
<div class="row">
<div class="col-md-5">
<div class="form-group @if($errors->has('judul')) has-error @endif">
<label>Judul</label>
<input type="text" class="form-control border-input" value="{{$pendaftar->judul}}" name="judul">
<span id="helpBlock2" class="help-block">{{$errors->first('judul')}}</span>
<div class="col-lg-6">
<div class="form-group @if($errors->has('nama')) has-error @endif">
<input type="text" class="form-control border-input" value="{{$kartu->nama}}" name="nama" placeholder="Nama Lengkap">
<span id="helpBlock2" class="help-block" >{{$errors->first('nama')}}</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10">
<div class="form-group @if($errors->has('keterangan')) has-error @endif">
<label>Keterangan</label>
<input type="text" class="form-control border-input" value="{{$pendaftar->keterangan}}" name="keterangan">
<span id="helpBlock2" class="help-block">{{$errors->first('nama_mk')}}</span>
<div class="col-lg-3">
<div class="form-group @if($errors->has('jeniskelamin')) has-error @endif">
<select class="form-control border-input" value="{{$kartu->jeniskelamin}}" name="jeniskelamin">
<option class="0" disabled="true" >---Jenis Kelamin---</option>
<option>Perempuan</option>
<option>Laki-laki</option>
</select>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="form-group @if($errors->has('agama')) has-error @endif">
<select class="form-control border-input" value="{{$kartu->agama}}" name="agama">
<option class="0" disabled="true" >---Pilih Agama---</option>
<option>Kristen Protestan</option>
<option>Kristen Katolik</option>
<option>Islam</option>
<option>Hindu</option>
<option>Buddha</option>
<option>Konghuchu</option>
</select>
<span id="helpBlock2" class="help-block">{{$errors->first('agama')}}</span>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-2">
<div class="form-group @if($errors->has('tempatlahir')) has-error @endif">
<input type="text" class="form-control border-input" value="{{$kartu->tempatlahir}}" name="tempatlahir" placeholder="Tempat lahir">
<span id="helpBlock2" class="help-block">{{$errors->first('tempatlahir')}}</span>
</div>
</div>
<div class="col-lg-2">
<div class="form-group @if($errors->has('tanggallahir')) has-error @endif">
<input type="date" class="form-control border-input" value="{{$kartu->tanggallahir}}" name="tanggallahir" placeholder="Tanggal lahir">
<span id="helpBlock2" class="help-block">{{$errors->first('tanggallahir')}}</span>
</div>
</div>
<div class="col-lg-3">
<div class="form-group @if($errors->has('kebutuhan_khusus')) has-error @endif">
<select class="form-control border-input" value="{{$kartu->kebutuhan_khusus}}" name="kebutuhan_khusus">
<option class="0" disabled="true">Berkebutuhan khusus ?</option>
<option>Tidak</option>
<option>Netra(A)</option>
<option>Rungu</option>
<option>Grahita Ringan</option>
<option>Grahita Sedang</option>
<option>Daksa Ringan</option>
<option>Daksa Sedang</option>
<option>Laras</option>
<option>Wicara</option>
<option>Hiper Aktif</option>
<option>Cerdas Istimewa</option>
<option>Bakat Istimewa</option>
<option>Kesulitan Belajar</option>
<option>Narkoba</option>
<option>Indigo</option>
<option>Autis</option>
<option>Down Sindrome</option>
<option>Lainnya</option>
</select>
<span id="helpBlock2" class="help-block">{{$errors->first('kebutuhan_khusus')}}</span>
</div>
</div>
<div class="col-lg-3">
<div class="form-group @if($errors->has('alamat')) has-error @endif">
<input type="text" class="form-control border-input" value="{{$kartu->alamat}}" name="alamat" placeholder="Alamat Lengkap">
<span id="helpBlock2" class="help-block">{{$errors->first('alamat')}}</span>
</div>
</div>
<div class="col-lg-2">
<div class="form-group @if($errors->has('no_hp')) has-error @endif">
<input type="text" class="form-control border-input" value="{{$kartu->no_hp}}" name="no_hp" placeholder="Nomor Telepon">
<span id="helpBlock2" class="help-block">{{$errors->first('no_hp')}}</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
......
@extends('layouts.Layout')
@section('content')
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title">Ubah Data</h4>
<p class="category"></p>
</div>
<div class="content">
<form action="{{route('periodik.update',$kartu->id)}}" method="POST">
{{ csrf_field() }}
<input type="hidden" name="_method" value="PUT">
<input type="hidden" name="id_pendaftar" value="{{$kartu->id}}">
<div class="row">
<div class="col-lg-2">
<div class="form-group @if($errors->has('tinggi_badan')) has-error @endif">
<input type="text" placeholder="Tinggi badan (CM)" class="form-control border-input" value="{{$kartu->tinggi_badan}}" name="tinggi_badan">
<span id="helpBlock2" class="help-block">{{$errors->first('tinggi_badan')}}</span>
</div>
</div>
<div class="col-lg-2">
<div class="form-group @if($errors->has('berat_badan')) has-error @endif">
<input type="text" placeholder="Berat badan (KG)" class="form-control border-input" value="{{$kartu->berat_badan}}" name="berat_badan">
<span id="helpBlock2" class="help-block">{{$errors->first('berat_badan')}}</span>
</div>
</div>
<div class="col-lg-3">
<div class="form-group @if($errors->has('jarak_kesekolah')) has-error @endif">
<input type="text" placeholder="Jarak rumah ke sekolah (M)" class="form-control border-input" value="{{$kartu->jarak_kesekolah}}" name="jarak_kesekolah">
<span id="helpBlock2" class="help-block">{{$errors->first('jarak_kesekolah')}}</span>
</div>
</div>
<div class="col-lg-3">
<div class="form-group @if($errors->has('waktu_tempuh')) has-error @endif">
<input type="text" placeholder="Waktu tempuh (Menit)" class="form-control border-input" value="{{$kartu->waktu_tempuh}}" name="waktu_tempuh">
<span id="helpBlock2" class="help-block">{{$errors->first('waktu_tempuh')}}</span>
</div>
</div>
<div class="col-md-2">
<div class="form-group @if($errors->has('jumlah_saudara')) has-error @endif">
<input type="text" placeholder="Jumlah Saudara" class="form-control border-input" value="{{$kartu->jumlah_saudara}}" name="jumlah_saudara">
<span id="helpBlock2" class="help-block">{{$errors->first('jumlah_saudara')}}</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<a href="{{ route('periodik.index')}}" class="btn btn-default">Cancel</a>
<input type="submit" class="btn btn-default">
</div>
</div>
</form>
</div>
</div>
</div>
@endsection
\ No newline at end of file
@extends('layouts.Layout')
@section('content')
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title">{{$title}}</h4>
<p class="category"></p>
</div>
<div class="content">
<form action="{{route('prestasi.store')}}" method="POST">
{{ csrf_field() }}
<h4 class="title">{{$title}}</h4>
<p class="category"></p>
</div>
<div class="content">
<form action="{{route('prestasi.store')}}" method="POST">
{{ csrf_field() }}
<div class="row">
<div class="col-md-10">
<div class="form-group @if($errors->has('jenis_prestasi')) has-error @endif">
<label>Jenis Prestasi</label>
<input type="text" class="form-control border-input" value="{{old('jenis_prestasi')}}" name="jenis_prestasi">
<span id="helpBlock2" class="help-block">{{$errors->first('jenis_prestasi')}}</span>
</div>
</div>
<div class="col-md-10">
<div class="form-group @if($errors->has('jenis_prestasi')) has-error @endif">
<label>Jenis Prestasi</label>
<input type="text" placeholder="Isi tinggi badan dalam cm" class="form-control border-input" value="{{old('jenis_prestasi')}}" name="jenis_prestasi">
<span id="helpBlock2" class="help-block">{{$errors->first('jenis_prestasi')}}</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10">
<div class="form-group @if($errors->has('nama_prestasi')) has-error @endif">
<label>Nama Prestasi</label>
<input type="text" class="form-control border-input" value="{{old('nama_prestasi')}}" name="nama_prestasi">
<span id="helpBlock2" class="help-block">{{$errors->first('nama_prestasi')}}</span>
</div>
</div>
<div class="col-md-10">
<div class="form-group @if($errors->has('nama_prestasi')) has-error @endif">
<label>Nama Prestasi</label>
<input type="text" placeholder="Isi berat badan dalam kg" class="form-control border-input" value="{{old('nama_prestasi')}}" name="nama_prestasi">
<span id="helpBlock2" class="help-block">{{$errors->first('nama_prestasi')}}</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10">
<div class="form-group @if($errors->has('tahun_prestasi')) has-error @endif">
<label>Tahun Prestasi</label>
<input type="text" class="form-control border-input" value="{{old('tahun_prestasi')}}" name="tahun_prestasi">
<span id="helpBlock2" class="help-block">{{$errors->first('tahun_prestasi')}}</span>
</div>
</div>
<div class="col-md-10">
<div class="form-group @if($errors->has('tahun_prestasi')) has-error @endif">
<label>Tahun Prestasi</label>
<input type="text" placeholder="Isi jarak rumah ke sekolah dalam meter" class="form-control border-input" value="{{old('tahun_prestasi')}}" name="tahun_prestasi">
<span id="helpBlock2" class="help-block">{{$errors->first('tahun_prestasi')}}</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10">
<div class="form-group @if($errors->has('penyelenggara')) has-error @endif">
<label>Penyelenggara</label>
<input type="text" class="form-control border-input" value="{{old('penyelenggara')}}" name="penyelenggara">
<span id="helpBlock2" class="help-block">{{$errors->first('penyelenggara')}}</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10">
<div class="form-group @if($errors->has('jenis_beasiswa')) has-error @endif">
<label>Jenis Beasiswa</label>
<input type="text" class="form-control border-input" value="{{old('jenis_beasiswa')}}" name="jenis_beasiswa">
<span id="helpBlock2" class="help-block">{{$errors->first('jenis_beasiswa')}}</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10">
<div class="form-group @if($errors->has('tahun_mulai')) has-error @endif">
<label>Tahun mulai</label>
<input type="text" class="form-control border-input" value="{{old('tahun_mulai')}}" name="tahun_mulai">
<span id="helpBlock2" class="help-block">{{$errors->first('tahun_mulai')}}</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10">
<div class="form-group @if($errors->has('tahun_selesai')) has-error @endif">
<label>Tahun selesai</label>
<input type="text" class="form-control border-input" value="{{old('tahun_selesai')}}" name="tahun_selesai">
<span id="helpBlock2" class="help-block">{{$errors->first('tahun_selesai')}}</span>
</div>
</div>
</div>
<div class="col-md-10">
<div class="form-group @if($errors->has('penyelenggara')) has-error @endif">
<label>Penyelenggara</label>
<input type="text" placeholder="Isi waktu tempuh ke sekolah dalam menit" class="form-control border-input" value="{{old('penyelenggara')}}" name="penyelenggara">
<span id="helpBlock2" class="help-block">{{$errors->first('penyelenggara')}}</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<input type="submit" class="btn btn-default">
</div>
<div class="col-md-12">
<input type="submit" class="btn btn-default">
</div>
</div>
</form>
</div>
</form>
</div>
</div>
</div>
\ No newline at end of file
</div>
@endsection
\ No newline at end of file
......@@ -11,6 +11,7 @@
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<meta name="viewport" content="width=device-width" />
<link href="{{ asset('css/style.css') }}" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="{{asset('css/bootstrap.min.css')}}" rel="stylesheet" />
......@@ -30,8 +31,11 @@
<link href='https://fonts.googleapis.com/css?family=Muli:400,300' rel='stylesheet' type='text/css'>
<link href="{{asset('css/themify-icons.css')}}" rel="stylesheet">
<link href="{{asset('css/style.css')}}" rel="stylesheet" />
<link href="{{asset('css/css/style.css')}}" rel="stylesheet" />
<link href="{{asset('css/css/bootstrap.min.css')}}" rel="stylesheet" />
<link href="{{asset('css/css/form-elements.css')}}" rel="stylesheet" />
</head>
<body>
......@@ -98,8 +102,14 @@
<script src="{{asset('js/bootstrap.min.js') }}"></script>
<script src="{{asset('js/app.js')}}"></script>
@show
<script src="{{asset('js/jquery-3.1.1.js')}}"></script>
<script src="{{ asset('js/jquery.bootstrap.wizard.min.js') }}"></script>
<script src="{{ asset('js/script.js') }}"></script>
<script src="{{ asset('js/jswizrd/jquery.backstretch.min.js') }}"></script>
<script src="{{ asset('js/jswizrd/retina-1.1.0.min.js') }}"></script>
<script src="{{ asset('js/jswizrd/scripts.js') }}"></script>
@show
<!-- Tahun Ajaran (Tata Usaha) -->
......@@ -116,6 +126,10 @@
$('#id-delete').val($(this).data('id'));
$('.bs-example-modal-sm3').modal('show');
});
$(document).on('click', '.Add-tahun', function() {
$('.bs-example-modal-sm1').modal('show');
});
$("#add").click(function() {
$.ajax({
......@@ -175,26 +189,96 @@
});
</script>
<!-- Untuk Ruang -->
<script type="text/javascript">
$(document).ready(
function(){
$("#klikpribadi").click(function(){
var url = $(this).attr('href');
$("#tampung").load(url);
});
$("#klikperiodik").click(function(){
var url = $(this).attr('href');
$("#tampung").load(url);
});
$("#klikprestasi").click(function(){
var url = $(this).attr('href');
$("#tampung").load(url);
});
$("#kliksekolah").click(function(){
var url = $(this).attr('href');
$("#tampung").load(url);
});
}
);
$(document).on('click', '.ubah-modal', function() {
$('#id-edit').val($(this).data('id'));
$('#kode-edit').val($(this).data('kode'));
$('#keterangan-edit').val($(this).data('keterangan'));
$('.bs-example-modal-sm2').modal('show');
});
$(document).on('click', '.hapus-modal', function() {
$('#id-delete').val($(this).data('id'));
$('.bs-example-modal-sm3').modal('show');
});
$(document).on('click', '.tambah-modal', function() {
$('.bs-example-modal-sm1').modal('show');
});
$("#addruang").click(function() {
$.ajax({
type: 'post',
url: 'ruang/store',
data: {
'_token': $('input[name=_token]').val(),
'kode': $('input[name=kode]').val(),
'keterangan': $('input[name=keterangan]').val()
},
success: function(data) {
if ((data.errors)){
$('.error').removeClass('hidden');
$('.error').text(data.errors.name);
}
else {
$('.error').remove();
$('#table').append("<tr class='item" + data.id + "'><td>" + data.id + "</td><td>" + data.kode + "</td><td>" + data.keterangan + "</td><td><button class='ubah-modal btn btn-info btn-sm' data-id='" + data.id + "' data-kode='" + data.kode + "' data-keterangan='" + data.keterangan + "'><span class='glyphicon glyphicon-edit'></span>Ubah</button> <button class='delete-modal btn btn-danger btn-sm' data-id='" + data.id + "' data-kode='" + data.kode + "'><span class='glyphicon glyphicon-trash'></span>Hapus</button></td></tr>");
toastr.success("Data Berhasil Disimpan.");
}
},
});
$('#kode').val('');
$('#keterangan').val('');
});
$("#Ubah").click(function() {
$.ajax({
type: 'post',
url: 'ruang/update',
data: {
'_token': $('input[name=_token]').val(),
'id' : $('input[name=id]').val(),
'kode': $('input[name=kode-edit]').val(),
'keterangan': $('input[name=keterangan-edit]').val()
},
success: function(data) {
$('.item' + data.id).replaceWith("<tr class='item" + data.id + "'><td>" + data.id + "</td><td>" + data.kode + "</td><td>" + data.keterangan + "</td><td><button class='ubah-modal btn btn-info btn-sm' data-id='" + data.id + "' data-kode='" + data.kode + "' data-keterangan='" + data.keterangan + "'><span class='glyphicon glyphicon-edit'></span>Ubah</button> <button class='delete-modal btn btn-danger btn-sm' data-id='" + data.id + "' data-kode='" + data.kode + "'><span class='glyphicon glyphicon-trash'></span>Hapus</button></td></tr>");
toastr.success("Data Berhasil Diubah.");
},
});
});
$("#delete").click(function() {
$.ajax({
type: 'post',
url: 'ruang/destroy',
data: {
'_token': $('input[name=_token]').val(),
'id' : $('input[name=id-delete]').val()
},
success: function(data) {
$('.item' + data.id).remove();
toastr.success("Data Berhasil Dihapus.");
}
});
});
</script>
<script type="text/javascript">
$('.addRow').on('click',function(){
addRow();
});
function addRow()
{
var tr = '<tr><td><input type="text" name="jenis_prestasi[]" class="form-control jenis_prestasi" placeholder="Jenis Prestasi"></td><td><input type="text" name="nama_prestasi[]" class="form-control nama_prestasi" placeholder="Nama Prestasi"></td><td><input type="text" name="tahun_prestasi[]" class="form-control tahun_prestasi" placeholder="Tahun Prestasi"></td><td><input type="text" name="penyelenggara" class="form-control penyelenggara" placeholder="Penyelenggara"></td><td><a href="#" class="btn btn-danger remove"><i class="glyphicon glyphicon-remove"></i></a></td></tr>';
$('tbody').append(tr);
};
$('body').delegate('.remove','click',function(){
$(this).parent().parent().remove();
});
</script>
</html>
......@@ -37,6 +37,12 @@
<p>Tahun Ajaran</p>
</a>
</li>
<li class="{{Request::segment(2) == 'ruang' ? 'active' : ''}}">
<a href="{{route('ruang.index')}}">
<i class="glyphicon glyphicon-book"></i>
<p>Ruang Ujian</p>
</a>
</li>
<li class="{{Request::segment(2) == 'akunsiswa' ? 'active' : ''}}">
<a href="{{route('akunsiswa.index')}}">
<i class="glyphicon glyphicon-book"></i>
......@@ -60,11 +66,15 @@
</a>
</li>
<li class="{{Request::segment(2) == 'pendaftar'?'active' : ''}}">
<a href="{{route('pendaftar.index')}}">
<i class="glyphicon glyphicon-pencil"></i>
<p>Daftar Online</p>
</a>
<li class="{{Request::segment(1) == '' ? 'active' : ''}}">
<a href="url(/Dashboard)" class="dropdown-toggle" data-toggle="dropdown">
<i class="glyphicon glyphicon-pencil"></i>
<p>Daftar Online</p></a>
<ul class="dropdown-menu">
<li class="{{Request::segment(2) == 'pendaftar' ? 'active' : ''}}"><a href="{{route('pendaftar.create')}}">Data Wajib</a></li>
<li class="{{Request::segment(2) == 'orangtua' ? 'active' : ''}}"><a href="{{route('orangtua.create')}}">Data Orang Tua</a></li>
<li class="{{Request::segment(2) == 'prestasi' ? 'active' : ''}}"><a href="{{route('prestasi.create')}}">Data Prestasi</a></li>
</ul>
</li>
<li class="{{Request::segment(2) == 'downloadpeng' ? 'active' : ''}}">
<a href="{{route('downloadpeng.index')}}">
......
......@@ -21,15 +21,15 @@
</thead>
<tbody>
<tr>
<td>{{$Daftar->no_pendaftar}}</td>
<td>{{$Daftar->nama}}</td>
<td>{{$Daftar->jeniskelamin}}</td>
<td>{{$Daftar->tempatlahir}}/{{$Daftar->tanggallahir}}</td>
<td>{{$Daftar->status}}</td>
<td>{{$Daftar->agama}}</td>
<td>{{$Daftar->alamat}}</td>
<td>{{$Daftar->kebutuhan_khusus}}</td>
<td>{{$Daftar->no_hp}}</td>
<td>{{@$Daftar->no_pendaftar}}</td>
<td>{{@$Daftar->nama}}</td>
<td>{{@$Daftar->jeniskelamin}}</td>
<td>{{@$Daftar->tempatlahir}}/{{@$Daftar->tanggallahir}}</td>
<td>{{@$Daftar->status}}</td>
<td>{{@$Daftar->agama}}</td>
<td>{{@$Daftar->alamat}}</td>
<td>{{@$Daftar->kebutuhan_khusus}}</td>
<td>{{@$Daftar->no_hp}}</td>
</tr>
</tbody>
</table>
......@@ -53,11 +53,11 @@
</thead>
<tbody>
<tr>
<td>{{$periodik->tinggi_badan}}</td>
<td>{{$periodik->berat_badan}}</td>
<td>{{$periodik->jarak_kesekolah}}</td>
<td>{{$periodik->waktu_tempuh}}</td>
<td>{{$periodik->jumlah_saudara}}</td>
<td>{{@$periodik->tinggi_badan}}</td>
<td>{{@$periodik->berat_badan}}</td>
<td>{{@$periodik->jarak_kesekolah}}</td>
<td>{{@$periodik->waktu_tempuh}}</td>
<td>{{@$periodik->jumlah_saudara}}</td>
</tr>
</tbody>
</table>
......@@ -76,19 +76,13 @@
<th>Nama Prestasi</th>
<th>Tahun Prestasi</th>
<th>Penyelenggara</th>
<th>Jenis Beasiswa</th>
<th>Tahun Mulai</th>
<th>Tahun Selesai</th>
</thead>
<tbody>
<tr>
<td>{{$prestasi->jenis_prestasi}}</td>
<td>{{$prestasi->nama_prestasi}}</td>
<td>{{$prestasi->tahun_prestasi}}</td>
<td>{{$prestasi->penyelenggara}}</td>
<td>{{$prestasi->jenis_beasiswa}}</td>
<td>{{$prestasi->tahun_mulai}}</td>
<td>{{$prestasi->tahun_selesai}}</td>
<td>{{@$prestasi->jenis_prestasi}}</td>
<td>{{@$prestasi->nama_prestasi}}</td>
<td>{{@$prestasi->tahun_prestasi}}</td>
<td>{{@$prestasi->penyelenggara}}</td>
</tr>
</tbody>
</table>
......@@ -114,17 +108,18 @@
</thead>
<tbody>
<tr>
<td>{{$asal_sekolah->nama_sekolah}}</td>
<td>{{$asal_sekolah->alamat_sekolah}}</td>
<td>{{$asal_sekolah->nisn}}</td>
<td>{{$asal_sekolah->nik}}</td>
<td>{{$asal_sekolah->no_ijazah}}</td>
<td>{{$asal_sekolah->no_skhun}}</td>
<td>{{$asal_sekolah->no_ujiannasional}}</td>
<td>{{@$asal_sekolah->nama_sekolah}}</td>
<td>{{@$asal_sekolah->alamat_sekolah}}</td>
<td>{{@$asal_sekolah->nisn}}</td>
<td>{{@$asal_sekolah->nik}}</td>
<td>{{@$asal_sekolah->no_ijazah}}</td>
<td>{{@$asal_sekolah->no_skhun}}</td>
<td>{{@$asal_sekolah->no_ujiannasional}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<a href="{{route('Daftar.index')}}" class="btn btn-info pull-left btn-sm"> Kembali</a><br>
@endsection
\ No newline at end of file
......@@ -30,9 +30,9 @@
<input type="hidden" name="_method" value="delete">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<a href="{{ route('Daftar.edit',$pen->id)}}" class="btn btn-info pull-right btn-sm"><span class="glyphicon glyphicon-edit"></span> Update</a>
<button type="submit" class="btn btn-info pull-right btn-sm" onclick="return confirm('are you sure to delete?')" name="name" ><span class="glyphicon glyphicon-trash">Hapus</button>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<a href="{{ route('Daftar.show',$pen->id)}}" class="btn btn-info pull-right btn-sm"><span class="glyphicon glyphicon-list"></span> Detail</a>
<input type="hidden" name="name"><a class="btn btn btn-danger btn-sm" onclick="return confirm('are you sure to delete?')" ><span class="glyphicon glyphicon-trash"></span> Hapus</a>
</form>
</td>
</tr>
......
@extends('layouts.Layout')
@section('content')
<div class="col-md-12">
<div class="card">
<div class="header">
<h3>Denah Ruangan Sekolah</h3>
</div>
<div class="panel-body">
@if(Session::has('alert-success'))
<div class="alert alert-success">
{{ Session::get('alert-success') }}
</div>
@endif
<div class="tab-content">
<div class="tab-pane" id="tab1">
<center><img class="img" src="{{asset('img/Denahv1.jpg')}}" /></center>
</div>
</div>
<div class="content table-responsive table-full-width" >
<button class="btn btn-info pull-left btn-sm"><a href="#tab1" data-toggle="tab"><span class="glyphicon glyphicon-check"></span> Lihat Denah</a></button>
<button class="tambah-modal btn btn-info pull-right btn-sm"><span class="glyphicon glyphicon-plus"></span> Tambah Data</button><br><br>
<table class="table table-striped" id="table">
<tr>
<th>ID</th>
<th>Kode</th>
<th>Keterangan</th>
<th>Action</th>
</tr>
@foreach($ruang as $rua)
<tr class="item{{$rua->id}}">
<td>{{$rua->id}}</td>
<td>{{$rua->kode}}</td>
<td>{{$rua->keterangan}}</td>
<td>
<button class="ubah-modal btn btn-info btn-sm" data-id="{{$rua->id}}" data-kode="{{$rua->kode}}" data-keterangan="{{$rua->keterangan}}"><span class="glyphicon glyphicon-edit"></span> Ubah</button>
<button class="hapus-modal btn btn-danger btn-sm" data-id="{{$rua->id}}"><span class="glyphicon glyphicon-trash"></span> Delete</button>
</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
</div>
@endsection
<div class="modal fade bs-example-modal-sm1" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Tambah Data</h4>
</div>
<div class="modal-body">
<div class="form-group">
{{ csrf_field() }}
<input type="text" name="kode" id="kode" class="form-control" placeholder="Kode">
</div>
<div class="form-group">
<input type="text" name="keterangan" id="keterangan" class="form-control" placeholder="Keterangan">
</div>
<div class="form-group" align="right">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" id="addruang" class="btn btn-primary" data-dismiss="modal">Simpan</button>
</div>
</div>
</div>
</div>
</div>
<!-- Edit modal -->
<div class="modal fade bs-example-modal-sm2" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Ubah Data</h4>
</div>
<div class="modal-body">
<div class="form-group">
{{ csrf_field() }}
<input type="hidden" name="id" id="id-edit">
<input type="text" name="kode-edit" id="kode-edit" class="form-control" placeholder="Kode">
</div>
<div class="form-group">
<input type="text" name="keterangan-edit" id="keterangan-edit" class="form-control" placeholder="Keterangan">
</div>
<div class="form-group" align="right">
<button type="button" id="Ubah" class="btn btn-primary" data-dismiss="modal">Ubah</button>
</div>
</div>
</div>
</div>
</div>
<!-- Delete modal -->
<div class="modal fade bs-example-modal-sm3" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Delete Data</h4>
</div>
<div class="modal-body">
<div class="form-group">
{{ csrf_field() }}
<input type="hidden" name="id-delete" id="id-delete">
<p>Yakin Ingin Menghapus Data? </p>
</div>
<div class="form-group" align="right">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" id="delete" class="btn btn-danger" data-dismiss="modal">Delete</button>
</div>
</div>
</div>
</div>
</div>
......@@ -13,7 +13,7 @@
</div>
@endif
<div class="content table-responsive table-full-width" >
<button type="button" class="btn btn-info pull-right btn-sm" data-toggle="modal" data-target=".bs-example-modal-sm1"><span class="glyphicon glyphicon-plus"></span>Tambah Data</button><br><br>
<button type="button" class="Add-tahun btn btn-info pull-right btn-sm" ><span class="glyphicon glyphicon-plus"></span>Tambah Data</button><br><br>
<table class="table table-striped" id="table">
<tr>
<th>ID</th>
......@@ -29,6 +29,9 @@
<td>
<button class="update-modal btn btn-info btn-sm" data-id="{{$thn->id}}" data-kode="{{$thn->kode}}" data-keterangan="{{$thn->keterangan}}"><span class="glyphicon glyphicon-edit"></span> Ubah</button>
<button class="delete-modal btn btn-danger btn-sm" data-id="{{$thn->id}}"><span class="glyphicon glyphicon-trash"></span> Delete</button>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<a href="{{ route('tahunajaran.show',$thn->id)}}" class="btn btn-info pull-right btn-sm"><span class="glyphicon glyphicon-list"></span> Lihat Daftar Pendaftar</a>
</td>
</tr>
@endforeach
......@@ -44,7 +47,8 @@
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title">Ubah Data</h4>
</div>
<div class="modal-body">
......
......@@ -15,7 +15,7 @@
@if(Session::has('error'))
<p>{!! Session::get('error') !!}</p>
@endif
<div class="row">
<div class="row">
<div class="col-md-5">
<div class="form-group @if($errors->has('judul')) has-error @endif">
<label>Judul</label>
......@@ -26,14 +26,16 @@
<div class="col-md-5">
<div class="form-group @if($errors->has('jenis')) has-error @endif">
<label>Jenis</label>
<select type="text" class="form-control border-input" value="{{old('jenis')}}" name="jenis">
<option>Syarat</option>
<select type="textarea" class="form-control border-input" value="{{old('jenis')}}" name="jenis">
<option>Pengumuman</option>
<option>Soal</option>
</select>
<span id="helpBlock2" class="help-block">{{$errors->first('jenis')}}</span>
</div>
</div>
<div class="col-md-5">
</div>
<div class="row">
<div class="col-lg-20">
<div class="form-group @if($errors->has('keterangan')) has-error @endif">
<label>Keterangan</label>
<textarea id="textarea" type="textarea" class="form-control border-input" value="{{old('keterangan')}}" name="keterangan"></textarea>
......@@ -42,7 +44,7 @@
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-info"><span class="glyphicon glyphicon-upload"></span>Upload</button>
<button type="submit" class="btn btn-info"><span class="glyphicon glyphicon-upload"></span>Unggah</button>
</div>
......@@ -69,9 +71,9 @@
<input class="w3-btn" type="hidden" name="_method" value="delete">
<input class="w3-btn" type="hidden" name="_token" value="{{ csrf_token() }}">
<a href="uploads/{{$upload->original_filename}}" download="{{$upload->filename}}">
<button type="button" class="btn btn-primary"><i class="glyphicon glyphicon-download">Download</i></button>
<button type="button" class="btn btn-primary"><i class="glyphicon glyphicon-download"> Download</i></button>
</a>
<button class="delete-modal btn btn-danger" onclick="return confirm('Are you sure to delete this data');" ><span class="glyphicon glyphicon-trash"></span>Delete</button>
<button class="delete-modal btn btn-danger" onclick="return confirm('Are you sure to delete this data');" ><span class="glyphicon glyphicon-trash"></span> Hapus</button>
</form>
</td>
</tr>
......
......@@ -66,6 +66,12 @@ Route::group(['namespace' => 'tatausaha','prefix' => 'tatausaha','middleware' =>
Route::post('tahunajaran/update', 'T_ajarController@update');
Route::post('tahunajaran/destroy', 'T_ajarController@destroy');
Route::resource('ruang','RuangController');
Route::post('ruang/store', 'RuangController@store');
Route::post('ruang/update', 'RuangController@update');
Route::post('ruang/destroy', 'RuangController@destroy');
});
//route untuk calonsiswa
......@@ -78,14 +84,16 @@ Route::group(['namespace' => 'calonsiswa','prefix' => 'calonsiswa','middleware'
Route::resource('Data','PendaftarController');
Route::resource('hasilujian','PendaftarController@hasilujian');
Route::resource('orangtua','OrangTuaController');
Route::post('orangtua/storewali','OrangTuaController@storewali');
Route::resource('prestasi','PrestasiController');
Route::resource('periodik','PeriodikController');
Route::resource('asalsekolah','AsalsekolahCtrl');
Route::resource('downloadpeng','UploadsController@indexpeng');
Route::resource('downloadsoal','UploadsController@indexsoal');
Route::resource('pdf','PDFController@index');
Route::resource('getPDF','PDFController@getPDF');
Route::resource('getPDF/kartu','PDFController@getPDF');
Route::resource('getPDF','PDFController');
Route::post('/prestasi/create',array('as' => 'create','uses'=>'PrestasiController@insert'));
});
......
......@@ -9,10 +9,10 @@ return array(
'Cpdf' => $vendorDir . '/dompdf/dompdf/lib/Cpdf.php',
'CreateOrangtuaTable' => $baseDir . '/database/migrations/2017_05_03_141806_create_orangtua_table.php',
'CreatePasswordResetsTable' => $baseDir . '/database/migrations/2014_10_12_100000_create_password_resets_table.php',
'CreatePengumumanTable' => $baseDir . '/database/migrations/2017_05_04_071145_create_pengumuman_table.php',
'CreatePengumumansTable' => $baseDir . '/database/migrations/2017_05_18_094250_create_pengumumans_table.php',
'CreatePeriodiksTable' => $baseDir . '/database/migrations/2017_05_06_164337_create_periodiks_table.php',
'CreatePrestasisTable' => $baseDir . '/database/migrations/2017_05_06_170228_create_prestasis_table.php',
'CreateRuangTable' => $baseDir . '/database/migrations/2017_05_19_094255_create_ruang_table.php',
'CreateTableAsalsekolah' => $baseDir . '/database/migrations/2017_05_06_170756_create_table_asalsekolah.php',
'CreateTablePribadi' => $baseDir . '/database/migrations/2017_05_17_020516_create_table_pribadi.php',
'CreateTahunajaranMigrate' => $baseDir . '/database/migrations/2017_05_10_014142_create_tahunajaran_migrate.php',
......
......@@ -314,10 +314,10 @@ class ComposerStaticInit85d5f4a217e7a43721994e9a0fbb9b99
'Cpdf' => __DIR__ . '/..' . '/dompdf/dompdf/lib/Cpdf.php',
'CreateOrangtuaTable' => __DIR__ . '/../..' . '/database/migrations/2017_05_03_141806_create_orangtua_table.php',
'CreatePasswordResetsTable' => __DIR__ . '/../..' . '/database/migrations/2014_10_12_100000_create_password_resets_table.php',
'CreatePengumumanTable' => __DIR__ . '/../..' . '/database/migrations/2017_05_04_071145_create_pengumuman_table.php',
'CreatePengumumansTable' => __DIR__ . '/../..' . '/database/migrations/2017_05_18_094250_create_pengumumans_table.php',
'CreatePeriodiksTable' => __DIR__ . '/../..' . '/database/migrations/2017_05_06_164337_create_periodiks_table.php',
'CreatePrestasisTable' => __DIR__ . '/../..' . '/database/migrations/2017_05_06_170228_create_prestasis_table.php',
'CreateRuangTable' => __DIR__ . '/../..' . '/database/migrations/2017_05_19_094255_create_ruang_table.php',
'CreateTableAsalsekolah' => __DIR__ . '/../..' . '/database/migrations/2017_05_06_170756_create_table_asalsekolah.php',
'CreateTablePribadi' => __DIR__ . '/../..' . '/database/migrations/2017_05_17_020516_create_table_pribadi.php',
'CreateTahunajaranMigrate' => __DIR__ . '/../..' . '/database/migrations/2017_05_10_014142_create_tahunajaran_migrate.php',
......
vendor/
composer.lock
phpunit.xml
CHANGELOG
=========
3.0.0
-----
* The method `getListenerPriority($eventName, $listener)` has been added to the
`EventDispatcherInterface`.
* The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()`
and `Event::getName()` have been removed.
The event dispatcher and the event name are passed to the listener call.
2.5.0
-----
* added Debug\TraceableEventDispatcher (originally in HttpKernel)
* changed Debug\TraceableEventDispatcherInterface to extend EventDispatcherInterface
* added RegisterListenersPass (originally in HttpKernel)
2.1.0
-----
* added TraceableEventDispatcherInterface
* added ContainerAwareEventDispatcher
* added a reference to the EventDispatcher on the Event
* added a reference to the Event name on the event
* added fluid interface to the dispatch() method which now returns the Event
object
* added GenericEvent event class
* added the possibility for subscribers to subscribe several times for the
same event
* added ImmutableEventDispatcher
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\EventDispatcher;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Lazily loads listeners and subscribers from the dependency injection
* container.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Bernhard Schussek <bschussek@gmail.com>
* @author Jordan Alliot <jordan.alliot@gmail.com>
*/
class ContainerAwareEventDispatcher extends EventDispatcher
{
/**
* The container from where services are loaded.
*
* @var ContainerInterface
*/
private $container;
/**
* The service IDs of the event listeners and subscribers.
*
* @var array
*/
private $listenerIds = array();
/**
* The services registered as listeners.
*
* @var array
*/
private $listeners = array();
/**
* Constructor.
*
* @param ContainerInterface $container A ContainerInterface instance
*/
public function __construct(ContainerInterface $container)
{
$this->container = $container;
}
/**
* Adds a service as event listener.
*
* @param string $eventName Event for which the listener is added
* @param array $callback The service ID of the listener service & the method
* name that has to be called
* @param int $priority The higher this value, the earlier an event listener
* will be triggered in the chain.
* Defaults to 0.
*
* @throws \InvalidArgumentException
*/
public function addListenerService($eventName, $callback, $priority = 0)
{
if (!is_array($callback) || 2 !== count($callback)) {
throw new \InvalidArgumentException('Expected an array("service", "method") argument');
}
$this->listenerIds[$eventName][] = array($callback[0], $callback[1], $priority);
}
public function removeListener($eventName, $listener)
{
$this->lazyLoad($eventName);
if (isset($this->listenerIds[$eventName])) {
foreach ($this->listenerIds[$eventName] as $i => list($serviceId, $method, $priority)) {
$key = $serviceId.'.'.$method;
if (isset($this->listeners[$eventName][$key]) && $listener === array($this->listeners[$eventName][$key], $method)) {
unset($this->listeners[$eventName][$key]);
if (empty($this->listeners[$eventName])) {
unset($this->listeners[$eventName]);
}
unset($this->listenerIds[$eventName][$i]);
if (empty($this->listenerIds[$eventName])) {
unset($this->listenerIds[$eventName]);
}
}
}
}
parent::removeListener($eventName, $listener);
}
/**
* {@inheritdoc}
*/
public function hasListeners($eventName = null)
{
if (null === $eventName) {
return (bool) count($this->listenerIds) || (bool) count($this->listeners);
}
if (isset($this->listenerIds[$eventName])) {
return true;
}
return parent::hasListeners($eventName);
}
/**
* {@inheritdoc}
*/
public function getListeners($eventName = null)
{
if (null === $eventName) {
foreach ($this->listenerIds as $serviceEventName => $args) {
$this->lazyLoad($serviceEventName);
}
} else {
$this->lazyLoad($eventName);
}
return parent::getListeners($eventName);
}
/**
* {@inheritdoc}
*/
public function getListenerPriority($eventName, $listener)
{
$this->lazyLoad($eventName);
return parent::getListenerPriority($eventName, $listener);
}
/**
* Adds a service as event subscriber.
*
* @param string $serviceId The service ID of the subscriber service
* @param string $class The service's class name (which must implement EventSubscriberInterface)
*/
public function addSubscriberService($serviceId, $class)
{
foreach ($class::getSubscribedEvents() as $eventName => $params) {
if (is_string($params)) {
$this->listenerIds[$eventName][] = array($serviceId, $params, 0);
} elseif (is_string($params[0])) {
$this->listenerIds[$eventName][] = array($serviceId, $params[0], isset($params[1]) ? $params[1] : 0);
} else {
foreach ($params as $listener) {
$this->listenerIds[$eventName][] = array($serviceId, $listener[0], isset($listener[1]) ? $listener[1] : 0);
}
}
}
}
public function getContainer()
{
return $this->container;
}
/**
* Lazily loads listeners for this event from the dependency injection
* container.
*
* @param string $eventName The name of the event to dispatch. The name of
* the event is the name of the method that is
* invoked on listeners.
*/
protected function lazyLoad($eventName)
{
if (isset($this->listenerIds[$eventName])) {
foreach ($this->listenerIds[$eventName] as list($serviceId, $method, $priority)) {
$listener = $this->container->get($serviceId);
$key = $serviceId.'.'.$method;
if (!isset($this->listeners[$eventName][$key])) {
$this->addListener($eventName, array($listener, $method), $priority);
} elseif ($listener !== $this->listeners[$eventName][$key]) {
parent::removeListener($eventName, array($this->listeners[$eventName][$key], $method));
$this->addListener($eventName, array($listener, $method), $priority);
}
$this->listeners[$eventName][$key] = $listener;
}
}
}
}
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\EventDispatcher\Debug;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
interface TraceableEventDispatcherInterface extends EventDispatcherInterface
{
/**
* Gets the called listeners.
*
* @return array An array of called listeners
*/
public function getCalledListeners();
/**
* Gets the not called listeners.
*
* @return array An array of not called listeners
*/
public function getNotCalledListeners();
}
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\EventDispatcher\Debug;
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\VarDumper\Caster\ClassStub;
use Symfony\Component\VarDumper\Cloner\VarCloner;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
class WrappedListener
{
private $listener;
private $name;
private $called;
private $stoppedPropagation;
private $stopwatch;
private $dispatcher;
private $pretty;
private $data;
private static $cloner;
public function __construct($listener, $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null)
{
$this->listener = $listener;
$this->name = $name;
$this->stopwatch = $stopwatch;
$this->dispatcher = $dispatcher;
$this->called = false;
$this->stoppedPropagation = false;
if (is_array($listener)) {
$this->name = is_object($listener[0]) ? get_class($listener[0]) : $listener[0];
$this->pretty = $this->name.'::'.$listener[1];
} elseif ($listener instanceof \Closure) {
$this->pretty = $this->name = 'closure';
} elseif (is_string($listener)) {
$this->pretty = $this->name = $listener;
} else {
$this->name = get_class($listener);
$this->pretty = $this->name.'::__invoke';
}
if (null !== $name) {
$this->name = $name;
}
if (null === self::$cloner) {
self::$cloner = class_exists(ClassStub::class) ? new VarCloner() : false;
}
}
public function getWrappedListener()
{
return $this->listener;
}
public function wasCalled()
{
return $this->called;
}
public function stoppedPropagation()
{
return $this->stoppedPropagation;
}
public function getPretty()
{
return $this->pretty;
}
public function getInfo($eventName)
{
if (null === $this->data) {
$this->data = false !== self::$cloner ? self::$cloner->cloneVar(array(new ClassStub($this->pretty.'()', $this->listener)))->seek(0) : $this->pretty;
}
return array(
'event' => $eventName,
'priority' => null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null,
'pretty' => $this->pretty,
'data' => $this->data,
);
}
public function __invoke(Event $event, $eventName, EventDispatcherInterface $dispatcher)
{
$this->called = true;
$e = $this->stopwatch->start($this->name, 'event_listener');
call_user_func($this->listener, $event, $eventName, $this->dispatcher ?: $dispatcher);
if ($e->isStarted()) {
$e->stop();
}
if ($event->isPropagationStopped()) {
$this->stoppedPropagation = true;
}
}
}
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\EventDispatcher\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
/**
* Compiler pass to register tagged services for an event dispatcher.
*/
class RegisterListenersPass implements CompilerPassInterface
{
/**
* @var string
*/
protected $dispatcherService;
/**
* @var string
*/
protected $listenerTag;
/**
* @var string
*/
protected $subscriberTag;
/**
* Constructor.
*
* @param string $dispatcherService Service name of the event dispatcher in processed container
* @param string $listenerTag Tag name used for listener
* @param string $subscriberTag Tag name used for subscribers
*/
public function __construct($dispatcherService = 'event_dispatcher', $listenerTag = 'kernel.event_listener', $subscriberTag = 'kernel.event_subscriber')
{
$this->dispatcherService = $dispatcherService;
$this->listenerTag = $listenerTag;
$this->subscriberTag = $subscriberTag;
}
public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) {
return;
}
$definition = $container->findDefinition($this->dispatcherService);
foreach ($container->findTaggedServiceIds($this->listenerTag) as $id => $events) {
$def = $container->getDefinition($id);
if (!$def->isPublic()) {
throw new InvalidArgumentException(sprintf('The service "%s" must be public as event listeners are lazy-loaded.', $id));
}
if ($def->isAbstract()) {
throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as event listeners are lazy-loaded.', $id));
}
foreach ($events as $event) {
$priority = isset($event['priority']) ? $event['priority'] : 0;
if (!isset($event['event'])) {
throw new InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag));
}
if (!isset($event['method'])) {
$event['method'] = 'on'.preg_replace_callback(array(
'/(?<=\b)[a-z]/i',
'/[^a-z0-9]/i',
), function ($matches) { return strtoupper($matches[0]); }, $event['event']);
$event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']);
}
$definition->addMethodCall('addListenerService', array($event['event'], array($id, $event['method']), $priority));
}
}
foreach ($container->findTaggedServiceIds($this->subscriberTag) as $id => $attributes) {
$def = $container->getDefinition($id);
if (!$def->isPublic()) {
throw new InvalidArgumentException(sprintf('The service "%s" must be public as event subscribers are lazy-loaded.', $id));
}
if ($def->isAbstract()) {
throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as event subscribers are lazy-loaded.', $id));
}
// We must assume that the class value has been correctly filled, even if the service is created by a factory
$class = $container->getParameterBag()->resolveValue($def->getClass());
$interface = 'Symfony\Component\EventDispatcher\EventSubscriberInterface';
if (!is_subclass_of($class, $interface)) {
if (!class_exists($class, false)) {
throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
}
throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface));
}
$definition->addMethodCall('addSubscriberService', array($id, $class));
}
}
}
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\EventDispatcher;
/**
* Event is the base class for classes containing event data.
*
* This class contains no event data. It is used by events that do not pass
* state information to an event handler when an event is raised.
*
* You can call the method stopPropagation() to abort the execution of
* further listeners in your event listener.
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class Event
{
/**
* @var bool Whether no further event listeners should be triggered
*/
private $propagationStopped = false;
/**
* Returns whether further event listeners should be triggered.
*
* @see Event::stopPropagation()
*
* @return bool Whether propagation was already stopped for this event
*/
public function isPropagationStopped()
{
return $this->propagationStopped;
}
/**
* Stops the propagation of the event to further event listeners.
*
* If multiple event listeners are connected to the same event, no
* further event listener will be triggered once any trigger calls
* stopPropagation().
*/
public function stopPropagation()
{
$this->propagationStopped = true;
}
}
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\EventDispatcher;
/**
* The EventDispatcherInterface is the central point of Symfony's event listener system.
*
* Listeners are registered on the manager and events are dispatched through the
* manager.
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Bernhard Schussek <bschussek@gmail.com>
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @author Jordan Alliot <jordan.alliot@gmail.com>
*/
class EventDispatcher implements EventDispatcherInterface
{
private $listeners = array();
private $sorted = array();
/**
* {@inheritdoc}
*/
public function dispatch($eventName, Event $event = null)
{
if (null === $event) {
$event = new Event();
}
if ($listeners = $this->getListeners($eventName)) {
$this->doDispatch($listeners, $eventName, $event);
}
return $event;
}
/**
* {@inheritdoc}
*/
public function getListeners($eventName = null)
{
if (null !== $eventName) {
if (!isset($this->listeners[$eventName])) {
return array();
}
if (!isset($this->sorted[$eventName])) {
$this->sortListeners($eventName);
}
return $this->sorted[$eventName];
}
foreach ($this->listeners as $eventName => $eventListeners) {
if (!isset($this->sorted[$eventName])) {
$this->sortListeners($eventName);
}
}
return array_filter($this->sorted);
}
/**
* {@inheritdoc}
*/
public function getListenerPriority($eventName, $listener)
{
if (!isset($this->listeners[$eventName])) {
return;
}
foreach ($this->listeners[$eventName] as $priority => $listeners) {
if (false !== in_array($listener, $listeners, true)) {
return $priority;
}
}
}
/**
* {@inheritdoc}
*/
public function hasListeners($eventName = null)
{
return (bool) $this->getListeners($eventName);
}
/**
* {@inheritdoc}
*/
public function addListener($eventName, $listener, $priority = 0)
{
$this->listeners[$eventName][$priority][] = $listener;
unset($this->sorted[$eventName]);
}
/**
* {@inheritdoc}
*/
public function removeListener($eventName, $listener)
{
if (!isset($this->listeners[$eventName])) {
return;
}
foreach ($this->listeners[$eventName] as $priority => $listeners) {
if (false !== ($key = array_search($listener, $listeners, true))) {
unset($this->listeners[$eventName][$priority][$key], $this->sorted[$eventName]);
}
}
}
/**
* {@inheritdoc}
*/
public function addSubscriber(EventSubscriberInterface $subscriber)
{
foreach ($subscriber->getSubscribedEvents() as $eventName => $params) {
if (is_string($params)) {
$this->addListener($eventName, array($subscriber, $params));
} elseif (is_string($params[0])) {
$this->addListener($eventName, array($subscriber, $params[0]), isset($params[1]) ? $params[1] : 0);
} else {
foreach ($params as $listener) {
$this->addListener($eventName, array($subscriber, $listener[0]), isset($listener[1]) ? $listener[1] : 0);
}
}
}
}
/**
* {@inheritdoc}
*/
public function removeSubscriber(EventSubscriberInterface $subscriber)
{
foreach ($subscriber->getSubscribedEvents() as $eventName => $params) {
if (is_array($params) && is_array($params[0])) {
foreach ($params as $listener) {
$this->removeListener($eventName, array($subscriber, $listener[0]));
}
} else {
$this->removeListener($eventName, array($subscriber, is_string($params) ? $params : $params[0]));
}
}
}
/**
* Triggers the listeners of an event.
*
* This method can be overridden to add functionality that is executed
* for each listener.
*
* @param callable[] $listeners The event listeners
* @param string $eventName The name of the event to dispatch
* @param Event $event The event object to pass to the event handlers/listeners
*/
protected function doDispatch($listeners, $eventName, Event $event)
{
foreach ($listeners as $listener) {
if ($event->isPropagationStopped()) {
break;
}
call_user_func($listener, $event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
*
* @param string $eventName The name of the event
*/
private function sortListeners($eventName)
{
krsort($this->listeners[$eventName]);
$this->sorted[$eventName] = call_user_func_array('array_merge', $this->listeners[$eventName]);
}
}
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\EventDispatcher;
/**
* The EventDispatcherInterface is the central point of Symfony's event listener system.
* Listeners are registered on the manager and events are dispatched through the
* manager.
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface EventDispatcherInterface
{
/**
* Dispatches an event to all registered listeners.
*
* @param string $eventName The name of the event to dispatch. The name of
* the event is the name of the method that is
* invoked on listeners.
* @param Event $event The event to pass to the event handlers/listeners
* If not supplied, an empty Event instance is created.
*
* @return Event
*/
public function dispatch($eventName, Event $event = null);
/**
* Adds an event listener that listens on the specified events.
*
* @param string $eventName The event to listen on
* @param callable $listener The listener
* @param int $priority The higher this value, the earlier an event
* listener will be triggered in the chain (defaults to 0)
*/
public function addListener($eventName, $listener, $priority = 0);
/**
* Adds an event subscriber.
*
* The subscriber is asked for all the events he is
* interested in and added as a listener for these events.
*
* @param EventSubscriberInterface $subscriber The subscriber
*/
public function addSubscriber(EventSubscriberInterface $subscriber);
/**
* Removes an event listener from the specified events.
*
* @param string $eventName The event to remove a listener from
* @param callable $listener The listener to remove
*/
public function removeListener($eventName, $listener);
/**
* Removes an event subscriber.
*
* @param EventSubscriberInterface $subscriber The subscriber
*/
public function removeSubscriber(EventSubscriberInterface $subscriber);
/**
* Gets the listeners of a specific event or all listeners sorted by descending priority.
*
* @param string $eventName The name of the event
*
* @return array The event listeners for the specified event, or all event listeners by event name
*/
public function getListeners($eventName = null);
/**
* Gets the listener priority for a specific event.
*
* Returns null if the event or the listener does not exist.
*
* @param string $eventName The name of the event
* @param callable $listener The listener
*
* @return int|null The event listener priority
*/
public function getListenerPriority($eventName, $listener);
/**
* Checks whether an event has any registered listeners.
*
* @param string $eventName The name of the event
*
* @return bool true if the specified event has any listeners, false otherwise
*/
public function hasListeners($eventName = null);
}
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\EventDispatcher;
/**
* An EventSubscriber knows himself what events he is interested in.
* If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes
* {@link getSubscribedEvents} and registers the subscriber as a listener for all
* returned events.
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface EventSubscriberInterface
{
/**
* Returns an array of event names this subscriber wants to listen to.
*
* The array keys are event names and the value can be:
*
* * The method name to call (priority defaults to 0)
* * An array composed of the method name to call and the priority
* * An array of arrays composed of the method names to call and respective
* priorities, or 0 if unset
*
* For instance:
*
* * array('eventName' => 'methodName')
* * array('eventName' => array('methodName', $priority))
* * array('eventName' => array(array('methodName1', $priority), array('methodName2')))
*
* @return array The event names to listen to
*/
public static function getSubscribedEvents();
}
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\EventDispatcher;
/**
* Event encapsulation class.
*
* Encapsulates events thus decoupling the observer from the subject they encapsulate.
*
* @author Drak <drak@zikula.org>
*/
class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
{
/**
* Event subject.
*
* @var mixed usually object or callable
*/
protected $subject;
/**
* Array of arguments.
*
* @var array
*/
protected $arguments;
/**
* Encapsulate an event with $subject and $args.
*
* @param mixed $subject The subject of the event, usually an object
* @param array $arguments Arguments to store in the event
*/
public function __construct($subject = null, array $arguments = array())
{
$this->subject = $subject;
$this->arguments = $arguments;
}
/**
* Getter for subject property.
*
* @return mixed $subject The observer subject
*/
public function getSubject()
{
return $this->subject;
}
/**
* Get argument by key.
*
* @param string $key Key
*
* @return mixed Contents of array key
*
* @throws \InvalidArgumentException If key is not found.
*/
public function getArgument($key)
{
if ($this->hasArgument($key)) {
return $this->arguments[$key];
}
throw new \InvalidArgumentException(sprintf('Argument "%s" not found.', $key));
}
/**
* Add argument to event.
*
* @param string $key Argument name
* @param mixed $value Value
*
* @return $this
*/
public function setArgument($key, $value)
{
$this->arguments[$key] = $value;
return $this;
}
/**
* Getter for all arguments.
*
* @return array
*/
public function getArguments()
{
return $this->arguments;
}
/**
* Set args property.
*
* @param array $args Arguments
*
* @return $this
*/
public function setArguments(array $args = array())
{
$this->arguments = $args;
return $this;
}
/**
* Has argument.
*
* @param string $key Key of arguments array
*
* @return bool
*/
public function hasArgument($key)
{
return array_key_exists($key, $this->arguments);
}
/**
* ArrayAccess for argument getter.
*
* @param string $key Array key
*
* @return mixed
*
* @throws \InvalidArgumentException If key does not exist in $this->args.
*/
public function offsetGet($key)
{
return $this->getArgument($key);
}
/**
* ArrayAccess for argument setter.
*
* @param string $key Array key to set
* @param mixed $value Value
*/
public function offsetSet($key, $value)
{
$this->setArgument($key, $value);
}
/**
* ArrayAccess for unset argument.
*
* @param string $key Array key
*/
public function offsetUnset($key)
{
if ($this->hasArgument($key)) {
unset($this->arguments[$key]);
}
}
/**
* ArrayAccess has argument.
*
* @param string $key Array key
*
* @return bool
*/
public function offsetExists($key)
{
return $this->hasArgument($key);
}
/**
* IteratorAggregate for iterating over the object like an array.
*
* @return \ArrayIterator
*/
public function getIterator()
{
return new \ArrayIterator($this->arguments);
}
}
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\EventDispatcher;
/**
* A read-only proxy for an event dispatcher.
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class ImmutableEventDispatcher implements EventDispatcherInterface
{
/**
* The proxied dispatcher.
*
* @var EventDispatcherInterface
*/
private $dispatcher;
/**
* Creates an unmodifiable proxy for an event dispatcher.
*
* @param EventDispatcherInterface $dispatcher The proxied event dispatcher
*/
public function __construct(EventDispatcherInterface $dispatcher)
{
$this->dispatcher = $dispatcher;
}
/**
* {@inheritdoc}
*/
public function dispatch($eventName, Event $event = null)
{
return $this->dispatcher->dispatch($eventName, $event);
}
/**
* {@inheritdoc}
*/
public function addListener($eventName, $listener, $priority = 0)
{
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}
/**
* {@inheritdoc}
*/
public function addSubscriber(EventSubscriberInterface $subscriber)
{
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}
/**
* {@inheritdoc}
*/
public function removeListener($eventName, $listener)
{
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}
/**
* {@inheritdoc}
*/
public function removeSubscriber(EventSubscriberInterface $subscriber)
{
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}
/**
* {@inheritdoc}
*/
public function getListeners($eventName = null)
{
return $this->dispatcher->getListeners($eventName);
}
/**
* {@inheritdoc}
*/
public function getListenerPriority($eventName, $listener)
{
return $this->dispatcher->getListenerPriority($eventName, $listener);
}
/**
* {@inheritdoc}
*/
public function hasListeners($eventName = null)
{
return $this->dispatcher->hasListeners($eventName);
}
}
Copyright (c) 2004-2017 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
EventDispatcher Component
=========================
The EventDispatcher component provides tools that allow your application
components to communicate with each other by dispatching events and listening to
them.
Resources
---------
* [Documentation](https://symfony.com/doc/current/components/event_dispatcher/index.html)
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\EventDispatcher\Tests;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest
{
protected function createEventDispatcher()
{
$container = new Container();
return new ContainerAwareEventDispatcher($container);
}
public function testAddAListenerService()
{
$event = new Event();
$service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock();
$service
->expects($this->once())
->method('onEvent')
->with($event)
;
$container = new Container();
$container->set('service.listener', $service);
$dispatcher = new ContainerAwareEventDispatcher($container);
$dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent'));
$dispatcher->dispatch('onEvent', $event);
}
public function testAddASubscriberService()
{
$event = new Event();
$service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\SubscriberService')->getMock();
$service
->expects($this->once())
->method('onEvent')
->with($event)
;
$service
->expects($this->once())
->method('onEventWithPriority')
->with($event)
;
$service
->expects($this->once())
->method('onEventNested')
->with($event)
;
$container = new Container();
$container->set('service.subscriber', $service);
$dispatcher = new ContainerAwareEventDispatcher($container);
$dispatcher->addSubscriberService('service.subscriber', 'Symfony\Component\EventDispatcher\Tests\SubscriberService');
$dispatcher->dispatch('onEvent', $event);
$dispatcher->dispatch('onEventWithPriority', $event);
$dispatcher->dispatch('onEventNested', $event);
}
public function testPreventDuplicateListenerService()
{
$event = new Event();
$service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock();
$service
->expects($this->once())
->method('onEvent')
->with($event)
;
$container = new Container();
$container->set('service.listener', $service);
$dispatcher = new ContainerAwareEventDispatcher($container);
$dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent'), 5);
$dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent'), 10);
$dispatcher->dispatch('onEvent', $event);
}
public function testHasListenersOnLazyLoad()
{
$event = new Event();
$service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock();
$container = new Container();
$container->set('service.listener', $service);
$dispatcher = new ContainerAwareEventDispatcher($container);
$dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent'));
$service
->expects($this->once())
->method('onEvent')
->with($event)
;
$this->assertTrue($dispatcher->hasListeners());
if ($dispatcher->hasListeners('onEvent')) {
$dispatcher->dispatch('onEvent');
}
}
public function testGetListenersOnLazyLoad()
{
$service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock();
$container = new Container();
$container->set('service.listener', $service);
$dispatcher = new ContainerAwareEventDispatcher($container);
$dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent'));
$listeners = $dispatcher->getListeners();
$this->assertTrue(isset($listeners['onEvent']));
$this->assertCount(1, $dispatcher->getListeners('onEvent'));
}
public function testRemoveAfterDispatch()
{
$service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock();
$container = new Container();
$container->set('service.listener', $service);
$dispatcher = new ContainerAwareEventDispatcher($container);
$dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent'));
$dispatcher->dispatch('onEvent', new Event());
$dispatcher->removeListener('onEvent', array($container->get('service.listener'), 'onEvent'));
$this->assertFalse($dispatcher->hasListeners('onEvent'));
}
public function testRemoveBeforeDispatch()
{
$service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock();
$container = new Container();
$container->set('service.listener', $service);
$dispatcher = new ContainerAwareEventDispatcher($container);
$dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent'));
$dispatcher->removeListener('onEvent', array($container->get('service.listener'), 'onEvent'));
$this->assertFalse($dispatcher->hasListeners('onEvent'));
}
}
class Service
{
public function onEvent(Event $e)
{
}
}
class SubscriberService implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return array(
'onEvent' => 'onEvent',
'onEventWithPriority' => array('onEventWithPriority', 10),
'onEventNested' => array(array('onEventNested')),
);
}
public function onEvent(Event $e)
{
}
public function onEventWithPriority(Event $e)
{
}
public function onEventNested(Event $e)
{
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment