Jump to content

Recommended Posts

Posted

Hi Everyone!

 

"Houston, I´ve a problem" 😁

Hello everyone! I have been working on customizing my SKIN using AdminLTE. I have a problem, because I could not change the position that the messages appear. See image!

I've tried to change the template files: core_message, core_error and core-success, but, nothing happens. Can someone help me?2020-02-26_LI.jpg

Posted (edited)
2 hours ago, Nascoli said:

Hi Everyone!

 

"Houston, I´ve a problem" 😁

Hello everyone! I have been working on customizing my SKIN using AdminLTE. I have a problem, because I could not change the position that the messages appear. See image!

I've tried to change the template files: core_message, core_error and core-success, but, nothing happens. Can someone help me?2020-02-26_LI.jpg

 

 

Hi, same skin. I solved it with a modal window. This is the file (core_message.php) here is my code and it works perfectly. Try it and see if it works. Of course, adapt it to your skin

 

<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>

<script type="text/javascript">
    $(window).load(function(){
        $('#message').modal('show');
    });
</script>
<?php
echo '<div id="message" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <!-- Modal Header -->
            <div class="modal-header text-center">
                <h2 class="modal-title"><i class="fa fa-exclamation"></i> Information</h2>
            </div>
            <!-- END Modal Header -->
            <!-- Modal Body -->
            <div class="modal-body">
                <center><p>'.$message.'</p></center>
            </div>
            <!-- END Modal Body -->
        </div>
    </div>
</div>
';
?>

try to insert it above the code

 

<form action="<?php echo url('/pireps/mine');?>" method="post">

 

<?php
                        if(isset($message))
                            echo '<div class="callout callout-warning">
                            <h4>Error</h4>
                            <p>'.$message.'</p></div>';
                    ?>

Edited by gio1961
  • Administrators
Posted

I moved your post to a new topic as it isn't directly related to phpVMS 5.5.2.72

 

Can you provide a link to the skin?

 

To move the "Fill out all of the required fields:" you can add spaces before it using &nbsp; for each space. You may need to add 5 or more spaces to get it to move to the right so all the wording is fully visible. There are probably other ways to do this also.

Posted
6 hours ago, ProAvia said:

I moved your post to a new topic as it isn't directly related to phpVMS 5.5.2.72

 

Can you provide a link to the skin?

 

To move the "Fill out all of the required fields:" you can add spaces before it using &nbsp; for each space. You may need to add 5 or more spaces to get it to move to the right so all the wording is fully visible. There are probably other ways to do this also.

 

6 hours ago, gio1961 said:

 

 

Hi, same skin. I solved it with a modal window. This is the file (core_message.php) here is my code and it works perfectly. Try it and see if it works. Of course, adapt it to your skin

 


<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>

<script type="text/javascript">
    $(window).load(function(){
        $('#message').modal('show');
    });
</script>
<?php
echo '<div id="message" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <!-- Modal Header -->
            <div class="modal-header text-center">
                <h2 class="modal-title"><i class="fa fa-exclamation"></i> Information</h2>
            </div>
            <!-- END Modal Header -->
            <!-- Modal Body -->
            <div class="modal-body">
                <center><p>'.$message.'</p></center>
            </div>
            <!-- END Modal Body -->
        </div>
    </div>
</div>
';
?>

try to insert it above the code

 

<form action="<?php echo url('/pireps/mine');?>" method="post">

 

<?php
                        if(isset($message))
                            echo '<div class="callout callout-warning">
                            <h4>Error</h4>
                            <p>'.$message.'</p></div>';
                    ?>

 

Hi ProAvia! Thanks for your answer!

So, I did what you suggested but it didn't work. I have no idea what is going on.

I think my PHPVMS is not executing the changes made to the core_message.php file.

Nothing I do changed the view!🙁

 

Regarding your question, I am customizing the AdminLTE 3.0 bootstrap template.

 

You can download it from the link below.

 

https://adminlte.io/themes/dev/AdminLTE/index.html

 

2020-02-26_LI2.jpg

  • Administrators
Posted

Looking at your first and last images, it appears that the wording has move a bit to the right. Maybe add a few more spaces (&nbsp;).

 

Just to be certain we are all looking at the same thing - the words "You must fill out all of the required fields!" are slightly further to the right in the last image compared to the first image. Another 5-10 spaces will line the "Y" in "You..." up with the icon directly below it.

 

Thanks for the link to the base skin template! 

Posted

I remember making a change to the skin a long time ago, but honestly I don't remember what I changed. If the solution comes to mind.
However this is my code and as you can see from the image the notice is placed where I wanted.

