コード例 #1
0
 public function run()
 {
     State::create(['name' => 'Andaman and Nicobar (AN)']);
     State::create(['name' => 'Andhra Pradesh (AP)']);
     State::create(['name' => 'Arunachal Pradesh (AR)']);
     State::create(['name' => 'Assam (AS)']);
 }
コード例 #2
0
 public function buildForm()
 {
     $states = State::lists('name', 'id')->all();
     $this->add('state_id', 'select', ['choices' => $states, 'empty_value' => '==== Select State ===', 'label' => 'State', 'attr' => ['required']]);
     $this->add('name', 'text', ['attr' => ['required', 'maxlength' => '100', 'placeholder' => 'name of the District'], 'wrapper' => ['class' => 'form-group']]);
     $this->add('save', 'submit', ['attr' => ['class' => 'btn btn-lg btn-primary col-md-12']]);
     $this->add('update', 'submit', ['attr' => ['class' => 'btn btn-lg btn-success col-md-12']]);
 }
コード例 #3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     try {
         State::destroy($id);
     } catch (QueryException $ex) {
         return Redirect::back()->with('alert-warning', 'State is in Use!');
     }
     return Redirect::route($this->route . 'index')->with('alert-success', 'Successfully Deleted!');
 }
コード例 #4
0
 public function buildForm()
 {
     $this->add('post_name', 'text', ['attr' => ['required', 'maxlength' => '255', 'placeholder' => 'name of the POST', 'title' => 'name of the position'], 'wrapper' => ['class' => 'form-group-sm col-md-5']]);
     $this->add('no_of_post', 'number', ['attr' => ['required', 'maxlength' => '3', 'placeholder' => 'no of vacancy', 'title' => 'total position vacant'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $this->add('industry_id', 'select', ['choices' => IndustryType::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'attr' => ['required'], 'label' => 'Industry :', 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('place_of_employment_state_id', 'select', ['choices' => State::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Place of Employment State', 'attr' => ['required', 'id' => 'place_of_employment_state_id'], 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $districts = ['' => '-- Select State first--'];
     $this->add('place_of_employment_district_id', 'select', ['choices' => $districts, 'label' => 'District', 'attr' => ['required', 'id' => 'place_of_employment_district_id', 'required'], 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     // ->add('some_choices', 'choices', [
     //            'choices' => $this->getData('post_choices')     // When form is created passed as ->setData('post_choices', ['some' => 'array'])
     //        ])
     $this->add('place_of_employment_city', 'text', ['attr' => ['maxlength' => '255', 'placeholder' => 'City'], 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('salary_offered_min', 'text', ['attr' => ['required', 'maxlength' => '8', 'placeholder' => 'salary offered min'], 'wrapper' => ['class' => 'form-group-sm col-md-4'], 'label' => 'Salary Offered Min. (monthly)']);
     $this->add('salary_offered_max', 'text', ['attr' => ['required', 'maxlength' => '8', 'placeholder' => 'salary offered max'], 'wrapper' => ['class' => 'form-group-sm col-md-4'], 'label' => 'Salary Offered Max. (monthly)']);
     $this->add('other_benefits', 'text', ['attr' => ['maxlength' => '8', 'placeholder' => 'salary other_benefits'], 'wrapper' => ['class' => 'form-group-sm col-md-4'], 'label' => 'Other Benefits (annual)']);
     $this->add('preferred_age_min', 'number', ['attr' => ['required', 'maxlength' => '2', 'placeholder' => 'preferred_age_min', 'min' => "15", 'max' => "99"], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $this->add('preferred_age_max', 'number', ['attr' => ['required', 'maxlength' => '2', 'placeholder' => 'preferred_age_max', 'min' => "15", 'max' => "99"], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $casts = ['ANY' => 'ANY'] + Caste::lists('name', 'id')->all();
     $this->add('preferred_caste', 'select', ['choices' => $casts, 'empty_value' => '==== Select ===', 'label' => 'Preferred Caste', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     // $relegions = ['ANY'=>'ANY','BUDDHISM'=>'BUDDHISM', 'CHRISTIANITY'=>'CHRISTIANITY','HINDUISM'=>'HINDUISM','ISLAM'=>'ISLAM',
     //     'JAINISM'=>'JAINISM','PARSI'=>'PARSI','SIKHISM'=>'SIKHISM', 'OTHERS'=>'OTHERS',
     // ];
     // $this->add('preferred_relegion', 'select', [
     //         'choices' => $relegions,
     //         'empty_value' => '==== Select ===',
     //         'label' => 'Preferred Relegion',
     //         'attr' => ['required'],
     //         'wrapper' => ['class' => 'form-group-sm col-md-3'] // Shows the wrapper default is false
     // ]);
     $job_sub_categories = ['Govt. Regular' => 'Govt. Regular', 'Govt. Contractual' => 'Govt. Contractual', 'Pvt. Regular' => 'Pvt. Regular', 'Pvt. Contractual' => 'Pvt. Contractual', 'Not Specified' => 'Not Specified'];
     $this->add('job_sub_category', 'select', ['choices' => $job_sub_categories, 'empty_value' => ' ==== Select === ', 'label' => 'Job Category', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $genders = ['ANY' => 'ANY', 'MALE' => 'MALE', 'FEMALE' => 'FEMALE', 'OTHERS' => 'OTHERS'];
     $this->add('preferred_sex', 'select', ['choices' => $genders, 'empty_value' => '==== Select ===', 'label' => 'Preferred Sex', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $job_types = ['Full Time' => 'Full Time', 'Part Time' => 'Part Time'];
     $this->add('job_type', 'select', ['choices' => $job_types, 'empty_value' => '-- Select --', 'label' => 'Job Type', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-2']]);
     $this->add('exam_passed_id', 'select', ['choices' => Exam::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Exam Passed :', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $this->add('subject_id', 'select', ['choices' => Subject::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Subject/Trade :', 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('specialization', 'text', ['attr' => ['maxlength' => '50', 'placeholder' => 'specialization'], 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('preferred_experience', 'number', ['attr' => ['maxlength' => '2', 'placeholder' => 'preferred years of expereince'], 'wrapper' => ['class' => 'form-group-sm col-md-2']]);
     $this->add('ex_service', 'select', ['choices' => ['YES' => 'YES', 'NO' => 'NO'], 'empty_value' => '--- Select ---', 'label' => 'Ex-serviceman', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $this->add('physical_challenge', 'select', ['choices' => ['YES' => 'YES', 'NO' => 'NO'], 'empty_value' => '--- Select ---', 'label' => 'Physically Challenged', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $this->add('physical_height', 'text', ['attr' => ['maxlength' => '5', 'placeholder' => 'height in cm'], 'label' => 'Physical height', 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('physical_weight', 'text', ['attr' => ['maxlength' => '5', 'placeholder' => 'weight in k.g.'], 'label' => 'Physical weight', 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('physical_chest', 'text', ['attr' => ['maxlength' => '5', 'placeholder' => ' in cm'], 'label' => 'Physical Chest', 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('description', 'textarea', ['attr' => ['maxlength' => '255', 'rows' => '3', 'placeholder' => 'additional note/details of the job'], 'wrapper' => ['class' => 'form-group col-md-12']]);
     $this->add('Submit', 'submit', ['attr' => ['class' => 'btn btn-lg btn-primary col-md-12']]);
     $this->add('update', 'submit', ['attr' => ['class' => 'btn btn-lg btn-success col-md-12']]);
 }
コード例 #5
0
 public function buildForm()
 {
     $this->add('organization_name', 'text', ['wrapper' => ['class' => 'form-group aug-form-group-sm'], 'attr' => ['required', 'maxlength' => '255', 'placeholder' => 'Organization Name', 'class' => 'form-control input-sm'], 'label' => 'Organization Name :', 'label_attr' => ['class' => 'col-sm-4 control-label', 'for' => $this->name], 'errors' => ['class' => 'has-error']]);
     $this->add('organization_type', 'select', ['choices' => Employer::$organization_type_options, 'empty_value' => '--- Select ---', 'attr' => ['required', 'class' => 'form-control input-sm'], 'label' => 'Type of Organization :']);
     $this->add('organization_sector', 'select', ['choices' => Employer::$organization_sector_options, 'empty_value' => '--- Select ---', 'attr' => ['required', 'class' => 'form-control input-sm'], 'label' => 'Organization Sector :']);
     $this->add('industry_id', 'select', ['choices' => IndustryType::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'attr' => ['required', 'class' => 'form-control input-sm'], 'label' => 'Industry :']);
     $this->add('address', 'textarea', ['attr' => ['maxlength' => '255', 'rows' => '3', 'placeholder' => 'Address details', 'required', 'class' => 'form-control input-sm'], 'label' => 'Address']);
     $states = State::lists('name', 'id')->all();
     $this->add('state_id', 'select', ['choices' => $states, 'label' => 'State', 'attr' => ['required', 'id' => 'state_id', 'class' => 'form-control input-sm']]);
     //$districts = District::lists('name', 'id')->all();
     $this->add('district_id', 'select', ['choices' => ['' => '-- Select State first--'], 'label' => 'District', 'attr' => ['required', 'id' => 'district_id', 'class' => 'form-control input-sm']]);
     $this->add('pincode', 'text', ['attr' => ['required', 'maxlength' => '6', 'placeholder' => 'Pincode', 'class' => 'form-control input-sm'], 'label' => 'Pincode']);
     $this->add('phone_no_ext', 'text', ['attr' => ['required', 'maxlength' => '5', 'style' => 'float:left;width:28%;', 'class' => 'form-control input-sm'], 'label' => 'Phone No extension']);
     $this->add('phone_no_main', 'text', ['attr' => ['required', 'maxlength' => '10', 'style' => 'float:left;width:70%;margin-left:3px;', 'class' => 'form-control input-sm'], 'label' => 'Phone No']);
     $this->add('organisation_email', 'email', ['attr' => ['required', 'maxlength' => '100', 'placeholder' => 'Organization Email', 'class' => 'form-control input-sm'], 'label' => 'Organization Email :']);
     $this->add('web_address', 'url', ['value' => 'http://www.', 'attr' => ['maxlength' => '255', 'id' => 'web_address', 'placeholder' => 'e.g. http://www.google.com', 'title' => 'it must contain http:// at the begining e.g. http://www.google.com'], 'label' => 'Organization Web Address URL :']);
     $this->add('contact_name', 'text', ['attr' => ['required', 'maxlength' => '50', 'placeholder' => 'Contact person name', 'class' => 'form-control input-sm'], 'label' => 'Contact Person name :']);
     $this->add('contact_designation', 'text', ['attr' => ['required', 'maxlength' => '50', 'placeholder' => 'Contact person designation', 'class' => 'form-control input-sm'], 'label' => 'Designation :']);
     $this->add('contact_mobile_no', 'text', ['attr' => ['required', 'maxlength' => '10', 'placeholder' => 'Contact person mobile no', 'class' => 'form-control input-sm'], 'label' => 'Mobile No :']);
     $this->add('contact_email', 'email', ['attr' => ['required', 'maxlength' => '255', 'placeholder' => 'Contact person email id', 'class' => 'form-control input-sm'], 'label' => 'E mail :']);
     $this->add('save', 'submit', ['attr' => ['class' => 'btn btn-default btn-blue btn-lg']]);
     $this->add('update', 'submit', ['attr' => ['class' => 'my_button']]);
 }