<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>
<div class="box-body">
<div class="block">
<div class="block-title">
<h4><i class="fa fa-paper-plane"></i> <strong>File</strong> Manual PIREP</h4>
</div>
                    <?php
                        if(isset($message))
                            echo '<div class="callout callout-warning">
                            <h4>Error</h4>
                            <p>'.$message.'</p></div>';
                    ?>
                    
                    <form action="<?php echo url('/pireps/mine');?>" method="post">
                        <div class="form-group">
                            <label>Pilot</label>
                            <input type="text" class="form-control" disabled placeholder="<?php echo Auth::$userinfo->firstname . ' ' . Auth::$userinfo->lastname;?>">
                        </div>
                        <div class="form-group">
                            <label>Airline</label>
                            <select name="code" id="code" class="form-control">
                                <option value="">Select airline</option>
                                <?php
                                    foreach($allairlines as $airline)
                                    {
                                        $sel = ($_POST['code'] == $airline->code || $bid->code == $airline->code)?'selected':'';
                                        echo '<option value="'.$airline->code.'" '.$sel.'>'.$airline->code.' - '.$airline->name.'</option>';
                                    }
                                ?>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Flight Number</label>
                            <input type="text" name="flightnum" class="form-control" value="<?php if(isset($bid->flightnum)) { echo $bid->flightnum; }?><?php if(isset($_POST['flightnum'])) { echo $_POST['flightnum'];} ?>">
                        </div>
                        <div class="form-group">
                            <label>Departure Airport</label>
                            <select id="depicao" name="depicao" class="form-control">
                                <option value="">Select departure airport</option>
                                <?php
                                    foreach($allairports as $airport)
                                    {
                                        $sel = ($_POST['depicao'] == $airport->icao || $bid->depicao == $airport->icao)?'selected':'';
                                        echo '<option value="'.$airport->icao.'" '.$sel.'>'.$airport->icao . ' - '.$airport->name .'</option>';
                                    }
                                ?>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Arrival Airport</label>
                            <select name="arricao" id="arricao" class="form-control">
                                <option value="">Select arrival airport</option>
                                <?php
                                    foreach($allairports as $airport)
                                    {
                                        $sel = ($_POST['arricao'] == $airport->icao || $bid->arricao == $airport->icao)?'selected':'';
                                        echo '<option value="'.$airport->icao.'" '.$sel.'>'.$airport->icao . ' - '.$airport->name .'</option>';
                                    }
                                ?>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Aircraft</label>
                            <select name="aircraft" id="aircraft" class="form-control">
                                <option value="">Select aircraft</option>
                                <?php
                                    foreach($allaircraft as $aircraft)
                                    {
                                        /*	Skip any aircraft which have aircraft that the pilot
                                            is not rated to fly (according to RANK) 
                                        */
                                        if(Config::Get('RESTRICT_AIRCRAFT_RANKS') === true)
                                        {
                                            /*	This means the aircraft rank level is higher than
                                                what the pilot's ranklevel, so just do "continue"
                                                and move onto the next route in the list 
                                             */
                                            if($aircraft->ranklevel > Auth::$userinfo->ranklevel)
                                            {
                                                continue;
                                            }
                                        }
                                        $sel = ($_POST['aircraft'] == $aircraft->name || $bid->registration == $aircraft->registration)?'selected':'';
                                        echo '<option value="'.$aircraft->id.'" '.$sel.'>'.$aircraft->name.' - '.$aircraft->registration.'</option>';
                                    }
                                ?>
                            </select>
                        </div>
                        
                        <?php
                        // List all of the custom PIREP fields
                        if(!$pirepfields) $pirepfields = array();
                        foreach($pirepfields as $field)
                        {
                        ?>
                        <div class="form-group"></div>
                        <label><?php echo $field->title ?></label>
                        <?php
                        // Determine field by the type
                        if($field->type == '' || $field->type == 'text')
                        {
                        ?>
                            <input type="text" name="<?php echo $field->name ?>" value="<?php echo $_POST[$field->name] ?>" class="form-control" />
                        <?php
                        } 
                        elseif($field->type == 'textarea')
                        {
                            echo '<textarea name="'.$field->name.'" class="form-control">'.$field->values.'</textarea>';
                        }
                        elseif($field->type == 'dropdown')
                        {
                            $values = explode(',', $field->options);
                            echo '<select name="'.$field->name.'" class="form-control">';
                            foreach($values as $value)
                            {
                                $value = trim($value);
                                echo '<option value="'.$value.'">'.$value.'</option>';
                            }
                            echo '</select>';		
                        }
                        ?>
                        <?php } ?>
                        
                        <div class="form-group">
                            <label>Fuel Used</label>
                            <input type="text" name="fuelused" class="form-control" placeholder="Enter fuel used in <?php echo Config::Get('LIQUID_UNIT_NAMES', Config::Get('LiquidUnit'))?>" value="<?php echo $_POST['fuelused']; ?>" />
                            <p>This is the fuel used on this flight in <?php echo Config::Get('LIQUID_UNIT_NAMES', Config::Get('LiquidUnit'))?></p>
                        </div>
                        <div class="form-group">
                            <label>Flight Time</label>
                            <input type="text" name="flighttime" class="form-control" placeholder="Enter in format HH.MM (example 3.45 = 3 hours and 45 minutes)" value="<?php echo $_POST['flighttime'] ?>" />
                        </div>
                        <div class="form-group">
                            <label>Route</label>
                            <textarea name="route" class="form-control" style="width: 100%" placeholder="Enter the route flown, or default will be from the schedule"><?php echo (!isset($_POST['route'])) ? $bid->route : $_POST['route']; ?></textarea>
                        </div>
                        <div class="form-group">
                            <label>Comments</label>
                            <textarea name="comment" class="form-control" style="width: 100%"><?php echo $_POST['comment'] ?></textarea>
                        </div>
                        <input type="hidden" name="bid" value="<?php echo $bidid ?>" />
                        <input type="submit" name="submit_pirep" value="Submit" class="btn btn-danger btn-block btn-flat" style="width:120px;" />
                    </form>
<br />
 
</div></div>

 

PIREP.jpg

Posted
11 hours ago, ProAvia said:

Looking at your first and last images, it appears that the wording has move a bit to the right. Maybe add a few more spaces (&nbsp;).

 

Just to be certain we are all looking at the same thing - the words "You must fill out all of the required fields!" are slightly further to the right in the last image compared to the first image. Another 5-10 spaces will line the "Y" in "You..." up with the icon directly below it.

 

Thanks for the link to the base skin template! 

 

Hi,

 

 

I'm so sorry. I forgot to explain how I did it. In fact, the text is now inside the CONTAINER, but I did it by changing the LAYOUT.PHP file as shown below. However, I can't even change the layout or color of the text or anything like that.

 

/*    Auth::$userinfo has the information about the user currently logged in
        We will use this next line - this gets their full pilot id, formatted properly */

Template::Show('core_navigation.php');?>
<div class="content-wrapper">
     <?php echo $page_content;?>
</div>

Posted
9 hours ago, gio1961 said:

I remember making a change to the skin a long time ago, but honestly I don't remember what I changed. If the solution comes to mind.
However this is my code and as you can see from the image the notice is placed where I wanted.


<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>
<div class="box-body">
<div class="block">
<div class="block-title">
<h4><i class="fa fa-paper-plane"></i> <strong>File</strong> Manual PIREP</h4>
</div>
                    <?php
                        if(isset($message))
                            echo '<div class="callout callout-warning">
                            <h4>Error</h4>
                            <p>'.$message.'</p></div>';
                    ?>
                    
                    <form action="<?php echo url('/pireps/mine');?>" method="post">
                        <div class="form-group">
                            <label>Pilot</label>
                            <input type="text" class="form-control" disabled placeholder="<?php echo Auth::$userinfo->firstname . ' ' . Auth::$userinfo->lastname;?>">
                        </div>
                        <div class="form-group">
                            <label>Airline</label>
                            <select name="code" id="code" class="form-control">
                                <option value="">Select airline</option>
                                <?php
                                    foreach($allairlines as $airline)
                                    {
                                        $sel = ($_POST['code'] == $airline->code || $bid->code == $airline->code)?'selected':'';
                                        echo '<option value="'.$airline->code.'" '.$sel.'>'.$airline->code.' - '.$airline->name.'</option>';
                                    }
                                ?>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Flight Number</label>
                            <input type="text" name="flightnum" class="form-control" value="<?php if(isset($bid->flightnum)) { echo $bid->flightnum; }?><?php if(isset($_POST['flightnum'])) { echo $_POST['flightnum'];} ?>">
                        </div>
                        <div class="form-group">
                            <label>Departure Airport</label>
                            <select id="depicao" name="depicao" class="form-control">
                                <option value="">Select departure airport</option>
                                <?php
                                    foreach($allairports as $airport)
                                    {
                                        $sel = ($_POST['depicao'] == $airport->icao || $bid->depicao == $airport->icao)?'selected':'';
                                        echo '<option value="'.$airport->icao.'" '.$sel.'>'.$airport->icao . ' - '.$airport->name .'</option>';
                                    }
                                ?>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Arrival Airport</label>
                            <select name="arricao" id="arricao" class="form-control">
                                <option value="">Select arrival airport</option>
                                <?php
                                    foreach($allairports as $airport)
                                    {
                                        $sel = ($_POST['arricao'] == $airport->icao || $bid->arricao == $airport->icao)?'selected':'';
                                        echo '<option value="'.$airport->icao.'" '.$sel.'>'.$airport->icao . ' - '.$airport->name .'</option>';
                                    }
                                ?>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Aircraft</label>
                            <select name="aircraft" id="aircraft" class="form-control">
                                <option value="">Select aircraft</option>
                                <?php
                                    foreach($allaircraft as $aircraft)
                                    {
                                        /*	Skip any aircraft which have aircraft that the pilot
                                            is not rated to fly (according to RANK) 
                                        */
                                        if(Config::Get('RESTRICT_AIRCRAFT_RANKS') === true)
                                        {
                                            /*	This means the aircraft rank level is higher than
                                                what the pilot's ranklevel, so just do "continue"
                                                and move onto the next route in the list 
                                             */
                                            if($aircraft->ranklevel > Auth::$userinfo->ranklevel)
                                            {
                                                continue;
                                            }
                                        }
                                        $sel = ($_POST['aircraft'] == $aircraft->name || $bid->registration == $aircraft->registration)?'selected':'';
                                        echo '<option value="'.$aircraft->id.'" '.$sel.'>'.$aircraft->name.' - '.$aircraft->registration.'</option>';
                                    }
                                ?>
                            </select>
                        </div>
                        
                        <?php
                        // List all of the custom PIREP fields
                        if(!$pirepfields) $pirepfields = array();
                        foreach($pirepfields as $field)
                        {
                        ?>
                        <div class="form-group"></div>
                        <label><?php echo $field->title ?></label>
                        <?php
                        // Determine field by the type
                        if($field->type == '' || $field->type == 'text')
                        {
                        ?>
                            <input type="text" name="<?php echo $field->name ?>" value="<?php echo $_POST[$field->name] ?>" class="form-control" />
                        <?php
                        } 
                        elseif($field->type == 'textarea')
                        {
                            echo '<textarea name="'.$field->name.'" class="form-control">'.$field->values.'</textarea>';
                        }
                        elseif($field->type == 'dropdown')
                        {
                            $values = explode(',', $field->options);
                            echo '<select name="'.$field->name.'" class="form-control">';
                            foreach($values as $value)
                            {
                                $value = trim($value);
                                echo '<option value="'.$value.'">'.$value.'</option>';
                            }
                            echo '</select>';		
                        }
                        ?>
                        <?php } ?>
                        
                        <div class="form-group">
                            <label>Fuel Used</label>
                            <input type="text" name="fuelused" class="form-control" placeholder="Enter fuel used in <?php echo Config::Get('LIQUID_UNIT_NAMES', Config::Get('LiquidUnit'))?>" value="<?php echo $_POST['fuelused']; ?>" />
                            <p>This is the fuel used on this flight in <?php echo Config::Get('LIQUID_UNIT_NAMES', Config::Get('LiquidUnit'))?></p>
                        </div>
                        <div class="form-group">
                            <label>Flight Time</label>
                            <input type="text" name="flighttime" class="form-control" placeholder="Enter in format HH.MM (example 3.45 = 3 hours and 45 minutes)" value="<?php echo $_POST['flighttime'] ?>" />
                        </div>
                        <div class="form-group">
                            <label>Route</label>
                            <textarea name="route" class="form-control" style="width: 100%" placeholder="Enter the route flown, or default will be from the schedule"><?php echo (!isset($_POST['route'])) ? $bid->route : $_POST['route']; ?></textarea>
                        </div>
                        <div class="form-group">
                            <label>Comments</label>
                            <textarea name="comment" class="form-control" style="width: 100%"><?php echo $_POST['comment'] ?></textarea>
                        </div>
                        <input type="hidden" name="bid" value="<?php echo $bidid ?>" />
                        <input type="submit" name="submit_pirep" value="Submit" class="btn btn-danger btn-block btn-flat" style="width:120px;" />
                    </form>
<br />
 
</div></div>

 

PIREP.jpg

 

Great! 

Thank you for sending me! I'll take a look at your code and post it here if I can solve it.

Question: What is the name of the file you changed? Is this PIREP_NEW.PHP?

Posted
6 minutes ago, Nascoli said:

 

Great! 

Thank you for sending me! I'll take a look at your code and post it here if I can solve it.

Question: What is the name of the file you changed? Is this PIREP_NEW.PHP?

 

Did I edit the PIREP_NEW.PHP file?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...